From 8f7d0059cf71b4acc98eb031cb8e2f42fc2968ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 28 Sep 2020 20:02:01 +0700 Subject: [PATCH 1/3] krita: build with python3-PyQt5-devel --- srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch | 34 ++++++++++++++ srcpkgs/krita/patches/sip5.patch | 47 +++++++++++++++++++ srcpkgs/krita/template | 6 +-- 3 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch create mode 100644 srcpkgs/krita/patches/sip5.patch diff --git a/srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch b/srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch new file mode 100644 index 00000000000..f9aa4e4a6f8 --- /dev/null +++ b/srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch @@ -0,0 +1,34 @@ +From c3cba340cfca43f216522464de5fd6f3e060718b Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev +Date: Sat, 4 Jul 2020 13:01:27 +0300 +Subject: [PATCH] Update pyqt_sip_dir for pyqt5 compiled with sip5 + +--- + https://github.com/KDE/krita/commit/c3cba340cfca43f216522464de5fd6f3e060718b + cmake/modules/FindPyQt5.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git cmake/modules/FindPyQt5.py cmake/modules/FindPyQt5.py +index e0ef9d7bdb..e138ad3107 100644 +--- cmake/modules/FindPyQt5.py ++++ cmake/modules/FindPyQt5.py +@@ -4,6 +4,7 @@ + + import sys + import os ++from distutils.sysconfig import get_python_lib + + try: + # On Windows and Python 3.8+ python doesn't load module DLL's +@@ -40,8 +41,9 @@ + except ValueError: + pass + +-# FIXME This next line is just a little bit too crude. +-pyqt_sip_dir = os.path.join(sys.prefix, "share", "sip", "PyQt5") ++pyqt_sip_dir = os.path.join(get_python_lib(plat_specific=1), "PyQt5", "bindings") ++if not os.path.exists(pyqt_sip_dir): # Fallback for older PyQt5/SIP ++ pyqt_sip_dir = os.path.join(sys.prefix, "share", "sip", "PyQt5") + print("pyqt_sip_dir:%s" % pyqt_sip_dir) + + print("pyqt_sip_flags:%s" % PyQt5.QtCore.PYQT_CONFIGURATION["sip_flags"]) diff --git a/srcpkgs/krita/patches/sip5.patch b/srcpkgs/krita/patches/sip5.patch new file mode 100644 index 00000000000..f3143151a25 --- /dev/null +++ b/srcpkgs/krita/patches/sip5.patch @@ -0,0 +1,47 @@ +From 91b31ace2ef8bc0792cdef3aa351f6d835baf254 Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev +Date: Fri, 24 Jul 2020 20:18:13 +0300 +Subject: [PATCH] Make FindSIP.py compatible with SIP v5 + +--- + cmake/modules/FindSIP.py | 30 +++++++++++++++++++++--------- + 1 file changed, 21 insertions(+), 9 deletions(-) + +diff --git cmake/modules/FindSIP.py cmake/modules/FindSIP.py +index ecb734f2cc..9fb032f8e5 100644 +--- cmake/modules/FindSIP.py ++++ cmake/modules/FindSIP.py +@@ -4,12 +4,24 @@ + # Redistribution and use is allowed according to the terms of the BSD license. + # For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +-import sys +-import sipconfig +- +-sipcfg = sipconfig.Configuration() +-print("sip_version:%06.0x" % sipcfg.sip_version) +-print("sip_version_str:%s" % sipcfg.sip_version_str) +-print("sip_bin:%s" % sipcfg.sip_bin) +-print("default_sip_dir:%s" % sipcfg.default_sip_dir) +-print("sip_inc_dir:%s" % sipcfg.sip_inc_dir) ++try: ++ import sipbuild ++except ImportError: # Code for SIP v4 ++ import sipconfig ++ ++ sipcfg = sipconfig.Configuration() ++ print("sip_version:%06.0x" % sipcfg.sip_version) ++ print("sip_version_str:%s" % sipcfg.sip_version_str) ++ print("sip_bin:%s" % sipcfg.sip_bin) ++ print("default_sip_dir:%s" % sipcfg.default_sip_dir) ++ print("sip_inc_dir:%s" % sipcfg.sip_inc_dir) ++else: # Code for SIP v5 ++ print("sip_version:%06.0x" % sipbuild.version.SIP_VERSION) ++ print("sip_version_str:%s" % sipbuild.version.SIP_VERSION_STR) ++ ++ import shutil ++ print("sip_bin:%s" % shutil.which("sip5")) ++ ++ from distutils.sysconfig import get_python_lib ++ python_modules_dir = get_python_lib(plat_specific=1) ++ print("default_sip_dir:%s" % python_modules_dir) diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template index a3f5f8fbe16..5891183d8c8 100644 --- a/srcpkgs/krita/template +++ b/srcpkgs/krita/template @@ -1,10 +1,10 @@ # Template file for 'krita' pkgname=krita version=4.3.0 -revision=1 +revision=2 build_style=cmake configure_args="-Wno-dev -DBUILD_TESTING=OFF" -hostmakedepends="extra-cmake-modules gettext pkg-config python3 +hostmakedepends="extra-cmake-modules gettext pkg-config python3 sip5 qt5-qmake qt5-host-tools kcoreaddons" makedepends="karchive-devel kconfig-devel kwidgetsaddons-devel kcompletion-devel kcoreaddons-devel kguiaddons-devel ki18n-devel kitemmodels-devel kitemviews-devel @@ -12,7 +12,7 @@ makedepends="karchive-devel kconfig-devel kwidgetsaddons-devel kcompletion-devel boost-devel gsl-devel tiff-devel libjpeg-turbo-devel libraw-devel fftw-devel opencolorio-devel eigen exiv2-devel libXi-devel libopenexr-devel libgomp-devel poppler-qt5-devel giflib-devel python3-devel python3-sip-devel python3-PyQt5 - python-PyQt5-devel quazip-devel libheif-devel" + python3-PyQt5-devel quazip-devel libheif-devel" short_desc="Painting and image editing program" maintainer="John " license="GPL-3.0-only" From 791e1494938bda592e0e1fb155da540980402dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 28 Sep 2020 20:03:47 +0700 Subject: [PATCH 2/3] python-Pillow: depends on python-tkinter Since we're going to drop python-PyQt5 --- srcpkgs/python-Pillow/INSTALL.msg | 2 -- srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg | 2 -- srcpkgs/python-Pillow/template | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 srcpkgs/python-Pillow/INSTALL.msg delete mode 100644 srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg diff --git a/srcpkgs/python-Pillow/INSTALL.msg b/srcpkgs/python-Pillow/INSTALL.msg deleted file mode 100644 index 256e374e98e..00000000000 --- a/srcpkgs/python-Pillow/INSTALL.msg +++ /dev/null @@ -1,2 +0,0 @@ -To use the Tk image interface install python-tkinter. -To use the Qt image interface install python-PyQt5. diff --git a/srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg b/srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg deleted file mode 100644 index 8ce8ed66afd..00000000000 --- a/srcpkgs/python-Pillow/python3-Pillow.INSTALL.msg +++ /dev/null @@ -1,2 +0,0 @@ -To use the Tk image interface install python3-tkinter. -To use the Qt image interface install python3-PyQt5. diff --git a/srcpkgs/python-Pillow/template b/srcpkgs/python-Pillow/template index 1e36fc16e19..072f37b611b 100644 --- a/srcpkgs/python-Pillow/template +++ b/srcpkgs/python-Pillow/template @@ -1,13 +1,13 @@ # Template file for 'python-Pillow' pkgname=python-Pillow version=6.2.2 -revision=2 +revision=3 wrksrc="Pillow-${version}" build_style=python2-module hostmakedepends="python-setuptools" makedepends="python-devel libjpeg-turbo-devel libopenjpeg2-devel tiff-devel freetype-devel lcms2-devel libwebp-devel libimagequant-devel" -depends="python" +depends="python python-tkinter" short_desc="Python Imaging Library (PIL) fork for Python2" maintainer="Alessio Sergi " license="custom:PIL" From a3d850be74206526be19fe29de0ed596fd41ba2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 28 Sep 2020 20:05:40 +0700 Subject: [PATCH 3/3] python-PyQt5: drop package --- srcpkgs/python-PyQt5/template | 250 ---------------------------------- srcpkgs/python-PyQt5/update | 1 - 2 files changed, 251 deletions(-) delete mode 100644 srcpkgs/python-PyQt5/template delete mode 100644 srcpkgs/python-PyQt5/update diff --git a/srcpkgs/python-PyQt5/template b/srcpkgs/python-PyQt5/template deleted file mode 100644 index 3848b368a05..00000000000 --- a/srcpkgs/python-PyQt5/template +++ /dev/null @@ -1,250 +0,0 @@ -# Template file for 'python-PyQt5' -pkgname=python-PyQt5 -version=5.15.0 -revision=1 -_sipver=4.19.23 -wrksrc="PyQt5-${version}" -hostmakedepends="pkg-config - python-devel python-sip-devel 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 - qt5-svg-devel qt5-webchannel-devel qt5-webkit-devel qt5-websockets-devel - qt5-x11extras-devel qt5-xmlpatterns-devel qt5-networkauth-devel pulseaudio-devel - python-enum34" -makedepends="${hostmakedepends/pkg-config/}" -depends="python-sip-PyQt5>=${_sipver} python-enum34" -short_desc="Python 2 bindings for the Qt5 toolkit" -maintainer="Orphaned " -license="GPL-3.0-only" -homepage="https://riverbankcomputing.com/software/pyqt/intro" -distfiles="${PYPI_SITE}/P/PyQt5/PyQt5-${version}.tar.gz" -checksum=c6f75488ffd5365a65893bc64ea82a6957db126fbfe33654bcd43ae1c30c52f9 -lib32disabled=yes - -post_extract() { - rm -rf pyuic/uic/port_v3 -} - -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 <