summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-07-24 13:54:39 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-07-24 14:01:03 +0200
commit78e94750bfec00c01b3130e2b729453c9b808928 (patch)
treebd9de6624551e1d965789b8ea46ad788c7ea10ae /kde-apps/kamoso
parentnet-wireless/kismet: remove unused patch (diff)
downloadgentoo-78e94750bfec00c01b3130e2b729453c9b808928.tar.gz
gentoo-78e94750bfec00c01b3130e2b729453c9b808928.tar.bz2
gentoo-78e94750bfec00c01b3130e2b729453c9b808928.zip
kde-apps/kamoso: Fix build (conditionalise dependency behind test)
Thanks-to: Patrick Allaert <patrickallaert@php.net> Closes: https://bugs.gentoo.org/860381 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/kamoso')
-rw-r--r--kde-apps/kamoso/files/kamoso-22.04.3-tests-optional.patch72
-rw-r--r--kde-apps/kamoso/kamoso-22.04.3.ebuild10
2 files changed, 80 insertions, 2 deletions
diff --git a/kde-apps/kamoso/files/kamoso-22.04.3-tests-optional.patch b/kde-apps/kamoso/files/kamoso-22.04.3-tests-optional.patch
new file mode 100644
index 000000000000..2d90e18a79eb
--- /dev/null
+++ b/kde-apps/kamoso/files/kamoso-22.04.3-tests-optional.patch
@@ -0,0 +1,72 @@
+From d868caa001d134cf70ad08185511c1dfc81476db Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 24 Jul 2022 13:46:19 +0200
+Subject: [PATCH] Make tests optional with standard BUILD_TESTING switch
+
+Qt5OpenGL is only needed for tests.
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 2 +-
+ src/elements/gstqtvideosink/CMakeLists.txt | 35 ++++++++++++----------
+ 2 files changed, 20 insertions(+), 17 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e2b1e40..3c04631 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -13,7 +13,7 @@ set(KF5_MIN_VERSION 5.70.0)
+ find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
+ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+
+-find_package(Qt5 NO_MODULE REQUIRED COMPONENTS Core Gui Widgets Quick Test OpenGL)
++find_package(Qt5 NO_MODULE REQUIRED COMPONENTS Core Gui Widgets Quick)
+ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Config DocTools KIO I18n Purpose Notifications)
+
+ find_package(PkgConfig REQUIRED)
+diff --git a/src/elements/gstqtvideosink/CMakeLists.txt b/src/elements/gstqtvideosink/CMakeLists.txt
+index a9f371d..37c3774 100644
+--- a/src/elements/gstqtvideosink/CMakeLists.txt
++++ b/src/elements/gstqtvideosink/CMakeLists.txt
+@@ -59,19 +59,22 @@ target_link_libraries(gst${QTVIDEOSINK_NAME}
+
+ install(TARGETS gst${QTVIDEOSINK_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/gstreamer-${GSTREAMER_ABI_VERSION})
+
+-ecm_add_test(
+- autotest.cpp
+- utils/utils.cpp
+- utils/bufferformat.cpp
+- painters/genericsurfacepainter.cpp
+- painters/openglsurfacepainter.cpp
+- ${GstQtVideoSink_test_GL_SRCS}
+- LINK_LIBRARIES
+- PkgConfig::GStreamerVideo
+- ${GstQtVideoSink_GL_LIBS}
+- Qt5::Test
+- Qt5::OpenGL
+- Qt5::Quick
+- TEST_NAME qtvideosink_autotest
+-)
+-
++if(BUILD_TESTING)
++ find_package(Qt5 NO_MODULE REQUIRED COMPONENTS OpenGL Widgets)
++ ecm_add_test(
++ autotest.cpp
++ utils/utils.cpp
++ utils/bufferformat.cpp
++ painters/genericsurfacepainter.cpp
++ painters/openglsurfacepainter.cpp
++ ${GstQtVideoSink_test_GL_SRCS}
++ LINK_LIBRARIES
++ PkgConfig::GStreamerVideo
++ ${GstQtVideoSink_GL_LIBS}
++ Qt5::Test
++ Qt5::OpenGL
++ Qt5::Quick
++ Qt5::Widgets
++ TEST_NAME qtvideosink_autotest
++ )
++endif()
+--
+2.35.1
+
diff --git a/kde-apps/kamoso/kamoso-22.04.3.ebuild b/kde-apps/kamoso/kamoso-22.04.3.ebuild
index ac23613f2d5e..d6ff62df372a 100644
--- a/kde-apps/kamoso/kamoso-22.04.3.ebuild
+++ b/kde-apps/kamoso/kamoso-22.04.3.ebuild
@@ -3,6 +3,7 @@
EAPI=8
+ECM_TEST="true"
ECM_HANDBOOK="forceoptional"
KFMIN=5.92.0
QTMIN=5.15.4
@@ -19,7 +20,7 @@ IUSE=""
RESTRICT="test" # bug 653674
-DEPEND="
+COMMON_DEPEND="
dev-libs/glib:2
>=dev-qt/qtdeclarative-${QTMIN}:5
>=dev-qt/qtgui-${QTMIN}:5
@@ -33,7 +34,10 @@ DEPEND="
media-libs/gst-plugins-base:1.0
virtual/opengl
"
-RDEPEND="${DEPEND}
+DEPEND="${COMMON_DEPEND}
+ test? ( >=dev-qt/qtopengl-${QTMIN}:5 )
+"
+RDEPEND="${COMMON_DEPEND}
>=dev-qt/qtquickcontrols2-${QTMIN}:5
>=kde-frameworks/kirigami-${KFMIN}:5
media-plugins/gst-plugins-jpeg:1.0
@@ -41,3 +45,5 @@ RDEPEND="${DEPEND}
media-plugins/gst-plugins-meta:1.0[alsa,theora,vorbis,v4l]
"
BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${P}-tests-optional.patch" )