From 03e200f567b2316a3678d9d1ed458bf1ddb4138f Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 29 Jan 2024 07:10:59 +0000 Subject: [PATCH] dev-build/meson: Sync with Gentoo It's from Gentoo commit e538accf3e4cb33b8537290de31ce4fc503047c8. --- .../files/meson-1.3.1-xtools-support.patch | 39 ++++++++++++------- ...son-1.3.1.ebuild => meson-1.3.1-r1.ebuild} | 4 +- 2 files changed, 29 insertions(+), 14 deletions(-) rename sdk_container/src/third_party/portage-stable/dev-build/meson/{meson-1.3.1.ebuild => meson-1.3.1-r1.ebuild} (96%) diff --git a/sdk_container/src/third_party/portage-stable/dev-build/meson/files/meson-1.3.1-xtools-support.patch b/sdk_container/src/third_party/portage-stable/dev-build/meson/files/meson-1.3.1-xtools-support.patch index 6e9e670ba8..dfb9b3f6be 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/meson/files/meson-1.3.1-xtools-support.patch +++ b/sdk_container/src/third_party/portage-stable/dev-build/meson/files/meson-1.3.1-xtools-support.patch @@ -1,26 +1,39 @@ -linkers_detect: detect xtools (Apple ld64 derivative) +From 33527630f1bd0e51093044016557cb44e7bb6547 Mon Sep 17 00:00:00 2001 +From: Fabian Groffen +Date: Wed, 17 Jan 2024 17:04:45 +0100 +Subject: [PATCH] linkers_detect: detect xtools (Apple ld64 derivative) -xtools is in use on x86_64 and ppc based darwin Prefix installs. Pick -it up as a valid linker. +xtools is in use on Gentoo Prefix x86_64 and ppc based Darwin installs. +Pick it up as a valid linker. -Meson is the only thing known at this point to try and figure out what -linker is in use exactly, so instead of changing the linker (xtools), -just teach Meson about xtools. +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. -Author: Fabian Groffen Bug: https://bugs.gentoo.org/868516 +Bug: https://github.com/mesonbuild/meson/issues/10805 +Signed-off-by: Fabian Groffen +Signed-off-by: Eli Schwartz +--- + 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 -@@ -185,6 +185,11 @@ +@@ -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 #868516 -+ elif 'xtools-' in o.split('\n')[0]: -+ xtools = o.split(' ')[0] -+ v = xtools.split('-')[1] -+ linker = AppleDynamicLinker(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/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.3.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.3.1-r1.ebuild similarity index 96% rename from sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.3.1.ebuild rename to sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.3.1-r1.ebuild index 0f026f75c3..6a86fb79de 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.3.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.3.1-r1.ebuild @@ -54,13 +54,15 @@ RDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-1.2.1-python-path.patch - "${FILESDIR}"/${PN}-1.3.1-xtools-support.patch # backport fix for hiding compiler warnings (such as Modern C) in vala and cython "${FILESDIR}"/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch # 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() {