diff --git a/srcpkgs/python-PyQt4/template b/srcpkgs/python-PyQt4/template index 4790430d9b6..c7dab37fcfa 100644 --- a/srcpkgs/python-PyQt4/template +++ b/srcpkgs/python-PyQt4/template @@ -1,63 +1,57 @@ # Template file for 'python-PyQt4' pkgname=python-PyQt4 version=4.11.4 -revision=5 +revision=6 wrksrc="PyQt-x11-gpl-${version}" hostmakedepends="pkg-config" -makedepends="python-devel python3.4-devel python-sip-devel python3.4-sip-devel +makedepends="python-devel python3-devel python-sip-devel python3-sip-devel qt-devel qt-webkit-devel dbus-devel python-dbus-devel MesaLib-devel phonon-devel" depends="python-sip" pycompile_module="PyQt4" short_desc="Python2 bindings for the Qt4 toolkit" -_short_desc="${short_desc/Python2/Python3.4}" maintainer="Alessio Sergi " homepage="http://www.riverbankcomputing.co.uk/software/pyqt/intro" license="GPL-2, GPL-3" distfiles="${SOURCEFORGE_SITE}/pyqt/PyQt-x11-gpl-${version}.tar.gz" checksum=fc1fe77495432ba3b0d74ff5cb164d375a97f5dddb728256330f615a7cdcf407 -alternatives="pyqt4:pyuic4:/usr/bin/pyuic4-2.7" +alternatives="pyqt4:pyuic4:/usr/bin/python2-pyuic4" -_do_pyqt4_build() { - local pyver=${1:-2.7} tools= - - if [ "$pyver" != "2.7" ]; then - tools="--no-tools" - fi - - python${pyver} configure-ng.py --confirm-license --assume-shared $tools \ - CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ - LINK="${CXX}" LINK_SHLIB="${CXX}" LFLAGS="${LDFLAGS}" STRIP="" - find -name Makefile -exec sed -i "{}" \ - -e "s;^\(CXXFLAGS.*=.*\);& $CXXFLAGS;" \ - -e "s;^\(LFLAGS.*=.*\);& $LDFLAGS;" \; - make ${makejobs} -} pre_build() { - mkdir -p pyqt4 - mv * pyqt4 || true - cp -a pyqt4 pyqt4-3.4 - rm -rf pyqt4/pyuic/uic/port_v3 - rm -rf pyqt4-3.4/pyuic/uic/port_v2 + mkdir -p pyqt4-${py2_ver} + mv * pyqt4-${py2_ver} || true + cp -a pyqt4-${py2_ver} pyqt4-${py3_ver} + rm -rf pyqt4-${py2_ver}/pyuic/uic/port_v3 + rm -rf pyqt4-${py3_ver}/pyuic/uic/port_v2 } do_build() { - # build python-pyqt4 - cd ${wrksrc}/pyqt4 - _do_pyqt4_build + local tools= - # build python3.4-pyqt4 - cd ${wrksrc}/pyqt4-3.4 - _do_pyqt4_build 3.4 + for pyver in $py2_ver $py3_ver; do + if [ "$pyver" != "$py2_ver" ]; then + tools="--no-tools" + fi + + cd $wrksrc/pyqt4-$pyver + python${pyver} configure-ng.py --confirm-license --assume-shared $tools \ + CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ + LINK="${CXX}" LINK_SHLIB="${CXX}" LFLAGS="${LDFLAGS}" STRIP="" + find -name Makefile -exec sed -i "{}" \ + -e "s;^\(CXXFLAGS.*=.*\);& $CXXFLAGS;" \ + -e "s;^\(LFLAGS.*=.*\);& $LDFLAGS;" \; + make ${makejobs} + done } do_install() { - # install python{,3.4}-pyqt4 - make -C pyqt4 DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install - make -C pyqt4-3.4 DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install + # install python{,3}-pyqt4 + make -C pyqt4-${py2_ver} DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install + make -C pyqt4-${py3_ver} DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install - cd pyqt4 + cd pyqt4-${py2_ver} # create versioned pyuic4 wrapper - mv ${DESTDIR}/usr/bin/pyuic4{,-2.7} - sed -i 's,python2.7,python3.4,g' pyuic4 - vbin pyuic4 pyuic4-3.4 + mv ${DESTDIR}/usr/bin/{,python2-}pyuic4 + sed -i "s,python2.7,python${py3_ver},g" pyuic4 + vbin pyuic4 python3-pyuic4 + # install doc vmkdir usr/share/doc/${pkgname} vcopy doc/html usr/share/doc/${pkgname} @@ -71,8 +65,8 @@ python-PyQt4-devel-tools_package() { } } python-PyQt4-devel_package() { - depends="python-sip-devel python3.4-sip-devel - python-PyQt4-${version}_${revision} python3.4-PyQt4-${version}_${revision}" + depends="python-sip-devel python3-sip-devel + python-PyQt4-${version}_${revision} python3-PyQt4-${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/share/sip @@ -82,14 +76,14 @@ python-PyQt4-dbus_package() { depends="${sourcepkg}-${version}_${revision} python-dbus" short_desc+=" - dbus support" pkg_install() { - vmove usr/lib/python2.7/site-packages/dbus/mainloop/qt.so + vmove ${py2_sitelib}/dbus/mainloop/qt.so } } python-PyQt4-phonon_package() { depends="${sourcepkg}-${version}_${revision}" short_desc+=" - phonon bindings" pkg_install() { - vmove usr/lib/python2.7/site-packages/PyQt4/phonon.so + vmove ${py2_sitelib}/PyQt4/phonon.so } } python-PyQt4-doc_package() { @@ -99,28 +93,45 @@ python-PyQt4-doc_package() { vmove usr/share/doc } } -python3.4-PyQt4_package() { - depends="python3.4-sip" - pycompile_version="3.4" +python3-PyQt4_package() { + depends="python3-sip" pycompile_module="PyQt4" - short_desc="${_short_desc}" - alternatives="pyqt4:pyuic4:/usr/bin/pyuic4-3.4" + replaces="python3.4-PyQt4>=0" + short_desc="${short_desc/Python2/Python3}" + alternatives="pyqt4:pyuic4:/usr/bin/python3-pyuic4" pkg_install() { - vmove usr/bin/pyuic4-3.4 - vmove usr/lib/python3.4 + vmove usr/bin/python3-pyuic4 + vmove ${py3_sitelib} } } +python3-PyQt4-dbus_package() { + replaces="python3.4-PyQt4-dbus>=0" + depends="python3-PyQt4-${version}_${revision} python3-dbus" + short_desc="${short_desc/Python2/Python3} - dbus support" + pkg_install() { + vmove ${py3_sitelib}/dbus/mainloop/qt.so + } +} +python3-PyQt4-phonon_package() { + replaces="python3.4-PyQt4-phonon>=0" + depends="python3-PyQt4-${version}_${revision}" + short_desc="${short_desc/Python2/Python3} - phonon bindings" + pkg_install() { + vmove ${py3_sitelib}/PyQt4/phonon.so + } +} +python3.4-PyQt4_package() { + build_style=meta + short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)" + depends="python3-PyQt4>=${version}_${revision}" +} python3.4-PyQt4-dbus_package() { - depends="python3.4-PyQt4-${version}_${revision} python3.4-dbus" - short_desc="${_short_desc} - dbus support" - pkg_install() { - vmove usr/lib/python3.4/site-packages/dbus/mainloop/qt.so - } + build_style=meta + short_desc="${short_desc/Python2/Python3.4} - dbus support (transitional dummy package)" + depends="python3-PyQt4-dbus>=${version}_${revision}" } python3.4-PyQt4-phonon_package() { - depends="python3.4-PyQt4-${version}_${revision}" - short_desc="${_short_desc} - phonon bindings" - pkg_install() { - vmove usr/lib/python3.4/site-packages/PyQt4/phonon.so - } + build_style=meta + short_desc="${short_desc/Python2/Python3.4} - phonon bindings (transitional dummy package)" + depends="python3-PyQt4-phonon>=${version}_${revision}" } diff --git a/srcpkgs/python3-PyQt4 b/srcpkgs/python3-PyQt4 new file mode 120000 index 00000000000..fe02248deea --- /dev/null +++ b/srcpkgs/python3-PyQt4 @@ -0,0 +1 @@ +python-PyQt4 \ No newline at end of file diff --git a/srcpkgs/python3-PyQt4-dbus b/srcpkgs/python3-PyQt4-dbus new file mode 120000 index 00000000000..fe02248deea --- /dev/null +++ b/srcpkgs/python3-PyQt4-dbus @@ -0,0 +1 @@ +python-PyQt4 \ No newline at end of file diff --git a/srcpkgs/python3-PyQt4-phonon b/srcpkgs/python3-PyQt4-phonon new file mode 120000 index 00000000000..fe02248deea --- /dev/null +++ b/srcpkgs/python3-PyQt4-phonon @@ -0,0 +1 @@ +python-PyQt4 \ No newline at end of file