Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/prefix/darwin/macos/
Date: Sun, 16 Jan 2022 12:20:36
Message-Id: 1642335626.69f5c7eeaf5f0c12eaddbda183102f1c7eaf2f6c.grobian@gentoo
1 commit: 69f5c7eeaf5f0c12eaddbda183102f1c7eaf2f6c
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 16 12:15:18 2022 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 16 12:20:26 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69f5c7ee
7
8 profiles/prefix/darwin/macos: use global fix for gnulib breakage
9
10 Bug: https://bugs.gentoo.org/831026
11 Bug: https://bugs.gentoo.org/829847
12 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
13
14 profiles/prefix/darwin/macos/package.mask | 9 ---------
15 profiles/prefix/darwin/macos/profile.bashrc | 23 +++++++++++++++++++++++
16 2 files changed, 23 insertions(+), 9 deletions(-)
17
18 diff --git a/profiles/prefix/darwin/macos/package.mask b/profiles/prefix/darwin/macos/package.mask
19 index 1d194495f268..0b90c5562381 100644
20 --- a/profiles/prefix/darwin/macos/package.mask
21 +++ b/profiles/prefix/darwin/macos/package.mask
22 @@ -4,12 +4,3 @@
23 # Fabian Groffen <grobian@g.o> (2022-01-08)
24 # malloc crash during install on >=11.0, bug #830425
25 =dev-util/cmake-3.22.1
26 -
27 -# Sam James <sam@g.o> (2021-12-23)
28 -# Fails to build due to gnulib errors on >=11.0:
29 -# ```timespec.h:52:21: error: expected identifier or ‘(’ before ‘struct’
30 -# 52 | _GL_TIMESPEC_INLINE struct timespec```
31 -# bug #829847
32 -=app-editors/nano-5.9
33 -=app-editors/nano-6.0
34 -=app-arch/gzip-1.11
35
36 diff --git a/profiles/prefix/darwin/macos/profile.bashrc b/profiles/prefix/darwin/macos/profile.bashrc
37 new file mode 100644
38 index 000000000000..fc81d01031c4
39 --- /dev/null
40 +++ b/profiles/prefix/darwin/macos/profile.bashrc
41 @@ -0,0 +1,23 @@
42 +# Copyright 1999-2022 Gentoo Authors
43 +# Distributed under the terms of the GNU General Public License v2
44 +
45 +if [[ ${EBUILD_PHASE} == prepare ]]; then
46 + # workaround for Gnulib bug that affects multiple packages: gzip, wget,
47 + # nano, etc
48 + # https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00053.html
49 + # https://bugs.gentoo.org/829847
50 + # https://bugs.gentoo.org/831026
51 + find "${S}" -name "config.h*" \
52 + | xargs grep -l "define _GL_INLINE static _GL_UNUSED" \
53 + | while read file
54 + do
55 + einfo "fixing gnulib inline bug in ${file#${S}/}"
56 + origfile="${file}".gnulib-fix.$$
57 + mv "${file}" "${origfile}"
58 + sed -e 's/define _GL_INLINE static _GL_UNUSED/define _GL_INLINE _GL_UNUSED static/' \
59 + -e 's/define _GL_EXTERN_INLINE static _GL_UNUSED/define _GL_EXTERN_INLINE _GL_UNUSED static/' \
60 + "${origfile}" > "${file}"
61 + touch -r "${origfile}" "${file}"
62 + done
63 +fi
64 +