diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-10 03:03:09 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-10 03:03:09 +0000 |
commit | be94ae04eee564451203d45977c2ef7c7ace1580 (patch) | |
tree | 616ffc0ad9aee18dc7d5e9e62bf62394e8e520ba /media-gfx/krita | |
parent | 2be329ae14bbf99f0fc4de7567e2386bbb529fdc (diff) |
gentoo auto-resync : 10:11:2024 - 03:03:09
Diffstat (limited to 'media-gfx/krita')
-rw-r--r-- | media-gfx/krita/Manifest | 3 | ||||
-rw-r--r-- | media-gfx/krita/files/krita-5.2.6-py3.13.patch | 120 | ||||
-rw-r--r-- | media-gfx/krita/krita-5.2.6.ebuild | 4 |
3 files changed, 125 insertions, 2 deletions
diff --git a/media-gfx/krita/Manifest b/media-gfx/krita/Manifest index 697fca9c36db..e6dd3f868758 100644 --- a/media-gfx/krita/Manifest +++ b/media-gfx/krita/Manifest @@ -6,11 +6,12 @@ AUX krita-5.1.5-sip-6.8.patch 770 BLAKE2B b63fb65ffc4ea733e8698b255b5531ff55299e AUX krita-5.2.2-fftw.patch 689 BLAKE2B a0b62a65d8de4c661a571f0f671387d0571982bbc0acdf4dc879c21711093e7a3d6ef17e6a24f04d066ecd1f861b98f8a37e626075d3fdd445f408e77484eb3f SHA512 6db10de30c0f47ea3d65490d82176685144af580a6581d0ff2fc0363e6b65166c154ad3dd05a0dadf967afc39417936275d71911e89fcf79ecfa84b1bb6b94fa AUX krita-5.2.3-tests-optional.patch 2807 BLAKE2B 7d0c0d26ce0cb1bf86f7933e8510bb5ea1e98986b811641874b4db6f622e5a31bf9b9c3b7e12267bf54f2d57d56459211df3e004dbc261e0d519f69d190e2149 SHA512 021d6d8fa1b976091088b317f54cf0be66f73b0dd9031497abc3101e4e43b69a0d4b5302e004b3ec81193bfecc0066cc4563a50b15e2c30109d3a57bafe23ca5 AUX krita-5.2.3-znver4-xsimd.patch 1650 BLAKE2B a534c96c1fdbaf3aeb59499c88079d70574e0ac4eda170637d187fd66338b80c53e3d85fe003f75c59512eb484522403e785b0a9bdb6dca0e6a7bce8d7a0a936 SHA512 2aeb300d6230fa29c97f086aad98df16ed71d1199716739467b7c25014ba7e3a84b368cc9945042e2ce8fca0e42c03579b1e26048304498c194cff01d7d7d7cf +AUX krita-5.2.6-py3.13.patch 4520 BLAKE2B cd190b438952853207f6d5f35fadb28d0044273dc4e6d6bb8aac4c623aadd7111a6c852de302da9c72c4444ef422c64c9b2a46ee74328af8b37d77d56a645fbc SHA512 65b2cff6ddcf2e6b3be9e993be61fbcb60ea89c58ba2aa2119582d5eb80b8c230b6323072dd6fc9b56a60899459cbfe433ec4deea3a3fbdaf796111383dbf206 DIST krita-5.1.5-exiv2-0.28.patch.xz 4664 BLAKE2B e364325be3d8e40e293a7d268136be3737ce5d2b9b5607f140b30ba3e687dc8d86545f4463348587711150f1652b521f87efc859a1bf2bc3b5ed704cf3236781 SHA512 130ba9cce7d6c0138f7ef6dab1445816c2e29752aa16643c32a7d9c00d7a156ac88f01afdb782ab03fc1e0822660a070f74c02e7cde4dfbcec30baaf3c3dba7f DIST krita-5.1.5.tar.xz 184981952 BLAKE2B 3d8d26849d8508dc040fb3ac5ab4d0ce724f670bf7d5782b37702b55afe5063543e6aa564a1c9326c90fb16f7905941e3f1ffd4296efd6f8a1c7cb34c0b41716 SHA512 b745eb9f51bb08df0948d6b97b85aee6a74b496df3e8423fb9107d79551daadb21960b4bb5c438348f662c67d0ec5b2fa6da18cfa5feb418659881cddd24d8f1 DIST krita-5.2.3.tar.xz 186685456 BLAKE2B 42943e7ebffdb46b9da085b2069701895e37ad9c457273b9217a095f1dfdf15c715cde0b88d440abb2d73dee656730da38844f11f27022885f87bb9cc9adab26 SHA512 69a0477e3119765dd53e0502fe5a64fcdc921dfcba3ddc5dec5c1bc4342a77b172b38276f134cc56f79741e6c47b51ef51786aadf0d178ce3955e24a9fd27b74 DIST krita-5.2.6.tar.xz 186560016 BLAKE2B 788385983b371626214898391b08b1276a74b2ee3c9f01c1b1ae19d8791bfcf1ea1f59f6304643aeb6b16a2559fd2e45464596c721eb5d53546672d0efe17903 SHA512 8502ebef11ae066b298e999aba06df7858605cca14b889cec167b7ee3953b8ed86459b44ed90508d59bd7a9968cc9957309cefaa140a8d20293344f4dcb7fea7 EBUILD krita-5.1.5.ebuild 3781 BLAKE2B ca13633df6861d9159cae079b667123280d3b4ed73e707e648b710782219999f67e8f7f806471f8eddb8c95c2e3f0a797434157a4fcc5db3cfb2a5430698ba05 SHA512 b12e60d70eb03c76c6a5dbb3df451d6666f37d07060fe90601b8c569d130ac1bb7d71ef95a6d87faa58a627b5a3823dd468eee8d0be7b370960e81957aec3316 EBUILD krita-5.2.3.ebuild 3789 BLAKE2B 6b55cc22a1dfd1766561b37c9b812907e36354021099e1613bc5a0182f19d4653c3db574311fd65cd7d7fbab689d3a80f02b638ee188383b7fb56d381c32c78d SHA512 5e03c9129ddde0c1c595beb8af2772f1056c52f9a55c3e66257b2d94f5c88fa00e8e62f85651426a96a7adce4c3e8931c3a81b6dceda66e3c3c18fd607810af9 -EBUILD krita-5.2.6.ebuild 3738 BLAKE2B e09b053369e25ca24d7814917e5b88b37b56796559435c8a9750bfbc4da6a91745f9e9fe22385679456986f4c13929abfab4c6436c816e5ba359e282ccf1a44e SHA512 404b398e3d6436163d73e39538150aba4c201b9271a92b01ee887d03f865768d6616d67aadfe209acbf492222d8d1b45f378945104d3da89dec9cd8347cf800d +EBUILD krita-5.2.6.ebuild 3811 BLAKE2B 30757cb72b3eb82831a0129ba0aeb8bcc2a1d021fe780c52df8f78e8b83de3ea86dd2e7ca2402caaec73f202c623ea11f71d17ed148c2f1a41ac8a1c35fcfd5f SHA512 996f1bb2d60761e2cc44dafc972c9ad2b6fb40afb109d1f83834c7559a2a167d5b8b1d70dac44ecc429abd77a89e1cfe4f433e7b7dcb184707831a25015f78a5 MISC metadata.xml 832 BLAKE2B 53e632c3407b42c5d0f165bdcf67dfdd3a30bf1ec3c19ea79b90323ccbe5415e7cd34fbc79ebbb0e513359f28f381e3dac5d2534daf9ae7696f83ea77acb8130 SHA512 6cb02292d63602c80451759f6b935f65c9dfc2f01b32ac540d8cd4422ab2a70e04261fabc67b570c60e116f03e34d0165c8db6dcf9595db6cfa10849d8066336 diff --git a/media-gfx/krita/files/krita-5.2.6-py3.13.patch b/media-gfx/krita/files/krita-5.2.6-py3.13.patch new file mode 100644 index 000000000000..6714059895d0 --- /dev/null +++ b/media-gfx/krita/files/krita-5.2.6-py3.13.patch @@ -0,0 +1,120 @@ +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 + diff --git a/media-gfx/krita/krita-5.2.6.ebuild b/media-gfx/krita/krita-5.2.6.ebuild index 0a1c86338154..dd17eae36561 100644 --- a/media-gfx/krita/krita-5.2.6.ebuild +++ b/media-gfx/krita/krita-5.2.6.ebuild @@ -4,7 +4,7 @@ EAPI=8 ECM_TEST="forceoptional" -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) KFMIN=5.115.0 QTMIN=5.15.12 inherit ecm kde.org python-single-r1 @@ -96,6 +96,8 @@ 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 ) |