From ceb01b98c03d1b3ca5cd3cc4cac744d926843fdd Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Mon, 27 Apr 2020 21:30:02 +0200 Subject: [PATCH] scons: add /bin to PATH variable for chroot. * switch to github archives to get tests scripts. * 25 tests failed out of 1227 --- dev-util/scons/patches/scons-3.1.2.patchset | 241 ++++++++++++++++++-- dev-util/scons/scons-3.1.2.recipe | 48 +++- 2 files changed, 269 insertions(+), 20 deletions(-) diff --git a/dev-util/scons/patches/scons-3.1.2.patchset b/dev-util/scons/patches/scons-3.1.2.patchset index 88a1244a4..d28705be5 100644 --- a/dev-util/scons/patches/scons-3.1.2.patchset +++ b/dev-util/scons/patches/scons-3.1.2.patchset @@ -1,22 +1,9 @@ -From c22b4bd5c5084f002caa5331f3ead300438aef11 Mon Sep 17 00:00:00 2001 +From 0264df7ae6bd79b5cd9d085e6620e0c5df18f380 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 9 Aug 2013 17:46:35 +0200 Subject: Add support for the Haiku platform -diff --git a/engine/SCons/Platform/__init__.py b/engine/SCons/Platform/__init__.py -index 66bff49..455c605 100644 ---- a/engine/SCons/Platform/__init__.py -+++ b/engine/SCons/Platform/__init__.py -@@ -80,6 +80,8 @@ def platform_default(): - return 'aix' - elif sys.platform.find('darwin') != -1: - return 'darwin' -+ elif sys.platform.find('haiku') != -1: -+ return 'haiku' - else: - return 'posix' - elif os.name == 'os2': diff --git a/engine/SCons/Platform/haiku.py b/engine/SCons/Platform/haiku.py new file mode 100644 index 0000000..547421e @@ -91,11 +78,24 @@ index 0000000..547421e + paths = [path + archSubDir for path in paths] + paths + + env['ENV']['PATH'] = ':'.join(paths) +diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py +index 7d959b7..1ca4685 100644 +--- a/src/engine/SCons/Platform/__init__.py ++++ b/src/engine/SCons/Platform/__init__.py +@@ -80,6 +80,8 @@ def platform_default(): + return 'aix' + elif sys.platform.find('darwin') != -1: + return 'darwin' ++ elif sys.platform.find('haiku') != -1: ++ return 'haiku' + else: + return 'posix' + elif os.name == 'os2': -- 2.24.0 -From 6d519c594fbf99cfff5f8e02e275964765e6a236 Mon Sep 17 00:00:00 2001 +From c2fd03dd3c66bed1385673c8aa606a6ca57f6f1d Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 22 Jan 2020 22:35:19 +0100 Subject: python3 support @@ -124,3 +124,214 @@ index 547421e..dd83ef8 100644 -- 2.24.0 + +From 795c3605dfdfe35ee676f8bff95b84e1877501ca Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 27 Apr 2020 14:05:11 +0200 +Subject: move platform haiku file + + +diff --git a/engine/SCons/Platform/haiku.py b/src/engine/SCons/Platform/haiku.py +similarity index 100% +rename from engine/SCons/Platform/haiku.py +rename to src/engine/SCons/Platform/haiku.py +-- +2.24.0 + + +From 6847e9d379bcab1af573378a5d30ae22605573d5 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 27 Apr 2020 14:05:11 +0200 +Subject: move platform haiku file + + +diff --git a/src/engine/MANIFEST.in b/src/engine/MANIFEST.in +index 3125824..231d3fc 100644 +--- a/src/engine/MANIFEST.in ++++ b/src/engine/MANIFEST.in +@@ -24,6 +24,7 @@ SCons/Platform/__init__.py + SCons/Platform/aix.py + SCons/Platform/cygwin.py + SCons/Platform/darwin.py ++SCons/Platform/haiku.py + SCons/Platform/hpux.py + SCons/Platform/irix.py + SCons/Platform/os2.py +diff --git a/src/engine/SCons/Platform/haiku.py b/src/engine/SCons/Platform/haiku.py +index dd83ef8..ced6116 100644 +--- a/src/engine/SCons/Platform/haiku.py ++++ b/src/engine/SCons/Platform/haiku.py +@@ -65,4 +65,4 @@ def generate(env): + # prepend the secondary arch subdirectories + paths = [path + archSubDir for path in paths] + paths + +- env['ENV']['PATH'] = ':'.join(paths) ++ env['ENV']['PATH'] = ':'.join(paths) + ":/bin" +-- +2.24.0 + + +From 7b6b4633337e71b5bc409dc445546e69a1655c1d Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 27 Apr 2020 21:28:15 +0200 +Subject: Haiku: add LIBRARY_PATH handling + + +diff --git a/SConstruct b/SConstruct +index 1adf714..e67cbf9 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -143,7 +143,7 @@ for a in addpaths: + # built with the --enable-shared option. + + ENV = { 'PATH' : os.environ['PATH'] } +-for key in ['LOGNAME', 'PYTHONPATH', 'LD_LIBRARY_PATH']: ++for key in ['LOGNAME', 'PYTHONPATH', 'LD_LIBRARY_PATH', 'LIBRARY_PATH']: + if key in os.environ: + ENV[key] = os.environ[key] + +diff --git a/test/CC/SHCCFLAGS.py b/test/CC/SHCCFLAGS.py +index 72d36b1..10989a6 100644 +--- a/test/CC/SHCCFLAGS.py ++++ b/test/CC/SHCCFLAGS.py +@@ -36,6 +36,8 @@ barflags = e['SHCCFLAGS'] + ' -DBAR' + + if os.name == 'posix': + os.environ['LD_LIBRARY_PATH'] = '.' ++if sys.platform[:5] == 'haiku': ++ os.environ['LIBRARY_PATH'] = '.' + if sys.platform.find('irix') > -1: + os.environ['LD_LIBRARYN32_PATH'] = '.' + +diff --git a/test/CC/SHCFLAGS.py b/test/CC/SHCFLAGS.py +index 3ec6778..e9821b8 100644 +--- a/test/CC/SHCFLAGS.py ++++ b/test/CC/SHCFLAGS.py +@@ -36,6 +36,8 @@ barflags = e['SHCFLAGS'] + ' -DBAR' + + if os.name == 'posix': + os.environ['LD_LIBRARY_PATH'] = '.' ++if sys.platform[:5] == 'haiku': ++ os.environ['LIBRARY_PATH'] = '.' + if sys.platform.find('irix') > -1: + os.environ['LD_LIBRARYN32_PATH'] = '.' + +diff --git a/test/CXX/CXXFLAGS.py b/test/CXX/CXXFLAGS.py +index 8d72708..ecfa985 100644 +--- a/test/CXX/CXXFLAGS.py ++++ b/test/CXX/CXXFLAGS.py +@@ -38,6 +38,8 @@ _obj = TestSCons._obj + + if os.name == 'posix': + os.environ['LD_LIBRARY_PATH'] = '.' ++if sys.platform[:5] == 'haiku': ++ os.environ['LIBRARY_PATH'] = '.' + if sys.platform.find('irix') > -1: + os.environ['LD_LIBRARYN32_PATH'] = '.' + +diff --git a/test/CXX/SHCXXFLAGS.py b/test/CXX/SHCXXFLAGS.py +index 343be30..824e49f 100644 +--- a/test/CXX/SHCXXFLAGS.py ++++ b/test/CXX/SHCXXFLAGS.py +@@ -37,6 +37,8 @@ _obj = TestSCons._obj + + if os.name == 'posix': + os.environ['LD_LIBRARY_PATH'] = '.' ++if sys.platform[:5] == 'haiku': ++ os.environ['LIBRARY_PATH'] = '.' + if sys.platform.find('irix') > -1: + os.environ['LD_LIBRARYN32_PATH'] = '.' + +diff --git a/test/LINK/VersionedLib-VariantDir.py b/test/LINK/VersionedLib-VariantDir.py +index 4a5ac40..b3eefef 100644 +--- a/test/LINK/VersionedLib-VariantDir.py ++++ b/test/LINK/VersionedLib-VariantDir.py +@@ -96,6 +96,8 @@ if platform == 'cygwin' or platform == 'win32': + + if os.name == 'posix': + os.environ['LD_LIBRARY_PATH'] = test.workpath('build/lib') ++if sys.platform.find('haiku') != -1: ++ os.environ['LIBRARY_PATH'] = test.workpath('build/lib') + if sys.platform.find('irix') != -1: + os.environ['LD_LIBRARYN32_PATH'] = test.workpath('build/lib') + +diff --git a/test/LINK/VersionedLib-j2.py b/test/LINK/VersionedLib-j2.py +index 0cde91c..09fa82c 100644 +--- a/test/LINK/VersionedLib-j2.py ++++ b/test/LINK/VersionedLib-j2.py +@@ -77,6 +77,8 @@ if platform == 'cygwin': + + if os.name == 'posix': + os.environ['LD_LIBRARY_PATH'] = test.workpath('.') ++if sys.platform.find('haiku') != -1: ++ os.environ['LIBRARY_PATH'] = test.workpath('.') + if sys.platform.find('irix') != -1: + os.environ['LD_LIBRARYN32_PATH'] = test.workpath('.') + +diff --git a/test/LINK/VersionedLib-subdir.py b/test/LINK/VersionedLib-subdir.py +index 66fef63..c82b268 100644 +--- a/test/LINK/VersionedLib-subdir.py ++++ b/test/LINK/VersionedLib-subdir.py +@@ -88,6 +88,8 @@ if platform == 'cygwin' or platform == 'win32': + + if os.name == 'posix': + os.environ['LD_LIBRARY_PATH'] = subdir ++if sys.platform.find('haiku') != -1: ++ os.environ['LIBRARY_PATH'] = subdir + if sys.platform.find('irix') != -1: + os.environ['LD_LIBRARYN32_PATH'] = subdir + +diff --git a/test/Libs/SharedLibrary.py b/test/Libs/SharedLibrary.py +index 9e22cfa..8922b24 100644 +--- a/test/Libs/SharedLibrary.py ++++ b/test/Libs/SharedLibrary.py +@@ -209,6 +209,8 @@ test.run(arguments = '.', + + if os.name == 'posix': + os.environ['LD_LIBRARY_PATH'] = '.' ++if sys.platform.find('haiku') != -1: ++ os.environ['LIBRARY_PATH'] = '.' + if sys.platform.find('irix') != -1: + os.environ['LD_LIBRARYN32_PATH'] = '.' + +diff --git a/test/LoadableModule.py b/test/LoadableModule.py +index 18a9c43..744eb84 100644 +--- a/test/LoadableModule.py ++++ b/test/LoadableModule.py +@@ -112,6 +112,7 @@ test.run(arguments = '.', + + if sys.platform in platforms_with_dlopen: + os.environ['LD_LIBRARY_PATH'] = test.workpath() ++ os.environ['LIBRARY_PATH'] = test.workpath() + test.run(program = test.workpath('dlopenprog'), + stdout = "f1.c\ndlopenprog.c\n") + +diff --git a/test/NodeOps.py b/test/NodeOps.py +index 99a3f6a..2b663db 100644 +--- a/test/NodeOps.py ++++ b/test/NodeOps.py +@@ -46,6 +46,8 @@ _dll = TestSCons._dll + + if os.name == 'posix': + os.environ['LD_LIBRARY_PATH'] = '.' ++if sys.platform[:5] == 'haiku': ++ os.environ['LIBRARY_PATH'] = '.' + if sys.platform.find('irix') > -1: + os.environ['LD_LIBRARYN32_PATH'] = '.' + +diff --git a/test/Repository/SharedLibrary.py b/test/Repository/SharedLibrary.py +index 51142aa..42eb4b4 100644 +--- a/test/Repository/SharedLibrary.py ++++ b/test/Repository/SharedLibrary.py +@@ -112,6 +112,8 @@ test.run(chdir='work', + if os.name == 'posix': + if sys.platform[:6] == 'darwin': + os.environ['DYLD_LIBRARY_PATH'] = test.workpath('work') ++ elif sys.platform[:5] == 'haiku': ++ os.environ['LIBRARY_PATH'] = test.workpath('work') + else: + os.environ['LD_LIBRARY_PATH'] = test.workpath('work') + if sys.platform.find('irix') != -1: +-- +2.24.0 + diff --git a/dev-util/scons/scons-3.1.2.recipe b/dev-util/scons/scons-3.1.2.recipe index 9e35132ba..fb8cdcc7f 100644 --- a/dev-util/scons/scons-3.1.2.recipe +++ b/dev-util/scons/scons-3.1.2.recipe @@ -7,9 +7,10 @@ an easier, more reliable and faster way to build software." HOMEPAGE="https://www.scons.org/" COPYRIGHT="2001-2019 The SCons Foundation" LICENSE="MIT" -REVISION="1" -SOURCE_URI="https://sourceforge.net/projects/scons/files/scons/$portVersion/scons-$portVersion.tar.gz" -CHECKSUM_SHA256="7801f3f62f654528e272df780be10c0e9337e897650b62ddcee9f39fde13f8fb" +REVISION="2" +SOURCE_URI="https://github.com/scons/scons/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="6458e0beee0876fa3455b50223f97c54e0546317f8a5e9753acd89e6a5a20f3d" +SOURCE_FILENAME="scons-$portVersion.tar.gz" PATCHES="scons-$portVersion.patchset" ARCHITECTURES="x86_gcc2 x86 x86_64" @@ -37,19 +38,56 @@ BUILD_PREREQUIRES=" cmd:python3 cmd:sed " +TEST_REQUIRES=" + cmd:gcc + " + +PATCH() +{ + copyright='Copyright (c) 2001 - 2019 The SCons Foundation' + release='2019-12-17' + for file in `find . -iname "*.py" -type f`; do + sed -i \ + -e "s|__COPYRIGHT__|$copyright|g" \ + -e "s|__DATE__|$release|g" \ + -e "s|__BUILDSYS__|none|g" \ + -e "s|__DEVELOPER__|none|g" \ + -e "s|__REVISION__|none|g" \ + -e "s|__FILE__|$file|g" \ + -e "s|__VERSION__|$portVersion|g" \ + $file + done +} BUILD() { - python3 setup.py build + # prepare scripts + for _script in scons{,ign,-time,-configure-cache}; do + cp src/script/${_script}.py src/script/${_script} + done + ( + python3 bootstrap.py SConstruct doc + ) + ( + cd src + python3 setup.py build + ) } INSTALL() { + cd src python3 setup.py install \ --prefix="$prefix" \ --install-data="$documentationDir" \ --symlink-scons \ --standard-lib \ - --no-install-bat + --no-install-bat \ + --no-install-man sed -i s/python/python3/ $binDir/scons } + +TEST() +{ + python3 ./runtest.py -a -t +}