commit:     37ec56bc389ab73912961b1b86e6a91fbd2c2992
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 21 16:05:42 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jan 21 16:42:11 2020 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=37ec56bc

kde-apps/kig: Fix crash upon exit when using scripting

Eliminiate CRLF line terminators.

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kig/files/kig-19.08.3-scripter-crash.patch     | 29 ++++++++++++++++++
 kde-apps/kig/files/kig-4.12.0-boostpython.patch    | 35 +++++++++++-----------
 kde-apps/kig/kig-19.12.49.9999.ebuild              |  1 +
 3 files changed, 48 insertions(+), 17 deletions(-)

diff --git a/kde-apps/kig/files/kig-19.08.3-scripter-crash.patch 
b/kde-apps/kig/files/kig-19.08.3-scripter-crash.patch
new file mode 100644
index 0000000000..9540e9044f
--- /dev/null
+++ b/kde-apps/kig/files/kig-19.08.3-scripter-crash.patch
@@ -0,0 +1,29 @@
+From 211f8501ec4cf77ed68253783d58a662b5513612 Mon Sep 17 00:00:00 2001
+From: Maurizio Paolini <[email protected]>
+Date: Sat, 11 Jan 2020 19:50:33 +0100
+Subject: Fix crash upon exit after transition python2 -> python3 when using
+ scripting (bug #416037)
+
+Reviewed By: kkevin
+Differential Revision: https://phabricator.kde.org/D12833
+CCBUG: 416037
+---
+ scripting/python_scripter.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripting/python_scripter.cc b/scripting/python_scripter.cc
+index bb5db39..3edec77 100644
+--- a/scripting/python_scripter.cc
++++ b/scripting/python_scripter.cc
+@@ -427,8 +427,8 @@ PythonScripter::PythonScripter()
+ PythonScripter::~PythonScripter()
+ {
+   PyErr_Clear();
+-  Py_Finalize();
+   delete d;
++  Py_FinalizeEx();
+ }
+ 
+ class CompiledPythonScript::Private
+-- 
+cgit v1.1

diff --git a/kde-apps/kig/files/kig-4.12.0-boostpython.patch 
b/kde-apps/kig/files/kig-4.12.0-boostpython.patch
index 7a4b878c6b..5173ba2cd7 100644
--- a/kde-apps/kig/files/kig-4.12.0-boostpython.patch
+++ b/kde-apps/kig/files/kig-4.12.0-boostpython.patch
@@ -1,17 +1,18 @@
-diff --git a/cmake/modules/FindBoostPython.cmake 
b/cmake/modules/FindBoostPython.cmake
-index 2ccc161..02d9bf6 100644
---- a/cmake/modules/FindBoostPython.cmake
-+++ b/cmake/modules/FindBoostPython.cmake
-@@ -74,10 +74,10 @@ if(HAVE_BOOST_SHARED_PTR_HPP AND Boost_PYTHON_FOUND)
-     # Second try: try pkg-config way
-     find_package(PkgConfig)
-     if(PKG_CONFIG_FOUND)
--      set(PYTHON_VERSIONS 
"python;python2.7;python2.6;python2.5;python2.4;python2.3;python2.2")
-+      execute_process(COMMAND python -c "import sys; 
sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" 
OUTPUT_VARIABLE PYTHON_VERSIONS)
-       foreach(_pyver ${PYTHON_VERSIONS})
-         if(NOT BoostPython_INCLUDES OR NOT BoostPython_LIBS)
--          pkg_check_modules(${_pyver} QUIET ${_pyver})
-+         pkg_check_modules(_python python-${_pyver})
-           if(${_pyver}_FOUND)
-             cmake_push_check_state()
-             set(CMAKE_REQUIRED_INCLUDES  ${CMAKE_REQUIRED_INCLUDES}  
${${_pyver}_INCLUDE_DIRS})
\ No newline at end of file
+diff --git a/cmake/modules/FindBoostPython.cmake 
b/cmake/modules/FindBoostPython.cmake
+index 2ccc161..02d9bf6 100644
+--- a/cmake/modules/FindBoostPython.cmake
++++ b/cmake/modules/FindBoostPython.cmake
+@@ -74,10 +74,10 @@ if(HAVE_BOOST_SHARED_PTR_HPP AND Boost_PYTHON_FOUND)
+     # Second try: try pkg-config way
+     find_package(PkgConfig)
+     if(PKG_CONFIG_FOUND)
+-      set(PYTHON_VERSIONS 
"python;python2.7;python2.6;python2.5;python2.4;python2.3;python2.2")
++      execute_process(COMMAND python -c "import sys; 
sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" 
OUTPUT_VARIABLE PYTHON_VERSIONS)
+       foreach(_pyver ${PYTHON_VERSIONS})
+         if(NOT BoostPython_INCLUDES OR NOT BoostPython_LIBS)
+-          pkg_check_modules(${_pyver} QUIET ${_pyver})
++          pkg_check_modules(_python python-${_pyver})
+           if(${_pyver}_FOUND)
+             cmake_push_check_state()
+             set(CMAKE_REQUIRED_INCLUDES  ${CMAKE_REQUIRED_INCLUDES}  
${${_pyver}_INCLUDE_DIRS})
+

diff --git a/kde-apps/kig/kig-19.12.49.9999.ebuild 
b/kde-apps/kig/kig-19.12.49.9999.ebuild
index a64ad2e315..d9087a123f 100644
--- a/kde-apps/kig/kig-19.12.49.9999.ebuild
+++ b/kde-apps/kig/kig-19.12.49.9999.ebuild
@@ -49,6 +49,7 @@ DEPEND="${RDEPEND}
 PATCHES=(
        "${FILESDIR}"/${PN}-4.12.0-boostpython.patch
        "${FILESDIR}"/${PN}-19.08.3-pykig-python3.patch
+       "${FILESDIR}"/${PN}-19.08.3-scripter-crash.patch
 )
 
 pkg_setup() {

Reply via email to