sip: add python{2,3}-PyQt5 subpackage

This is needed since PyQt5>=5.11 requires to have sip in it's own python
module path
This commit is contained in:
John 2018-11-23 21:42:08 +01:00 committed by maxice8
parent b7038962bd
commit 28ace0d30b
3 changed files with 39 additions and 7 deletions

1
srcpkgs/python-sip-PyQt5 Symbolic link
View File

@ -0,0 +1 @@
sip

1
srcpkgs/python3-sip-PyQt5 Symbolic link
View File

@ -0,0 +1 @@
sip

View File

@ -1,14 +1,14 @@
# Template file for 'sip'
pkgname=sip
version=4.19.13
revision=1
revision=2
wrksrc="sip-${version}"
hostmakedepends="python-devel python3-devel"
makedepends="${hostmakedepends}"
short_desc="Python extension module generator for C/C++ libraries"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="GPL-2.0-only, GPL-3.0-only, SIP"
homepage="https://riverbankcomputing.com/software/sip/intro"
license="GPL-2, GPL-3, SIP"
distfiles="${SOURCEFORGE_SITE}/pyqt/sip/sip-${version}/sip-${version}.tar.gz"
checksum=e353a7056599bf5fbd5d3ff9842a6ab2ea3cf4e0304a0f925ec5862907c0d15e
@ -16,20 +16,24 @@ pre_build() {
mkdir -p sip-${py2_ver}
mv * sip-${py2_ver} || true
cp -a sip-${py2_ver} sip-${py3_ver}
cp -a sip-${py2_ver} sip-${py3_ver}-PyQt5
cp -a sip-${py2_ver} sip-${py2_ver}-PyQt5
}
do_build() {
for pyver in $py2_ver $py3_ver; do
if [ "$pyver" != "$py2_ver" ]; then
for pyver in $py2_ver $py3_ver ${py3_ver}-PyQt5 ${py2_ver}-PyQt5; do
if [ "${pyver%-PyQt5}" != "$py2_ver" ]; then
pyinc="$py3_inc"
else
pyinc="$py2_inc"
fi
if [ "${pyver##*-}" = "PyQt5" ]; then
pyqt5="--sip-module PyQt5.sip --no-tools"
fi
cd ${wrksrc}/sip-${pyver}
python${pyver} configure.py \
python${pyver%-PyQt5} configure.py \
CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
LINK="${CXX}" LINK_SHLIB="${CXX}" LFLAGS="${LDFLAGS}" STRIP="" \
INCDIR="${XBPS_CROSS_BASE}/${pyinc}"
INCDIR="${XBPS_CROSS_BASE}/${pyinc}" ${pyqt5}
make ${makejobs}
done
}
@ -48,6 +52,14 @@ do_install() {
make DESTDIR=${DESTDIR} install -C siplib
vinstall sipconfig.py 644 $py3_sitelib
vinstall sipdistutils.py 644 $py3_sitelib
# install python3 PyQt5 sip
cd ${wrksrc}/sip-${py3_ver}-PyQt5
make DESTDIR=${DESTDIR} install -C siplib
# install python2 PyQt5 sip
cd ${wrksrc}/sip-${py2_ver}-PyQt5
make DESTDIR=${DESTDIR} install -C siplib
}
python-sip_package() {
@ -90,3 +102,21 @@ python3-sip-devel_package() {
vmove ${py3_sitelib}/sipdistutils.py
}
}
python3-sip-PyQt5_package() {
lib32disabled=yes
depends="${sourcepkg}-${version}_${revision} python3"
short_desc="Python3 SIP bindings (PyQt5 version)"
pkg_install() {
vmove ${py3_sitelib}/PyQt5/sip.so
vmove ${py3_sitelib}/PyQt5/sip.pyi
}
}
python-sip-PyQt5_package() {
lib32disabled=yes
depends="${sourcepkg}-${version}_${revision} python3"
short_desc="Python2 SIP bindings (PyQt5 version)"
pkg_install() {
vmove ${py2_sitelib}/PyQt5/sip.so
vmove ${py2_sitelib}/PyQt5/sip.pyi
}
}