commit: 69f5c7eeaf5f0c12eaddbda183102f1c7eaf2f6c Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Sun Jan 16 12:15:18 2022 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Sun Jan 16 12:20:26 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69f5c7ee
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 <AT> gentoo.org> profiles/prefix/darwin/macos/package.mask | 9 --------- profiles/prefix/darwin/macos/profile.bashrc | 23 +++++++++++++++++++++++ 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 <[email protected]> (2022-01-08) # malloc crash during install on >=11.0, bug #830425 =dev-util/cmake-3.22.1 - -# Sam James <[email protected]> (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 +
