From affa5f919c4fce0c10c497c1dbf70c732ac7ad2c Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Tue, 1 Nov 2016 21:11:21 +0100 Subject: [PATCH] python-PyQt5: update to 5.7 --- .../patches/PyQt5-5.7-qt-5.6.2.patch | 11 ++++ .../patches/PyQt5_gpl-5.6-dbus_ftbfs.patch | 11 ---- srcpkgs/python-PyQt5/template | 62 ++++++++++++------- srcpkgs/python3-PyQt5-devel-tools | 1 + 4 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 srcpkgs/python-PyQt5/patches/PyQt5-5.7-qt-5.6.2.patch delete mode 100644 srcpkgs/python-PyQt5/patches/PyQt5_gpl-5.6-dbus_ftbfs.patch create mode 120000 srcpkgs/python3-PyQt5-devel-tools diff --git a/srcpkgs/python-PyQt5/patches/PyQt5-5.7-qt-5.6.2.patch b/srcpkgs/python-PyQt5/patches/PyQt5-5.7-qt-5.6.2.patch new file mode 100644 index 00000000000..444a3827743 --- /dev/null +++ b/srcpkgs/python-PyQt5/patches/PyQt5-5.7-qt-5.6.2.patch @@ -0,0 +1,11 @@ +--- sip/QtCore/QtCoremod.sip.orig ++++ sip/QtCore/QtCoremod.sip +@@ -22,7 +22,7 @@ + + %Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", version=1) + +-%Timeline {Qt_5_0_0 Qt_5_0_1 Qt_5_0_2 Qt_5_1_0 Qt_5_1_1 Qt_5_2_0 Qt_5_2_1 Qt_5_3_0 Qt_5_3_1 Qt_5_3_2 Qt_5_4_0 Qt_5_4_1 Qt_5_4_2 Qt_5_5_0 Qt_5_5_1 Qt_5_6_0 Qt_5_6_1 Qt_5_7_0} ++%Timeline {Qt_5_0_0 Qt_5_0_1 Qt_5_0_2 Qt_5_1_0 Qt_5_1_1 Qt_5_2_0 Qt_5_2_1 Qt_5_3_0 Qt_5_3_1 Qt_5_3_2 Qt_5_4_0 Qt_5_4_1 Qt_5_4_2 Qt_5_5_0 Qt_5_5_1 Qt_5_6_0 Qt_5_6_1 Qt_5_6_2 Qt_5_7_0} + + %Platforms {WS_X11 WS_WIN WS_MACX} + diff --git a/srcpkgs/python-PyQt5/patches/PyQt5_gpl-5.6-dbus_ftbfs.patch b/srcpkgs/python-PyQt5/patches/PyQt5_gpl-5.6-dbus_ftbfs.patch deleted file mode 100644 index c13ca6cb882..00000000000 --- a/srcpkgs/python-PyQt5/patches/PyQt5_gpl-5.6-dbus_ftbfs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./configure.py.dbus 2016-04-24 22:16:43.120281591 -0500 -+++ ./configure.py 2016-04-25 10:16:52.465218805 -0500 -@@ -2141,7 +2141,7 @@ def check_dbus(target_config, verbose): - else: - dlist = target_config.dbus_inc_dirs - -- target_config.dbus_inc_dirs = [] -+ #target_config.dbus_inc_dirs = [] - - for d in dlist: - if os.access(os.path.join(d, 'dbus', 'dbus-python.h'), os.F_OK): diff --git a/srcpkgs/python-PyQt5/template b/srcpkgs/python-PyQt5/template index 426c5627376..3a495d5761d 100644 --- a/srcpkgs/python-PyQt5/template +++ b/srcpkgs/python-PyQt5/template @@ -1,7 +1,7 @@ # Template file for 'python-PyQt5' pkgname=python-PyQt5 -version=5.6 -revision=3 +version=5.7 +revision=1 lib32disabled=yes wrksrc="PyQt5_gpl-${version}" hostmakedepends="pkg-config" @@ -18,8 +18,7 @@ maintainer="Alessio Sergi " homepage="http://www.riverbankcomputing.co.uk/software/pyqt/intro" license="GPL-3" distfiles="${SOURCEFORGE_SITE}/pyqt/PyQt5_gpl-${version}.tar.gz" -checksum=2e481a6c4c41b96ed3b33449e5f9599987c63a5c8db93313bd57a6acbf20f0e1 -alternatives="pyqt5:pyuic5:/usr/bin/python2-pyuic5" +checksum=892693ba5f79989abb2061dad2d5c4e6f127e9dd3240f73f8220c7152cd35b05 pre_build() { mkdir -p pyqt5-${py2_ver} @@ -32,28 +31,28 @@ do_build() { local tools= for pyver in $py2_ver $py3_ver; do - if [ "$pyver" != "$py2_ver" ]; then - tools="--no-tools" - fi cd $wrksrc/pyqt5-$pyver - python${pyver} configure.py --confirm-license --assume-shared ${tools} \ - CC="${CC}" CFLAGS="${CFLAGS}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ - LINK="${CXX}" LINK_SHLIB="${CXX}" LFLAGS="${LDFLAGS}" STRIP="" \ - QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" + python${pyver} configure.py --confirm-license --assume-shared \ + STRIP="" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" make ${makejobs} done } do_install() { - # install python{,3}-pyqt5 + # install python-pyqt5 make -C pyqt5-${py2_ver} DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install + for f in pylupdate5 pyrcc5 pyuic5; do + sed -i 's,/usr/bin/python2.7,/usr/bin/python2,' ${DESTDIR}/usr/bin/${f} + mv ${DESTDIR}/usr/bin/{,python2-}${f} + done + + # install python3-pyqt5 make -C pyqt5-${py3_ver} DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install + for f in pylupdate5 pyrcc5 pyuic5; do + sed -i 's,/usr/bin/python3[.0-9]*,/usr/bin/python3,' ${DESTDIR}/usr/bin/${f} + mv ${DESTDIR}/usr/bin/{,python3-}${f} + done cd pyqt5-${py2_ver} - # create versioned pyuic5 wrapper - mv ${DESTDIR}/usr/bin/{,python2-}pyuic5 - sed -i "s,python2.7,python${py3_ver},g" pyuic5 - vbin pyuic5 python3-pyuic5 - # install doc vmkdir usr/share/doc/${pkgname} vcopy doc/html usr/share/doc/${pkgname} @@ -61,9 +60,32 @@ do_install() { python-PyQt5-devel-tools_package() { short_desc+=" - development tools" + alternatives=" + pyqt5:pylupdate5:/usr/bin/python2-pylupdate5 + pyqt5:pyrcc5:/usr/bin/python2-pyrcc5 + pyqt5:pyuic5:/usr/bin/python2-pyuic5" + pycompile_module="PyQt5" pkg_install() { - vmove usr/bin/pylupdate5 - vmove usr/bin/pyrcc5 + vmove usr/bin/python2-* + vmove ${py2_sitelib}/PyQt5/pylupdate.so + vmove ${py2_sitelib}/PyQt5/pylupdate_main.py + vmove ${py2_sitelib}/PyQt5/pyrcc.so + vmove ${py2_sitelib}/PyQt5/pyrcc_main.py + } +} +python3-PyQt5-devel-tools_package() { + short_desc="${short_desc/Python2/Python3} - development tools" + alternatives=" + pyqt5:pylupdate5:/usr/bin/python3-pylupdate5 + pyqt5:pyrcc5:/usr/bin/python3-pyrcc5 + pyqt5:pyuic5:/usr/bin/python3-pyuic5" + pycompile_module="PyQt5" + pkg_install() { + vmove usr/bin/python3-* + vmove ${py3_sitelib}/PyQt5/pylupdate.so + vmove ${py3_sitelib}/PyQt5/pylupdate_main.py + vmove ${py3_sitelib}/PyQt5/pyrcc.so + vmove ${py3_sitelib}/PyQt5/pyrcc_main.py } } python-PyQt5-devel_package() { @@ -240,9 +262,7 @@ python3-PyQt5_package() { pycompile_module="PyQt5" replaces="python3.4-PyQt5>=0" short_desc="${short_desc/Python2/Python3}" - alternatives="pyqt5:pyuic5:/usr/bin/python3-pyuic5" pkg_install() { - vmove usr/bin/python3-pyuic5 vmove ${py3_sitelib} } } diff --git a/srcpkgs/python3-PyQt5-devel-tools b/srcpkgs/python3-PyQt5-devel-tools new file mode 120000 index 00000000000..7e24798936c --- /dev/null +++ b/srcpkgs/python3-PyQt5-devel-tools @@ -0,0 +1 @@ +python-PyQt5 \ No newline at end of file