Files
haikuports/dev-util/scons/scons-4.4.0.recipe
Han Pengfei b7bcca446c scons: update to 4.4.0 (#7330)
Signed-off-by: Han Pengfei <pengphei@qq.com>

Signed-off-by: Han Pengfei <pengphei@qq.com>
2022-10-31 10:14:49 +01:00

88 lines
2.3 KiB
Bash

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-2021 The SCons Foundation"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/scons/scons/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="b4fef9df167b16b94a91bcc3905c595a5768a433f2aee9abe7f4fffac201eeaa"
SOURCE_FILENAME="scons-$portVersion.tar.gz"
PATCHES="scons-$portVersion.patchset"
PYTHON_VERSION="3.9"
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
setuptools_python39
wheel_python39
"
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
}