2014-10-21 17:31:43 +00:00
|
|
|
# Template file for 'sip'
|
|
|
|
pkgname=sip
|
2014-11-15 19:14:14 +00:00
|
|
|
version=4.16.4
|
2014-10-21 17:31:43 +00:00
|
|
|
revision=1
|
|
|
|
wrksrc="sip-${version}"
|
|
|
|
hostmakedepends="python-devel python3.4-devel"
|
|
|
|
makedepends="${hostmakedepends}"
|
|
|
|
replaces="python-sip<4.16.2_2"
|
2014-11-15 19:14:14 +00:00
|
|
|
short_desc="Python extension module generator for C/C++ libraries"
|
2014-10-21 17:31:43 +00:00
|
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
|
|
|
homepage="http://www.riverbankcomputing.co.uk/software/sip/intro"
|
|
|
|
license="GPL-2, GPL-3, SIP"
|
|
|
|
distfiles="${SOURCEFORGE_SITE}/pyqt/${pkgname}-${version}.tar.gz"
|
2014-11-15 19:14:14 +00:00
|
|
|
checksum=ceda443fc5e129e67a067e2cd7b73ff037f8b10b50e407baa2b1d9f2199d57f5
|
2014-10-21 17:31:43 +00:00
|
|
|
|
|
|
|
_do_sip_build() {
|
2014-11-15 19:14:14 +00:00
|
|
|
local pyver=${1:-2.7} pysufx=
|
2014-10-21 17:31:43 +00:00
|
|
|
|
2014-11-15 19:14:14 +00:00
|
|
|
if [ "$pyver" != "2.7" ]; then
|
|
|
|
pysufx="m"
|
|
|
|
fi
|
|
|
|
|
|
|
|
python${pyver} configure.py \
|
2014-10-21 17:31:43 +00:00
|
|
|
CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
|
|
|
|
LINK="${CXX}" LINK_SHLIB="${CXX}" LFLAGS="${LDFLAGS}" STRIP="" \
|
2014-11-15 19:14:14 +00:00
|
|
|
INCDIR="${XBPS_CROSS_BASE}/usr/include/python${pyver}${pysufx}"
|
2014-10-21 17:31:43 +00:00
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
|
|
|
post_extract() {
|
|
|
|
cp -a ${wrksrc} /tmp/python3.4-sip-build
|
|
|
|
mv /tmp/python3.4-sip-build ${wrksrc}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
# build python-sip
|
2014-11-15 19:14:14 +00:00
|
|
|
_do_sip_build
|
2014-10-21 17:31:43 +00:00
|
|
|
|
|
|
|
# build python3.4-sip
|
|
|
|
cd ${wrksrc}/python3.4-sip-build
|
2014-11-15 19:14:14 +00:00
|
|
|
_do_sip_build 3.4
|
2014-10-21 17:31:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
# install sip
|
|
|
|
make DESTDIR=${DESTDIR} install -C sipgen
|
|
|
|
|
|
|
|
# install python-sip
|
|
|
|
make DESTDIR=${DESTDIR} install -C siplib
|
|
|
|
vinstall sipconfig.py 644 usr/lib/python2.7/site-packages
|
|
|
|
vinstall sipdistutils.py 644 usr/lib/python2.7/site-packages
|
|
|
|
|
|
|
|
# install python3.4-sip
|
|
|
|
cd ${wrksrc}/python3.4-sip-build
|
|
|
|
make DESTDIR=${DESTDIR} install -C siplib
|
|
|
|
vinstall sipconfig.py 644 usr/lib/python3.4/site-packages
|
|
|
|
vinstall sipdistutils.py 644 usr/lib/python3.4/site-packages
|
|
|
|
}
|
|
|
|
|
|
|
|
python-sip_package() {
|
|
|
|
replaces="python-sip<4.16.2_2"
|
2014-11-15 19:14:14 +00:00
|
|
|
depends="${sourcepkg}>=${version}_${revision} python"
|
2014-10-21 17:31:43 +00:00
|
|
|
pycompile_module="sipconfig.py"
|
|
|
|
short_desc+=" - Python2 SIP bindings"
|
|
|
|
pkg_install() {
|
2014-11-15 19:14:14 +00:00
|
|
|
vmove usr/lib/python2.7/site-packages/sip.so
|
2014-10-21 17:31:43 +00:00
|
|
|
vmove usr/lib/python2.7/site-packages/sipconfig.py
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python-sip-devel_package() {
|
|
|
|
replaces="python-sip<4.16.2_2"
|
|
|
|
depends="python-sip>=${version}_${revision}"
|
|
|
|
pycompile_module="sipdistutils.py"
|
2014-11-15 19:14:14 +00:00
|
|
|
short_desc+=" - Python2 SIP bindings (development files)"
|
2014-10-21 17:31:43 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include/python2.7
|
|
|
|
vmove usr/lib/python2.7/site-packages/sipdistutils.py
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-sip_package() {
|
|
|
|
replaces="python3.4-sip<4.16.2_2"
|
2014-11-15 19:14:14 +00:00
|
|
|
depends="${sourcepkg}>=${version}_${revision} python3.4"
|
2014-10-21 17:31:43 +00:00
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="sipconfig.py"
|
|
|
|
short_desc+=" - Python3.4 SIP bindings"
|
|
|
|
pkg_install() {
|
2014-11-15 19:14:14 +00:00
|
|
|
vmove usr/lib/python3.4/site-packages/sip.so
|
2014-10-21 17:31:43 +00:00
|
|
|
vmove usr/lib/python3.4/site-packages/sipconfig.py
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-sip-devel_package() {
|
|
|
|
replaces="python3.4-sip<4.16.2_2"
|
|
|
|
depends="python3.4-sip>=${version}_${revision}"
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="sipdistutils.py"
|
2014-11-15 19:14:14 +00:00
|
|
|
short_desc+=" - Python3.4 SIP bindings (development files)"
|
2014-10-21 17:31:43 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include/python3.4m
|
|
|
|
vmove usr/lib/python3.4/site-packages/sipdistutils.py
|
|
|
|
}
|
|
|
|
}
|