void-packages/srcpkgs/python-PyQt4/template

128 lines
3.2 KiB
Plaintext
Raw Normal View History

2014-07-05 22:31:01 +02:00
# Template file for 'python-PyQt4'
pkgname=python-PyQt4
2014-11-16 02:06:46 +01:00
version=4.11.3
2014-10-21 19:43:00 +02:00
revision=1
2014-07-05 22:31:01 +02:00
wrksrc="PyQt-x11-gpl-${version}"
2014-11-16 02:06:46 +01:00
hostmakedepends="pkg-config python-devel python3.4-devel"
makedepends="${hostmakedepends} python-sip-devel python3.4-sip-devel
qt-qmake qt-devel dbus-devel python-dbus-devel MesaLib-devel phonon-devel"
depends="python-sip python-dbus"
2014-10-21 19:43:00 +02:00
replaces="python-PyQt4<4.11.1_2"
2014-11-16 02:06:46 +01:00
short_desc="Python2 bindings for the Qt4 toolkit"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="http://www.riverbankcomputing.co.uk/software/pyqt/intro"
2014-11-01 21:53:39 +01:00
update_pkgname="PyQt-x11-gpl"
2014-11-16 02:06:46 +01:00
license="GPL-2, GPL-3"
2014-10-21 19:43:00 +02:00
distfiles="${SOURCEFORGE_SITE}/pyqt/PyQt-x11-gpl-${version}.tar.gz"
2014-11-16 02:06:46 +01:00
checksum=853780dcdbe2e6ba785d703d059b096e1fc49369d3e8d41a060be874b8745686
2014-07-05 22:31:01 +02:00
2014-11-16 02:06:46 +01:00
_do_pyqt4_build() {
local pyver=${1:-2.7} pysufx= tools=
2014-10-21 19:43:00 +02:00
2014-11-16 02:06:46 +01:00
if [ "$pyver" != "2.7" ]; then
pysufx="m"
tools="--no-tools"
fi
python${pyver} configure-ng.py --confirm-license --assume-shared $tools \
2014-10-21 19:43:00 +02:00
CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
LINK="${CXX}" LINK_SHLIB="${CXX}" LFLAGS="${LDFLAGS}" STRIP="" \
2014-11-16 02:06:46 +01:00
INCDIR="${XBPS_CROSS_BASE}/usr/include/python${pyver}${pysufx}"
2014-10-21 19:43:00 +02:00
make ${makejobs}
}
post_extract() {
cp -a ${wrksrc} /tmp/python3.4-PyQt4-build
mv /tmp/python3.4-PyQt4-build ${wrksrc}
}
pre_build() {
rm -rf pyuic/uic/port_v3
cd ${wrksrc}/python3.4-PyQt4-build
rm -rf pyuic/uic/port_v2
2014-07-05 22:31:01 +02:00
}
do_build() {
2014-10-21 19:43:00 +02:00
# build python-pyqt4
2014-11-16 02:06:46 +01:00
cd ${wrksrc}
_do_pyqt4_build
2014-10-21 19:43:00 +02:00
# build python3.4-pyqt4
cd ${wrksrc}/python3.4-PyQt4-build
2014-11-16 02:06:46 +01:00
_do_pyqt4_build 3.4
2014-07-05 22:31:01 +02:00
}
do_install() {
2014-10-21 19:43:00 +02:00
# install python-pyqt4
make DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install
# install python3.4-pyqt4
cd ${wrksrc}/python3.4-PyQt4-build
make DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install
# install doc
vmkdir usr/share/doc/${pkgname}
vcopy "doc/html examples" usr/share/doc/${pkgname}
}
post_install() {
2014-11-16 02:06:46 +01:00
# install python3-pyuic4 wrapper
sed -i 's,python2.7,python3.4,g' pyuic4
vbin pyuic4 python3-pyuic4
2014-10-21 19:43:00 +02:00
}
python-PyQt4-devel-tools_package() {
replaces="python-PyQt4<4.11.1_2"
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development tools"
pkg_install() {
vmove usr/bin/pylupdate4
vmove usr/bin/pyrcc4
}
}
python-PyQt4-devel_package() {
replaces="python-PyQt4<4.11.1_2"
2014-11-16 02:06:46 +01:00
depends="python-sip-devel python3.4-sip-devel
python-PyQt4>=${version}_${revision} python3.4-PyQt4>=${version}_${revision}"
2014-10-21 19:43:00 +02:00
short_desc+=" - development files"
pkg_install() {
vmove usr/share/sip
}
}
2014-11-16 02:06:46 +01:00
python-PyQt4-phonon_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - Python2 bindings for Phonon"
pkg_install() {
vmove usr/lib/python2.7/site-packages/PyQt4/phonon.so
}
}
2014-10-21 19:43:00 +02:00
python-PyQt4-doc_package() {
noarch=yes
replaces="python-PyQt4<4.11.1_2"
short_desc+=" - documentation files"
pkg_install() {
vmove usr/share/doc
}
2014-07-05 22:31:01 +02:00
}
python3.4-PyQt4_package() {
2014-10-21 19:43:00 +02:00
replaces="python3.4-PyQt4<4.11.1_2"
2014-11-16 02:06:46 +01:00
depends="python3.4-sip python3.4-dbus"
short_desc="${short_desc/Python2/Python3.4}"
2014-07-05 22:31:01 +02:00
pkg_install() {
2014-11-16 02:06:46 +01:00
vmove usr/bin/python3-pyuic4
2014-10-21 19:43:00 +02:00
vmove usr/lib/python3.4
2014-07-05 22:31:01 +02:00
}
}
2014-11-16 02:06:46 +01:00
python3.4-PyQt4-phonon_package() {
depends="python3.4-PyQt4>=${version}_${revision}"
short_desc+=" - Python3.4 bindings for Phonon"
pkg_install() {
vmove usr/lib/python3.4/site-packages/PyQt4/phonon.so
}
}