Files
haikuports/dev-python/sip/sip-4.19.5.recipe
2017-11-06 18:42:31 +01:00

115 lines
2.6 KiB
Bash

SUMMARY="A tool to create Python bindings for C and C++ libraries"
DESCRIPTION="SIP comprises a code generator and a Python module. The code generator \
processes a set of specification files and generates C or C++ code which is \
then compiled to create the bindings extension module. The SIP Python \
module provides support functions to the automatically generated code."
HOMEPAGE="https://www.riverbankcomputing.com/software/sip/"
COPYRIGHT="2015 Riverbank Computing Limited"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="http://sourceforge.net/projects/pyqt/files/sip/sip-$portVersion/sip-$portVersion.tar.gz"
CHECKSUM_SHA256="391b7bf08f1cd12d8a25ed5608ca36ee9b759eee1690d8156e35d92f9a74b456"
SOURCE_DIR="sip-$portVersion"
PATCHES="sip-$portVersion.patch"
PYTHON3_VERSION="3.6"
ARCHITECTURES="x86 x86_gcc2 x86_64"
PROVIDES="
sip = $portVersion
"
REQUIRES="
"
PROVIDES_python="
sip_python = $portVersion
cmd:python2_sip = $portVersion
"
REQUIRES_python="
haiku
cmd:python2
"
REPLACES_python="
python_sip
"
PROVIDES_python3="
sip_python3 = $portVersion
cmd:sip = $portVersion
"
REQUIRES_python3="
haiku
cmd:python$PYTHON3_VERSION
"
REPLACES_python3="
python3_sip
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:python2
cmd:python$PYTHON3_VERSION
cmd:gcc
cmd:make
"
BUILD()
{
OLDPYTHONPATH=$PYTHONPATH
mkdir -p build && cd build
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python2/bin/python2
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$OLDPYTHONPATH
$python ../configure.py \
--platform=haiku-g++ \
--bindir=$binDir \
--incdir=$includeDir/python2.7 \
--destdir=$installLocation \
#--sipdir= \
make $jobArgs
mkdir -p ../build3 && cd ../build3
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python$PYTHON3_VERSION/bin/python3
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$OLDPYTHONPATH
$python ../configure.py \
--platform=haiku-g++ \
--bindir=$binDir \
--incdir=$includeDir/python${pythonVersion}m \
--destdir=$installLocation \
#--sipdir= \
make $jobArgs
}
INSTALL()
{
cd build
make install
mv $binDir/sip $binDir/python2-sip
packageEntries python \
$prefix/lib/python* \
$binDir \
$developDir
cd ../build3
make install
packageEntries python3 \
$prefix/lib/python* \
$binDir \
$developDir
}