* [PR PATCH] Pyqt5 modernize and update to 5.15.1
@ 2020-09-27 4:23 sgn
2020-09-27 23:21 ` [PR PATCH] [Updated] " sgn
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: sgn @ 2020-09-27 4:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
There is a new pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages pyqt5-modernize-update-to-5.15.1
https://github.com/void-linux/void-packages/pull/25128
Pyqt5 modernize and update to 5.15.1
- modernized since it's required for calibre
A patch file from https://github.com/void-linux/void-packages/pull/25128.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pyqt5-modernize-update-to-5.15.1-25128.patch --]
[-- Type: text/x-diff, Size: 19176 bytes --]
From b5cded8ab25cfd9847a403e3aa09f2dd00da5b92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 10:10:02 +0700
Subject: [PATCH 1/2] python3-PyQt5: use modern sip-build
Calibre doesn't work with old layout.
---
srcpkgs/python3-PyQt5/template | 242 +++++++++++++++++++++------------
1 file changed, 156 insertions(+), 86 deletions(-)
diff --git a/srcpkgs/python3-PyQt5/template b/srcpkgs/python3-PyQt5/template
index 25809d48dabb..76b7ccd396ef 100644
--- a/srcpkgs/python3-PyQt5/template
+++ b/srcpkgs/python3-PyQt5/template
@@ -1,10 +1,10 @@
# 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
+hostmakedepends="pkg-config qscintilla-qt5-devel python3-sip-PyQt5
python3-devel sip5 python-dbus-devel qt5 qt5-devel qt5-tools-devel
qt5-connectivity-devel qt5-declarative-devel qt5-location-devel
qt5-multimedia-devel qt5-qmake qt5-sensors-devel qt5-serialport-devel
@@ -24,51 +24,146 @@ 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 <<EOF
-py_platform = linux
-py_inc_dir = %(sysroot)/usr/include/python%(py_major).%(py_minor)${py3_abiver}
-py_pyshlib = python%(py_major).%(py_minor)${py3_abiver}.so
-pyqt_disabled_features = PyQt_Desktop_OpenGL
+_cross_configure() {
+ 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
+
+ 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=/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=$qmakespec/host/linux-g++
+ TargetSpec=$qmakespec/target/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 $qmakespec/qt.conf "\$@" ;;
+esac
+_EOF
+ chmod +x $XBPS_CROSS_BASE/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 \
+ --pep484-pyi
if [ "$CROSS_BUILD" ]; then
# Fix location of libraries
- find . -name Makefile |
+ find build -name Makefile |
xargs sed -i -E "s|(/usr/lib/libQt5[^ ]+so)|${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 +180,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 +190,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 +198,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 +206,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 +215,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 +224,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 +232,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 +243,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 +252,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 +263,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 +271,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 +279,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 +287,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 +295,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 +305,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 +313,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 +322,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 +330,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 +338,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 9f60eacd06f31883cfcecf858bd32b62fed1d663 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 11:20:07 +0700
Subject: [PATCH 2/2] python3-PyQt5-webengine: build with sip-build
---
srcpkgs/python3-PyQt5-webengine/template | 65 +++++++++++-------------
1 file changed, 30 insertions(+), 35 deletions(-)
diff --git a/srcpkgs/python3-PyQt5-webengine/template b/srcpkgs/python3-PyQt5-webengine/template
index 0970f0dbaf99..8036782f3667 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=1
+revision=2
wrksrc="PyQtWebEngine-${version}"
hostmakedepends="pkg-config qt5-qmake python3-PyQt5 sip5 qt5-webengine-devel
qt5-declarative-devel qt5-webchannel-devel qt5-location-devel"
@@ -27,10 +27,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 +57,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
@@ -95,9 +91,10 @@ _cross_configure() {
cat <<-EOF > "$qmakespec/host/linux-g++/qplatformdefs.h"
#include "/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h"
EOF
+ ln -sf $qplatformdefs ${wrksrc}/.host-spec/linux-g++/
- cat > "$qmakespec/qt.conf" <<-_EOF
+ cat > "$wrksrc/qt.conf" <<-_EOF
[Paths]
Sysroot=${XBPS_CROSS_BASE}
Prefix=/usr
@@ -123,7 +120,6 @@ _cross_configure() {
TargetSpec=$qmakespec/target/linux-g++
_EOF
-
case $XBPS_TARGET_MACHINE in
i686*) _qt_arch=i386;;
x86_64*) _qt_arch=x86_64;;
@@ -140,46 +136,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 "\$@" ;;
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 \
+ --pep484-pyi
+
+ if [ "$CROSS_BUILD" ]; then
+ # Fix location of libraries
+ find build -name Makefile |
+ xargs sed -i -E "
+ s|(/usr/lib/libQt5[^ ]+so)|${XBPS_CROSS_BASE}\1|g
+ /INSTALL_ROOT/s,$XBPS_CROSS_BASE,,g
+ s,-I/usr/include,-I$XBPS_CROSS_BASE/usr/include,g
+ "
+ sed -i -e "s,$XBPS_CROSS_BASE,,g" installed.txt
fi
}
do_build() {
+ cd build
make ${makejobs}
}
do_install() {
+ cd build
make DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install
rm -rf ${DESTDIR}/usr/share
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Pyqt5 modernize and update to 5.15.1
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
@ 2020-09-27 23:21 ` sgn
2020-09-28 0:44 ` [PR PATCH] [Updated] PyQt5 modernize and update to 5.15.1 (Prepare for Calibre 5.0.0) sgn
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2020-09-27 23:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages pyqt5-modernize-update-to-5.15.1
https://github.com/void-linux/void-packages/pull/25128
Pyqt5 modernize and update to 5.15.1
- modernized since it's required for calibre
A patch file from https://github.com/void-linux/void-packages/pull/25128.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pyqt5-modernize-update-to-5.15.1-25128.patch --]
[-- Type: text/x-diff, Size: 21509 bytes --]
From c3ba2289e5e567dab21c39915071208752e71a3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:14:53 +0700
Subject: [PATCH 1/2] 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..326c16b9be3 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 <<EOF
-py_platform = linux
-py_inc_dir = %(sysroot)/usr/include/python%(py_major).%(py_minor)${py3_abiver}
-py_pyshlib = python%(py_major).%(py_minor)${py3_abiver}.so
-pyqt_disabled_features = PyQt_Desktop_OpenGL
+_cross_configure() {
+ 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
+
+ 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=/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 f704a7fb42d31e47d11c71f66565cc76939d32d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:48 +0700
Subject: [PATCH 2/2] python3-PyQt5-webengine: modernize
---
srcpkgs/python3-PyQt5-webengine/template | 79 +++++++++++-------------
1 file changed, 35 insertions(+), 44 deletions(-)
diff --git a/srcpkgs/python3-PyQt5-webengine/template b/srcpkgs/python3-PyQt5-webengine/template
index 0970f0dbaf9..a80107cb7ea 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,13 +88,9 @@ _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
@@ -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 <<EOF >$XBPS_WRAPPERDIR/cross-qmake
+ cat <<EOF >$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
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] PyQt5 modernize and update to 5.15.1 (Prepare for Calibre 5.0.0)
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
2020-09-27 23:21 ` [PR PATCH] [Updated] " sgn
@ 2020-09-28 0:44 ` sgn
2020-09-28 0:45 ` sgn
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2020-09-28 0:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages pyqt5-modernize-update-to-5.15.1
https://github.com/void-linux/void-packages/pull/25128
PyQt5 modernize and update to 5.15.1 (Prepare for Calibre 5.0.0)
- modernized since it's required for calibre
A patch file from https://github.com/void-linux/void-packages/pull/25128.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pyqt5-modernize-update-to-5.15.1-25128.patch --]
[-- Type: text/x-diff, Size: 25565 bytes --]
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?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:14:53 +0700
Subject: [PATCH 1/3] 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 <<EOF
-py_platform = linux
-py_inc_dir = %(sysroot)/usr/include/python%(py_major).%(py_minor)${py3_abiver}
-py_pyshlib = python%(py_major).%(py_minor)${py3_abiver}.so
-pyqt_disabled_features = PyQt_Desktop_OpenGL
+_cross_configure() {
+ 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
+
+ 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?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:48 +0700
Subject: [PATCH 2/3] 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 <<EOF >$XBPS_WRAPPERDIR/cross-qmake
+ cat <<EOF >$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 8bad2f3c29872fa812d371b051da3f0f8b91fd0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:29 +0700
Subject: [PATCH 3/3] calibre: update to 5.0.0.
---
srcpkgs/calibre/template | 41 ++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template
index 48397fdd6d2..9a41b447acf 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.0
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 <dem.procopiou@gmail.com>"
@@ -25,7 +26,7 @@ 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=72b136273cba66c83cb780363500fab70974bf9f854ee3b98b7110ca719aea2e
nocross=yes
do_configure() {
@@ -41,15 +42,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 +58,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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] PyQt5 modernize and update to 5.15.1 (Prepare for Calibre 5.0.0)
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
2020-09-27 23:21 ` [PR PATCH] [Updated] " sgn
2020-09-28 0:44 ` [PR PATCH] [Updated] PyQt5 modernize and update to 5.15.1 (Prepare for Calibre 5.0.0) sgn
@ 2020-09-28 0:45 ` sgn
2020-09-28 0:48 ` [PR PATCH] [Updated] Calibre 5.0.0, python3-PyQt5 build with sip-build sgn
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2020-09-28 0:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages pyqt5-modernize-update-to-5.15.1
https://github.com/void-linux/void-packages/pull/25128
PyQt5 modernize and update to 5.15.1 (Prepare for Calibre 5.0.0)
- modernized since it's required for calibre
A patch file from https://github.com/void-linux/void-packages/pull/25128.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pyqt5-modernize-update-to-5.15.1-25128.patch --]
[-- Type: text/x-diff, Size: 25584 bytes --]
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?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:14:53 +0700
Subject: [PATCH 1/3] 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 <<EOF
-py_platform = linux
-py_inc_dir = %(sysroot)/usr/include/python%(py_major).%(py_minor)${py3_abiver}
-py_pyshlib = python%(py_major).%(py_minor)${py3_abiver}.so
-pyqt_disabled_features = PyQt_Desktop_OpenGL
+_cross_configure() {
+ 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
+
+ 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?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:48 +0700
Subject: [PATCH 2/3] 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 <<EOF >$XBPS_WRAPPERDIR/cross-qmake
+ cat <<EOF >$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 fba106dcd9e0279a0164aa8b7737993a11708e18 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:29 +0700
Subject: [PATCH 3/3] calibre: update to 5.0.0.
---
srcpkgs/calibre/template | 42 +++++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template
index 48397fdd6d2..5e316fa9755 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.0
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 <dem.procopiou@gmail.com>"
@@ -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=72b136273cba66c83cb780363500fab70974bf9f854ee3b98b7110ca719aea2e
+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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Calibre 5.0.0, python3-PyQt5 build with sip-build
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
` (2 preceding siblings ...)
2020-09-28 0:45 ` sgn
@ 2020-09-28 0:48 ` sgn
2020-09-28 0:58 ` sgn
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2020-09-28 0:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages pyqt5-modernize-update-to-5.15.1
https://github.com/void-linux/void-packages/pull/25128
Calibre 5.0.0, python3-PyQt5 build with sip-build
- modernized since it's required for calibre
A patch file from https://github.com/void-linux/void-packages/pull/25128.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pyqt5-modernize-update-to-5.15.1-25128.patch --]
[-- Type: text/x-diff, Size: 28067 bytes --]
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?=
<congdanhqx@gmail.com>
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 <<EOF
-py_platform = linux
-py_inc_dir = %(sysroot)/usr/include/python%(py_major).%(py_minor)${py3_abiver}
-py_pyshlib = python%(py_major).%(py_minor)${py3_abiver}.so
-pyqt_disabled_features = PyQt_Desktop_OpenGL
+_cross_configure() {
+ 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
+
+ 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?=
<congdanhqx@gmail.com>
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 <<EOF >$XBPS_WRAPPERDIR/cross-qmake
+ cat <<EOF >$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?=
<congdanhqx@gmail.com>
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 <orphan@voidlinux.org>"
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?=
<congdanhqx@gmail.com>
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 <orphan@voidlinux.org>"
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 e4c90dc8b99a2c1020b9c35f9d634f46490e9eb3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:29 +0700
Subject: [PATCH 5/5] calibre: update to 5.0.0.
---
srcpkgs/calibre/template | 42 +++++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template
index 48397fdd6d2..5e316fa9755 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.0
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 <dem.procopiou@gmail.com>"
@@ -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=72b136273cba66c83cb780363500fab70974bf9f854ee3b98b7110ca719aea2e
+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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Calibre 5.0.0, python3-PyQt5 build with sip-build
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
` (3 preceding siblings ...)
2020-09-28 0:48 ` [PR PATCH] [Updated] Calibre 5.0.0, python3-PyQt5 build with sip-build sgn
@ 2020-09-28 0:58 ` sgn
2020-09-28 12:52 ` sgn
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2020-09-28 0:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages pyqt5-modernize-update-to-5.15.1
https://github.com/void-linux/void-packages/pull/25128
Calibre 5.0.0, python3-PyQt5 build with sip-build
- modernized since it's required for calibre
A patch file from https://github.com/void-linux/void-packages/pull/25128.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pyqt5-modernize-update-to-5.15.1-25128.patch --]
[-- Type: text/x-diff, Size: 28067 bytes --]
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?=
<congdanhqx@gmail.com>
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 <<EOF
-py_platform = linux
-py_inc_dir = %(sysroot)/usr/include/python%(py_major).%(py_minor)${py3_abiver}
-py_pyshlib = python%(py_major).%(py_minor)${py3_abiver}.so
-pyqt_disabled_features = PyQt_Desktop_OpenGL
+_cross_configure() {
+ 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
+
+ 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?=
<congdanhqx@gmail.com>
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 <<EOF >$XBPS_WRAPPERDIR/cross-qmake
+ cat <<EOF >$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?=
<congdanhqx@gmail.com>
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 <orphan@voidlinux.org>"
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?=
<congdanhqx@gmail.com>
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 <orphan@voidlinux.org>"
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?=
<congdanhqx@gmail.com>
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 <dem.procopiou@gmail.com>"
@@ -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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Calibre 5.0.0, python3-PyQt5 build with sip-build
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
` (4 preceding siblings ...)
2020-09-28 0:58 ` sgn
@ 2020-09-28 12:52 ` sgn
2020-09-28 13:06 ` sgn
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2020-09-28 12:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages pyqt5-modernize-update-to-5.15.1
https://github.com/void-linux/void-packages/pull/25128
Calibre 5.0.0, python3-PyQt5 build with sip-build
- modernized since it's required for calibre
A patch file from https://github.com/void-linux/void-packages/pull/25128.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pyqt5-modernize-update-to-5.15.1-25128.patch --]
[-- Type: text/x-diff, Size: 14605 bytes --]
From 1c225cb6d1c67c13898630959b6b2336f68cb2a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 28 Sep 2020 19:40:29 +0700
Subject: [PATCH 1/5] python-PyQt5: update to 5.15.1.
---
srcpkgs/python-PyQt5/template | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python-PyQt5/template b/srcpkgs/python-PyQt5/template
index 3848b368a05..46399a57031 100644
--- a/srcpkgs/python-PyQt5/template
+++ b/srcpkgs/python-PyQt5/template
@@ -1,6 +1,6 @@
# Template file for 'python-PyQt5'
pkgname=python-PyQt5
-version=5.15.0
+version=5.15.1
revision=1
_sipver=4.19.23
wrksrc="PyQt5-${version}"
@@ -18,7 +18,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
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() {
@@ -96,7 +96,6 @@ python-PyQt5-devel-tools_package() {
python-PyQt5-devel_package() {
depends="python-sip-devel python-PyQt5-${version}_${revision}"
short_desc+=" - development files"
- conflicts="python3-PyQt5-devel>=0"
pkg_install() {
vmove usr/share/sip
}
From 444b025f05ff243edd9916299ae009c1c7d1037b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:48 +0700
Subject: [PATCH 2/5] python3-PyQt5-webengine: build with sip-build
---
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 <<EOF >$XBPS_WRAPPERDIR/cross-qmake
+ cat <<EOF >$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 8810b9fe6da9c8765f86ab4f1cb934caff6d15fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 28 Sep 2020 07:45:53 +0700
Subject: [PATCH 3/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 <orphan@voidlinux.org>"
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 3785e630efbdbbc34f71b5fbf4bf9fdd93d49ee6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:29 +0700
Subject: [PATCH 4/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 <dem.procopiou@gmail.com>"
@@ -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
From 18874d7d6a8ff84a41879582dc0da1b79a9b42e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 28 Sep 2020 19:41:25 +0700
Subject: [PATCH 5/5] python-PyQt5-webengine: drop package
Last user: calibre moved to Python 3
---
srcpkgs/python-PyQt5-webengine/template | 44 -------------------------
srcpkgs/python-PyQt5-webengine/update | 1 -
2 files changed, 45 deletions(-)
delete mode 100644 srcpkgs/python-PyQt5-webengine/template
delete mode 100644 srcpkgs/python-PyQt5-webengine/update
diff --git a/srcpkgs/python-PyQt5-webengine/template b/srcpkgs/python-PyQt5-webengine/template
deleted file mode 100644
index 257a9e1387b..00000000000
--- a/srcpkgs/python-PyQt5-webengine/template
+++ /dev/null
@@ -1,44 +0,0 @@
-# Template file for 'python-PyQt5-webengine'
-pkgname=python-PyQt5-webengine
-version=5.15.0
-revision=1
-wrksrc="PyQtWebEngine-${version}"
-hostmakedepends="pkg-config qt5-qmake python python-PyQt5"
-makedepends="qt5-declarative-devel qt5-webchannel-devel qt5-location-devel
- qt5-webengine-devel python-devel python-PyQt5-devel"
-depends="python-PyQt5>=${version}_1 python-PyQt5-webchannel>=${version}_1"
-short_desc="Python2 bindings for the Qt5 toolkit - webengine module"
-maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-3.0-only"
-homepage="https://www.riverbankcomputing.com/software/pyqtwebengine/intro"
-distfiles="${PYPI_SITE}/P/PyQtWebEngine/PyQtWebEngine-${version}.tar.gz"
-checksum=670812688e40bf75f70ddf01eadd897d231300318d3856b275bf8e7e0085bf75
-lib32disabled=yes
-nocross="configure script is broken for cross builds"
-
-case "$XBPS_TARGET_MACHINE" in
- ppc64le*) ;;
- ppc*) broken="no webengine for big endian ppc";;
- arm*) broken="depends on qt5-webengine";;
-esac
-
-post_extract() {
- rm -rf pyuic/uic/port_v3
-}
-
-do_configure() {
- python2 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=""
-}
-
-do_build() {
- make ${makejobs}
-}
-
-do_install() {
- make DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install
- rm -rf ${DESTDIR}/usr/share
-}
diff --git a/srcpkgs/python-PyQt5-webengine/update b/srcpkgs/python-PyQt5-webengine/update
deleted file mode 100644
index 4e03873e2a7..00000000000
--- a/srcpkgs/python-PyQt5-webengine/update
+++ /dev/null
@@ -1 +0,0 @@
-pkgname="PyQtWebEngine_gpl"
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Calibre 5.0.0, python3-PyQt5 build with sip-build
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
` (5 preceding siblings ...)
2020-09-28 12:52 ` sgn
@ 2020-09-28 13:06 ` sgn
2020-09-28 14:31 ` sgn
2020-09-28 14:49 ` [PR PATCH] [Merged]: " sgn
8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2020-09-28 13:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages pyqt5-modernize-update-to-5.15.1
https://github.com/void-linux/void-packages/pull/25128
Calibre 5.0.0, python3-PyQt5 build with sip-build
- modernized since it's required for calibre
A patch file from https://github.com/void-linux/void-packages/pull/25128.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pyqt5-modernize-update-to-5.15.1-25128.patch --]
[-- Type: text/x-diff, Size: 10755 bytes --]
From b5ee79ec382c2600c3366ce417c6429f3296bc58 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:48 +0700
Subject: [PATCH 1/3] python3-PyQt5-webengine: build with sip-build
---
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 <<EOF >$XBPS_WRAPPERDIR/cross-qmake
+ cat <<EOF >$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 a3f706c51cdddf0f355116212932d6868647ff7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 28 Sep 2020 07:45:53 +0700
Subject: [PATCH 2/3] 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 <orphan@voidlinux.org>"
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 d022e6d7d326400780665d5c0621bd2c08f86ba5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:29 +0700
Subject: [PATCH 3/3] 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 <dem.procopiou@gmail.com>"
@@ -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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Calibre 5.0.0, python3-PyQt5 build with sip-build
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
` (6 preceding siblings ...)
2020-09-28 13:06 ` sgn
@ 2020-09-28 14:31 ` sgn
2020-09-28 14:49 ` [PR PATCH] [Merged]: " sgn
8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2020-09-28 14:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages pyqt5-modernize-update-to-5.15.1
https://github.com/void-linux/void-packages/pull/25128
Calibre 5.0.0, python3-PyQt5 build with sip-build
- modernized since it's required for calibre
A patch file from https://github.com/void-linux/void-packages/pull/25128.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pyqt5-modernize-update-to-5.15.1-25128.patch --]
[-- Type: text/x-diff, Size: 6278 bytes --]
From 37037acb8006e7454b94fbebcab9ce3053880ea8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 27 Sep 2020 14:13:29 +0700
Subject: [PATCH 1/2] 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 <dem.procopiou@gmail.com>"
@@ -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
From 92ce73f35d359e4e112df10c7996897fc729c65d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 28 Sep 2020 19:41:25 +0700
Subject: [PATCH 2/2] python-PyQt5-webengine: drop package
Last user: calibre moved to Python 3
---
srcpkgs/python-PyQt5-webengine/template | 44 -------------------------
srcpkgs/python-PyQt5-webengine/update | 1 -
2 files changed, 45 deletions(-)
delete mode 100644 srcpkgs/python-PyQt5-webengine/template
delete mode 100644 srcpkgs/python-PyQt5-webengine/update
diff --git a/srcpkgs/python-PyQt5-webengine/template b/srcpkgs/python-PyQt5-webengine/template
deleted file mode 100644
index 257a9e1387b..00000000000
--- a/srcpkgs/python-PyQt5-webengine/template
+++ /dev/null
@@ -1,44 +0,0 @@
-# Template file for 'python-PyQt5-webengine'
-pkgname=python-PyQt5-webengine
-version=5.15.0
-revision=1
-wrksrc="PyQtWebEngine-${version}"
-hostmakedepends="pkg-config qt5-qmake python python-PyQt5"
-makedepends="qt5-declarative-devel qt5-webchannel-devel qt5-location-devel
- qt5-webengine-devel python-devel python-PyQt5-devel"
-depends="python-PyQt5>=${version}_1 python-PyQt5-webchannel>=${version}_1"
-short_desc="Python2 bindings for the Qt5 toolkit - webengine module"
-maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-3.0-only"
-homepage="https://www.riverbankcomputing.com/software/pyqtwebengine/intro"
-distfiles="${PYPI_SITE}/P/PyQtWebEngine/PyQtWebEngine-${version}.tar.gz"
-checksum=670812688e40bf75f70ddf01eadd897d231300318d3856b275bf8e7e0085bf75
-lib32disabled=yes
-nocross="configure script is broken for cross builds"
-
-case "$XBPS_TARGET_MACHINE" in
- ppc64le*) ;;
- ppc*) broken="no webengine for big endian ppc";;
- arm*) broken="depends on qt5-webengine";;
-esac
-
-post_extract() {
- rm -rf pyuic/uic/port_v3
-}
-
-do_configure() {
- python2 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=""
-}
-
-do_build() {
- make ${makejobs}
-}
-
-do_install() {
- make DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install
- rm -rf ${DESTDIR}/usr/share
-}
diff --git a/srcpkgs/python-PyQt5-webengine/update b/srcpkgs/python-PyQt5-webengine/update
deleted file mode 100644
index 4e03873e2a7..00000000000
--- a/srcpkgs/python-PyQt5-webengine/update
+++ /dev/null
@@ -1 +0,0 @@
-pkgname="PyQtWebEngine_gpl"
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Merged]: Calibre 5.0.0, python3-PyQt5 build with sip-build
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
` (7 preceding siblings ...)
2020-09-28 14:31 ` sgn
@ 2020-09-28 14:49 ` sgn
8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2020-09-28 14:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
There's a merged pull request on the void-packages repository
Calibre 5.0.0, python3-PyQt5 build with sip-build
https://github.com/void-linux/void-packages/pull/25128
Description:
- modernized since it's required for calibre
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-09-28 14:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-27 4:23 [PR PATCH] Pyqt5 modernize and update to 5.15.1 sgn
2020-09-27 23:21 ` [PR PATCH] [Updated] " sgn
2020-09-28 0:44 ` [PR PATCH] [Updated] PyQt5 modernize and update to 5.15.1 (Prepare for Calibre 5.0.0) sgn
2020-09-28 0:45 ` sgn
2020-09-28 0:48 ` [PR PATCH] [Updated] Calibre 5.0.0, python3-PyQt5 build with sip-build sgn
2020-09-28 0:58 ` sgn
2020-09-28 12:52 ` sgn
2020-09-28 13:06 ` sgn
2020-09-28 14:31 ` sgn
2020-09-28 14:49 ` [PR PATCH] [Merged]: " sgn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).