diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-08-22 21:23:11 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-08-22 21:40:17 +0200 |
commit | 364bb9166135bf355c5d34556924daa692efb584 (patch) | |
tree | c19ecc7d5668f967494a770a2c17ddaea82f011a /media-libs | |
parent | dev-python/pyyaml: use pytest for tests (diff) | |
download | gentoo-364bb9166135bf355c5d34556924daa692efb584.tar.gz gentoo-364bb9166135bf355c5d34556924daa692efb584.tar.bz2 gentoo-364bb9166135bf355c5d34556924daa692efb584.zip |
media-libs/phonon: Fix upstream's cmake logic w/ IUSE -designer
Closes: https://bugs.gentoo.org/938315
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/phonon/files/phonon-4.12.0-cmake.patch | 69 | ||||
-rw-r--r-- | media-libs/phonon/phonon-4.12.0-r3.ebuild | 6 |
2 files changed, 72 insertions, 3 deletions
diff --git a/media-libs/phonon/files/phonon-4.12.0-cmake.patch b/media-libs/phonon/files/phonon-4.12.0-cmake.patch new file mode 100644 index 000000000000..f212567777f1 --- /dev/null +++ b/media-libs/phonon/files/phonon-4.12.0-cmake.patch @@ -0,0 +1,69 @@ +From 02bde730f0750ca751da81a7077a0f70bf9dd056 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Thu, 22 Aug 2024 21:19:07 +0200 +Subject: [PATCH] Hide QtDesigner cmake finding and workarounds behind existing + option + +Otherwise, `add_library(Qt::OpenGLWidgets ALIAS Qt6::OpenGLWidgets)` will +potentially fail even if PHONON_BUILD_DESIGNER_PLUGIN was not requested. + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 32 ++++++++++++++++++-------------- + 1 file changed, 18 insertions(+), 14 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c00760fc..babeb392 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.5 FATAL_ERROR) +-project(Phonon VERSION "4.12.0") ++project(Phonon VERSION "4.11.1") + + include(FeatureSummary) + +@@ -116,23 +116,27 @@ foreach(version ${VERSIONS}) + # https://bugreports.qt.io/browse/QTBUG-114706 + add_library(Qt::Widgets ALIAS Qt${QT_MAJOR_VERSION}::Widgets) + +- # Designer Plugin +- find_package(Qt${QT_MAJOR_VERSION}Designer ${REQUIRED_QT_VERSION}) +- set_package_properties(Qt${QT_MAJOR_VERSION}Designer PROPERTIES +- TYPE RECOMMENDED +- DESCRIPTION "Needed to build the Qt Designer plugin" +- URL "https://www.qt.io/download") +- # https://bugreports.qt.io/browse/QTBUG-114706 +- if(Qt${QT_MAJOR_VERSION}Xml_FOUND) +- add_library(Qt::Xml ALIAS Qt${QT_MAJOR_VERSION}::Xml) ++ if(PHONON_BUILD_DESIGNER_PLUGIN) ++ # Designer Plugin ++ find_package(Qt${QT_MAJOR_VERSION}Designer ${REQUIRED_QT_VERSION}) ++ set_package_properties(Qt${QT_MAJOR_VERSION}Designer PROPERTIES ++ TYPE RECOMMENDED ++ DESCRIPTION "Needed to build the Qt Designer plugin" ++ URL "https://www.qt.io/download") ++ # https://bugreports.qt.io/browse/QTBUG-114706 ++ if(Qt${QT_MAJOR_VERSION}Xml_FOUND) ++ add_library(Qt::Xml ALIAS Qt${QT_MAJOR_VERSION}::Xml) ++ endif() ++ if(QT_MAJOR_VERSION STREQUAL "6") ++ # Qt6Designer links to OpenGLWidgets but doesnt find it ++ find_package(Qt6OpenGLWidgets ${REQUIRED_QT_VERSION}) ++ # https://bugreports.qt.io/browse/QTBUG-114706 ++ add_library(Qt::OpenGLWidgets ALIAS Qt6::OpenGLWidgets) ++ endif() + endif() + + if(QT_MAJOR_VERSION STREQUAL "6") + find_package(Qt6Core5Compat REQUIRED) +- # Qt6Designer links to OpenGLWidgets but doesnt find it +- find_package(Qt6OpenGLWidgets ${REQUIRED_QT_VERSION}) +- # https://bugreports.qt.io/browse/QTBUG-114706 +- add_library(Qt::OpenGLWidgets ALIAS Qt6::OpenGLWidgets) + endif() + + set(BUILDSYSTEM_INSTALL_DIR ${CMAKE_INSTALL_FULL_DATAROOTDIR}/${PHONON_LIB_SONAME}/buildsystem/) +-- +2.46.0 + diff --git a/media-libs/phonon/phonon-4.12.0-r3.ebuild b/media-libs/phonon/phonon-4.12.0-r3.ebuild index 5ccc7cf1b081..545735c83895 100644 --- a/media-libs/phonon/phonon-4.12.0-r3.ebuild +++ b/media-libs/phonon/phonon-4.12.0-r3.ebuild @@ -49,9 +49,9 @@ BDEPEND=" qt5? ( dev-qt/linguist-tools:5 ) qt6? ( dev-qt/qttools:6[linguist] ) " -PDEPEND=" - !minimal? ( >=media-libs/phonon-vlc-0.12.0[qt5?,qt6?] ) -" +PDEPEND="!minimal? ( >=media-libs/phonon-vlc-0.12.0[qt5?,qt6?] )" + +PATCHES=( "${FILESDIR}/${P}-cmake.patch" ) # bug 938315 pkg_setup() { MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) ) |