summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2022-01-16 13:15:18 +0100
committerFabian Groffen <grobian@gentoo.org>2022-01-16 13:20:26 +0100
commit69f5c7eeaf5f0c12eaddbda183102f1c7eaf2f6c (patch)
treeb90321346a1992ad0b126dc0d3cc2d0d590f6a05 /profiles
parentapp-xemacs/ebuild-mode: Remove old (diff)
downloadgentoo-69f5c7eeaf5f0c12eaddbda183102f1c7eaf2f6c.tar.gz
gentoo-69f5c7eeaf5f0c12eaddbda183102f1c7eaf2f6c.tar.bz2
gentoo-69f5c7eeaf5f0c12eaddbda183102f1c7eaf2f6c.zip
profiles/prefix/darwin/macos: use global fix for gnulib breakage
Bug: https://bugs.gentoo.org/831026 Bug: https://bugs.gentoo.org/829847 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'profiles')
-rw-r--r--profiles/prefix/darwin/macos/package.mask9
-rw-r--r--profiles/prefix/darwin/macos/profile.bashrc23
2 files changed, 23 insertions, 9 deletions
diff --git a/profiles/prefix/darwin/macos/package.mask b/profiles/prefix/darwin/macos/package.mask
index 1d194495f268..0b90c5562381 100644
--- a/profiles/prefix/darwin/macos/package.mask
+++ b/profiles/prefix/darwin/macos/package.mask
@@ -4,12 +4,3 @@
# Fabian Groffen <grobian@gentoo.org> (2022-01-08)
# malloc crash during install on >=11.0, bug #830425
=dev-util/cmake-3.22.1
-
-# Sam James <sam@gentoo.org> (2021-12-23)
-# Fails to build due to gnulib errors on >=11.0:
-# ```timespec.h:52:21: error: expected identifier or ‘(’ before ‘struct’
-# 52 | _GL_TIMESPEC_INLINE struct timespec```
-# bug #829847
-=app-editors/nano-5.9
-=app-editors/nano-6.0
-=app-arch/gzip-1.11
diff --git a/profiles/prefix/darwin/macos/profile.bashrc b/profiles/prefix/darwin/macos/profile.bashrc
new file mode 100644
index 000000000000..fc81d01031c4
--- /dev/null
+++ b/profiles/prefix/darwin/macos/profile.bashrc
@@ -0,0 +1,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
+