kde-frameworks/extra-cmake-modules: FindQHelpGenerator: Find Qt5Help
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 18 Nov 2018 09:05:35 +0000 (10:05 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 18 Nov 2018 09:36:52 +0000 (10:36 +0100)
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.52.0-r1.ebuild [new file with mode: 0644]
kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.52.0-fix-FindQHelpGenerator.patch [new file with mode: 0644]

diff --git a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.52.0-r1.ebuild b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.52.0-r1.ebuild
new file mode 100644 (file)
index 0000000..058394d
--- /dev/null
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{4,5,6,7}} )
+ECM_KDEINSTALLDIRS="false"
+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 ~amd64-fbsd"
+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}/${PN}-5.49.0-no-fatal-warnings.patch"
+       "${FILESDIR}/${P}-fix-FindQHelpGenerator.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_QTHELP_DOCS=$(usex doc)
+               -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 )
+
+       kde5_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.52.0-fix-FindQHelpGenerator.patch b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.52.0-fix-FindQHelpGenerator.patch
new file mode 100644 (file)
index 0000000..9e42001
--- /dev/null
@@ -0,0 +1,47 @@
+From 96d169b87292d935646b1924952829b0f4d5d669 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino@kde.org>
+Date: Sat, 17 Nov 2018 08:57:09 +0100
+Subject: FindQHelpGenerator: try to find Qt5Help instead of Qt5Core
+
+Summary:
+The Qt5Help CMake modules contain the Qt5::qhelpgenerator target, so
+look for that instead of Qt5Core.  Otherwise, the Qt5::qhelpgenerator
+is available only if Qt5Help was searched previously (which does not
+happen often).
+
+Using the Qt5::qhelpgenerator is more reliable than the search for the
+qhelpgenerator executable based on the qmake path.
+
+Test Plan:
+build some framework with -DBUILD_QCH=ON, and notice that
+the right path of qhelpgenerator is found directly with the
+Qt5::qhelpgenerator target.
+
+Reviewers: kossebau
+
+Reviewed By: kossebau
+
+Subscribers: kde-frameworks-devel, kde-buildsystem
+
+Tags: #frameworks, #build_system
+
+Differential Revision: https://phabricator.kde.org/D16938
+---
+ find-modules/FindQHelpGenerator.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/find-modules/FindQHelpGenerator.cmake b/find-modules/FindQHelpGenerator.cmake
+index 50aef27..272e587 100644
+--- a/find-modules/FindQHelpGenerator.cmake
++++ b/find-modules/FindQHelpGenerator.cmake
+@@ -33,7 +33,7 @@
+ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #=============================================================================
+-find_package(Qt5Core QUIET)
++find_package(Qt5Help QUIET)
+ if (TARGET Qt5::qhelpgenerator)
+     get_target_property(QHelpGenerator_EXECUTABLE Qt5::qhelpgenerator LOCATION)
+ else()
+-- 
+cgit v0.11.2