kde-frameworks/extra-cmake-modules: Fix ECMFindQMLModule.cmake.in
authorAndreas Sturmlechner <asturm@gentoo.org>
Sat, 2 Dec 2017 18:29:26 +0000 (19:29 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sat, 2 Dec 2017 18:33:32 +0000 (19:33 +0100)
See also: https://phabricator.kde.org/D9116

Bug: https://bugs.gentoo.org/639460
Package-Manager: Portage-2.3.16, Repoman-2.3.6

kde-frameworks/extra-cmake-modules/Manifest
kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.40.0-r1.ebuild [new file with mode: 0644]
kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.40.0-qmlplugindump-path.patch [new file with mode: 0644]

index a5966730bab6b78cb83919d717aa28b014cc9b24..f466f82d09657e2dec03c01a7be11be385d30e6d 100644 (file)
@@ -1,2 +1,2 @@
 DIST extra-cmake-modules-5.37.0.tar.xz 311696 SHA256 26198cf05c084c158bb23f0585a9df5bba1aa16b746252c80bdf4f0261b527cb SHA512 eb064dcf03960913c41c61dcb02ed12fa1b83abe507f9b161770bae8fe32b74dee45a29b12af26e636e896b97b17221adf67ea8465fcc9ab319b4ee55ab4f8bf WHIRLPOOL 0085edc89a6ac6369b509cd16ee79447f3d6c924aa06ca8bf73471772ae03afd8d57223fad70c5d5e4e3256ffc12e1de0b9176dfdbb2526015b41230a16da12d
-DIST extra-cmake-modules-5.40.0.tar.xz 312532 SHA256 83e48889c84474e4f560e10e4eea0cc529f8511b3bd0415fcb898ac0496e630a SHA512 5390edfde7acb4c89abd2f5abc4fb533f2f4b45061127796b3a2f9d7ab65d7b8ba5cc0aee0543a28886118af8f1c7aed4f5b51c33f20223d9948ca39944c399c WHIRLPOOL 8b41b776a90c4126c9291a0bd7cde6a417240e0976b6d3325fbe7d534a90bf51e9f36871b76ebe9a11e06510367620fe63351e625b4b4665b896ed7f17ecd201
+DIST extra-cmake-modules-5.40.0.tar.xz 312532 BLAKE2B 0054ee4d3d17f238c4940404c6f5e00c951d305b0fce3e206bdc84dff0be683d4dc7e7043db61019422d182385ec2990e05b2df384b14e7b248d492cf918e691 SHA512 5390edfde7acb4c89abd2f5abc4fb533f2f4b45061127796b3a2f9d7ab65d7b8ba5cc0aee0543a28886118af8f1c7aed4f5b51c33f20223d9948ca39944c399c
diff --git a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.40.0-r1.ebuild b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.40.0-r1.ebuild
new file mode 100644 (file)
index 0000000..76f08e6
--- /dev/null
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+KDE_AUTODEPS="false"
+KDE_DEBUG="false"
+KDE_QTHELP="false"
+KDE_TEST="false"
+inherit kde5 python-any-r1
+
+DESCRIPTION="Extra modules and scripts for CMake"
+HOMEPAGE="https://cgit.kde.org/extra-cmake-modules.git"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="doc test"
+
+DEPEND="
+       doc? (
+               ${PYTHON_DEPS}
+               $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]')
+       )
+       test? (
+               $(add_qt_dep qtcore)
+               $(add_qt_dep linguist-tools)
+       )
+"
+RDEPEND="
+       app-arch/libarchive[bzip2]
+"
+
+PATCHES=( "${FILESDIR}/${P}-qmlplugindump-path.patch" )
+
+python_check_deps() {
+       has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       use doc && python-any-r1_pkg_setup
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_HTML_DOCS="$(usex doc)"
+               -DBUILD_MAN_DOCS="$(usex doc)"
+               -DDOC_INSTALL_DIR="/usr/share/doc/${PF}"
+       )
+       use test && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_PythonModuleGeneration=ON )
+
+       cmake-utils_src_configure
+}
+
+src_test() {
+       # ECMToolchainAndroidTest passes but then breaks src_install
+       # ECMPoQmToolsTest is broken, bug #627806
+       local myctestargs=(
+               -E "(ECMToolchainAndroidTest|ECMPoQmToolsTest)"
+       )
+
+       kde5_src_test
+}
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 (file)
index 0000000..d1bcf79
--- /dev/null
@@ -0,0 +1,38 @@
+From 32d596b8c64c1c963b053788feeee67ef012b836 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+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
+