[gentoo-commits] proj/kde:master commit in: kde-frameworks/extra-cmake-modules/, kde-frameworks/extra-cmake-modules/files/

2023-11-19 Thread Andreas Sturmlechner
commit: b75c79ba74b11c5565d81c5cb75deb54738c6c2e
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Nov 18 17:01:52 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Nov 18 17:02:14 2023 +
URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=b75c79ba

kde-frameworks/extra-cmake-modules: Disable PyQt5-based tests by patch

... replacing sed.

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../extra-cmake-modules-5..ebuild  | 12 ++
 ...les-5.112.0-disable-tests-requiring-PyQt5.patch | 27 ++
 2 files changed, 29 insertions(+), 10 deletions(-)

diff --git 
a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5..ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5..ebuild
index 0b9a1e6e94..68a04bec3e 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5..ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5..ebuild
@@ -16,6 +16,7 @@ IUSE="doc test"
 
 RESTRICT="!test? ( test )"
 
+RDEPEND="app-arch/libarchive[bzip2]"
 BDEPEND="
doc? (
${PYTHON_DEPS}
@@ -27,14 +28,12 @@ BDEPEND="
>=dev-qt/qtcore-${QTMIN}:5
)
 "
-RDEPEND="
-   app-arch/libarchive[bzip2]
-"
 
 PATCHES=(
"${FILESDIR}/${PN}-5.49.0-no-fatal-warnings.patch"
"${FILESDIR}/${PN}-5.93.0-skip-ecm_add_test-early.patch"
"${FILESDIR}/${PN}-5.93.0-disable-qmlplugindump.patch"
+   "${FILESDIR}/${PN}-5.112.0-disable-tests-requiring-PyQt5.patch" # bug 
680256
 )
 
 python_check_deps() {
@@ -45,13 +44,6 @@ pkg_setup() {
use doc && python-any-r1_pkg_setup
 }
 
-src_prepare() {
-   cmake_src_prepare
-   # Requires PyQt5, bug #680256
-   sed -i -e "/^if(NOT SIP_Qt5Core_Mod_FILE)/s/NOT 
SIP_Qt5Core_Mod_FILE/TRUE/" \
-   tests/CMakeLists.txt || die "failed to disable 
GenerateSipBindings tests"
-}
-
 src_configure() {
local mycmakeargs=(
-DDOC_INSTALL_DIR=/usr/share/doc/"${PF}"

diff --git 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.112.0-disable-tests-requiring-PyQt5.patch
 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.112.0-disable-tests-requiring-PyQt5.patch
new file mode 100644
index 00..17d6044805
--- /dev/null
+++ 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.112.0-disable-tests-requiring-PyQt5.patch
@@ -0,0 +1,27 @@
+From 35d209b5662e468aa2f613ffdb9b91bc2e7f7e26 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner 
+Date: Sat, 18 Nov 2023 17:58:36 +0100
+Subject: [PATCH] Disable tests requiring PyQt5
+
+Gentoo-bug: https://bugs.gentoo.org/680256
+Signed-off-by: Andreas Sturmlechner 
+---
+ tests/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 1415bb91..09d998e4 100644
+--- a/tests/CMakeLists.txt
 b/tests/CMakeLists.txt
+@@ -79,7 +79,7 @@ find_file(SIP_Qt5Core_Mod_FILE
+ PATH_SUFFIXES share/sip/PyQt5/QtCore
+ )
+ 
+-if(NOT SIP_Qt5Core_Mod_FILE)
++if(TRUE)
+ message(STATUS "WARNING: skipping tests that require PyQt")
+ else()
+   find_package(PythonModuleGeneration)
+-- 
+2.42.1
+



[gentoo-commits] proj/kde:master commit in: kde-frameworks/extra-cmake-modules/, kde-frameworks/extra-cmake-modules/files/

2022-03-29 Thread Andreas Sturmlechner
commit: 5f2b69f3ffb3011e3c77506e98d6363379274ac6
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Mar 29 10:47:29 2022 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Mar 29 10:47:29 2022 +
URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=5f2b69f3

kde-frameworks/extra-cmake-modules: Rebase skip-ecm_add_test-early.patch

Reported-by: Duncan <1i5t5.duncan  cox.net>
Closes: https://bugs.gentoo.org/836348
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../extra-cmake-modules-.ebuild|  2 +-
 ...e-modules-5.93.0-skip-ecm_add_test-early.patch} | 39 --
 2 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
index df4d73770a..d692244ad8 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
@@ -33,7 +33,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.93.0-skip-ecm_add_test-early.patch"
"${FILESDIR}/${PN}-5.93.0-disable-qmlplugindump.patch"
 )
 

diff --git 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.72.0-skip-ecm_add_test-early.patch
 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.93.0-skip-ecm_add_test-early.patch
similarity index 61%
rename from 
kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.72.0-skip-ecm_add_test-early.patch
rename to 
kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.93.0-skip-ecm_add_test-early.patch
index 72541d73e7..f9eef60072 100644
--- 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.72.0-skip-ecm_add_test-early.patch
+++ 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.93.0-skip-ecm_add_test-early.patch
@@ -1,35 +1,36 @@
-From ad3aec71ed7f8820e69fe55489368a19d0735ab5 Mon Sep 17 00:00:00 2001
+From 9b53dd107af153b88658ffa246de728a8a6fbd9d Mon Sep 17 00:00:00 2001
 From: Andreas Sturmlechner 
 Date: Sat, 11 Jul 2020 23:04:16 +0200
-Subject: [PATCH] ECMAddTests.cmake: Skip ecm_add_test early if Qt5::Test is 
not available
+Subject: [PATCH] ECMAddTests.cmake: Skip ecm_add_test early if Qt::Test is not
+ available
 
 Signed-off-by: Andreas Sturmlechner 
 ---
  modules/ECMAddTests.cmake| 9 +
- tests/ECMAddTests/CMakeLists.txt | 5 +
- 2 files changed, 14 insertions(+)
+ tests/ECMAddTests/CMakeLists.txt | 4 
+ 2 files changed, 13 insertions(+)
 
 diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake
-index 4bc7fb8..12825aa 100644
+index 58c78d05..994ed1e4 100644
 --- a/modules/ECMAddTests.cmake
 +++ b/modules/ECMAddTests.cmake
-@@ -81,6 +81,10 @@ function(ecm_add_test)
+@@ -84,6 +84,10 @@ function(ecm_add_test)
  message(FATAL_ERROR "ecm_add_test() called with multiple source files but 
without setting \"TEST_NAME\"")
endif()
  
-+  if(NOT TARGET Qt5::Test)
++  if(NOT TARGET Qt::Test)
 +return()
 +  endif()
 +
set(_testname ${ARG_NAME_PREFIX}${_targetname})
set(gui_args)
if(ARG_GUI)
-@@ -122,6 +126,11 @@ function(ecm_add_tests)
+@@ -127,6 +131,11 @@ function(ecm_add_tests)
endif()
set(test_names)
set(target_names)
 +
-+  if(NOT TARGET Qt5::Test)
++  if(NOT TARGET Qt::Test)
 +return()
 +  endif()
 +
@@ -37,18 +38,20 @@ index 4bc7fb8..12825aa 100644
  ecm_add_test(${_test_source}
NAME_PREFIX ${ARG_NAME_PREFIX}
 diff --git a/tests/ECMAddTests/CMakeLists.txt 
b/tests/ECMAddTests/CMakeLists.txt
-index e77b33f..4e191fe 100644
+index aa7e73a1..5fbc1cc7 100644
 --- a/tests/ECMAddTests/CMakeLists.txt
 +++ b/tests/ECMAddTests/CMakeLists.txt
-@@ -1,3 +1,8 @@
-+if(NOT TARGET Qt5::Test)
-+message(STATUS "WARNING: skipping tests that require Qt5::Test")
-+return()
-+endif()
+@@ -2,6 +2,10 @@ if (QT_MAJOR_VERSION EQUAL "6")
+ set(QT_VERSION_OPT "-DBUILD_WITH_QT6=ON")
+ else()
+ set(QT_VERSION_OPT "-DBUILD_WITH_QT6=OFF")
 +
++if(NOT TARGET Qt::Test)
++message(STATUS "WARNING: skipping tests that require Qt::Test")
++return()
+ endif()
+ 
  macro(add_check NAME)
- string(REPLACE "." "/" dir "${NAME}")
- string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}")
 -- 
-2.27.0
+2.35.1
 



[gentoo-commits] proj/kde:master commit in: kde-frameworks/extra-cmake-modules/, kde-frameworks/extra-cmake-modules/files/

2021-12-29 Thread Andreas Sturmlechner
commit: 571c1bce1bdb97b0b08f7cae47c63d0666870ddf
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Wed Dec 29 19:13:30 2021 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Wed Dec 29 19:13:30 2021 +
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  gentoo.org>

 .../extra-cmake-modules-.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-.ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
index a612724875..00deddf483 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.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 00..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 
+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
+



[gentoo-commits] proj/kde:master commit in: kde-frameworks/extra-cmake-modules/, kde-frameworks/extra-cmake-modules/files/

2021-10-05 Thread Andreas Sturmlechner
commit: c24905bfe4ba7433673e214f6555fb8348ec3724
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Oct  5 15:22:17 2021 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Oct  5 15:24:36 2021 +
URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=c24905bf

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

Closes: https://bugs.gentoo.org/816309
Package-Manager: Portage-3.0.26, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../extra-cmake-modules-.ebuild|  2 +-
 ...make-modules-5.88.0-disable-qmlplugindump.patch | 65 ++
 2 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
index 142667eb9f..a612724875 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.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.74.0-disable-qmlplugindump.patch"
+   "${FILESDIR}/${PN}-5.88.0-disable-qmlplugindump.patch"
 )
 
 python_check_deps() {

diff --git 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.88.0-disable-qmlplugindump.patch
 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.88.0-disable-qmlplugindump.patch
new file mode 100644
index 00..f2c8368898
--- /dev/null
+++ 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.88.0-disable-qmlplugindump.patch
@@ -0,0 +1,65 @@
+From 8bcda9bc1d12e2e8ea54dc8d957e415f9d5469a0 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner 
+Date: Sun, 8 Dec 2019 15:01:33 +0100
+Subject: [PATCH] ECMFindQMLModule.cmake.in: Add ECM_DISABLE_QMLPLUGINDUMP to
+ avoid sandbox violations
+
+Back-story: https://bugzilla.gnome.org/show_bug.cgi?id=744135
+BUG: 387753
+---
+ modules/ECMFindQMLModule.cmake.in | 35 +++
+ 1 file changed, 22 insertions(+), 13 deletions(-)
+
+diff --git a/modules/ECMFindQMLModule.cmake.in 
b/modules/ECMFindQMLModule.cmake.in
+index 4234b702..d9817fe8 100644
+--- a/modules/ECMFindQMLModule.cmake.in
 b/modules/ECMFindQMLModule.cmake.in
+@@ -5,23 +5,32 @@
+ #=
+ 
+ include(FindPackageHandleStandardArgs)
+-include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake")
+ 
+-query_qmake(qt_binaries_dir QT_HOST_BINS)
++option (ECM_DISABLE_QMLPLUGINDUMP "Do not use qmlplugindump which may 
segfault in some sandboxed environments" OFF)
+ 
+-find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS 
${qt_binaries_dir})
+-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)
++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)
++include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake")
++
++query_qmake(qt_binaries_dir QT_HOST_BINS)
++
++find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS 
${qt_binaries_dir})
++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)
++
++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.33.0
+



