Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meson: bump to 1.0.0, set default Haiku install paths
- Loading branch information
Showing
2 changed files
with
397 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
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" | ||
LICENSE="Apache v2" | ||
REVISION="1" | ||
SOURCE_URI="https://github.com/mesonbuild/meson/releases/download/$portVersion/meson-$portVersion.tar.gz" | ||
CHECKSUM_SHA256="aa50a4ba4557c25e7d48446abfde857957dcdf58385fffbe670ba0e8efacce05" | ||
PATCHES="meson-$portVersion.patchset" | ||
PYTHON_VERSION="3.9" | ||
|
||
ARCHITECTURES="any" | ||
|
||
PROVIDES=" | ||
meson = $portVersion | ||
cmd:meson = $portVersion | ||
cmd:mesonconf = $portVersion | ||
cmd:mesonintrospect = $portVersion | ||
cmd:mesontest = $portVersion | ||
cmd:wraptool = $portVersion | ||
" | ||
REQUIRES=" | ||
haiku | ||
setuptools_python39 | ||
cmd:python$PYTHON_VERSION | ||
cmd:ninja >= 1.6 | ||
" | ||
|
||
BUILD_REQUIRES=" | ||
haiku_devel | ||
setuptools_python39 | ||
" | ||
BUILD_PREREQUIRES=" | ||
cmd:python$PYTHON_VERSION | ||
" | ||
|
||
TEST_REQUIRES=" | ||
cmd:clang | ||
cmd:g_ir_scanner | ||
cmd:gcc | ||
cmd:ninja >= 1.6 | ||
cmd:pkg_config | ||
devel:libglib_2.0 | ||
" | ||
|
||
INSTALL() | ||
{ | ||
# GENERIC: all python_setuptools-based installs need this | ||
python=$portPackageLinksDir/cmd~python$PYTHON_VERSION/bin/python3.9 | ||
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3) | ||
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ | ||
export PYTHONPATH=$installLocation:$PYTHONPATH | ||
mkdir -p $installLocation | ||
|
||
$python setup.py install \ | ||
--root=/ --prefix=$prefix | ||
|
||
mkdir -p $docDir | ||
mv $prefix/share/man $manDir | ||
rm -rf $prefix/share | ||
} | ||
|
||
TEST() | ||
{ | ||
MESON_PRINT_TEST_OUTPUT=1 LC_CTYPE=en_US.UTF-8 ./run_tests.py | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,330 @@ | ||
From 8d3f34603c2424a16a1c99ed7a654ac328871868 Mon Sep 17 00:00:00 2001 | ||
From: Eli Schwartz <eschwartz@archlinux.org> | ||
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 <danger_mail@list.ru> | ||
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 696fea28044e99a6f5609910e20db625f6580aac Mon Sep 17 00:00:00 2001 | ||
From: X512 <danger_mail@list.ru> | ||
Date: Sat, 5 Nov 2022 07:55:32 +0900 | ||
Subject: Haiku pkgconfig directory layout support | ||
|
||
--- | ||
mesonbuild/modules/pkgconfig.py | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py | ||
index d475618ba..af8467c08 100644 | ||
--- a/mesonbuild/modules/pkgconfig.py | ||
+++ b/mesonbuild/modules/pkgconfig.py | ||
@@ -699,6 +699,9 @@ 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.36.1 | ||
|
||
|
||
From 623f7c7c8cfd17d9123f052af7b9b16871496f11 Mon Sep 17 00:00:00 2001 | ||
From: Adrien Destugues <pulkomandy@pulkomandy.tk> | ||
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 <jerome.duval@gmail.com> | ||
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 | ||
|