commit: 9deec41183bab5d5e490f152d5971920214e6d66 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Thu Nov 4 20:37:07 2021 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Thu Nov 4 20:37:16 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9deec411
sys-devel/binutils-apple-8.2.1-r101: fix build on macOS monterey Based on original path by Tee KOBAYASHI, which was based on work from https://trac.macports.org/ticket/63221 Adapted to be conditional, that is, only defined when not yet defined. Closes: https://bugs.gentoo.org/821697 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> .../binutils-apple-8.2.1-r101.ebuild | 4 ++++ .../files/binutils-apple-8.2.1-macos-12.patch | 24 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) 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 index dc08967e958..091e4e5990b 100644 --- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild @@ -27,6 +27,10 @@ BDEPEND="" S="${WORKDIR}/darwin-xtools-gentoo-${PVR}" +PATCHES=( + "${FILESDIR}"/${PN}-8.2.1-macos-12.patch +) + src_configure() { CTARGET=${CTARGET:-${CHOST}} if [[ ${CTARGET} == ${CHOST} ]] ; then 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 new file mode 100644 index 00000000000..b30f91d44cb --- /dev/null +++ b/sys-devel/binutils-apple/files/binutils-apple-8.2.1-macos-12.patch @@ -0,0 +1,24 @@ +Extracted from the patch in +https://reviews.llvm.org/rG96d071cd0ccc53bbf94bcd6ed4b52c9006b17e15 +License is unclear. + +support macOS Monterey by providing definitions which formerly were +provided + +--- a/cctools/otool/print_objc.c ++++ b/cctools/otool/print_objc.c +@@ -75,6 +75,14 @@ + uint32_t protocols; /* struct objc_protocol_list * (32-bit pointer) */ + }; + ++#ifndef CLS_GETINFO ++# define CLS_GETINFO(cls, infomask) ((cls)->info & (infomask)) ++// class is not a metaclass ++#define CLS_CLASS 0x1 ++// class is a metaclass ++#define CLS_META 0x2 ++#endif ++ + struct objc_category_t { + uint32_t category_name; /* char * (32-bit pointer) */ + uint32_t class_name; /* char * (32-bit pointer) */
