Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 09 Jul 2017 19:41:14
Message-Id: 1499628163.4c4cbdcbe4c8f5231faff0bba4eb73dd506c924f.asturm@gentoo
1 commit: 4c4cbdcbe4c8f5231faff0bba4eb73dd506c924f
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 16 21:53:10 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 9 19:22:43 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c4cbdcb
7
8 kde5.eclass: Add KDE_QTHELP for QCH file support
9
10 Do not compress .qch and .tags files.
11
12 See also:
13 https://mail.kde.org/pipermail/distributions/2017-June/000227.html
14
15 eclass/kde5.eclass | 35 +++++++++++++++++++++++++++++++++++
16 1 file changed, 35 insertions(+)
17
18 diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
19 index 3b6810526a0..b4cfadc9dfc 100644
20 --- a/eclass/kde5.eclass
21 +++ b/eclass/kde5.eclass
22 @@ -79,6 +79,17 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_
23 # Defaults to "doc". Otherwise, use alternative KDE handbook path.
24 : ${KDE_DOC_DIR:=doc}
25
26 +# @ECLASS-VARIABLE: KDE_QTHELP
27 +# @DESCRIPTION:
28 +# If set to "false", do nothing.
29 +# Otherwise, add "doc" to IUSE, add the appropriate dependency, generate
30 +# and install Qt compressed help files with -DBUILD_QCH=ON when USE=doc.
31 +if [[ ${CATEGORY} = kde-frameworks && ( $(get_version_component_range 2) -ge 36 || ${KDE_BUILD_TYPE} = live ) ]]; then
32 + : ${KDE_QTHELP:=true}
33 +else
34 + : ${KDE_QTHELP:=false}
35 +fi
36 +
37 # @ECLASS-VARIABLE: KDE_TEST
38 # @DESCRIPTION:
39 # If set to "false", do nothing.
40 @@ -223,6 +234,18 @@ case ${KDE_HANDBOOK} in
41 ;;
42 esac
43
44 +case ${KDE_QTHELP} in
45 + false) ;;
46 + *)
47 + IUSE+=" doc"
48 + COMMONDEPEND+=" doc? ( $(add_qt_dep qt-docs) )"
49 + DEPEND+=" doc? (
50 + $(add_qt_dep qthelp)
51 + >=app-doc/doxygen-1.8.13-r1
52 + )"
53 + ;;
54 +esac
55 +
56 case ${KDE_TEST} in
57 false) ;;
58 *)
59 @@ -647,6 +670,10 @@ kde5_src_configure() {
60 cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=ON )
61 fi
62
63 + if [[ ${KDE_QTHELP} != false ]]; then
64 + cmakeargs+=( -DBUILD_QCH=$(usex doc) )
65 + fi
66 +
67 # install mkspecs in the same directory as qt stuff
68 cmakeargs+=(-DKDE_INSTALL_USE_QT_SYS_PATHS=ON)
69
70 @@ -704,6 +731,14 @@ kde5_src_install() {
71
72 cmake-utils_src_install
73
74 + # We don't want QCH and tags files to be compressed, because then
75 + # cmake can't find the tags and qthelp viewers can't find the docs
76 + local p=$(best_version dev-qt/qtcore:5)
77 + local pv=$(echo ${p/%-r[0-9]*/} | rev | cut -d - -f 1 | rev)
78 + if [[ -d ${ED%/}/usr/share/doc/qt-${pv} ]]; then
79 + docompress -x /usr/share/doc/qt-${pv}
80 + fi
81 +
82 # We don't want /usr/share/doc/HTML to be compressed,
83 # because then khelpcenter can't find the docs
84 if [[ -d ${ED%/}/usr/share/doc/HTML ]]; then