void-packages/srcpkgs/python-PyQt4/template

106 lines
2.6 KiB
Text
Raw Normal View History

2014-07-05 20:31:01 +00:00
# Template file for 'python-PyQt4'
pkgname=python-PyQt4
2014-10-21 17:43:00 +00:00
version=4.11.2
revision=1
2014-07-05 20:31:01 +00:00
wrksrc="PyQt-x11-gpl-${version}"
maintainer="Dominik Honnef <dominik@honnef.co>"
2014-10-21 17:43:00 +00:00
hostmakedepends="
python-devel python3.4-devel python-sip-devel python3.4-sip-devel qt-qmake qt-devel"
2014-07-05 20:31:01 +00:00
makedepends="${hostmakedepends}"
2014-10-21 17:43:00 +00:00
depends="python-sip"
replaces="python-PyQt4<4.11.1_2"
license="GPL-2, GPL-3"
homepage="http://www.riverbankcomputing.co.uk/software/pyqt/intro"
2014-11-01 20:53:39 +00:00
update_pkgname="PyQt-x11-gpl"
2014-10-21 17:43:00 +00:00
short_desc="Python2 bindings for the Qt4 toolkit"
distfiles="${SOURCEFORGE_SITE}/pyqt/PyQt-x11-gpl-${version}.tar.gz"
checksum=05dfc4060d25f81e5d45fb020ad59d21af7dc4c01ace4d2b37f3b49493d03f6e
2014-07-05 20:31:01 +00:00
_do_pyqt_build() {
local v=$1 tools=${2:-yes} suffix=$3 tools_flag
[[ "$tools" != "yes" ]] && tools_flag="--no-tools"
2014-10-21 17:43:00 +00:00
python${v} configure-ng.py \
--confirm-license --assume-shared $tools_flag \
CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
LINK="${CXX}" LINK_SHLIB="${CXX}" LFLAGS="${LDFLAGS}" STRIP="" \
INCDIR="${XBPS_CROSS_BASE}/usr/include/python${v}${suffix}"
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 20:31:01 +00:00
}
do_build() {
2014-10-21 17:43:00 +00:00
# build python-pyqt4
2014-07-05 20:31:01 +00:00
_do_pyqt_build 2.7
2014-10-21 17:43:00 +00:00
# build python3.4-pyqt4
cd ${wrksrc}/python3.4-PyQt4-build
2014-07-05 20:31:01 +00:00
_do_pyqt_build 3.4 no "m"
}
do_install() {
2014-10-21 17:43:00 +00: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() {
# install pyuic4 wrapper
vbin ${FILESDIR}/pyuic4
}
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
vmove usr/bin/pyuic4
}
}
python-PyQt4-devel_package() {
replaces="python-PyQt4<4.11.1_2"
depends="python-sip-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/share/sip
}
}
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 20:31:01 +00:00
}
python3.4-PyQt4_package() {
2014-10-21 17:43:00 +00:00
replaces="python3.4-PyQt4<4.11.1_2"
depends="python3.4-sip"
short_desc="${short_desc/Python2/Python3.4}"
2014-07-05 20:31:01 +00:00
pkg_install() {
2014-10-21 17:43:00 +00:00
vmove usr/lib/python3.4
2014-07-05 20:31:01 +00:00
}
}