From 6dcb21ac659ac56faf1e0b30d9bfb75aa27df78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 27 Sep 2020 14:14:53 +0700 Subject: [PATCH 1/5] python3-PyQt5: modernize --- .../patches/pyproject-cross.patch | 18 ++ srcpkgs/python3-PyQt5/template | 252 ++++++++++++------ 2 files changed, 182 insertions(+), 88 deletions(-) create mode 100644 srcpkgs/python3-PyQt5/patches/pyproject-cross.patch diff --git a/srcpkgs/python3-PyQt5/patches/pyproject-cross.patch b/srcpkgs/python3-PyQt5/patches/pyproject-cross.patch new file mode 100644 index 00000000000..6acb1bfd787 --- /dev/null +++ b/srcpkgs/python3-PyQt5/patches/pyproject-cross.patch @@ -0,0 +1,18 @@ +--- project.py.orig 2020-09-27 14:28:27.338774698 +0700 ++++ project.py 2020-09-27 14:28:29.317795099 +0700 +@@ -51,6 +51,15 @@ + _QOpenGLFunctions_2_1, _QOpenGLFunctions_4_1_Core, + _QOpenGLFunctions_ES2, pylupdate, pyrcc] + ++ def run_command(self, args, *, fatal=True): ++ """ Run a command and display the output if requested. """ ++ qemu_machine = os.environ.get("XBPS_TARGET_QEMU_MACHINE") ++ builddir = os.environ.get("XBPS_BUILDDIR") ++ if qemu_machine and args[0].startswith(os.path.join(builddir, "PyQt5")): ++ qemu = "qemu-{}-static".format(qemu_machine) ++ args.insert(0, qemu) ++ super().run_command(args, fatal=fatal) ++ + def apply_user_defaults(self, tool): + """ Set default values where needed. """ + diff --git a/srcpkgs/python3-PyQt5/template b/srcpkgs/python3-PyQt5/template index 25809d48dab..f92090c192f 100644 --- a/srcpkgs/python3-PyQt5/template +++ b/srcpkgs/python3-PyQt5/template @@ -1,11 +1,12 @@ # Template file for 'python3-PyQt5' pkgname=python3-PyQt5 version=5.15.0 -revision=1 -_sipver=4.19.23 +revision=2 +_sipver=12.8.0 wrksrc="PyQt5-${version}" -hostmakedepends="pkg-config - python3-devel sip5 python-dbus-devel qt5 qt5-devel qt5-tools-devel +build_helper=qemu +hostmakedepends="pkg-config qscintilla-qt5-devel python3-sip-PyQt5 + python3-devel python-dbus-devel qt5 qt5-devel qt5-tools-devel python3-PyQt-builder qt5-connectivity-devel qt5-declarative-devel qt5-location-devel qt5-multimedia-devel qt5-qmake qt5-sensors-devel qt5-serialport-devel qt5-svg-devel qt5-webchannel-devel qt5-webkit-devel qt5-websockets-devel @@ -24,51 +25,151 @@ post_extract() { rm -rf pyuic/uic/port_v2 } -do_configure() { - local _sysroot= _configuration= qt_version - if [ "$CROSS_BUILD" ]; then - qt_version=$(qmake -query QT_VERSION) - _sysroot="--sysroot $XBPS_CROSS_BASE" - _configuration="--configuration $wrksrc/pyqt5_${XBPS_CROSS_TRIPLET}.cfg" - cat >pyqt5_${XBPS_CROSS_TRIPLET}.cfg <"${wrksrc}/.target-spec/linux-g++/qmake.conf" <<-_EOF + MAKEFILE_GENERATOR = UNIX + CONFIG += incremental + QMAKE_INCREMENTAL_STYLE = sublib + + include(/usr/lib/qt5/mkspecs/common/linux.conf) + include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf) + include(/usr/lib/qt5/mkspecs/common/g++-unix.conf) + + QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri + QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri + QMAKE_CC = ${CC} + QMAKE_CXX = ${CXX} + QMAKE_LINK = ${CXX} + QMAKE_LINK_C = ${CC} + QMAKE_LINK_SHLIB = ${CXX} + + QMAKE_AR = ${XBPS_CROSS_TRIPLET}-gcc-ar cqs + QMAKE_OBJCOPY = ${OBJCOPY} + QMAKE_NM = ${NM} -P + QMAKE_STRIP = ${STRIP} + + QMAKE_CFLAGS = ${CFLAGS} + QMAKE_CXXFLAGS = ${CXXFLAGS} + QMAKE_LFLAGS = ${LDFLAGS} + load(qt_config) + _EOF + ln -sf ${XBPS_CROSS_BASE}$qplatformdefs ${wrksrc}/.target-spec/linux-g++/ + + mkdir -p "${wrksrc}/.host-spec/linux-g++" + cat > "${wrksrc}/.host-spec/linux-g++/qmake.conf" <<-_EOF + MAKEFILE_GENERATOR = UNIX + CONFIG += incremental + QMAKE_INCREMENTAL_STYLE = sublib -qt_shared = True + include(/usr/lib/qt5/mkspecs/common/linux.conf) + include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf) + include(/usr/lib/qt5/mkspecs/common/g++-unix.conf) -[Qt ${qt_version}] -# _QOpenGLFunctions_ES2 doesn't work -pyqt_modules = QtCore QtGui QtHelp QtMultimedia - QtMultimediaWidgets QtNetwork QtOpenGL QtPrintSupport QtQml QtQuick - QtSql QtSvg QtTest QtWebKit QtWebKitWidgets QtWidgets QtXml - QtXmlPatterns QtDesigner QtDBus QtSensors QtSerialPort - QtX11Extras QtBluetooth QtPositioning QtQuickWidgets QtWebSockets - QtWebChannel QtLocation QtNfc QtNetworkAuth -EOF + QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri + QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri + QMAKE_CC = ${CC_FOR_BUILD} + QMAKE_CXX = ${CXX_FOR_BUILD} + QMAKE_LINK = ${CXX_FOR_BUILD} + QMAKE_LINK_C = ${CC_FOR_BUILD} + QMAKE_LINK_SHLIB = ${CXX_FOR_BUILD} + QMAKE_AR = gcc-ar cqs + QMAKE_OBJCOPY = ${OBJCOPY_FOR_BUILD} + QMAKE_NM = ${NM_FOR_BUILD} -P + QMAKE_STRIP = ${STRIP_FOR_BUILD} + + QMAKE_CFLAGS = ${CFLAGS_FOR_BUILD} + QMAKE_CXXFLAGS = ${CXXFLAGS_FOR_BUILD} + QMAKE_LFLAGS = ${LDFLAGS_FOR_BUILD} + load(qt_config) + _EOF + ln -sf $qplatformdefs ${wrksrc}/.host-spec/linux-g++/ + + cat >"${wrksrc}/qt.conf" <<-_EOF + [Paths] + Sysroot=${XBPS_CROSS_BASE} + Prefix=/usr + ArchData=/usr/lib/qt5 + Data=/usr/share/qt5 + Documentation=/usr/share/doc/qt5 + Headers=${XBPS_CROSS_BASE}/usr/include/qt5 + Libraries=${XBPS_CROSS_BASE}/usr/lib + LibraryExecutables=/usr/lib/qt5/libexec + Binaries=/usr/lib/qt5/bin + Tests=${XBPS_CROSS_BASE}/usr/tests + Plugins=/usr/lib/qt5/plugins + Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/imports + Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/qml + Translations=${XBPS_CROSS_BASE}/usr/share/qt5/translations + Settings=${XBPS_CROSS_BASE}/etc/xdg + Examples=${XBPS_CROSS_BASE}/usr/share/qt5/examples + HostPrefix=/usr + HostData=/usr/lib/qt5 + HostBinaries=/usr/lib/qt5/bin + HostLibraries=/usr/lib + Spec=$wrksrc/.host-spec/linux-g++ + TargetSpec=$wrksrc/.target-spec/linux-g++ + _EOF + + case $XBPS_TARGET_MACHINE in + i686*) _qt_arch=i386;; + x86_64*) _qt_arch=x86_64;; + aarch64*) _qt_arch=arm64;; + arm*) _qt_arch=arm;; + mips*) _qt_arch=mips;; + esac + cat >$XBPS_WRAPPERDIR/qmake <<_EOF +#!/bin/sh +export PREFIX=/usr +export QT_INSTALL_PREFIX=/usr +export LIB=/usr/lib +export QT_TARGET_ARCH=$_qt_arch +export PKG_CONFIG_EXECUTABLE=$XBPS_WRAPPERDIR/$PKG_CONFIG +case " \$* " in +" -query ") + /usr/lib/qt5/bin/qmake "\$@" -qtconf $wrksrc/qt.conf | + sed '/^QT_INSTALL_/s,$XBPS_CROSS_BASE,,' + ;; +*) + exec /usr/lib/qt5/bin/qmake -qtconf $wrksrc/qt.conf "\$@" ;; +esac +_EOF + chmod +x $XBPS_WRAPPERDIR/qmake +} + +do_configure() { + if [ "$CROSS_BUILD" ]; then + _cross_configure fi - python3 configure.py --confirm-license --assume-shared \ - $_sysroot $_configuration \ - QMAKE_CC="${CC}" QMAKE_CFLAGS="${CFLAGS}" \ - QMAKE_CXX="${CXX}" QMAKE_CXXFLAGS="${CXXFLAGS}" \ - QMAKE_LINK="${CXX}" QMAKE_LINK_SHLIB="${CXX}" \ - QMAKE_LFLAGS="${LDFLAGS}" QMAKE_STRIP="" + mkdir -p build + sip-build --confirm-license --no-make \ + --api-dir /usr/share/qt5/qsci/api/python \ + --build-dir build if [ "$CROSS_BUILD" ]; then # Fix location of libraries - find . -name Makefile | - xargs sed -i -E "s|(/usr/lib/libQt5[^ ]+so)|${XBPS_CROSS_BASE}\1|g" + find build -name Makefile | + xargs sed -i " + s, \\(/usr/lib/libQt\\), $XBPS_CROSS_BASE\\1,g + s,-L\\(/usr/lib\\),-L$XBPS_CROSS_BASE\\1,g + /INSTALL_ROOT/s,$XBPS_CROSS_BASE,,g + s,-I\\(/usr/include\\),-I$XBPS_CROSS_BASE\\1,g + s,-I\\(/usr/lib\\),-I$XBPS_CROSS_BASE\\1,g + " fi } do_build() { + cd build make ${makejobs} } do_install() { + cd build make DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install for f in pylupdate5 pyrcc5 pyuic5; do sed -i '1s,python3[.0-9]*,python3,' ${DESTDIR}/usr/bin/${f} @@ -85,11 +186,9 @@ python3-PyQt5-devel-tools_package() { pyqt5:pyrcc5:/usr/bin/python3-pyrcc5 pyqt5:pyuic5:/usr/bin/python3-pyuic5" 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 + vmove usr/bin + vmove "${py3_sitelib}/PyQt5/pylupdate*" + vmove "${py3_sitelib}/PyQt5/pyrcc*" } } python3-PyQt5-devel_package() { @@ -97,7 +196,7 @@ python3-PyQt5-devel_package() { short_desc+=" - development files" conflicts="python-PyQt5-devel>=0" pkg_install() { - vmove usr/share/sip + vmove ${py3_sitelib}/PyQt5/bindings } } python3-PyQt5-dbus_package() { @@ -105,7 +204,7 @@ python3-PyQt5-dbus_package() { depends="python3-PyQt5-${version}_${revision} python3-dbus" short_desc="${short_desc} - dbus support" pkg_install() { - vmove ${py3_sitelib}/dbus/mainloop/pyqt5.so + vmove ${py3_sitelib}/dbus } } python3-PyQt5-connectivity_package() { @@ -113,10 +212,8 @@ python3-PyQt5-connectivity_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - connectivity module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtBluetooth.pyi - vmove ${py3_sitelib}/PyQt5/QtBluetooth.so - vmove ${py3_sitelib}/PyQt5/QtNfc.pyi - vmove ${py3_sitelib}/PyQt5/QtNfc.so + vmove "${py3_sitelib}/PyQt5/QtBluetooth.*" + vmove "${py3_sitelib}/PyQt5/QtNfc.*" } } python3-PyQt5-multimedia_package() { @@ -124,10 +221,8 @@ python3-PyQt5-multimedia_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - multimedia module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtMultimedia.pyi - vmove ${py3_sitelib}/PyQt5/QtMultimedia.so - vmove ${py3_sitelib}/PyQt5/QtMultimediaWidgets.pyi - vmove ${py3_sitelib}/PyQt5/QtMultimediaWidgets.so + vmove "${py3_sitelib}/PyQt5/QtMultimedia.*" + vmove "${py3_sitelib}/PyQt5/QtMultimediaWidgets.*" } } python3-PyQt5-networkauth_package() { @@ -135,8 +230,7 @@ python3-PyQt5-networkauth_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - networkauth module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtNetworkAuth.pyi - vmove ${py3_sitelib}/PyQt5/QtNetworkAuth.so + vmove "${py3_sitelib}/PyQt5/QtNetworkAuth.*" } } python3-PyQt5-opengl_package() { @@ -144,10 +238,9 @@ python3-PyQt5-opengl_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - opengl module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtOpenGL.pyi - vmove ${py3_sitelib}/PyQt5/QtOpenGL.so + vmove "${py3_sitelib}/PyQt5/QtOpenGL.*" if [ -z "$CROSS_BUILD" ]; then - vmove ${py3_sitelib}/PyQt5/_QOpenGLFunctions_*.so + vmove "${py3_sitelib}/PyQt5/_QOpenGLFunctions_*" fi } } @@ -156,10 +249,8 @@ python3-PyQt5-location_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - location module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtLocation.pyi - vmove ${py3_sitelib}/PyQt5/QtLocation.so - vmove ${py3_sitelib}/PyQt5/QtPositioning.pyi - vmove ${py3_sitelib}/PyQt5/QtPositioning.so + vmove "${py3_sitelib}/PyQt5/QtLocation.*" + vmove "${py3_sitelib}/PyQt5/QtPositioning.*" } } python3-PyQt5-quick_package() { @@ -167,12 +258,9 @@ python3-PyQt5-quick_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - quick module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtQml.pyi - vmove ${py3_sitelib}/PyQt5/QtQml.so - vmove ${py3_sitelib}/PyQt5/QtQuick.pyi - vmove ${py3_sitelib}/PyQt5/QtQuick.so - vmove ${py3_sitelib}/PyQt5/QtQuickWidgets.pyi - vmove ${py3_sitelib}/PyQt5/QtQuickWidgets.so + vmove "${py3_sitelib}/PyQt5/QtQml.*" + vmove "${py3_sitelib}/PyQt5/QtQuick.*" + vmove "${py3_sitelib}/PyQt5/QtQuickWidgets.*" vmove usr/lib/qt5/plugins/PyQt5/libpyqt5qmlplugin.so } } @@ -181,8 +269,7 @@ python3-PyQt5-sensors_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - sensors module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtSensors.pyi - vmove ${py3_sitelib}/PyQt5/QtSensors.so + vmove "${py3_sitelib}/PyQt5/QtSensors.*" } } python3-PyQt5-serialport_package() { @@ -190,8 +277,7 @@ python3-PyQt5-serialport_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - serialport module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtSerialPort.pyi - vmove ${py3_sitelib}/PyQt5/QtSerialPort.so + vmove "${py3_sitelib}/PyQt5/QtSerialPort.*" } } python3-PyQt5-sql_package() { @@ -199,8 +285,7 @@ python3-PyQt5-sql_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - sql module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtSql.pyi - vmove ${py3_sitelib}/PyQt5/QtSql.so + vmove "${py3_sitelib}/PyQt5/QtSql.*" } } python3-PyQt5-svg_package() { @@ -208,8 +293,7 @@ python3-PyQt5-svg_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - svg module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtSvg.pyi - vmove ${py3_sitelib}/PyQt5/QtSvg.so + vmove "${py3_sitelib}/PyQt5/QtSvg.*" } } python3-PyQt5-tools_package() { @@ -217,11 +301,9 @@ python3-PyQt5-tools_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - designer, help modules" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtHelp.pyi - vmove ${py3_sitelib}/PyQt5/QtHelp.so - vmove ${py3_sitelib}/PyQt5/QtDesigner.pyi - vmove ${py3_sitelib}/PyQt5/QtDesigner.so - vmove usr/lib/qt5/plugins/designer/libpyqt5.so + vmove "${py3_sitelib}/PyQt5/QtHelp.*" + vmove "${py3_sitelib}/PyQt5/QtDesigner.*" + vmove usr/lib/qt5/plugins/designer } } python3-PyQt5-webchannel_package() { @@ -229,8 +311,7 @@ python3-PyQt5-webchannel_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - webchannel module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtWebChannel.pyi - vmove ${py3_sitelib}/PyQt5/QtWebChannel.so + vmove "${py3_sitelib}/PyQt5/QtWebChannel.*" } } python3-PyQt5-webkit_package() { @@ -238,10 +319,8 @@ python3-PyQt5-webkit_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - webkit module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtWebKit.pyi - vmove ${py3_sitelib}/PyQt5/QtWebKit.so - vmove ${py3_sitelib}/PyQt5/QtWebKitWidgets.pyi - vmove ${py3_sitelib}/PyQt5/QtWebKitWidgets.so + vmove "${py3_sitelib}/PyQt5/QtWebKit.*" + vmove "${py3_sitelib}/PyQt5/QtWebKitWidgets.*" } } python3-PyQt5-websockets_package() { @@ -249,8 +328,7 @@ python3-PyQt5-websockets_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - websockets module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtWebSockets.pyi - vmove ${py3_sitelib}/PyQt5/QtWebSockets.so + vmove "${py3_sitelib}/PyQt5/QtWebSockets.*" } } python3-PyQt5-x11extras_package() { @@ -258,8 +336,7 @@ python3-PyQt5-x11extras_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - x11extras module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtX11Extras.pyi - vmove ${py3_sitelib}/PyQt5/QtX11Extras.so + vmove "${py3_sitelib}/PyQt5/QtX11Extras.*" } } python3-PyQt5-xmlpatterns_package() { @@ -267,7 +344,6 @@ python3-PyQt5-xmlpatterns_package() { depends="python3-PyQt5-${version}_${revision}" short_desc="${short_desc} - xmlpatterns module" pkg_install() { - vmove ${py3_sitelib}/PyQt5/QtXmlPatterns.pyi - vmove ${py3_sitelib}/PyQt5/QtXmlPatterns.so + vmove "${py3_sitelib}/PyQt5/QtXmlPatterns.*" } } From 9464c8e8329585fa2b95b413d5c564b4a88697e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 27 Sep 2020 14:13:48 +0700 Subject: [PATCH 2/5] python3-PyQt5-webengine: modernize --- srcpkgs/python3-PyQt5-webengine/template | 81 +++++++++++------------- 1 file changed, 36 insertions(+), 45 deletions(-) diff --git a/srcpkgs/python3-PyQt5-webengine/template b/srcpkgs/python3-PyQt5-webengine/template index 0970f0dbaf9..f7ed917d88a 100644 --- a/srcpkgs/python3-PyQt5-webengine/template +++ b/srcpkgs/python3-PyQt5-webengine/template @@ -1,9 +1,10 @@ # Template file for 'python3-PyQt5-webengine' pkgname=python3-PyQt5-webengine version=5.15.0 -revision=1 +revision=2 wrksrc="PyQtWebEngine-${version}" hostmakedepends="pkg-config qt5-qmake python3-PyQt5 sip5 qt5-webengine-devel + python3-PyQt-builder python3-PyQt5-devel qt5-declarative-devel qt5-webchannel-devel qt5-location-devel" makedepends="qt5-declarative-devel qt5-webchannel-devel qt5-location-devel qt5-webengine-devel python3-devel python3-PyQt5-devel" @@ -27,10 +28,10 @@ post_extract() { } _cross_configure() { - local qmakespec=$XBPS_STATEDIR/qmake-$XBPS_TARGET_MACHINE - mkdir -p $qmakespec/target/linux-g++ - # This is copied from qmake build-style - cat > "$qmakespec/target/linux-g++/qmake.conf" <<-_EOF + local qplatformdefs="/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h" + + mkdir -p "${wrksrc}/.target-spec/linux-g++" + cat >"${wrksrc}/.target-spec/linux-g++/qmake.conf" <<-_EOF MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib @@ -57,14 +58,10 @@ _cross_configure() { QMAKE_LFLAGS = ${LDFLAGS} load(qt_config) _EOF + ln -sf ${XBPS_CROSS_BASE}$qplatformdefs ${wrksrc}/.target-spec/linux-g++/ - cat <<-EOF > "$qmakespec/target/linux-g++/qplatformdefs.h" - #include "${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h" - EOF - - - mkdir -p $qmakespec/host/linux-g++ - cat > "$qmakespec/host/linux-g++/qmake.conf" <<-_EOF + mkdir -p "${wrksrc}/.host-spec/linux-g++" + cat > "${wrksrc}/.host-spec/linux-g++/qmake.conf" <<-_EOF MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib @@ -91,20 +88,16 @@ _cross_configure() { QMAKE_LFLAGS = ${LDFLAGS_FOR_BUILD} load(qt_config) _EOF + ln -sf $qplatformdefs ${wrksrc}/.host-spec/linux-g++/ - cat <<-EOF > "$qmakespec/host/linux-g++/qplatformdefs.h" - #include "/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h" - EOF - - - cat > "$qmakespec/qt.conf" <<-_EOF + cat > "$wrksrc/qt.conf" <<-_EOF [Paths] Sysroot=${XBPS_CROSS_BASE} Prefix=/usr ArchData=/usr/lib/qt5 Data=/usr/share/qt5 Documentation=/usr/share/doc/qt5 - Headers=/usr/include/qt5 + Headers=${XBPS_CROSS_BASE}/usr/include/qt5 Libraries=${XBPS_CROSS_BASE}/usr/lib LibraryExecutables=/usr/lib/qt5/libexec Binaries=/usr/lib/qt5/bin @@ -119,11 +112,10 @@ _cross_configure() { HostData=/usr/lib/qt5 HostBinaries=/usr/lib/qt5/bin HostLibraries=/usr/lib - Spec=$qmakespec/host/linux-g++ - TargetSpec=$qmakespec/target/linux-g++ + Spec=$wrksrc/.host-spec/linux-g++ + TargetSpec=$wrksrc/.target-spec/linux-g++ _EOF - case $XBPS_TARGET_MACHINE in i686*) _qt_arch=i386;; x86_64*) _qt_arch=x86_64;; @@ -131,7 +123,7 @@ _cross_configure() { arm*) _qt_arch=arm;; mips*) _qt_arch=mips;; esac - cat <$XBPS_WRAPPERDIR/cross-qmake + cat <$XBPS_WRAPPERDIR/qmake #!/bin/sh export PREFIX=/usr export QT_INSTALL_PREFIX=/usr @@ -140,46 +132,45 @@ export QT_TARGET_ARCH=$_qt_arch export PKG_CONFIG_EXECUTABLE=$XBPS_WRAPPERDIR/$PKG_CONFIG case " \$* " in " -query ") - /usr/lib/qt5/bin/qmake "\$@" -qtconf $qmakespec/qt.conf | + /usr/lib/qt5/bin/qmake "\$@" -qtconf $wrksrc/qt.conf | sed '/^QT_INSTALL_/s,$XBPS_CROSS_BASE,,' ;; *) - exec /usr/lib/qt5/bin/qmake -qtconf $qmakespec/qt.conf "\$@" ;; + exec /usr/lib/qt5/bin/qmake -qtconf $wrksrc/qt.conf "\$@" ;; esac EOF - chmod +x $XBPS_WRAPPERDIR/cross-qmake - - python3 configure.py --qmake=$XBPS_WRAPPERDIR/cross-qmake \ - --sysroot $XBPS_CROSS_BASE/usr - # Technically, the second sed expr isn't necessary - # since all of them are the same for both host and target. - # We need to fix INSTALL_ROOT anyway, let's fix it, too. - sed -i -e "/INSTALL_ROOT/s,$XBPS_CROSS_BASE,,g" \ - -e "s,-I/usr/include,-I$XBPS_CROSS_BASE/usr/include,g" \ - Makefile \ - QtWebEngine/Makefile \ - QtWebEngineCore/Makefile \ - QtWebEngineWidgets/Makefile - sed -i -e "s,$XBPS_CROSS_BASE,,g" installed.txt + chmod +x $XBPS_WRAPPERDIR/qmake } do_configure() { if [ "$CROSS_BUILD" ]; then _cross_configure - else - python3 configure.py \ - QMAKE_CC="${CC}" QMAKE_CFLAGS="${CFLAGS}" \ - QMAKE_CXX="${CXX}" QMAKE_CXXFLAGS="${CXXFLAGS}" \ - QMAKE_LINK="${CXX}" QMAKE_LINK_SHLIB="${CXX}" - QMAKE_LFLAGS="${LDFLAGS}" QMAKE_STRIP="" + fi + mkdir -p build + sip-build --no-make \ + --api-dir /usr/share/qt5/qsci/api/python \ + --build-dir build + + if [ "$CROSS_BUILD" ]; then + # Fix location of libraries + find build -name Makefile | + xargs sed -i " + s, \\(/usr/lib/libQt\\), $XBPS_CROSS_BASE\\1,g + s,-L\\(/usr/lib\\),-L$XBPS_CROSS_BASE\\1,g + /INSTALL_ROOT/s,$XBPS_CROSS_BASE,,g + s,-I\\(/usr/include\\),-I$XBPS_CROSS_BASE\\1,g + s,-I\\(/usr/lib\\),-I$XBPS_CROSS_BASE\\1,g + " fi } do_build() { + cd build make ${makejobs} } do_install() { + cd build make DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install rm -rf ${DESTDIR}/usr/share } From 2ceee14939f7e4dd0d18fa4125ecc64518065ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 28 Sep 2020 07:46:39 +0700 Subject: [PATCH 3/5] python3-PyQt5: update to 5.15.1. --- srcpkgs/python3-PyQt5/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/python3-PyQt5/template b/srcpkgs/python3-PyQt5/template index f92090c192f..81dbb61ce1c 100644 --- a/srcpkgs/python3-PyQt5/template +++ b/srcpkgs/python3-PyQt5/template @@ -1,7 +1,7 @@ # Template file for 'python3-PyQt5' pkgname=python3-PyQt5 -version=5.15.0 -revision=2 +version=5.15.1 +revision=1 _sipver=12.8.0 wrksrc="PyQt5-${version}" build_helper=qemu @@ -18,7 +18,7 @@ maintainer="Orphaned " license="GPL-3.0-only" homepage="https://riverbankcomputing.com/software/pyqt/intro" distfiles="${PYPI_SITE}/P/PyQt5/PyQt5-${version}.tar.gz" -checksum=c6f75488ffd5365a65893bc64ea82a6957db126fbfe33654bcd43ae1c30c52f9 +checksum=d9a76b850246d08da9863189ecb98f6c2aa9b4d97a3e85e29330a264aed0f9a1 lib32disabled=yes post_extract() { From 689f7a765f37591f6f379ebcdc68810869e41672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 28 Sep 2020 07:45:53 +0700 Subject: [PATCH 4/5] python3-PyQt5-webengine: update to 5.15.1. --- srcpkgs/python3-PyQt5-webengine/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/python3-PyQt5-webengine/template b/srcpkgs/python3-PyQt5-webengine/template index f7ed917d88a..33956d8a64a 100644 --- a/srcpkgs/python3-PyQt5-webengine/template +++ b/srcpkgs/python3-PyQt5-webengine/template @@ -1,7 +1,7 @@ # Template file for 'python3-PyQt5-webengine' pkgname=python3-PyQt5-webengine -version=5.15.0 -revision=2 +version=5.15.1 +revision=1 wrksrc="PyQtWebEngine-${version}" hostmakedepends="pkg-config qt5-qmake python3-PyQt5 sip5 qt5-webengine-devel python3-PyQt-builder python3-PyQt5-devel @@ -14,7 +14,7 @@ maintainer="Orphaned " license="GPL-3.0-only" homepage="https://www.riverbankcomputing.com/software/pyqtwebengine/intro" distfiles="${PYPI_SITE}/P/PyQtWebEngine/PyQtWebEngine-${version}.tar.gz" -checksum=670812688e40bf75f70ddf01eadd897d231300318d3856b275bf8e7e0085bf75 +checksum=f0ca7915ee206ba5d703168c6ca40b0aad62c67360328fae4af5359cdbcee439 lib32disabled=yes case "$XBPS_TARGET_MACHINE" in From 9c580881862f3eeeb8afb9b7fca97b0690281cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 27 Sep 2020 14:13:29 +0700 Subject: [PATCH 5/5] calibre: update to 5.0.1. --- srcpkgs/calibre/template | 42 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template index 48397fdd6d2..444e7c2b7f6 100644 --- a/srcpkgs/calibre/template +++ b/srcpkgs/calibre/template @@ -1,23 +1,24 @@ # Template file for 'calibre' pkgname=calibre -version=4.23.0 +version=5.0.1 revision=1 -build_style=python2-module +build_style=python3-module pycompile_dirs="/usr/lib/calibre/" -hostmakedepends="pkg-config python-BeautifulSoup4 python-Pillow python-PyQt5-svg - python-PyQt5-webengine python-apsw python-css-parser python-dateutil - python-devel python-html5-parser python-msgpack python-regex qt5-qmake - xdg-utils rapydscript-ng" +hostmakedepends="pkg-config python3-BeautifulSoup4 python3-Pillow python3-PyQt5-svg + python3-PyQt5-webengine python3-apsw python3-css-parser python3-dateutil + python3-devel python3-html5-parser python3-msgpack python3-regex qt5-qmake + libpodofo-devel python3-PyQt-builder python3-PyQt5-devel qt5-host-tools + python3-zeroconf xdg-utils rapydscript-ng" makedepends="glib-devel libchmlib-devel libinput-devel libmagick-devel libmtp-devel - libpodofo-devel libwmf-devel libxkbcommon-devel python-PyQt5-devel + libpodofo-devel libwmf-devel libxkbcommon-devel python3-PyQt5-devel qt5-devel sqlite-devel tslib-devel hunspell-devel hyphen-devel" -depends="desktop-file-utils optipng poppler-utils python-BeautifulSoup4 - python-Markdown python-Pillow python-PyQt5-svg - python-PyQt5-webengine python-PyQt5-webchannel python-Pygments python-apsw - python-css-parser python-cssselect python-dateutil python-dbus - python-dnspython python-feedparser python-html5-parser python-mechanize - python-msgpack python-netifaces python-psutil python-regex python-html2text - qt5-webengine python-ipaddress" +depends="desktop-file-utils optipng poppler-utils python3-BeautifulSoup4 + python3-Markdown python3-Pillow python3-PyQt5-svg python3-zeroconf + python3-PyQt5-webengine python3-PyQt5-webchannel python3-Pygments python3-apsw + python3-css-parser python3-cssselect python3-dateutil python3-dbus + python3-dnspython python3-feedparser python3-html5-parser python3-mechanize + python3-msgpack python3-netifaces python3-psutil python3-regex python3-html2text + qt5-webengine" checkdepends="${depends} libjpeg-turbo-tools jxrlib" short_desc="Ebook management application" maintainer="skmpz " @@ -25,7 +26,8 @@ license="GPL-3.0-only" homepage="https://calibre-ebook.com" changelog="https://raw.githubusercontent.com/kovidgoyal/calibre/master/Changelog.yaml" distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz" -checksum=16de51473cf0e336f946a57251a1e4f4fbba1f857f17d8fc14aa132e7eb59518 +checksum=949fffb683708345daa84df24f73b01479043f08c67d0b13209d5977789f4802 +lib32disabled=yes nocross=yes do_configure() { @@ -41,15 +43,15 @@ do_configure() { } do_build() { - python2 setup.py build - python2 setup.py gui - python2 setup.py rapydscript + python3 setup.py build + python3 setup.py gui + python3 setup.py rapydscript } do_check() { # qt test crashes without any error messages # disabled for now - python2 setup.py test \ + python3 setup.py test \ --exclude-test-name unrar \ --exclude-test-name qt } @@ -57,7 +59,7 @@ do_check() { do_install() { vmkdir usr/share/zsh/site-functions - python2 setup.py \ + python3 setup.py \ install --prefix=/usr --staging-root=${DESTDIR}/usr for m in man-pages/man1/*.1; do