2014-07-05 20:31:01 +00:00
|
|
|
# Template file for 'python-PyQt4'
|
|
|
|
pkgname=python-PyQt4
|
2015-06-14 12:04:14 +00:00
|
|
|
version=4.11.4
|
|
|
|
revision=1
|
2014-07-05 20:31:01 +00:00
|
|
|
wrksrc="PyQt-x11-gpl-${version}"
|
2014-12-27 18:54:04 +00:00
|
|
|
hostmakedepends="pkg-config"
|
|
|
|
makedepends="python-devel python3.4-devel python-sip-devel python3.4-sip-devel
|
|
|
|
qt-devel dbus-devel python-dbus-devel MesaLib-devel phonon-devel"
|
|
|
|
depends="python-sip"
|
2015-06-14 12:04:14 +00:00
|
|
|
pycompile_module="PyQt4"
|
2014-11-16 01:06:46 +00:00
|
|
|
short_desc="Python2 bindings for the Qt4 toolkit"
|
2015-01-06 18:15:15 +00:00
|
|
|
_short_desc="${short_desc/Python2/Python3.4}"
|
2014-11-16 01:06:46 +00:00
|
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
2014-07-05 20:40:57 +00:00
|
|
|
homepage="http://www.riverbankcomputing.co.uk/software/pyqt/intro"
|
2014-11-16 01:06:46 +00:00
|
|
|
license="GPL-2, GPL-3"
|
2014-10-21 17:43:00 +00:00
|
|
|
distfiles="${SOURCEFORGE_SITE}/pyqt/PyQt-x11-gpl-${version}.tar.gz"
|
2015-06-14 12:04:14 +00:00
|
|
|
checksum=fc1fe77495432ba3b0d74ff5cb164d375a97f5dddb728256330f615a7cdcf407
|
2014-07-05 20:31:01 +00:00
|
|
|
|
2014-11-16 01:06:46 +00:00
|
|
|
_do_pyqt4_build() {
|
2014-12-27 18:54:04 +00:00
|
|
|
local pyver=${1:-2.7} tools=
|
2014-10-21 17:43:00 +00:00
|
|
|
|
2014-11-16 01:06:46 +00:00
|
|
|
if [ "$pyver" != "2.7" ]; then
|
|
|
|
tools="--no-tools"
|
|
|
|
fi
|
|
|
|
|
|
|
|
python${pyver} configure-ng.py --confirm-license --assume-shared $tools \
|
2014-10-21 17:43:00 +00:00
|
|
|
CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
|
2014-12-27 18:54:04 +00:00
|
|
|
LINK="${CXX}" LINK_SHLIB="${CXX}" LFLAGS="${LDFLAGS}" STRIP=""
|
2014-10-21 17:43:00 +00:00
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
pre_build() {
|
2014-12-27 18:54:04 +00:00
|
|
|
mkdir -p pyqt4
|
|
|
|
mv * pyqt4 || true
|
|
|
|
cp -a pyqt4 pyqt4-3.4
|
|
|
|
rm -rf ${wrksrc}/pyqt4/pyuic/uic/port_v3
|
|
|
|
rm -rf ${wrksrc}/pyqt4-3.4/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-12-27 18:54:04 +00:00
|
|
|
cd ${wrksrc}/pyqt4
|
2014-11-16 01:06:46 +00:00
|
|
|
_do_pyqt4_build
|
2014-10-21 17:43:00 +00:00
|
|
|
|
|
|
|
# build python3.4-pyqt4
|
2014-12-27 18:54:04 +00:00
|
|
|
cd ${wrksrc}/pyqt4-3.4
|
2014-11-16 01:06:46 +00:00
|
|
|
_do_pyqt4_build 3.4
|
2014-07-05 20:31:01 +00:00
|
|
|
}
|
|
|
|
do_install() {
|
2015-01-06 18:15:15 +00:00
|
|
|
# install python{,3.4}-pyqt4
|
2014-12-27 18:54:04 +00:00
|
|
|
make -C pyqt4 DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install
|
|
|
|
make -C pyqt4-3.4 DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install
|
2014-10-21 17:43:00 +00:00
|
|
|
|
2014-12-27 18:54:04 +00:00
|
|
|
cd ${wrksrc}/pyqt4
|
2014-11-16 01:06:46 +00:00
|
|
|
# install python3-pyuic4 wrapper
|
|
|
|
sed -i 's,python2.7,python3.4,g' pyuic4
|
|
|
|
vbin pyuic4 python3-pyuic4
|
2015-01-06 18:15:15 +00:00
|
|
|
# install doc
|
|
|
|
vmkdir usr/share/doc/${pkgname}
|
|
|
|
vcopy "doc/html examples" usr/share/doc/${pkgname}
|
2014-10-21 17:43:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
python-PyQt4-devel-tools_package() {
|
|
|
|
short_desc+=" - development tools"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/pylupdate4
|
|
|
|
vmove usr/bin/pyrcc4
|
|
|
|
}
|
|
|
|
}
|
|
|
|
python-PyQt4-devel_package() {
|
2014-11-16 01:06:46 +00:00
|
|
|
depends="python-sip-devel python3.4-sip-devel
|
2015-06-14 12:04:14 +00:00
|
|
|
python-PyQt4-${version}_${revision} python3.4-PyQt4-${version}_${revision}"
|
2014-10-21 17:43:00 +00:00
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/share/sip
|
|
|
|
}
|
|
|
|
}
|
2014-12-27 18:54:04 +00:00
|
|
|
python-PyQt4-dbus_package() {
|
2015-06-14 12:04:14 +00:00
|
|
|
depends="${sourcepkg}-${version}_${revision} python-dbus"
|
|
|
|
short_desc+=" - dbus support"
|
2014-12-27 18:54:04 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python2.7/site-packages/dbus/mainloop/qt.so
|
|
|
|
}
|
|
|
|
}
|
2014-11-16 01:06:46 +00:00
|
|
|
python-PyQt4-phonon_package() {
|
2015-06-14 12:04:14 +00:00
|
|
|
depends="${sourcepkg}-${version}_${revision}"
|
|
|
|
short_desc+=" - phonon bindings"
|
2014-11-16 01:06:46 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python2.7/site-packages/PyQt4/phonon.so
|
|
|
|
}
|
|
|
|
}
|
2014-10-21 17:43:00 +00:00
|
|
|
python-PyQt4-doc_package() {
|
|
|
|
noarch=yes
|
|
|
|
short_desc+=" - documentation files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/share/doc
|
|
|
|
}
|
2014-07-05 20:31:01 +00:00
|
|
|
}
|
|
|
|
python3.4-PyQt4_package() {
|
2014-12-27 18:54:04 +00:00
|
|
|
depends="python3.4-sip"
|
2015-06-14 12:04:14 +00:00
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="PyQt4"
|
2015-01-06 18:15:15 +00:00
|
|
|
short_desc="${_short_desc}"
|
2014-07-05 20:31:01 +00:00
|
|
|
pkg_install() {
|
2014-11-16 01:06:46 +00:00
|
|
|
vmove usr/bin/python3-pyuic4
|
2014-10-21 17:43:00 +00:00
|
|
|
vmove usr/lib/python3.4
|
2014-07-05 20:31:01 +00:00
|
|
|
}
|
|
|
|
}
|
2014-12-27 18:54:04 +00:00
|
|
|
python3.4-PyQt4-dbus_package() {
|
2015-06-14 12:04:14 +00:00
|
|
|
depends="python3.4-PyQt4-${version}_${revision} python3.4-dbus"
|
|
|
|
short_desc="${_short_desc} - dbus support"
|
2014-12-27 18:54:04 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python3.4/site-packages/dbus/mainloop/qt.so
|
|
|
|
}
|
|
|
|
}
|
2014-11-16 01:06:46 +00:00
|
|
|
python3.4-PyQt4-phonon_package() {
|
2015-06-14 12:04:14 +00:00
|
|
|
depends="python3.4-PyQt4-${version}_${revision}"
|
|
|
|
short_desc="${_short_desc} - phonon bindings"
|
2014-11-16 01:06:46 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python3.4/site-packages/PyQt4/phonon.so
|
|
|
|
}
|
|
|
|
}
|