blob: fc81d01031c41f4ce5d8e672c9648108ff77578e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
if [[ ${EBUILD_PHASE} == prepare ]]; then
# workaround for Gnulib bug that affects multiple packages: gzip, wget,
# nano, etc
# https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00053.html
# https://bugs.gentoo.org/829847
# https://bugs.gentoo.org/831026
find "${S}" -name "config.h*" \
| xargs grep -l "define _GL_INLINE static _GL_UNUSED" \
| while read file
do
einfo "fixing gnulib inline bug in ${file#${S}/}"
origfile="${file}".gnulib-fix.$$
mv "${file}" "${origfile}"
sed -e 's/define _GL_INLINE static _GL_UNUSED/define _GL_INLINE _GL_UNUSED static/' \
-e 's/define _GL_EXTERN_INLINE static _GL_UNUSED/define _GL_EXTERN_INLINE _GL_UNUSED static/' \
"${origfile}" > "${file}"
touch -r "${origfile}" "${file}"
done
fi
|