scons: add recipe for version 3.1.1 (#4437)

This commit is contained in:
Plüss Roland
2019-12-12 11:40:16 +01:00
committed by Jérôme Duval
parent 830d9bf0d5
commit fabd12b6fc
2 changed files with 149 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
From c30cc8ab914c08d37fe69d62a46609fd3b728f5b 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/engine/SCons/Platform/__init__.py b/engine/SCons/Platform/__init__.py
index c95f291..2fb360b 100644
--- a/engine/SCons/Platform/__init__.py
+++ b/engine/SCons/Platform/__init__.py
@@ -78,6 +78,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
--- /dev/null
+++ b/engine/SCons/Platform/haiku.py
@@ -0,0 +1,68 @@
+"""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 commands
+import os
+import posix
+
+def findDir(identifier):
+ return commands.getoutput('finddir %s' % identifier)
+
+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)
+
+ if secondaryArch:
+ # prepend the secondary arch subdirectories
+ paths = [path + archSubDir for path in paths] + paths
+
+ env['ENV']['PATH'] = ':'.join(paths)
--
2.10.2

View File

@@ -0,0 +1,53 @@
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-2019 The SCons Foundation"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="http://sourceforge.net/projects/scons/files/scons/$portVersion/scons-$portVersion.tar.gz"
CHECKSUM_SHA256="4cea417fdd7499a36f407923d03b4b7000b0f9e8fd7b31b316b9ce7eba9143a5"
PATCHES="scons-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
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:scons_time = $portVersion compat >= 3
cmd:scons_time_$portVersion = $portVersion compat >= 3
cmd:sconsign = $portVersion compat >= 3
cmd:sconsign_$portVersion = $portVersion compat >= 3
"
REQUIRES="
haiku
cmd:python3
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:python3
"
BUILD()
{
python3 setup.py build
}
INSTALL()
{
python3 setup.py install \
--prefix="$prefix" \
--install-data="$documentationDir" \
--symlink-scons \
--standard-lib \
--no-install-bat
}