Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] krita: build with python3-PyQt5-devel
@ 2020-09-29  0:06 sgn
  2020-09-30 23:38 ` [PR PATCH] [Merged]: " sgn
  0 siblings, 1 reply; 2+ messages in thread
From: sgn @ 2020-09-29  0:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages krita-python3-pyqt5
https://github.com/void-linux/void-packages/pull/25181

krita: build with python3-PyQt5-devel
Also enable PyQt5 when cross-build

A patch file from https://github.com/void-linux/void-packages/pull/25181.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-krita-python3-pyqt5-25181.patch --]
[-- Type: text/x-diff, Size: 3616 bytes --]

From a398f6c2fcbaeaf265f6705ec7212bc6b1d339d5 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 20:02:01 +0700
Subject: [PATCH] krita: build with python3-PyQt5-devel

---
 srcpkgs/krita/patches/pyqt_sip_dir-sip5.patch | 34 +++++++++++++++++++
 srcpkgs/krita/template                        | 15 ++++++--
 2 files changed, 46 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/krita/patches/pyqt_sip_dir-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 <mitya57@gmail.com>
+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/template b/srcpkgs/krita/template
index a3f5f8fbe16..ec4a1dfe8ca 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,18 +1,19 @@
 # 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
- qt5-qmake qt5-host-tools kcoreaddons"
+ qt5-qmake qt5-host-tools kcoreaddons python3-sip-devel python3-PyQt5
+ python3-PyQt5-devel"
 makedepends="karchive-devel kconfig-devel kwidgetsaddons-devel kcompletion-devel
  kcoreaddons-devel kguiaddons-devel ki18n-devel kitemmodels-devel kitemviews-devel
  kwindowsystem-devel kio-devel kcrash-devel qt5-svg-devel qt5-multimedia-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 <me@johnnynator.dev>"
 license="GPL-3.0-only"
@@ -29,3 +30,11 @@ esac
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"
 fi
+
+pre_configure() {
+	# CMake won't search in those directories because of CMAKE_FIND_ROOT_PATH
+	if [ "$CROSS_BUILD" ]; then
+		configure_args+=" -D_find_sip_py=$wrksrc/cmake/modules/FindSIP.py"
+		configure_args+=" -D_find_pyqt5_py=$wrksrc/cmake/modules/FindPyQt5.py"
+	fi
+}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: krita: build with python3-PyQt5-devel
  2020-09-29  0:06 [PR PATCH] krita: build with python3-PyQt5-devel sgn
@ 2020-09-30 23:38 ` sgn
  0 siblings, 0 replies; 2+ messages in thread
From: sgn @ 2020-09-30 23:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

There's a merged pull request on the void-packages repository

krita: build with python3-PyQt5-devel
https://github.com/void-linux/void-packages/pull/25181

Description:
Also enable PyQt5 when cross-build

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-30 23:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29  0:06 [PR PATCH] krita: build with python3-PyQt5-devel sgn
2020-09-30 23:38 ` [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).