From dad5a310e1699aa0e2d9519ca6ba863878dd9586 Mon Sep 17 00:00:00 2001 From: christophecvr Date: Fri, 25 Oct 2024 11:35:18 +0200 Subject: [PATCH] py-meson: Default FrameworkPath not found when using -std=C++ or std=gnu++ Closes: https://trac.macports.org/ticket/71165 Modifies the patch-meson-gcc-appleframeworks.diff patch file. Bumps py-meson Portfile to revision 1 --- python/py-meson/Portfile | 2 +- .../files/patch-meson-gcc-appleframeworks.diff | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/python/py-meson/Portfile b/python/py-meson/Portfile index b54e2fa041c6..777ca071ed76 100644 --- a/python/py-meson/Portfile +++ b/python/py-meson/Portfile @@ -8,7 +8,7 @@ name py-meson # update version and revision also in the meson port github.setup mesonbuild meson 1.6.0 github.tarball_from releases -revision 0 +revision 1 checksums rmd160 b3376a06163a378f4188a75d412d92f4cafcf1d8 \ sha256 999b65f21c03541cf11365489c1fad22e2418bb0c3d50ca61139f2eec09d5496 \ diff --git a/python/py-meson/files/patch-meson-gcc-appleframeworks.diff b/python/py-meson/files/patch-meson-gcc-appleframeworks.diff index e90cc85ddb56..010018c96b7d 100644 --- a/python/py-meson/files/patch-meson-gcc-appleframeworks.diff +++ b/python/py-meson/files/patch-meson-gcc-appleframeworks.diff @@ -1,6 +1,6 @@ ---- mesonbuild/compilers/mixins/clike.py.orig 2022-01-03 04:12:32.000000000 +0800 -+++ mesonbuild/compilers/mixins/clike.py 2022-04-06 05:50:19.000000000 +0800 -@@ -1123,9 +1123,6 @@ +--- mesonbuild/compilers/mixins/clike.py.orig 2024-10-20 20:20:25.000000000 +0200 ++++ mesonbuild/compilers/mixins/clike.py 2024-10-25 10:29:11.000000000 +0200 +@@ -1185,14 +1185,12 @@ unless you select a particular macOS SDK with the -isysroot flag. You can also add to this by setting -F in CFLAGS. ''' @@ -8,5 +8,12 @@ - if self.id != 'clang': - raise mesonlib.MesonException('Cannot find framework path with non-clang compiler') # Construct the compiler command-line - commands = self.get_exelist() + ['-v', '-E', '-'] + commands = self.get_exelist(ccache=False) + ['-v', '-E', '-'] commands += self.get_always_args() + # Add CFLAGS/CXXFLAGS/OBJCFLAGS/OBJCXXFLAGS from the env +- commands += env.coredata.get_external_args(self.for_machine, self.language) ++ # 'std=c++','std=gnu++' are valid for C++/ObjC++ but not for 'C' ++ commands += [x for x in env.coredata.get_external_args(self.for_machine, self.language) if '-std=c++' not in x and '-std=gnu++' not in x] + mlog.debug('Finding framework path by running: ', ' '.join(commands), '\n') + os_env = os.environ.copy() + os_env['LC_ALL'] = 'C'