From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Calibre 5.0.0, python3-PyQt5 build with sip-build
Date: Mon, 28 Sep 2020 14:52:41 +0200 [thread overview]
Message-ID: <20200928125241.4kcqIIZ_ziiY-BTEHYas1-zAYUNny0tXFhy_DAWTE10@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-25128@inbox.vuxu.org>
[-- 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"
next prev parent reply other threads:[~2020-09-28 12:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-09-28 13:06 ` sgn
2020-09-28 14:31 ` sgn
2020-09-28 14:49 ` [PR PATCH] [Merged]: " sgn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200928125241.4kcqIIZ_ziiY-BTEHYas1-zAYUNny0tXFhy_DAWTE10@z \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).