summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-06-16 23:53:10 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2017-07-09 21:22:43 +0200
commit4c4cbdcbe4c8f5231faff0bba4eb73dd506c924f (patch)
tree4659c1af64c5beb60245ff5a6ea9672871d3db26 /eclass/kde5.eclass
parentnet-misc/sks: add dosym for sks_build.sh (diff)
downloadgentoo-4c4cbdcbe4c8f5231faff0bba4eb73dd506c924f.tar.gz
gentoo-4c4cbdcbe4c8f5231faff0bba4eb73dd506c924f.tar.bz2
gentoo-4c4cbdcbe4c8f5231faff0bba4eb73dd506c924f.zip
kde5.eclass: Add KDE_QTHELP for QCH file support
Do not compress .qch and .tags files. See also: https://mail.kde.org/pipermail/distributions/2017-June/000227.html
Diffstat (limited to 'eclass/kde5.eclass')
-rw-r--r--eclass/kde5.eclass35
1 files changed, 35 insertions, 0 deletions
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index 3b6810526a0a..b4cfadc9dfcc 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -79,6 +79,17 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_
# Defaults to "doc". Otherwise, use alternative KDE handbook path.
: ${KDE_DOC_DIR:=doc}
+# @ECLASS-VARIABLE: KDE_QTHELP
+# @DESCRIPTION:
+# If set to "false", do nothing.
+# Otherwise, add "doc" to IUSE, add the appropriate dependency, generate
+# and install Qt compressed help files with -DBUILD_QCH=ON when USE=doc.
+if [[ ${CATEGORY} = kde-frameworks && ( $(get_version_component_range 2) -ge 36 || ${KDE_BUILD_TYPE} = live ) ]]; then
+ : ${KDE_QTHELP:=true}
+else
+ : ${KDE_QTHELP:=false}
+fi
+
# @ECLASS-VARIABLE: KDE_TEST
# @DESCRIPTION:
# If set to "false", do nothing.
@@ -223,6 +234,18 @@ case ${KDE_HANDBOOK} in
;;
esac
+case ${KDE_QTHELP} in
+ false) ;;
+ *)
+ IUSE+=" doc"
+ COMMONDEPEND+=" doc? ( $(add_qt_dep qt-docs) )"
+ DEPEND+=" doc? (
+ $(add_qt_dep qthelp)
+ >=app-doc/doxygen-1.8.13-r1
+ )"
+ ;;
+esac
+
case ${KDE_TEST} in
false) ;;
*)
@@ -647,6 +670,10 @@ kde5_src_configure() {
cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=ON )
fi
+ if [[ ${KDE_QTHELP} != false ]]; then
+ cmakeargs+=( -DBUILD_QCH=$(usex doc) )
+ fi
+
# install mkspecs in the same directory as qt stuff
cmakeargs+=(-DKDE_INSTALL_USE_QT_SYS_PATHS=ON)
@@ -704,6 +731,14 @@ kde5_src_install() {
cmake-utils_src_install
+ # We don't want QCH and tags files to be compressed, because then
+ # cmake can't find the tags and qthelp viewers can't find the docs
+ local p=$(best_version dev-qt/qtcore:5)
+ local pv=$(echo ${p/%-r[0-9]*/} | rev | cut -d - -f 1 | rev)
+ if [[ -d ${ED%/}/usr/share/doc/qt-${pv} ]]; then
+ docompress -x /usr/share/doc/qt-${pv}
+ fi
+
# We don't want /usr/share/doc/HTML to be compressed,
# because then khelpcenter can't find the docs
if [[ -d ${ED%/}/usr/share/doc/HTML ]]; then