commit:     571c1bce1bdb97b0b08f7cae47c63d0666870ddf
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 29 19:13:30 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 29 19:13:30 2021 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=571c1bce

kde-frameworks/extra-cmake-modules: Rebase disable-qmlplugindump.patch

Broken by upstream commit bc0692797aba5dd7f6d588bb75d3fc60512a9bd5

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

 .../extra-cmake-modules-9999.ebuild                |  2 +-
 ...make-modules-5.90.0-disable-qmlplugindump.patch | 76 ++++++++++++++++++++++
 2 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-9999.ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-9999.ebuild
index a612724875..00deddf483 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-9999.ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-9999.ebuild
@@ -34,7 +34,7 @@ RDEPEND="
 PATCHES=(
        "${FILESDIR}/${PN}-5.49.0-no-fatal-warnings.patch"
        "${FILESDIR}/${PN}-5.72.0-skip-ecm_add_test-early.patch"
-       "${FILESDIR}/${PN}-5.88.0-disable-qmlplugindump.patch"
+       "${FILESDIR}/${PN}-5.90.0-disable-qmlplugindump.patch"
 )
 
 python_check_deps() {

diff --git 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.90.0-disable-qmlplugindump.patch
 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.90.0-disable-qmlplugindump.patch
new file mode 100644
index 0000000000..db46d3e861
--- /dev/null
+++ 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.90.0-disable-qmlplugindump.patch
@@ -0,0 +1,76 @@
+From 763df79a4b468acd401f8adb5b245245a63d2934 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <ast...@gentoo.org>
+Date: Sun, 8 Dec 2019 15:01:33 +0100
+Subject: [PATCH] ECMFindQMLModule.cmake.in: Add ECM_DISABLE_QMLPLUGINDUMP to
+ avoid sandbox violations
+
+See also: https://phabricator.kde.org/D25812
+
+Backstory: https://bugzilla.gnome.org/show_bug.cgi?id=744135
+BUG: 387753
+---
+ modules/ECMFindQMLModule.cmake.in | 45 ++++++++++++++++++-------------
+ 1 file changed, 27 insertions(+), 18 deletions(-)
+
+diff --git a/modules/ECMFindQMLModule.cmake.in 
b/modules/ECMFindQMLModule.cmake.in
+index 7cd737b..9847825 100644
+--- a/modules/ECMFindQMLModule.cmake.in
++++ b/modules/ECMFindQMLModule.cmake.in
+@@ -7,27 +7,36 @@
+ include(FindPackageHandleStandardArgs)
+ include("${ECM_MODULE_DIR}/QtVersionOption.cmake")
+ 
+-if (QT_MAJOR_VERSION EQUAL "5")
+-    include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake")
+-    query_qmake(qt_binaries_dir QT_HOST_BINS)
+-    find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS 
${qt_binaries_dir})
+-elseif (QT_MAJOR_VERSION EQUAL "6")
+-    find_package(Qt6QmlTools REQUIRED)
+-    get_target_property(QMLPLUGINDUMP_PROGRAM Qt6::qmlplugindump LOCATION)
+-endif()
+-
+-if(NOT QMLPLUGINDUMP_PROGRAM)
+-    message(WARNING "Could not find qmlplugindump. It is necessary to look up 
qml module dependencies.")
+-endif()
++option (ECM_DISABLE_QMLPLUGINDUMP "Do not use qmlplugindump which may 
segfault in some sandboxed environments" OFF)
+ 
+-execute_process(COMMAND "${QMLPLUGINDUMP_PROGRAM}" "@MODULE_NAME@" 
"@VERSION@" ERROR_VARIABLE ERRORS_OUTPUT OUTPUT_VARIABLE DISREGARD_VARIABLE 
RESULT_VARIABLE ExitCode TIMEOUT 30)
+-
+-if(ExitCode EQUAL 0)
++if(ECM_DISABLE_QMLPLUGINDUMP)
++    message(NOTICE "@GENMODULE@: qmlplugindump disabled - assuming dependency 
is available as >= @VERSION@.")
+     set(@GENMODULE@_FOUND TRUE)
+-    set(@GENMODULE@_VERSION "${PACKAGE_FIND_VERSION}")
++    set(@GENMODULE@_VERSION @VERSION@)
+ else()
+-    message(STATUS "qmlplugindump failed for @MODULE_NAME@.")
+-    set(@GENMODULE@_FOUND FALSE)
++
++    if (QT_MAJOR_VERSION EQUAL "5")
++        include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake")
++        query_qmake(qt_binaries_dir QT_HOST_BINS)
++        find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS 
${qt_binaries_dir})
++    elseif (QT_MAJOR_VERSION EQUAL "6")
++        find_package(Qt6QmlTools REQUIRED)
++        get_target_property(QMLPLUGINDUMP_PROGRAM Qt6::qmlplugindump LOCATION)
++    endif()
++
++    if(NOT QMLPLUGINDUMP_PROGRAM)
++        message(WARNING "Could not find qmlplugindump. It is necessary to 
look up qml module dependencies.")
++    endif()
++
++    execute_process(COMMAND "${QMLPLUGINDUMP_PROGRAM}" "@MODULE_NAME@" 
"@VERSION@" ERROR_VARIABLE ERRORS_OUTPUT OUTPUT_VARIABLE DISREGARD_VARIABLE 
RESULT_VARIABLE ExitCode TIMEOUT 30)
++
++    if(ExitCode EQUAL 0)
++        set(@GENMODULE@_FOUND TRUE)
++        set(@GENMODULE@_VERSION "${PACKAGE_FIND_VERSION}")
++    else()
++        message(STATUS "qmlplugindump failed for @MODULE_NAME@.")
++        set(@GENMODULE@_FOUND FALSE)
++    endif()
+ endif()
+ 
+ find_package_handle_standard_args(@GENMODULE@
+-- 
+2.34.1
+

Reply via email to