[gentoo-commits] proj/kde:master commit in: kde-frameworks/extra-cmake-modules/, kde-frameworks/extra-cmake-modules/files/

2020-08-30 Thread Andreas Sturmlechner
commit: 1d40d9cea3c030184fa2d9de40dd5b253f380a56
Author: Jimi Huotari  gentoo  org>
AuthorDate: Sat Aug 29 21:39:08 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Aug 30 08:45:24 2020 +
URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=1d40d9ce

kde-frameworks/extra-cmake-modules: Refactor qmlplugindump patch

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Jimi Huotari  gentoo.org>
Closes: https://github.com/gentoo/kde/pull/891
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild  | 2 +-
 ...ump.patch => extra-cmake-modules-5.74.0-disable-qmlplugindump.patch} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
index 0425b6f07a..86cdadf3ee 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
@@ -33,8 +33,8 @@ RESTRICT+=" !test? ( test )"
 
 PATCHES=(
"${FILESDIR}/${PN}-5.49.0-no-fatal-warnings.patch"
-   "${FILESDIR}/${PN}-5.65.0-disable-qmlplugindump.patch"
"${FILESDIR}/${PN}-5.72.0-skip-ecm_add_test-early.patch"
+   "${FILESDIR}/${PN}-5.74.0-disable-qmlplugindump.patch"
 )
 
 python_check_deps() {

diff --git 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.65.0-disable-qmlplugindump.patch
 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.74.0-disable-qmlplugindump.patch
similarity index 98%
rename from 
kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.65.0-disable-qmlplugindump.patch
rename to 
kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.74.0-disable-qmlplugindump.patch
index 2cbfba7d5e..08fcf32338 100644
--- 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.65.0-disable-qmlplugindump.patch
+++ 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.74.0-disable-qmlplugindump.patch
@@ -28,7 +28,7 @@ index 8109ab8..1edc01d 100644
 -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)
