mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
dev-python/sip: update to 4.19.5
Reworked recipe, removed python2-sip since both are the same binary. The headers was also moved to includeDir. Now also builds a version for PyQt5
This commit is contained in:
48
dev-python/sip/licenses/SIP
Normal file
48
dev-python/sip/licenses/SIP
Normal file
@@ -0,0 +1,48 @@
|
||||
RIVERBANK COMPUTING LIMITED LICENSE AGREEMENT FOR SIP
|
||||
|
||||
1. This LICENSE AGREEMENT is between Riverbank Computing Limited ("Riverbank"),
|
||||
and the Individual or Organization ("Licensee") accessing and otherwise using
|
||||
SIP software in source or binary form and its associated documentation. SIP
|
||||
comprises a software tool for generating Python bindings for software C and C++
|
||||
libraries, and a Python extension module used at runtime by those generated
|
||||
bindings.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, Riverbank
|
||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide license to
|
||||
reproduce, analyze, test, perform and/or display publicly, prepare derivative
|
||||
works, distribute, and otherwise use SIP alone or in any derivative version,
|
||||
provided, however, that Riverbank's License Agreement and Riverbank's notice of
|
||||
copyright, e.g., "Copyright (c) 2015 Riverbank Computing Limited; All Rights
|
||||
Reserved" are retained in SIP alone or in any derivative version prepared by
|
||||
Licensee.
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on or
|
||||
incorporates SIP or any part thereof, and wants to make the derivative work
|
||||
available to others as provided herein, then Licensee hereby agrees to include
|
||||
in any such work a brief summary of the changes made to SIP.
|
||||
|
||||
4. Licensee may not use SIP to generate Python bindings for any C or C++
|
||||
library for which bindings are already provided by Riverbank.
|
||||
|
||||
5. Riverbank is making SIP available to Licensee on an "AS IS" basis.
|
||||
RIVERBANK MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY
|
||||
OF EXAMPLE, BUT NOT LIMITATION, RIVERBANK MAKES NO AND DISCLAIMS ANY
|
||||
REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
|
||||
PURPOSE OR THAT THE USE OF SIP WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
6. RIVERBANK SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF SIP FOR ANY
|
||||
INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING,
|
||||
DISTRIBUTING, OR OTHERWISE USING SIP, OR ANY DERIVATIVE THEREOF, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
7. This License Agreement will automatically terminate upon a material breach
|
||||
of its terms and conditions.
|
||||
|
||||
8. Nothing in this License Agreement shall be deemed to create any relationship
|
||||
of agency, partnership, or joint venture between Riverbank and Licensee. This
|
||||
License Agreement does not grant permission to use Riverbank trademarks or
|
||||
trade name in a trademark sense to endorse or promote products or services of
|
||||
Licensee, or any third party.
|
||||
|
||||
9. By copying, installing or otherwise using SIP, Licensee agrees to be bound
|
||||
by the terms and conditions of this License Agreement.
|
||||
137
dev-python/sip/sip-4.19.12.recipe
Normal file
137
dev-python/sip/sip-4.19.12.recipe
Normal file
@@ -0,0 +1,137 @@
|
||||
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="2018 Riverbank Computing Limited"
|
||||
LICENSE="GNU GPL v2
|
||||
GNU GPL v3
|
||||
SIP"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://downloads.sourceforge.net/pyqt/sip-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="24617fc31b983df075500ecac0e99d2fb48bf63ba82d4a17518659e571923822"
|
||||
SOURCE_DIR="sip-$portVersion"
|
||||
PATCHES="sip-$portVersion.patch"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = "x86_gcc2" ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
sip$secondaryArchSuffix = $portVersion
|
||||
cmd:sip = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python python3)
|
||||
PYTHON_VERSIONS=(2.7 3.6)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
maybe_sipNoSuffix=
|
||||
maybe_sipPyQtNoSuffix=
|
||||
if [ "$targetArchitecture" = "x86_gcc2" ]; then
|
||||
maybe_sipNoSuffix="sip_$pythonPackage = $portVersion"
|
||||
maybe_sipPyQtNoSuffix="sip_pyqt_$pythonPackage = $portVersion"
|
||||
fi
|
||||
|
||||
eval "
|
||||
PROVIDES_${pythonPackage}=\"
|
||||
sip${secondaryArchSuffix}_$pythonPackage = $portVersion
|
||||
$maybe_sipNoSuffix
|
||||
\"
|
||||
REQUIRES_$pythonPackage=\"
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:python$pythonVersion
|
||||
\"
|
||||
PROVIDES_pyqt_${pythonPackage}=\"
|
||||
sip${secondaryArchSuffix}_pyqt_${pythonPackage} = $portVersion
|
||||
$maybe_sipPyQtNoSuffix
|
||||
\"
|
||||
REQUIRES_pyqt_${pythonPackage}=\"
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:python$pythonVersion
|
||||
\"
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
BUILD()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation="$prefix"/lib/$python/vendor-packages/
|
||||
export PYTHONPATH="$installLocation"
|
||||
|
||||
mkdir -p build_$pythonPackage build_pyqt_$pythonPackage
|
||||
cd build_$pythonPackage
|
||||
|
||||
$python ../configure.py \
|
||||
--platform=haiku-g++ \
|
||||
--bindir=$commandBinDir \
|
||||
--incdir=$includeDir \
|
||||
--destdir=$installLocation
|
||||
make $jobArgs
|
||||
|
||||
cd ../build_pyqt_$pythonPackage
|
||||
$python ../configure.py \
|
||||
--platform=haiku-g++ \
|
||||
--bindir=$commandBinDir \
|
||||
--incdir=$includeDir \
|
||||
--destdir=$installLocation \
|
||||
--sip-module PyQt5.sip \
|
||||
--no-tools
|
||||
make $jobArgs
|
||||
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation="$prefix"/lib/$python/vendor-packages/
|
||||
|
||||
cd build_$pythonPackage
|
||||
make install
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$prefix/lib/$python"
|
||||
|
||||
cd ../build_pyqt_$pythonPackage
|
||||
make install
|
||||
|
||||
packageEntries pyqt_$pythonPackage \
|
||||
"$prefix/lib/$python"
|
||||
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user