mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
media-gfx/krita: drop 5.2.6
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -1,2 +1 @@
|
||||
DIST krita-5.2.6.tar.xz 186560016 BLAKE2B 788385983b371626214898391b08b1276a74b2ee3c9f01c1b1ae19d8791bfcf1ea1f59f6304643aeb6b16a2559fd2e45464596c721eb5d53546672d0efe17903 SHA512 8502ebef11ae066b298e999aba06df7858605cca14b889cec167b7ee3953b8ed86459b44ed90508d59bd7a9968cc9957309cefaa140a8d20293344f4dcb7fea7
|
||||
DIST krita-5.2.9.tar.xz 186574780 BLAKE2B de6be9c1de9854271fedd115902693183ed1953ad4a7dc47602bcdc5f70907bac5489ecd510fcf9507f35293e8fd8d34385374cca3ca054fb01749d96c63a22b SHA512 fc4af177371afad307a77047ceff3fb793c76e6e8b64382acd950bd89d6fc12fb2c83d76d8e8d0482860add178b8fe70ac05b1db4bc0e17520be53b9190e4bfe
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
From 0f43ec3158225092f6a02422eb90c56421326570 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
|
||||
Date: Tue, 18 Jun 2024 22:05:34 +0200
|
||||
Subject: [PATCH] Changes to build pykrita with Python 3.13
|
||||
|
||||
Python 3.11 deprecated Py_SetPath() in 2022 and Python 3.13 removed it.
|
||||
Instead one needs to use the new PyConfig API (PEP 587) added to Python
|
||||
3.8.
|
||||
|
||||
Fix: #488680
|
||||
---
|
||||
.../extensions/pykrita/plugin/utilities.cpp | 61 +++++++++++++++++--
|
||||
plugins/extensions/pykrita/plugin/utilities.h | 4 +-
|
||||
2 files changed, 57 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/plugins/extensions/pykrita/plugin/utilities.cpp b/plugins/extensions/pykrita/plugin/utilities.cpp
|
||||
index 4f58183238..1e497b2681 100644
|
||||
--- a/plugins/extensions/pykrita/plugin/utilities.cpp
|
||||
+++ b/plugins/extensions/pykrita/plugin/utilities.cpp
|
||||
@@ -19,8 +19,10 @@
|
||||
#include <cmath>
|
||||
#include <Python.h>
|
||||
|
||||
+#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QLibrary>
|
||||
+#include <QProcessEnvironment>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
@@ -412,18 +414,65 @@ bool Python::setPath(const QStringList& scriptPaths)
|
||||
joinedPaths = joinedPaths + pathSeparator + originalPath;
|
||||
}
|
||||
dbgScript << "Setting python paths:" << joinedPaths;
|
||||
+
|
||||
#ifdef Q_OS_WIN
|
||||
- QVector<wchar_t> joinedPathsWChars(joinedPaths.size() + 1, 0);
|
||||
- joinedPaths.toWCharArray(joinedPathsWChars.data());
|
||||
- Py_SetPath(joinedPathsWChars.data());
|
||||
+ PyStatus status;
|
||||
+ PyConfig config;
|
||||
+ PyConfig_InitPythonConfig(&config);
|
||||
+
|
||||
+ for (const QString& path : joinedPaths.split(pathSeparator)) {
|
||||
+ status = PyWideStringList_Append(&config.module_search_paths, path.toStdWString().c_str());
|
||||
+ if (PyStatus_Exception(status)) {
|
||||
+ qDebug() << "Error appending to PyWideStringList:" << status.err_msg;
|
||||
+ dbgScript << "Error appending to PyWideStringList";
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ config.module_search_paths_set = true;
|
||||
+ qDebug() << "Set module_search_paths";
|
||||
+
|
||||
+ status = Py_InitializeFromConfig(&config);
|
||||
+ if (PyStatus_Exception(status)) {
|
||||
+ qDebug() << "Cannot initialize Py_InitializeFromConfig:" << status.err_msg;
|
||||
+ Py_ExitStatusException(status);
|
||||
+ PyConfig_Clear(&config);
|
||||
+ dbgScript << "Cannot initialize Py_InitializeFromConfig config";
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ PyConfig_Clear(&config);
|
||||
#else
|
||||
if (runningInBundle) {
|
||||
- QVector<wchar_t> joinedPathsWChars(joinedPaths.size() + 1, 0);
|
||||
- joinedPaths.toWCharArray(joinedPathsWChars.data());
|
||||
- Py_SetPath(joinedPathsWChars.data());
|
||||
+ PyStatus status;
|
||||
+ PyConfig config;
|
||||
+ PyConfig_InitPythonConfig(&config);
|
||||
+
|
||||
+ for (const QString& path : joinedPaths.split(pathSeparator)) {
|
||||
+ status = PyWideStringList_Append(&config.module_search_paths, path.toStdWString().c_str());
|
||||
+ if (PyStatus_Exception(status)) {
|
||||
+ qDebug() << "Error appending to PyWideStringList:" << status.err_msg;
|
||||
+ dbgScript << "Error appending to PyWideStringList";
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ config.module_search_paths_set = true;
|
||||
+
|
||||
+ status = Py_InitializeFromConfig(&config);
|
||||
+ if (PyStatus_Exception(status)) {
|
||||
+ Py_ExitStatusException(status);
|
||||
+ qDebug() << "Cannot initialize Py_InitializeFromConfig 2:" << status.err_msg;
|
||||
+ PyConfig_Clear(&config);
|
||||
+ dbgScript << "Cannot initialize Py_InitializeFromConfig config";
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ PyConfig_Clear(&config);
|
||||
}
|
||||
else {
|
||||
qputenv("PYTHONPATH", joinedPaths.toLocal8Bit());
|
||||
+ qDebug() << "Set PYTHONPATH environment variable";
|
||||
}
|
||||
#endif
|
||||
isPythonPathSet = true;
|
||||
diff --git a/plugins/extensions/pykrita/plugin/utilities.h b/plugins/extensions/pykrita/plugin/utilities.h
|
||||
index fb309bd0b8..aec47da239 100644
|
||||
--- a/plugins/extensions/pykrita/plugin/utilities.h
|
||||
+++ b/plugins/extensions/pykrita/plugin/utilities.h
|
||||
@@ -81,8 +81,8 @@ public:
|
||||
static bool libraryLoad();
|
||||
|
||||
/**
|
||||
- * Set the Python paths by calling Py_SetPath. This should be called before
|
||||
- * initialization to ensure the proper libraries get loaded.
|
||||
+ * Set the Python paths by calling Py_InitializeFromConfig. This should be
|
||||
+ * called before initialization to ensure the proper libraries get loaded.
|
||||
*/
|
||||
static bool setPath(const QStringList& scriptPaths);
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
ECM_TEST="forceoptional"
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
KFMIN=5.115.0
|
||||
QTMIN=5.15.12
|
||||
inherit ecm kde.org python-single-r1
|
||||
|
||||
if [[ ${KDE_BUILD_TYPE} = release ]]; then
|
||||
SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
|
||||
KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Free digital painting application. Digital Painting, Creative Freedom!"
|
||||
HOMEPAGE="https://apps.kde.org/krita/ https://krita.org/en/"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="5"
|
||||
IUSE="color-management fftw gif +gsl heif jpeg2k jpegxl +mypaint-brush-engine openexr pdf media +raw +xsimd webp"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# bug 630508
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
dev-libs/boost:=
|
||||
dev-libs/libunibreak:=
|
||||
dev-libs/quazip:0=[qt5(+)]
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pyqt5[declarative,gui,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/sip:=[${PYTHON_USEDEP}]
|
||||
')
|
||||
>=dev-qt/qtconcurrent-${QTMIN}:5
|
||||
>=dev-qt/qtdbus-${QTMIN}:5
|
||||
>=dev-qt/qtdeclarative-${QTMIN}:5
|
||||
>=dev-qt/qtgui-${QTMIN}:5=[-gles2-only]
|
||||
>=dev-qt/qtnetwork-${QTMIN}:5
|
||||
>=dev-qt/qtprintsupport-${QTMIN}:5
|
||||
>=dev-qt/qtsql-${QTMIN}:5
|
||||
>=dev-qt/qtsvg-${QTMIN}:5
|
||||
>=dev-qt/qtwidgets-${QTMIN}:5
|
||||
>=dev-qt/qtx11extras-${QTMIN}:5
|
||||
>=dev-qt/qtxml-${QTMIN}:5
|
||||
>=kde-frameworks/kcompletion-${KFMIN}:5
|
||||
>=kde-frameworks/kconfig-${KFMIN}:5
|
||||
>=kde-frameworks/kcoreaddons-${KFMIN}:5
|
||||
>=kde-frameworks/kcrash-${KFMIN}:5
|
||||
>=kde-frameworks/kguiaddons-${KFMIN}:5
|
||||
>=kde-frameworks/ki18n-${KFMIN}:5
|
||||
>=kde-frameworks/kiconthemes-${KFMIN}:5
|
||||
>=kde-frameworks/kitemmodels-${KFMIN}:5
|
||||
>=kde-frameworks/kitemviews-${KFMIN}:5
|
||||
>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
|
||||
>=kde-frameworks/kwindowsystem-${KFMIN}:5
|
||||
>=kde-frameworks/kxmlgui-${KFMIN}:5
|
||||
media-gfx/exiv2:=
|
||||
media-libs/lcms
|
||||
media-libs/libjpeg-turbo:=
|
||||
media-libs/libpng:=
|
||||
media-libs/tiff:=
|
||||
sys-libs/zlib
|
||||
virtual/opengl
|
||||
x11-libs/libX11
|
||||
x11-libs/libXi
|
||||
color-management? ( >=media-libs/opencolorio-2.0.0 )
|
||||
fftw? ( sci-libs/fftw:3.0= )
|
||||
gif? ( media-libs/giflib )
|
||||
gsl? ( sci-libs/gsl:= )
|
||||
jpeg2k? ( media-libs/openjpeg:= )
|
||||
jpegxl? ( >=media-libs/libjxl-0.7.0_pre20220825:= )
|
||||
heif? ( >=media-libs/libheif-1.11:=[x265] )
|
||||
media? ( media-libs/mlt:= )
|
||||
mypaint-brush-engine? ( media-libs/libmypaint:= )
|
||||
openexr? ( media-libs/openexr:= )
|
||||
pdf? ( app-text/poppler[qt5] )
|
||||
raw? ( kde-apps/libkdcraw:5 )
|
||||
webp? ( >=media-libs/libwebp-1.2.0:= )
|
||||
xsimd? ( >=dev-cpp/xsimd-13.0.0 )
|
||||
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-libs/immer
|
||||
dev-libs/lager
|
||||
dev-libs/zug
|
||||
"
|
||||
BDEPEND="
|
||||
dev-cpp/eigen:3
|
||||
dev-lang/perl
|
||||
sys-devel/gettext
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# downstream
|
||||
"${FILESDIR}"/${PN}-5.2.3-tests-optional.patch
|
||||
"${FILESDIR}"/${PN}-5.2.2-fftw.patch # bug 913518
|
||||
# Fedora, non-upstreamed:
|
||||
"${FILESDIR}"/${P}-py3.13.patch # bug 943149
|
||||
# git master
|
||||
"${FILESDIR}"/${PN}-5.1.5-sip-6.8.patch # bug 919139
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
ecm_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
ecm_src_prepare
|
||||
cmake_comment_add_subdirectory benchmarks # bug 939842
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Prevent sandbox violation from FindPyQt5.py module
|
||||
# See Gentoo-bug 655918
|
||||
addpredict /dev/dri
|
||||
|
||||
local mycmakeargs=(
|
||||
-DENABLE_UPDATERS=OFF
|
||||
-DKRITA_ENABLE_PCH=OFF # big mess.
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_KSeExpr=ON # not packaged
|
||||
$(cmake_use_find_package color-management OpenColorIO)
|
||||
$(cmake_use_find_package fftw FFTW3)
|
||||
$(cmake_use_find_package gif GIF)
|
||||
$(cmake_use_find_package gsl GSL)
|
||||
$(cmake_use_find_package heif HEIF)
|
||||
$(cmake_use_find_package jpeg2k OpenJPEG)
|
||||
$(cmake_use_find_package jpegxl JPEGXL)
|
||||
$(cmake_use_find_package media Mlt7)
|
||||
$(cmake_use_find_package mypaint-brush-engine LibMyPaint)
|
||||
$(cmake_use_find_package openexr OpenEXR)
|
||||
$(cmake_use_find_package pdf Poppler)
|
||||
$(cmake_use_find_package raw KF5KDcraw)
|
||||
$(cmake_use_find_package webp WebP)
|
||||
$(cmake_use_find_package xsimd xsimd)
|
||||
)
|
||||
|
||||
ecm_src_configure
|
||||
}
|
||||
Reference in New Issue
Block a user