+-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)



[gentoo-commits] proj/kde:master commit in: kde-frameworks/extra-cmake-modules/, kde-frameworks/extra-cmake-modules/files/

2020-07-12 Thread Andreas Sturmlechner
commit: 1b0294df9849933ffb3b0b22586677a71ebb0487
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Jul 11 21:44:16 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Jul 12 22:51:50 2020 +
URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=1b0294df

kde-frameworks/extra-cmake-modules: Skip ecm_add_test w/o Qt5::Test

Bug: https://bugs.gentoo.org/651978
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../extra-cmake-modules-.ebuild|  1 +
 ...ke-modules-5.72.0-skip-ecm_add_test-early.patch | 54 ++
 2 files changed, 55 insertions(+)

diff --git a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
index 7f5092846c..0425b6f07a 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-.ebuild
@@ -34,6 +34,7 @@ RESTRICT+=" !test? ( test )"
 PATCHES=(
"${FILESDIR}/${PN}-5.49.0-no-fatal-warnings.patch"
"${FILESDIR}/${PN}-5.65.0-disable-qmlplugindump.patch"
+   "${FILESDIR}/${PN}-5.72.0-skip-ecm_add_test-early.patch"
 )
 
 python_check_deps() {

diff --git 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.72.0-skip-ecm_add_test-early.patch
 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.72.0-skip-ecm_add_test-early.patch
new file mode 100644
index 00..72541d73e7
--- /dev/null
+++ 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.72.0-skip-ecm_add_test-early.patch
@@ -0,0 +1,54 @@
+From ad3aec71ed7f8820e69fe55489368a19d0735ab5 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner 
+Date: Sat, 11 Jul 2020 23:04:16 +0200
+Subject: [PATCH] ECMAddTests.cmake: Skip ecm_add_test early if Qt5::Test is 
not available
+
+Signed-off-by: Andreas Sturmlechner 
+---
+ modules/ECMAddTests.cmake| 9 +
+ tests/ECMAddTests/CMakeLists.txt | 5 +
+ 2 files changed, 14 insertions(+)
+
+diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake
+index 4bc7fb8..12825aa 100644
+--- a/modules/ECMAddTests.cmake
 b/modules/ECMAddTests.cmake
+@@ -81,6 +81,10 @@ function(ecm_add_test)
+ message(FATAL_ERROR "ecm_add_test() called with multiple source files but 
without setting \"TEST_NAME\"")
+   endif()
+ 
++  if(NOT TARGET Qt5::Test)
++return()
++  endif()
++
+   set(_testname ${ARG_NAME_PREFIX}${_targetname})
+   set(gui_args)
+   if(ARG_GUI)
+@@ -122,6 +126,11 @@ function(ecm_add_tests)
+   endif()
+   set(test_names)
+   set(target_names)
++
++  if(NOT TARGET Qt5::Test)
++return()
++  endif()
++
+   foreach(_test_source ${ARG_UNPARSED_ARGUMENTS})
+ ecm_add_test(${_test_source}
+   NAME_PREFIX ${ARG_NAME_PREFIX}
+diff --git a/tests/ECMAddTests/CMakeLists.txt 
b/tests/ECMAddTests/CMakeLists.txt
+index e77b33f..4e191fe 100644
+--- a/tests/ECMAddTests/CMakeLists.txt
 b/tests/ECMAddTests/CMakeLists.txt
+@@ -1,3 +1,8 @@
++if(NOT TARGET Qt5::Test)
++message(STATUS "WARNING: skipping tests that require Qt5::Test")
++return()
++endif()
++
+ macro(add_check NAME)
+ string(REPLACE "." "/" dir "${NAME}")
+ string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}")
+-- 
+2.27.0
+



[gentoo-commits] proj/kde:master commit in: kde-frameworks/extra-cmake-modules/, kde-frameworks/extra-cmake-modules/files/

2019-12-09 Thread Andreas Sturmlechner
commit: f5b2cf80ea9696a5efbc2064cd432670670af486
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Mon Dec  9 12:49:45 2019 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Mon Dec  9 14:50:24 2019 +
URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=f5b2cf80

kde-frameworks/extra-cmake-modules: Add ECM_DISABLE_QMLPLUGINDUMP

Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../extra-cmake-modules-5.65.0.ebuild  |  5 +-
 ...make-modules-5.65.0-disable-qmlplugindump.patch | 65 ++
 2 files changed, 69 insertions(+), 1 deletion(-)

diff --git 
a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.65.0.ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.65.0.ebuild
index e152de53fc..e070207366 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.65.0.ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.65.0.ebuild
@@ -31,7 +31,10 @@ RDEPEND="
 
 RESTRICT+=" !test? ( test )"
 
-PATCHES=( "${FILESDIR}/${PN}-5.49.0-no-fatal-warnings.patch" )
+PATCHES=(
+   "${FILESDIR}/${PN}-5.49.0-no-fatal-warnings.patch"
+   "${FILESDIR}/${PN}-5.65.0-disable-qmlplugindump.patch"
+)
 
 python_check_deps() {
has_version "dev-python/sphinx[${PYTHON_USEDEP}]"

diff --git 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.65.0-disable-qmlplugindump.patch
 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.65.0-disable-qmlplugindump.patch
new file mode 100644
index 00..2cbfba7d5e
--- /dev/null
+++ 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.65.0-disable-qmlplugindump.patch
@@ -0,0 +1,65 @@
+From 8d30a7dd4517130bf1f6904b0969aaa78e44e16b Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner 
+Date: Sun, 8 Dec 2019 15:01:33 +0100
+Subject: [PATCH] ECMFindQMLModule.cmake.in: Add ECM_DISABLE_QMLPLUGINDUMP to
+ avoid sandbox violations
+
+Back story: https://bugzilla.gnome.org/show_bug.cgi?id=744135
+BUG: 387753
+---
+ modules/ECMFindQMLModule.cmake.in | 35 +++
+ 1 file changed, 22 insertions(+), 13 deletions(-)
+
+diff --git a/modules/ECMFindQMLModule.cmake.in 
b/modules/ECMFindQMLModule.cmake.in
+index 8109ab8..1edc01d 100644
+--- a/modules/ECMFindQMLModule.cmake.in
 b/modules/ECMFindQMLModule.cmake.in
+@@ -26,23 +26,32 @@
+ #=
+ 
+ include(FindPackageHandleStandardArgs)
+-include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake")
+ 
+-query_qmake(qt_binaries_dir QT_INSTALL_BINS)
++option (ECM_DISABLE_QMLPLUGINDUMP "Do not use qmlplugindump which may 
segfault in some sandboxed environments" OFF)
+ 
+-find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS 
${qt_binaries_dir})
+-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)
+-
+-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)
++include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake")
++
++query_qmake(qt_binaries_dir QT_INSTALL_BINS)
++
++find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS 
${qt_binaries_dir})
++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)
++
++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.24.0
+



