krita: build with python3-PyQt5-devel

This commit is contained in:
Đoàn Trần Công Danh 2020-09-28 20:02:01 +07:00
parent 90fb7cd2cc
commit 666132c570
2 changed files with 46 additions and 3 deletions

View File

@ -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"])

View File

@ -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
}