From ebc140d983c9d939e0ebc6c183ced4161599a73b Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 12 Apr 2023 18:13:13 +0200 Subject: [PATCH] meson: bump version --- ...{meson-1.0.0.recipe => meson-1.1.0.recipe} | 6 +- dev-util/meson/patches/meson-1.0.0.patchset | 303 ------------------ dev-util/meson/patches/meson-1.1.0.patchset | 100 ++++++ 3 files changed, 103 insertions(+), 306 deletions(-) rename dev-util/meson/{meson-1.0.0.recipe => meson-1.1.0.recipe} (90%) delete mode 100644 dev-util/meson/patches/meson-1.0.0.patchset create mode 100644 dev-util/meson/patches/meson-1.1.0.patchset diff --git a/dev-util/meson/meson-1.0.0.recipe b/dev-util/meson/meson-1.1.0.recipe similarity index 90% rename from dev-util/meson/meson-1.0.0.recipe rename to dev-util/meson/meson-1.1.0.recipe index 742abe437..c359c5789 100644 --- a/dev-util/meson/meson-1.0.0.recipe +++ b/dev-util/meson/meson-1.1.0.recipe @@ -2,11 +2,11 @@ SUMMARY="A High productivity build system" DESCRIPTION="MesonĀ® is a project to create the best possible next-generation \ build system." HOMEPAGE="https://mesonbuild.com/" -COPYRIGHT="2013-2020 The Meson development team" +COPYRIGHT="2013-2023 The Meson development team" LICENSE="Apache v2" -REVISION="2" +REVISION="1" SOURCE_URI="https://github.com/mesonbuild/meson/releases/download/$portVersion/meson-$portVersion.tar.gz" -CHECKSUM_SHA256="aa50a4ba4557c25e7d48446abfde857957dcdf58385fffbe670ba0e8efacce05" +CHECKSUM_SHA256="d9616c44cd6c53689ff8f05fc6958a693f2e17c3472a8daf83cee55dabff829f" PATCHES="meson-$portVersion.patchset" PYTHON_VERSION="3.9" diff --git a/dev-util/meson/patches/meson-1.0.0.patchset b/dev-util/meson/patches/meson-1.0.0.patchset deleted file mode 100644 index cff902c35..000000000 --- a/dev-util/meson/patches/meson-1.0.0.patchset +++ /dev/null @@ -1,303 +0,0 @@ -From 8d3f34603c2424a16a1c99ed7a654ac328871868 Mon Sep 17 00:00:00 2001 -From: Eli Schwartz -Date: Thu, 19 Jan 2023 15:46:05 -0500 -Subject: remove dead code - -We shouldn't be hardcoding library dirs anyway. And we usually get this -from the compiler. - -This function has been unused since its users were moved to use the -compiler method, in the following commits: -- a1a4f66e6d915c1f6aae2ead02cf5631b10c76f1 -- a3856be1d50eaefe32fee5d3347d55d934d15b50 -- 08224dafcba1b694fb624553e7d84deb565aae22 ---- - mesonbuild/utils/universal.py | 47 ----------------------------------- - 1 file changed, 47 deletions(-) - -diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py -index a78ca7fd9..9fa0d5167 100644 ---- a/mesonbuild/utils/universal.py -+++ b/mesonbuild/utils/universal.py -@@ -94,7 +94,6 @@ __all__ = [ - 'generate_list', - 'get_compiler_for_source', - 'get_filenames_templates_dict', -- 'get_library_dirs', - 'get_variable_regex', - 'get_wine_shortpath', - 'git', -@@ -986,52 +985,6 @@ def default_prefix() -> str: - return 'c:/' if is_windows() else '/usr/local' - - --def get_library_dirs() -> T.List[str]: -- if is_windows(): -- return ['C:/mingw/lib'] # TODO: get programmatically -- if is_osx(): -- return ['/usr/lib'] # TODO: get programmatically -- # The following is probably Debian/Ubuntu specific. -- # /usr/local/lib is first because it contains stuff -- # installed by the sysadmin and is probably more up-to-date -- # than /usr/lib. If you feel that this search order is -- # problematic, please raise the issue on the mailing list. -- unixdirs = ['/usr/local/lib', '/usr/lib', '/lib'] -- -- if is_freebsd(): -- return unixdirs -- # FIXME: this needs to be further genericized for aarch64 etc. -- machine = platform.machine() -- if machine in {'i386', 'i486', 'i586', 'i686'}: -- plat = 'i386' -- elif machine.startswith('arm'): -- plat = 'arm' -- else: -- plat = '' -- -- # Solaris puts 32-bit libraries in the main /lib & /usr/lib directories -- # and 64-bit libraries in platform specific subdirectories. -- if is_sunos(): -- if machine == 'i86pc': -- plat = 'amd64' -- elif machine.startswith('sun4'): -- plat = 'sparcv9' -- -- usr_platdir = Path('/usr/lib/') / plat -- if usr_platdir.is_dir(): -- unixdirs += [str(x) for x in (usr_platdir).iterdir() if x.is_dir()] -- if os.path.exists('/usr/lib64'): -- unixdirs.append('/usr/lib64') -- -- lib_platdir = Path('/lib/') / plat -- if lib_platdir.is_dir(): -- unixdirs += [str(x) for x in (lib_platdir).iterdir() if x.is_dir()] -- if os.path.exists('/lib64'): -- unixdirs.append('/lib64') -- -- return unixdirs -- -- - def has_path_sep(name: str, sep: str = '/\\') -> bool: - 'Checks if any of the specified @sep path separators are in @name' - for each in sep: --- -2.36.1 - - -From 29771e62faba9f38d55bf34dbe40b16720170c92 Mon Sep 17 00:00:00 2001 -From: X512 -Date: Fri, 10 Jun 2022 22:34:00 +0900 -Subject: haiku: set default prefix and library paths - ---- - mesonbuild/coredata.py | 18 ++++++----- - mesonbuild/utils/universal.py | 57 ++++++++++++++++++++++++++++++++++- - 2 files changed, 66 insertions(+), 9 deletions(-) - -diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py -index 6d63625f2..a3c5bd4f5 100644 ---- a/mesonbuild/coredata.py -+++ b/mesonbuild/coredata.py -@@ -22,7 +22,9 @@ from .mesonlib import ( - HoldableObject, - MesonException, EnvironmentException, MachineChoice, PerMachine, - PerMachineDefaultable, default_libdir, default_libexecdir, -- default_prefix, split_args, OptionKey, OptionType, stringlistify, -+ default_prefix, default_datadir, default_includedir, default_infodir, -+ default_localedir, default_mandir, default_sbindir, default_sysconfdir, -+ split_args, OptionKey, OptionType, stringlistify, - pickle_load, replace_if_different - ) - from .wrap import WrapMode -@@ -1193,17 +1195,17 @@ class BuiltinOption(T.Generic[_T, _U]): - BUILTIN_DIR_OPTIONS: 'MutableKeyedOptionDictType' = OrderedDict([ - (OptionKey('prefix'), BuiltinOption(UserStringOption, 'Installation prefix', default_prefix())), - (OptionKey('bindir'), BuiltinOption(UserStringOption, 'Executable directory', 'bin')), -- (OptionKey('datadir'), BuiltinOption(UserStringOption, 'Data file directory', 'share')), -- (OptionKey('includedir'), BuiltinOption(UserStringOption, 'Header file directory', 'include')), -- (OptionKey('infodir'), BuiltinOption(UserStringOption, 'Info page directory', 'share/info')), -+ (OptionKey('datadir'), BuiltinOption(UserStringOption, 'Data file directory', default_datadir())), -+ (OptionKey('includedir'), BuiltinOption(UserStringOption, 'Header file directory', default_includedir())), -+ (OptionKey('infodir'), BuiltinOption(UserStringOption, 'Info page directory', default_infodir())), - (OptionKey('libdir'), BuiltinOption(UserStringOption, 'Library directory', default_libdir())), - (OptionKey('libexecdir'), BuiltinOption(UserStringOption, 'Library executable directory', default_libexecdir())), -- (OptionKey('localedir'), BuiltinOption(UserStringOption, 'Locale data directory', 'share/locale')), -+ (OptionKey('localedir'), BuiltinOption(UserStringOption, 'Locale data directory', default_localedir())), - (OptionKey('localstatedir'), BuiltinOption(UserStringOption, 'Localstate data directory', 'var')), -- (OptionKey('mandir'), BuiltinOption(UserStringOption, 'Manual page directory', 'share/man')), -- (OptionKey('sbindir'), BuiltinOption(UserStringOption, 'System executable directory', 'sbin')), -+ (OptionKey('mandir'), BuiltinOption(UserStringOption, 'Manual page directory', default_mandir())), -+ (OptionKey('sbindir'), BuiltinOption(UserStringOption, 'System executable directory', default_sbindir())), - (OptionKey('sharedstatedir'), BuiltinOption(UserStringOption, 'Architecture-independent data directory', 'com')), -- (OptionKey('sysconfdir'), BuiltinOption(UserStringOption, 'Sysconf data directory', 'etc')), -+ (OptionKey('sysconfdir'), BuiltinOption(UserStringOption, 'Sysconf data directory', default_sysconfdir())), - ]) - - BUILTIN_CORE_OPTIONS: 'MutableKeyedOptionDictType' = OrderedDict([ -diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py -index 9fa0d5167..4efe93bdd 100644 ---- a/mesonbuild/utils/universal.py -+++ b/mesonbuild/utils/universal.py -@@ -82,6 +82,13 @@ __all__ = [ - 'default_libdir', - 'default_libexecdir', - 'default_prefix', -+ 'default_datadir', -+ 'default_includedir', -+ 'default_infodir', -+ 'default_localedir', -+ 'default_mandir', -+ 'default_sbindir', -+ 'default_sysconfdir', - 'detect_subprojects', - 'detect_vcs', - 'do_conf_file', -@@ -977,12 +984,60 @@ def default_libdir() -> str: - - - def default_libexecdir() -> str: -+ if is_haiku(): -+ return 'lib' - # There is no way to auto-detect this, so it must be set at build time - return 'libexec' - - - def default_prefix() -> str: -- return 'c:/' if is_windows() else '/usr/local' -+ if is_windows(): -+ return 'c:/' -+ if is_haiku(): -+ return '/boot/system/non-packaged' -+ return '/usr/local' -+ -+ -+def default_datadir() -> str: -+ if is_haiku(): -+ return 'data' -+ return 'share' -+ -+ -+def default_includedir() -> str: -+ if is_haiku(): -+ return 'develop/headers' -+ return 'include' -+ -+ -+def default_infodir() -> str: -+ if is_haiku(): -+ return 'documentation/info' -+ return 'share/info' -+ -+ -+def default_localedir() -> str: -+ if is_haiku(): -+ return 'data/locale' -+ return 'share/locale' -+ -+ -+def default_mandir() -> str: -+ if is_haiku(): -+ return 'documentation/man' -+ return 'share/man' -+ -+ -+def default_sbindir() -> str: -+ if is_haiku(): -+ return 'bin' -+ return 'sbin' -+ -+ -+def default_sysconfdir() -> str: -+ if is_haiku(): -+ return 'settings' -+ return 'etc' - - - def has_path_sep(name: str, sep: str = '/\\') -> bool: --- -2.36.1 - - -From 623f7c7c8cfd17d9123f052af7b9b16871496f11 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Mon, 3 Aug 2020 11:56:45 +0200 -Subject: Fix include path for boost - ---- - mesonbuild/dependencies/boost.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py -index 4ebd88d7b..e3a159266 100644 ---- a/mesonbuild/dependencies/boost.py -+++ b/mesonbuild/dependencies/boost.py -@@ -523,10 +523,11 @@ class BoostDependency(SystemDependency): - - def detect_inc_dirs(self, root: Path) -> T.List[BoostIncludeDir]: - candidates = [] # type: T.List[Path] -- inc_root = root / 'include' -+ inc_root = root / 'headers' - - candidates += [root / 'boost'] - candidates += [inc_root / 'boost'] -+ candidates += [inc_root / 'x86' / 'boost'] - if inc_root.is_dir(): - for i in inc_root.iterdir(): - if not i.is_dir() or not i.name.startswith('boost-'): --- -2.36.1 - - -From a656d8af6b595a680c5827389c5b4405fdac9754 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Fri, 26 Nov 2021 11:39:48 +0100 -Subject: add support for gcc 2.95.3 - ---- - mesonbuild/compilers/detect.py | 2 +- - mesonbuild/compilers/mixins/gnu.py | 12 +++++++++++- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py -index 367bcf915..9682ae7c4 100644 ---- a/mesonbuild/compilers/detect.py -+++ b/mesonbuild/compilers/detect.py -@@ -331,7 +331,7 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin - version = search_version(out) - - guess_gcc_or_lcc: T.Optional[str] = None -- if 'Free Software Foundation' in out or 'xt-' in out: -+ if 'Free Software Foundation' in out or 'xt-' in out or '2.95.3' in out: - guess_gcc_or_lcc = 'gcc' - if 'e2k' in out and 'lcc' in out: - guess_gcc_or_lcc = 'lcc' -diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py -index 8152b2538..ee061f82b 100644 ---- a/mesonbuild/compilers/mixins/gnu.py -+++ b/mesonbuild/compilers/mixins/gnu.py -@@ -508,7 +508,7 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta): - stdo = self._get_search_dirs(env) - for line in stdo.split('\n'): - if line.startswith(name + ':'): -- return self._split_fetch_real_dirs(line.split('=', 1)[1]) -+ return self._split_fetch_real_dirs(line.split('=', 1)[1] if '=' in line else line) - return [] - - def get_lto_compile_args(self, *, threads: int = 0, mode: str = 'default') -> T.List[str]: -@@ -643,3 +643,13 @@ class GnuCompiler(GnuLikeCompiler): - if linker == 'mold' and mesonlib.version_compare(version, '>=12.0.1'): - return ['-fuse-ld=mold'] - return super().use_linker_args(linker, version) -+ -+ def gnu_symbol_visibility_args(self, vistype: str) -> T.List[str]: -+ if mesonlib.version_compare(self.version, '< 4'): -+ vistype = '' -+ return super().gnu_symbol_visibility_args(vistype) -+ -+ def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]: -+ if mesonlib.version_compare(self.version, '< 4'): -+ return [] -+ return super().get_dependency_gen_args(outtarget, outfile) --- -2.36.1 - diff --git a/dev-util/meson/patches/meson-1.1.0.patchset b/dev-util/meson/patches/meson-1.1.0.patchset new file mode 100644 index 000000000..cc2dd7a08 --- /dev/null +++ b/dev-util/meson/patches/meson-1.1.0.patchset @@ -0,0 +1,100 @@ +From 9779c98c9d1a4f1a6afb8311d3af02f0a69bfde4 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Mon, 3 Aug 2020 11:56:45 +0200 +Subject: Fix include path for boost + + +diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py +index 4ebd88d..e3a1592 100644 +--- a/mesonbuild/dependencies/boost.py ++++ b/mesonbuild/dependencies/boost.py +@@ -523,10 +523,11 @@ class BoostDependency(SystemDependency): + + def detect_inc_dirs(self, root: Path) -> T.List[BoostIncludeDir]: + candidates = [] # type: T.List[Path] +- inc_root = root / 'include' ++ inc_root = root / 'headers' + + candidates += [root / 'boost'] + candidates += [inc_root / 'boost'] ++ candidates += [inc_root / 'x86' / 'boost'] + if inc_root.is_dir(): + for i in inc_root.iterdir(): + if not i.is_dir() or not i.name.startswith('boost-'): +-- +2.37.3 + + +From 9d6c4075e111a2b76834270703bedda6621f8642 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 26 Nov 2021 11:39:48 +0100 +Subject: add support for gcc 2.95.3 + + +diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py +index 6eca155..90af5b0 100644 +--- a/mesonbuild/compilers/detect.py ++++ b/mesonbuild/compilers/detect.py +@@ -334,7 +334,7 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin + version = search_version(out) + + guess_gcc_or_lcc: T.Optional[str] = None +- if 'Free Software Foundation' in out or out.startswith('xt-'): ++ if 'Free Software Foundation' in out or out.startswith('xt-') or '2.95.3' in out: + guess_gcc_or_lcc = 'gcc' + if 'e2k' in out and 'lcc' in out: + guess_gcc_or_lcc = 'lcc' +diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py +index f51460d..edd699a 100644 +--- a/mesonbuild/compilers/mixins/gnu.py ++++ b/mesonbuild/compilers/mixins/gnu.py +@@ -512,7 +512,7 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta): + stdo = self._get_search_dirs(env) + for line in stdo.split('\n'): + if line.startswith(name + ':'): +- return self._split_fetch_real_dirs(line.split('=', 1)[1]) ++ return self._split_fetch_real_dirs(line.split('=', 1)[1] if '=' in line else line) + return [] + + def get_lto_compile_args(self, *, threads: int = 0, mode: str = 'default') -> T.List[str]: +@@ -650,3 +650,13 @@ class GnuCompiler(GnuLikeCompiler): + + def get_profile_use_args(self) -> T.List[str]: + return super().get_profile_use_args() + ['-fprofile-correction'] ++ ++ def gnu_symbol_visibility_args(self, vistype: str) -> T.List[str]: ++ if mesonlib.version_compare(self.version, '< 4'): ++ vistype = '' ++ return super().gnu_symbol_visibility_args(vistype) ++ ++ def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]: ++ if mesonlib.version_compare(self.version, '< 4'): ++ return [] ++ return super().get_dependency_gen_args(outtarget, outfile) +-- +2.37.3 + + +From 0bbaab52fc15f8db98f9c88080389cb3e04248b9 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Wed, 12 Apr 2023 17:58:48 +0200 +Subject: Revert b1384b9c9f64ff909d5431176503a7dcdadd426c + + +diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py +index f26ba77..ce90f2f 100644 +--- a/mesonbuild/modules/pkgconfig.py ++++ b/mesonbuild/modules/pkgconfig.py +@@ -701,9 +701,6 @@ class PkgConfigModule(NewExtensionModule): + if mesonlib.is_freebsd(): + pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('prefix'))), 'libdata', 'pkgconfig') + pkgroot_name = os.path.join('{prefix}', 'libdata', 'pkgconfig') +- elif mesonlib.is_haiku(): +- pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('prefix'))), 'develop', 'lib', 'pkgconfig') +- pkgroot_name = os.path.join('{prefix}', 'develop', 'lib', 'pkgconfig') + else: + pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('libdir'))), 'pkgconfig') + pkgroot_name = os.path.join('{libdir}', 'pkgconfig') +-- +2.37.3 +