[gentoo-commits] proj/kde:master commit in: kde-frameworks/extra-cmake-modules/, kde-frameworks/extra-cmake-modules/files/

2018-01-07 Thread Andreas Sturmlechner
commit: 49e87796953844e226f0037ede5baad8d767879b
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Jan  7 19:15:38 2018 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Jan  7 19:15:38 2018 +
URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=49e87796

kde-frameworks/extra-cmake-modules: Re-add qmlplugindump patch

Still pending upstream.

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../extra-cmake-modules-5.42.0.ebuild  |  2 ++
 ...a-cmake-modules-5.40.0-qmlplugindump-path.patch | 38 ++
 2 files changed, 40 insertions(+)

diff --git 
a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.42.0.ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.42.0.ebuild
index 8b14f01dc7..fb96d84501 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.42.0.ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.42.0.ebuild
@@ -31,6 +31,8 @@ RDEPEND="
app-arch/libarchive[bzip2]
 "
 
+PATCHES=( "${FILESDIR}/${PN}-5.40.0-qmlplugindump-path.patch" )
+
 python_check_deps() {
has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
 }

diff --git 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.40.0-qmlplugindump-path.patch
 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.40.0-qmlplugindump-path.patch
new file mode 100644
index 00..d1bcf791fd
--- /dev/null
+++ 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.40.0-qmlplugindump-path.patch
@@ -0,0 +1,38 @@
+From 32d596b8c64c1c963b053788f67ef012b836 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner 
+Date: Sat, 2 Dec 2017 19:04:10 +0100
+Subject: [PATCH] Make sure to search for Qt5-based qmlplugindump
+
+Summary:
+Without any hint, qmlplugindump version is whatever default is set by 
qtchooser.
+Fix uses the same approach as FindQtWaylandScanner.cmake.
+
+Test Plan: ecm_find_qmlmodule now works properly for e.g. kirigami.
+
+Reviewers: apol
+
+Subscribers: #frameworks, #build_system
+
+Tags: #frameworks, #build_system
+
+Differential Revision: https://phabricator.kde.org/D9116
+---
+ modules/ECMFindQMLModule.cmake.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/ECMFindQMLModule.cmake.in 
b/modules/ECMFindQMLModule.cmake.in
+index 428d60a..d72c52b 100644
+--- a/modules/ECMFindQMLModule.cmake.in
 b/modules/ECMFindQMLModule.cmake.in
