mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
scons: move to dev-build
gentoo moved from dev-util
This commit is contained in:
@@ -1,293 +0,0 @@
|
||||
From b77bebdf15ede3d5817c4aa16a2b9d5b447e4e5d Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Weinhold <ingo_weinhold@gmx.de>
|
||||
Date: Fri, 9 Aug 2013 17:46:35 +0200
|
||||
Subject: Add support for the Haiku platform
|
||||
|
||||
|
||||
diff --git a/SCons/Platform/__init__.py b/SCons/Platform/__init__.py
|
||||
index 77eea5c..3bd20d6 100644
|
||||
--- a/SCons/Platform/__init__.py
|
||||
+++ b/SCons/Platform/__init__.py
|
||||
@@ -75,6 +75,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/SCons/Platform/haiku.py b/SCons/Platform/haiku.py
|
||||
new file mode 100644
|
||||
index 0000000..3ea01f8
|
||||
--- /dev/null
|
||||
+++ b/SCons/Platform/haiku.py
|
||||
@@ -0,0 +1,70 @@
|
||||
+"""SCons.Platform.haiku
|
||||
+
|
||||
+Platform-specific initialization for Haiku systems.
|
||||
+
|
||||
+There normally shouldn't be any need to import this module directly. It
|
||||
+will usually be imported through the generic SCons.Platform.Platform()
|
||||
+selection method.
|
||||
+"""
|
||||
+
|
||||
+#
|
||||
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
|
||||
+#
|
||||
+# Permission is hereby granted, free of charge, to any person obtaining
|
||||
+# a copy of this software and associated documentation files (the
|
||||
+# "Software"), to deal in the Software without restriction, including
|
||||
+# without limitation the rights to use, copy, modify, merge, publish,
|
||||
+# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
+# permit persons to whom the Software is furnished to do so, subject to
|
||||
+# the following conditions:
|
||||
+#
|
||||
+# The above copyright notice and this permission notice shall be included
|
||||
+# in all copies or substantial portions of the Software.
|
||||
+#
|
||||
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
||||
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+#
|
||||
+
|
||||
+__revision__ = ""
|
||||
+
|
||||
+import os
|
||||
+import subprocess
|
||||
+from . import posix
|
||||
+
|
||||
+def findDir(identifier):
|
||||
+ return str(subprocess.check_output(['finddir', identifier], shell=False).rstrip())
|
||||
+
|
||||
+def generate(env):
|
||||
+ posix.generate(env)
|
||||
+
|
||||
+ # determine, if building for the secondary architecture
|
||||
+ secondaryArch = os.environ.get('HAIKU_SECONDARY_ARCH')
|
||||
+ archSubDir = '/' + secondaryArch if secondaryArch else ''
|
||||
+
|
||||
+ # PATH
|
||||
+ pathDescriptions = [
|
||||
+ ('B_USER_NONPACKAGED_BIN_DIRECTORY', None),
|
||||
+ ('B_USER_BIN_DIRECTORY', None),
|
||||
+ ('B_SYSTEM_NONPACKAGED_BIN_DIRECTORY', None),
|
||||
+ ('B_SYSTEM_BIN_DIRECTORY', None)
|
||||
+ ]
|
||||
+
|
||||
+ paths = []
|
||||
+ for pathConstant, subDir in pathDescriptions:
|
||||
+ path = findDir(pathConstant)
|
||||
+ if subDir:
|
||||
+ path += '/' + subDir
|
||||
+ paths.append(path)
|
||||
+
|
||||
+ paths.append('/bin')
|
||||
+
|
||||
+ if secondaryArch:
|
||||
+ # prepend the secondary arch subdirectories
|
||||
+ paths = [path + archSubDir for path in paths] + paths
|
||||
+
|
||||
+ env['ENV']['PATH'] = ':'.join(paths)
|
||||
--
|
||||
2.42.1
|
||||
|
||||
|
||||
From 0d05b41773f3b766ad1f86f43db88fd4f20a1af8 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 27 Apr 2020 21:28:15 +0200
|
||||
Subject: Haiku: add LIBRARY_PATH handling
|
||||
|
||||
|
||||
diff --git a/site_scons/BuildCommandLine.py b/site_scons/BuildCommandLine.py
|
||||
index d401aed..465ae61 100644
|
||||
--- a/site_scons/BuildCommandLine.py
|
||||
+++ b/site_scons/BuildCommandLine.py
|
||||
@@ -204,7 +204,7 @@ class BuildCommandLine:
|
||||
# Re-exporting LD_LIBRARY_PATH is necessary if the Python version was
|
||||
# built with the --enable-shared option.
|
||||
self.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:
|
||||
self.ENV[key] = os.environ[key]
|
||||
|
||||
diff --git a/test/CC/SHCCFLAGS.py b/test/CC/SHCCFLAGS.py
|
||||
index 71ed1c0..1277577 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 a691dba..5e1c89a 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 8f84a1a..436e179 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 53ae5d0..bcb5de6 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 cda9065..bb0af84 100644
|
||||
--- a/test/Libs/SharedLibrary.py
|
||||
+++ b/test/Libs/SharedLibrary.py
|
||||
@@ -198,6 +198,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 a2db429..9cd5dba 100644
|
||||
--- a/test/NodeOps.py
|
||||
+++ b/test/NodeOps.py
|
||||
@@ -42,6 +42,8 @@ from TestSCons import _exe, lib_, _lib, _obj, dll_, _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 04ce1a5..0f1ee40 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.42.1
|
||||
|
||||
|
||||
From e7d3755df9eff0977a13384241ca9f73c53dda4f Mon Sep 17 00:00:00 2001
|
||||
From: Han Pengfei <pengphei@qq.com>
|
||||
Date: Thu, 27 Oct 2022 10:15:59 +0000
|
||||
Subject: Remove man page generated for package
|
||||
|
||||
Signed-off-by: Han Pengfei <pengphei@qq.com>
|
||||
|
||||
diff --git a/setup.cfg b/setup.cfg
|
||||
index b6d7a5e..37f2f6a 100644
|
||||
--- a/setup.cfg
|
||||
+++ b/setup.cfg
|
||||
@@ -69,10 +69,10 @@ console_scripts =
|
||||
SCons.Tool.docbook = *.*
|
||||
|
||||
|
||||
-[options.data_files]
|
||||
-. = scons.1
|
||||
- scons-time.1
|
||||
- sconsign.1
|
||||
+#[options.data_files]
|
||||
+#. = scons.1
|
||||
+# scons-time.1
|
||||
+# sconsign.1
|
||||
|
||||
[sdist]
|
||||
dist_dir=build/dist
|
||||
--
|
||||
2.42.1
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
SUMMARY="A software construction tool"
|
||||
DESCRIPTION="SCons is an open-source software construction tool - that is, a \
|
||||
next-generation build tool. Think of SCons as an improved, cross-platform \
|
||||
substitute for the classic Make utility with integrated functionality similar \
|
||||
to autoconf/automake and compiler caches such as ccache. In short, SCons is \
|
||||
an easier, more reliable and faster way to build software."
|
||||
HOMEPAGE="https://www.scons.org/"
|
||||
COPYRIGHT="2001-2023 The SCons Foundation"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/scons/scons/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="085fc9df961224b91ed715c5c44a11796a3e614d146139989ab14e8a347425ff"
|
||||
SOURCE_FILENAME="scons-$portVersion.tar.gz"
|
||||
PATCHES="scons-$portVersion.patchset"
|
||||
PYTHON_VERSION="3.10"
|
||||
python_PACKAGE="python310"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
|
||||
PROVIDES="
|
||||
scons = $portVersion compat >= 3
|
||||
cmd:scons = $portVersion compat >= 3
|
||||
cmd:scons_$portVersion = $portVersion compat >= 3
|
||||
cmd:scons_configure_cache = $portVersion compat >= 3
|
||||
cmd:scons_configure_cache_$portVersion = $portVersion compat >= 3
|
||||
cmd:sconsign = $portVersion compat >= 3
|
||||
cmd:sconsign_$portVersion = $portVersion compat >= 3
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
cmd:python$PYTHON_VERSION
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
pip_$python_PACKAGE
|
||||
setuptools_$python_PACKAGE
|
||||
wheel_$python_PACKAGE
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:python$PYTHON_VERSION
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
TEST_REQUIRES="
|
||||
cmd:gcc
|
||||
cmd:python$PYTHON_VERSION
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# GENERIC: all python_setuptools-based installs need this
|
||||
python=$portPackageLinksDir/cmd~python$PYTHON_VERSION/bin/python$PYTHON_VERSION
|
||||
|
||||
# prepare scripts
|
||||
for _script in scons{,ign,-configure-cache}; do
|
||||
cp scripts/${_script}.py scripts/${_script}
|
||||
done
|
||||
(
|
||||
$python scripts/scons.py doc/man
|
||||
)
|
||||
(
|
||||
$python setup.py build
|
||||
)
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# GENERIC: all python_setuptools-based installs need this
|
||||
python=$portPackageLinksDir/cmd~python$PYTHON_VERSION/bin/python$PYTHON_VERSION
|
||||
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
|
||||
|
||||
# Without psutil, we can't create man page
|
||||
#mkdir -p $docDir
|
||||
#mv $prefix/share/man $manDir
|
||||
#rm -rf $prefix/share
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
python$PYTHON_VERSION ./runtest.py -a -t
|
||||
}
|
||||
Reference in New Issue
Block a user