Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-apple/files/, sys-devel/binutils-apple/
Date: Thu, 04 Nov 2021 20:37:22
Message-Id: 1636058236.9deec41183bab5d5e490f152d5971920214e6d66.grobian@gentoo
1 commit: 9deec41183bab5d5e490f152d5971920214e6d66
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 4 20:37:07 2021 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 4 20:37:16 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9deec411
7
8 sys-devel/binutils-apple-8.2.1-r101: fix build on macOS monterey
9
10 Based on original path by Tee KOBAYASHI, which was based on work from
11 https://trac.macports.org/ticket/63221
12
13 Adapted to be conditional, that is, only defined when not yet defined.
14
15 Closes: https://bugs.gentoo.org/821697
16 Package-Manager: Portage-3.0.28, Repoman-3.0.3
17 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
18
19 .../binutils-apple-8.2.1-r101.ebuild | 4 ++++
20 .../files/binutils-apple-8.2.1-macos-12.patch | 24 ++++++++++++++++++++++
21 2 files changed, 28 insertions(+)
22
23 diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild
24 index dc08967e958..091e4e5990b 100644
25 --- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild
26 +++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild
27 @@ -27,6 +27,10 @@ BDEPEND=""
28
29 S="${WORKDIR}/darwin-xtools-gentoo-${PVR}"
30
31 +PATCHES=(
32 + "${FILESDIR}"/${PN}-8.2.1-macos-12.patch
33 +)
34 +
35 src_configure() {
36 CTARGET=${CTARGET:-${CHOST}}
37 if [[ ${CTARGET} == ${CHOST} ]] ; then
38
39 diff --git a/sys-devel/binutils-apple/files/binutils-apple-8.2.1-macos-12.patch b/sys-devel/binutils-apple/files/binutils-apple-8.2.1-macos-12.patch
40 new file mode 100644
41 index 00000000000..b30f91d44cb
42 --- /dev/null
43 +++ b/sys-devel/binutils-apple/files/binutils-apple-8.2.1-macos-12.patch
44 @@ -0,0 +1,24 @@
45 +Extracted from the patch in
46 +https://reviews.llvm.org/rG96d071cd0ccc53bbf94bcd6ed4b52c9006b17e15
47 +License is unclear.
48 +
49 +support macOS Monterey by providing definitions which formerly were
50 +provided
51 +
52 +--- a/cctools/otool/print_objc.c
53 ++++ b/cctools/otool/print_objc.c
54 +@@ -75,6 +75,14 @@
55 + uint32_t protocols; /* struct objc_protocol_list * (32-bit pointer) */
56 + };
57 +
58 ++#ifndef CLS_GETINFO
59 ++# define CLS_GETINFO(cls, infomask) ((cls)->info & (infomask))
60 ++// class is not a metaclass
61 ++#define CLS_CLASS 0x1
62 ++// class is a metaclass
63 ++#define CLS_META 0x2
64 ++#endif
65 ++
66 + struct objc_category_t {
67 + uint32_t category_name; /* char * (32-bit pointer) */
68 + uint32_t class_name; /* char * (32-bit pointer) */