+@@ -27,7 +27,7 @@
+ 
+ include(FindPackageHandleStandardArgs)
+ 
+-find_program(QMLPLUGINDUMP_PROGRAM qmlplugindump)
++find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS 
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/bin/)
+ if(NOT QMLPLUGINDUMP_PROGRAM)
+ message(WARNING "Could not find qmlplugindump. It is necessary to look up 
qml module dependencies.")
+ endif()
+-- 
+2.15.1
+



[gentoo-commits] proj/kde:master commit in: kde-frameworks/extra-cmake-modules/, kde-frameworks/extra-cmake-modules/files/

2017-08-08 Thread Andreas Sturmlechner
commit: 06d50c76fcc5d796c53c6ac4b1c0857f47eea3ef
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Aug  8 07:17:31 2017 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Aug  8 07:17:31 2017 +
URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=06d50c76

kde-frameworks/extra-cmake-modules: Backport fix to ECMAddTests.cmake

Respecting BUILD_TESTING will enable us to drop a lot of eclass magic.

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 .../extra-cmake-modules-5.37.0.ebuild  |  2 +
 .../extra-cmake-modules-5.37.0-ecmaddtest.patch| 74 ++
 2 files changed, 76 insertions(+)

diff --git 
a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.37.0.ebuild 
b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.37.0.ebuild
index a1079a5899..231e84818f 100644
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.37.0.ebuild
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.37.0.ebuild
@@ -31,6 +31,8 @@ RDEPEND="
app-arch/libarchive[bzip2]
 "
 
+PATCHES=( "${FILESDIR}/${P}-ecmaddtest.patch" )
+
 python_check_deps() {
has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
 }

diff --git 
a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.37.0-ecmaddtest.patch
 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.37.0-ecmaddtest.patch
new file mode 100644
index 00..fe86754188
--- /dev/null
+++ 
b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.37.0-ecmaddtest.patch
@@ -0,0 +1,74 @@
+From b99d2d2c5dedcaba9745dddc1dd7b8d4811babf1 Mon Sep 17 00:00:00 2001
+From: Kevin Funk 
+Date: Mon, 7 Aug 2017 15:50:25 +0200
+Subject: RFC: Make ECMAddTests respect BUILD_TESTING
+
+Summary:
+Use-case: Make building unit tests optional, by just following the CMake
+BUILD_TESTING option.
+
+The usual approach to conditionally build tests is to do:
+```
+if (BUILD_TESTING)
+add_executable(TestOne TestOne.cpp)
+target_link_libraries(TestOne my_library)
+endif()
+```
+
+or:
+
+```
+if (BUILD_TESTING)
+add_subdirectory(tests)
+endif()
+```
+
+This patch just turns all calls to ecm_add_test(...) into no-ops if
+BUILD_TESTING=OFF.
+
+See:
+  https://cmake.org/cmake/help/v3.6/module/CTest.html
+
+Reviewers: vkrause
+
+Reviewed By: vkrause
+
+Subscribers: kossebau, vkrause, elvisangelaccio, asturmlechner, apol, 
#frameworks, #build_system
+
+Tags: #frameworks, #build_system
+
+Differential Revision: https://phabricator.kde.org/D7187
+---
+ modules/ECMAddTests.cmake | 10 ++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake
+index 9667388..c77a7aa 100644
+--- a/modules/ECMAddTests.cmake
 b/modules/ECMAddTests.cmake
+@@ -49,6 +49,12 @@
+ # be given; this will be used for both the target and test names (and, as with
+ # ecm_add_tests(), the NAME_PREFIX argument will be prepended to the test 
name).
+ #
++# If BUILD_TESTING is set to OFF, ecm_add_test will turn into a no-op and thus
++# will not add any test-related targets
++#
++# BUILD_TESTING is created as a cache variable by the CTest module and by the
++# :kde-module:`KDECMakeSettings` module.
++#
+ #
+ # Since pre-1.0.0.
+ 
+@@ -84,6 +90,10 @@ include(ECMMarkAsTest)
+ include(ECMMarkNonGuiExecutable)
+ 
+ function(ecm_add_test)
++  if(NOT BUILD_TESTING)
++  return() # turn this function into a no-op
++  endif()
++
+   set(options GUI)
+   # TARGET_NAME_VAR and TEST_NAME_VAR are undocumented args used by
+   # ecm_add_tests
+-- 
+cgit v0.11.2