summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-01-18 15:26:51 -0500
committerSam James <sam@gentoo.org>2024-01-18 20:43:22 +0000
commite538accf3e4cb33b8537290de31ce4fc503047c8 (patch)
tree7dcb5760a7ba7eb3cbefc616cf5f87b643b652b5 /dev-build/meson
parentdev-python/sqlalchemy: Stabilize 1.4.51 arm64, #922442 (diff)
downloadgentoo-e538accf3e4cb33b8537290de31ce4fc503047c8.tar.gz
gentoo-e538accf3e4cb33b8537290de31ce4fc503047c8.tar.bz2
gentoo-e538accf3e4cb33b8537290de31ce4fc503047c8.zip
dev-build/meson: backport macos Prefix fix
Followup to commit 791e631e0121da91676113928a3e4070453c2449. The patch has been integrated upstream and will be backported to meson 1.3.2; the issues with including it here have been resolved, so bring it back. Closes: https://bugs.gentoo.org/868516 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-build/meson')
-rw-r--r--dev-build/meson/files/meson-1.3.1-xtools-support.patch39
-rw-r--r--dev-build/meson/meson-1.3.1-r1.ebuild (renamed from dev-build/meson/meson-1.3.1.ebuild)3
2 files changed, 42 insertions, 0 deletions
diff --git a/dev-build/meson/files/meson-1.3.1-xtools-support.patch b/dev-build/meson/files/meson-1.3.1-xtools-support.patch
new file mode 100644
index 000000000000..dfb9b3f6be68
--- /dev/null
+++ b/dev-build/meson/files/meson-1.3.1-xtools-support.patch
@@ -0,0 +1,39 @@
+From 33527630f1bd0e51093044016557cb44e7bb6547 Mon Sep 17 00:00:00 2001
+From: Fabian Groffen <grobian@gentoo.org>
+Date: Wed, 17 Jan 2024 17:04:45 +0100
+Subject: [PATCH] linkers_detect: detect xtools (Apple ld64 derivative)
+
+xtools is in use on Gentoo Prefix x86_64 and ppc based Darwin installs.
+Pick it up as a valid linker.
+
+Since xtools is answering with a version to --version, as opposed to
+ld64, detection of xtools in the ld64 handling block is not possible,
+since --version already succeeded.
+
+Bug: https://bugs.gentoo.org/868516
+Bug: https://github.com/mesonbuild/meson/issues/10805
+Signed-off-by: Fabian Groffen <grobian@gentoo.org>
+Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
+---
+ mesonbuild/linkers/detect.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/mesonbuild/linkers/detect.py b/mesonbuild/linkers/detect.py
+index 918f2e634..1bce413f4 100644
+--- a/mesonbuild/linkers/detect.py
++++ b/mesonbuild/linkers/detect.py
+@@ -174,6 +174,11 @@ def guess_nix_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty
+ v = search_version(o)
+
+ linker = linkers.LLVMDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v)
++ # detect xtools first, bug #10805
++ elif 'xtools-' in o.split('\n', maxsplit=1)[0]:
++ xtools = o.split(' ', maxsplit=1)[0]
++ v = xtools.split('-', maxsplit=2)[1]
++ linker = linkers.AppleDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v)
+ # First might be apple clang, second is for real gcc, the third is icc.
+ # Note that "ld: unknown option: " sometimes instead is "ld: unknown options:".
+ elif e.endswith('(use -v to see invocation)\n') or 'macosx_version' in e or 'ld: unknown option' in e:
+--
+2.43.0
+
diff --git a/dev-build/meson/meson-1.3.1.ebuild b/dev-build/meson/meson-1.3.1-r1.ebuild
index 2498ea56a83a..6a86fb79dedb 100644
--- a/dev-build/meson/meson-1.3.1.ebuild
+++ b/dev-build/meson/meson-1.3.1-r1.ebuild
@@ -60,6 +60,9 @@ PATCHES=(
# backport revert for broken rpath changes: https://github.com/mesonbuild/meson/pull/12672
"${FILESDIR}"/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch
+
+ # backport macos Prefix fix: https://github.com/mesonbuild/meson/pull/12747
+ "${FILESDIR}"/meson-1.3.1-xtools-support.patch
)
python_prepare_all() {