1 |
Functions moved to ecm-utils: |
2 |
- All phase functions so far exported by kde5 |
3 |
|
4 |
Variables moved to ecm-utils: |
5 |
- ECM_KDEINSTALLDIRS |
6 |
- KDE_DEBUG (-> ECM_DEBUG) |
7 |
- KDE_DESIGNERPLUGIN (-> split into ECM_DESIGNERPLUGIN, KDE_DESIGNERPLUGIN) |
8 |
- KDE_EXAMPLES (-> ECM_EXAMPLES) |
9 |
- KDE_HANDBOOK (-> ECM_HANDBOOK) |
10 |
- KDE_DOC_DIR (-> ECM_HANDBOOK_DIR) |
11 |
- KDE_PO_DIRS (-> ECM_PO_DIRS) |
12 |
- KDE_QTHELP (-> ECM_QTHELP) |
13 |
- KDE_TEST (-> ECM_TEST) |
14 |
- VIRTUALX_REQUIRED |
15 |
|
16 |
Variables deprecated: |
17 |
- KDE_AUTODEPS (re-use as a switch to inherit ecm-utils or cmake-utils) |
18 |
Add meta variable fallbacks in case of KDE_AUTODEPS=false; |
19 |
ECM_KDEINSTALLDIRS, KDE_DEBUG, KDE_TEST were found to be in use even |
20 |
with KDE_AUTODEPS disabled. |
21 |
|
22 |
--- a/eclass/kde5.eclass |
23 |
+++ b/eclass/kde5.eclass |
24 |
@@ -31,27 +31,7 @@ if [[ -z ${KDE_ORG_NAME} ]]; then |
25 |
KDE_ORG_NAME=${KMNAME:=$PN} |
26 |
fi |
27 |
|
28 |
-# @ECLASS-VARIABLE: VIRTUALX_REQUIRED |
29 |
-# @DESCRIPTION: |
30 |
-# For proper description see virtualx.eclass manpage. |
31 |
-# Here we redefine default value to be manual, if your package needs virtualx |
32 |
-# for tests you should proceed with setting VIRTUALX_REQUIRED=test. |
33 |
-: ${VIRTUALX_REQUIRED:=manual} |
34 |
- |
35 |
-inherit cmake-utils flag-o-matic kde.org kde5-functions virtualx xdg |
36 |
- |
37 |
-if [[ -v KDE_GCC_MINIMAL ]]; then |
38 |
- EXPORT_FUNCTIONS pkg_pretend |
39 |
-fi |
40 |
- |
41 |
-EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm |
42 |
- |
43 |
-# @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS |
44 |
-# @DESCRIPTION: |
45 |
-# If set to "false", do nothing. |
46 |
-# For any other value, assume the package is using KDEInstallDirs macro and switch |
47 |
-# KDE_INSTALL_USE_QT_SYS_PATHS to ON. |
48 |
-: ${ECM_KDEINSTALLDIRS:=true} |
49 |
+inherit flag-o-matic kde.org kde5-functions xdg |
50 |
|
51 |
# @ECLASS-VARIABLE: KDE_AUTODEPS |
52 |
# @DESCRIPTION: |
53 |
@@ -59,6 +39,7 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_in |
54 |
# For any other value, add dependencies on dev-qt/qtcore:5, kde-frameworks/kf-env |
55 |
# and kde-frameworks/extra-cmake-modules:5. Additionally, required blockers may |
56 |
# be set depending on the value of CATEGORY. |
57 |
+# PORTING: no replacement |
58 |
: ${KDE_AUTODEPS:=true} |
59 |
|
60 |
# @ECLASS-VARIABLE: KDE_DEBUG |
61 |
@@ -66,6 +47,7 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_in |
62 |
# If set to "false", add -DNDEBUG (via cmake-utils_src_configure) and -DQT_NO_DEBUG |
63 |
# to CPPFLAGS. |
64 |
# Otherwise, add debug to IUSE. |
65 |
+# PORTING: ECM_DEBUG in ecm-utils.eclass |
66 |
: ${KDE_DEBUG:=true} |
67 |
|
68 |
# @ECLASS-VARIABLE: KDE_DESIGNERPLUGIN |
69 |
@@ -73,12 +55,14 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_in |
70 |
# If set to "false", do nothing. |
71 |
# Otherwise, add "designer" to IUSE to toggle build of designer plugins |
72 |
# and add the necessary DEPENDs. |
73 |
+# PORTING: ECM_DESIGNERPLUGIN in ecm-utils.eclass |
74 |
: ${KDE_DESIGNERPLUGIN:=false} |
75 |
|
76 |
# @ECLASS-VARIABLE: KDE_EXAMPLES |
77 |
# @DESCRIPTION: |
78 |
# If set to "false", unconditionally ignore a top-level examples subdirectory. |
79 |
# Otherwise, add "examples" to IUSE to toggle adding that subdirectory. |
80 |
+# PORTING: ECM_EXAMPLES in ecm-utils.eclass |
81 |
: ${KDE_EXAMPLES:=false} |
82 |
|
83 |
# @ECLASS-VARIABLE: KDE_HANDBOOK |
84 |
@@ -90,16 +74,19 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_in |
85 |
# when USE=!handbook. In case package requires KF5KDELibs4Support, see next: |
86 |
# If set to "forceoptional", remove a KF5DocTools dependency from the root |
87 |
# CMakeLists.txt in addition to the above. |
88 |
+# PORTING: ECM_HANDBOOK in ecm-utils.eclass |
89 |
: ${KDE_HANDBOOK:=false} |
90 |
|
91 |
# @ECLASS-VARIABLE: KDE_DOC_DIR |
92 |
# @DESCRIPTION: |
93 |
# Specifies the location of the KDE handbook if not the default. |
94 |
+# PORTING: ECM_HANDBOOK_DIR in ecm-utils.eclass |
95 |
: ${KDE_DOC_DIR:=doc} |
96 |
|
97 |
# @ECLASS-VARIABLE: KDE_PO_DIRS |
98 |
# @DESCRIPTION: |
99 |
# Specifies the possible locations of KDE l10n files if not the default. |
100 |
+# PORTING: ECM_PO_DIRS in ecm-utils.eclass |
101 |
: ${KDE_PO_DIRS:="po poqm"} |
102 |
|
103 |
# @ECLASS-VARIABLE: KDE_QTHELP |
104 |
@@ -107,6 +94,7 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_in |
105 |
# If set to "false", do nothing. |
106 |
# Otherwise, add "doc" to IUSE, add the appropriate dependency, generate |
107 |
# and install Qt compressed help files with -DBUILD_QCH=ON when USE=doc. |
108 |
+# PORTING: ECM_QTHELP in ecm-utils.eclass |
109 |
if [[ ${CATEGORY} = kde-frameworks ]]; then |
110 |
: ${KDE_QTHELP:=true} |
111 |
fi |
112 |
@@ -124,6 +112,7 @@ fi |
113 |
# autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt in ${S} |
114 |
# and below conditional on BUILD_TESTING. This is always meant as a short-term |
115 |
# fix and creates ${T}/${P}-tests-optional.patch to refine and submit upstream. |
116 |
+# PORTING: ECM_TEST in ecm-utils.eclass |
117 |
if [[ ${CATEGORY} = kde-frameworks ]]; then |
118 |
: ${KDE_TEST:=true} |
119 |
fi |
120 |
@@ -163,75 +152,68 @@ case ${KDE_SUBSLOT} in |
121 |
esac |
122 |
|
123 |
case ${KDE_AUTODEPS} in |
124 |
- false) ;; |
125 |
+ false) |
126 |
+ inherit cmake-utils |
127 |
+ # @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS |
128 |
+ # @DESCRIPTION: |
129 |
+ # If set to "false", do nothing. |
130 |
+ # For any other value, assume the package is using KDEInstallDirs macro and switch |
131 |
+ # KDE_INSTALL_USE_QT_SYS_PATHS to ON. |
132 |
+ : ${ECM_KDEINSTALLDIRS:=true} |
133 |
+ # @ECLASS-VARIABLE: KDE_DEBUG |
134 |
+ # @DESCRIPTION: |
135 |
+ # If set to "false", add -DNDEBUG (via cmake-utils_src_configure) and -DQT_NO_DEBUG |
136 |
+ # to CPPFLAGS. |
137 |
+ # Otherwise, add debug to IUSE. |
138 |
+ : ${KDE_DEBUG:=true} |
139 |
+ case ${KDE_DEBUG} in |
140 |
+ false) ;; |
141 |
+ *) |
142 |
+ IUSE+=" debug" |
143 |
+ ;; |
144 |
+ esac |
145 |
+ # @ECLASS-VARIABLE: KDE_TEST |
146 |
+ # @DESCRIPTION: |
147 |
+ # If set to "false", do nothing. |
148 |
+ # For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5. |
149 |
+ # If set to "optional", configure with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON |
150 |
+ # when USE=!test. |
151 |
+ # If set to "forceoptional", remove a Qt5Test dependency and comment test |
152 |
+ # subdirs from the root CMakeLists.txt in addition to the above. |
153 |
+ if [[ ${CATEGORY} = kde-frameworks ]]; then |
154 |
+ : ${KDE_TEST:=true} |
155 |
+ fi |
156 |
+ : ${KDE_TEST:=false} |
157 |
+ case ${KDE_TEST} in |
158 |
+ false) ;; |
159 |
+ *) |
160 |
+ IUSE+=" test" |
161 |
+ DEPEND+=" test? ( dev-qt/qttest:5 )" |
162 |
+ ;; |
163 |
+ esac |
164 |
+ ;; |
165 |
*) |
166 |
- BDEPEND+=" $(add_frameworks_dep extra-cmake-modules)" |
167 |
- RDEPEND+=" >=kde-frameworks/kf-env-4" |
168 |
- COMMONDEPEND+=" $(add_qt_dep qtcore)" |
169 |
- |
170 |
# all packages need breeze/oxygen icons for basic iconset, bug #564838 |
171 |
if [[ ${PN} != breeze-icons && ${PN} != oxygen-icons ]]; then |
172 |
- RDEPEND+=" || ( $(add_frameworks_dep breeze-icons) kde-frameworks/oxygen-icons:* )" |
173 |
+ ECM_NONGUI=false |
174 |
fi |
175 |
- ;; |
176 |
-esac |
177 |
- |
178 |
-case ${KDE_DEBUG} in |
179 |
- false) ;; |
180 |
- *) |
181 |
- IUSE+=" debug" |
182 |
- ;; |
183 |
-esac |
184 |
- |
185 |
-case ${KDE_DESIGNERPLUGIN} in |
186 |
- false) ;; |
187 |
- *) |
188 |
- IUSE+=" designer" |
189 |
- if [[ ${CATEGORY} = kde-apps && ${PV} = 19.0[48]* ]]; then |
190 |
- BDEPEND+=" designer? ( $(add_frameworks_dep kdesignerplugin) )" |
191 |
- else |
192 |
- BDEPEND+=" designer? ( $(add_qt_dep designer) )" |
193 |
+ # propagate deprecated variables to ecm-utils.eclass |
194 |
+ if [[ -z ${ECM_DESIGNERPLUGIN} && ${CATEGORY} != kde-apps ]]; then |
195 |
+ ECM_DESIGNERPLUGIN=${KDE_DESIGNERPLUGIN} |
196 |
+ KDE_DESIGNERPLUGIN=false # use fallback var only for kde-apps |
197 |
fi |
198 |
-esac |
199 |
- |
200 |
-case ${KDE_EXAMPLES} in |
201 |
- false) ;; |
202 |
- *) |
203 |
- IUSE+=" examples" |
204 |
- ;; |
205 |
-esac |
206 |
- |
207 |
-case ${KDE_HANDBOOK} in |
208 |
- false) ;; |
209 |
- *) |
210 |
- IUSE+=" +handbook" |
211 |
- BDEPEND+=" handbook? ( $(add_frameworks_dep kdoctools) )" |
212 |
- ;; |
213 |
-esac |
214 |
- |
215 |
-case ${KDE_QTHELP} in |
216 |
- false) ;; |
217 |
- *) |
218 |
- IUSE+=" doc" |
219 |
- COMMONDEPEND+=" doc? ( $(add_qt_dep qt-docs) )" |
220 |
- BDEPEND+=" doc? ( |
221 |
- $(add_qt_dep qthelp) |
222 |
- >=app-doc/doxygen-1.8.13-r1 |
223 |
- )" |
224 |
- ;; |
225 |
-esac |
226 |
- |
227 |
-case ${KDE_TEST} in |
228 |
- false) ;; |
229 |
- *) |
230 |
- IUSE+=" test" |
231 |
- DEPEND+=" test? ( $(add_qt_dep qttest) )" |
232 |
+ [[ -z ${ECM_DEBUG} ]] && ECM_DEBUG=${KDE_DEBUG} |
233 |
+ [[ -z ${ECM_EXAMPLES} ]] && ECM_EXAMPLES=${KDE_EXAMPLES} |
234 |
+ [[ -z ${ECM_HANDBOOK} ]] && ECM_HANDBOOK=${KDE_HANDBOOK} |
235 |
+ [[ -z ${ECM_HANDBOOK_DIR} ]] && ECM_HANDBOOK_DIR=${KDE_DOC_DIR} |
236 |
+ [[ -z ${ECM_PO_DIRS} ]] && ECM_PO_DIRS=${KDE_PO_DIRS} |
237 |
+ [[ -z ${ECM_QTHELP} ]] && ECM_QTHELP=${KDE_QTHELP} |
238 |
+ [[ -z ${ECM_TEST} ]] && ECM_TEST=${KDE_TEST} |
239 |
+ inherit ecm-utils |
240 |
;; |
241 |
esac |
242 |
|
243 |
-DEPEND+=" ${COMMONDEPEND}" |
244 |
-RDEPEND+=" ${COMMONDEPEND}" |
245 |
-unset COMMONDEPEND |
246 |
+EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm |
247 |
|
248 |
# @FUNCTION: kde5_pkg_pretend |
249 |
# @DESCRIPTION: |
250 |
@@ -239,7 +221,10 @@ unset COMMONDEPEND |
251 |
# phase function is only exported if KDE_GCC_MINIMAL is defined. |
252 |
kde5_pkg_pretend() { |
253 |
debug-print-function ${FUNCNAME} "$@" |
254 |
- _check_gcc_version |
255 |
+ case ${KDE_AUTODEPS} in |
256 |
+ false) ;; |
257 |
+ *) ecm-utils_pkg_pretend ;; |
258 |
+ esac |
259 |
} |
260 |
|
261 |
# @FUNCTION: kde5_pkg_setup |
262 |
@@ -247,7 +232,10 @@ kde5_pkg_pretend() { |
263 |
# Checks if the active compiler meets the minimum version requirements. |
264 |
kde5_pkg_setup() { |
265 |
debug-print-function ${FUNCNAME} "$@" |
266 |
- _check_gcc_version |
267 |
+ case ${KDE_AUTODEPS} in |
268 |
+ false) ;; |
269 |
+ *) ecm-utils_pkg_setup ;; |
270 |
+ esac |
271 |
} |
272 |
|
273 |
# @FUNCTION: kde5_src_unpack |
274 |
@@ -264,112 +252,26 @@ kde5_src_unpack() { |
275 |
# handling of linguas, tests, handbook etc. |
276 |
kde5_src_prepare() { |
277 |
debug-print-function ${FUNCNAME} "$@" |
278 |
- |
279 |
- cmake-utils_src_prepare |
280 |
- |
281 |
- # only build examples when required |
282 |
- if ! { in_iuse examples && use examples; } ; then |
283 |
- cmake_comment_add_subdirectory examples |
284 |
- fi |
285 |
- |
286 |
- # only enable handbook when required |
287 |
- if in_iuse handbook && ! use handbook ; then |
288 |
- cmake_comment_add_subdirectory ${KDE_DOC_DIR} |
289 |
- |
290 |
- if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then |
291 |
- punt_bogus_dep KF5 DocTools |
292 |
- sed -i -e "/kdoctools_install/ s/^/#DONT/" CMakeLists.txt || die |
293 |
- fi |
294 |
- fi |
295 |
- |
296 |
- # drop translations when nls is not wanted |
297 |
- if in_iuse nls && ! use nls ; then |
298 |
- local po |
299 |
- for po in ${KDE_PO_DIRS}; do |
300 |
- if [[ -d ${po} ]] ; then |
301 |
- rm -r ${po} || die |
302 |
- fi |
303 |
- done |
304 |
- fi |
305 |
- |
306 |
- # enable only the requested translations when required |
307 |
- # always install unconditionally for kconfigwidgets - if you use language |
308 |
- # X as system language, and there is a combobox with language names, the |
309 |
- # translated language name for language Y is taken from /usr/share/locale/Y/kf5_entry.desktop |
310 |
- if [[ -v LINGUAS && ${PN} != kconfigwidgets ]] ; then |
311 |
- local po |
312 |
- for po in ${KDE_PO_DIRS}; do |
313 |
- if [[ -d ${po} ]] ; then |
314 |
- pushd ${po} > /dev/null || die |
315 |
- local lang |
316 |
- for lang in *; do |
317 |
- if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then |
318 |
- case ${lang} in |
319 |
- cmake_modules | \ |
320 |
- CMakeLists.txt | \ |
321 |
- ${PN}.pot) ;; |
322 |
- *) rm -r ${lang} || die ;; |
323 |
- esac |
324 |
- if [[ -e CMakeLists.txt ]] ; then |
325 |
- cmake_comment_add_subdirectory ${lang} |
326 |
- sed -e "/add_subdirectory([[:space:]]*${lang}\/.*[[:space:]]*)/d" \ |
327 |
- -i CMakeLists.txt || die |
328 |
- fi |
329 |
- fi |
330 |
- done |
331 |
- popd > /dev/null || die |
332 |
- fi |
333 |
- done |
334 |
- fi |
335 |
- |
336 |
- if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then |
337 |
- if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && -v LINGUAS ]] ; then |
338 |
- pushd ${KDE_DOC_DIR} > /dev/null || die |
339 |
- local lang |
340 |
- for lang in *; do |
341 |
- if ! has ${lang} ${LINGUAS} ; then |
342 |
- cmake_comment_add_subdirectory ${lang} |
343 |
- fi |
344 |
- done |
345 |
- popd > /dev/null || die |
346 |
- fi |
347 |
- fi |
348 |
- |
349 |
- # only build unit tests when required |
350 |
- if ! { in_iuse test && use test; } ; then |
351 |
- if [[ ${KDE_TEST} = forceoptional ]] ; then |
352 |
- punt_bogus_dep Qt5 Test |
353 |
- # if forceoptional, also cover non-kde categories |
354 |
- cmake_comment_add_subdirectory autotests test tests |
355 |
- elif [[ ${KDE_TEST} = forceoptional-recursive ]] ; then |
356 |
- punt_bogus_dep Qt5 Test |
357 |
- local f pf="${T}/${P}"-tests-optional.patch |
358 |
- touch ${pf} || die "Failed to touch patch file" |
359 |
- for f in $(find . -type f -name "CMakeLists.txt" -exec \ |
360 |
- grep -l "^\s*add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)" {} \;); do |
361 |
- cp ${f} ${f}.old || die "Failed to prepare patch origfile" |
362 |
- pushd ${f%/*} > /dev/null || die |
363 |
+ case ${KDE_AUTODEPS} in |
364 |
+ false) |
365 |
+ cmake-utils_src_prepare |
366 |
+ # only build unit tests when required |
367 |
+ if ! { in_iuse test && use test; } ; then |
368 |
+ if [[ ${KDE_TEST} = forceoptional ]] ; then |
369 |
punt_bogus_dep Qt5 Test |
370 |
- sed -i CMakeLists.txt -e \ |
371 |
- "/^#/! s/add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/" \ |
372 |
- || die |
373 |
- popd > /dev/null || die |
374 |
- diff -Naur ${f}.old ${f} 1>>${pf} |
375 |
- rm ${f}.old || die "Failed to clean up" |
376 |
- done |
377 |
- eqawarn "Build system was modified by KDE_TEST=forceoptional-recursive." |
378 |
- eqawarn "Unified diff file ready for pickup in:" |
379 |
- eqawarn " ${pf}" |
380 |
- eqawarn "Push it upstream to make this message go away." |
381 |
- elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then |
382 |
- cmake_comment_add_subdirectory autotests test tests |
383 |
- fi |
384 |
- fi |
385 |
- |
386 |
- # in frameworks, tests = manual tests so never build them |
387 |
- if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then |
388 |
- cmake_comment_add_subdirectory tests |
389 |
- fi |
390 |
+ # if forceoptional, also cover non-kde categories |
391 |
+ cmake_comment_add_subdirectory autotests test tests |
392 |
+ elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then |
393 |
+ cmake_comment_add_subdirectory autotests test tests |
394 |
+ fi |
395 |
+ fi |
396 |
+ # in frameworks, tests = manual tests so never build them |
397 |
+ if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then |
398 |
+ cmake_comment_add_subdirectory tests |
399 |
+ fi |
400 |
+ ;; |
401 |
+ *) ecm-utils_src_prepare ;; |
402 |
+ esac |
403 |
} |
404 |
|
405 |
# @FUNCTION: kde5_src_configure |
406 |
@@ -378,55 +280,38 @@ kde5_src_prepare() { |
407 |
# handbook, tests etc. |
408 |
kde5_src_configure() { |
409 |
debug-print-function ${FUNCNAME} "$@" |
410 |
+ case ${KDE_AUTODEPS} in |
411 |
+ false) |
412 |
+ # we rely on cmake-utils.eclass to append -DNDEBUG too |
413 |
+ if in_iuse debug && ! use debug; then |
414 |
+ append-cppflags -DQT_NO_DEBUG |
415 |
+ fi |
416 |
|
417 |
- # we rely on cmake-utils.eclass to append -DNDEBUG too |
418 |
- if in_iuse debug && ! use debug; then |
419 |
- append-cppflags -DQT_NO_DEBUG |
420 |
- fi |
421 |
- |
422 |
- local cmakeargs |
423 |
- |
424 |
- if in_iuse test && ! use test ; then |
425 |
- cmakeargs+=( -DBUILD_TESTING=OFF ) |
426 |
+ local cmakeargs |
427 |
|
428 |
- if [[ ${KDE_TEST} = optional ]] ; then |
429 |
- cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON ) |
430 |
- fi |
431 |
- fi |
432 |
+ if in_iuse test && ! use test ; then |
433 |
+ cmakeargs+=( -DBUILD_TESTING=OFF ) |
434 |
|
435 |
- if in_iuse handbook && ! use handbook && [[ ${KDE_HANDBOOK} = optional ]] ; then |
436 |
- cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON ) |
437 |
- fi |
438 |
- |
439 |
- if in_iuse designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then |
440 |
- if [[ ${CATEGORY} = kde-frameworks ]]; then |
441 |
- cmakeargs+=( -DBUILD_DESIGNERPLUGIN=$(usex designer) ) |
442 |
- else |
443 |
- if [[ ${KDE_BUILD_TYPE} = live && ${PV} != 19.08* ]] ; then |
444 |
- cmakeargs+=( -DBUILD_DESIGNERPLUGIN=$(usex designer) ) |
445 |
- else |
446 |
- cmakeargs+=( $(cmake-utils_use_find_package designer KF5DesignerPlugin) ) |
447 |
+ if [[ ${KDE_TEST} = optional ]] ; then |
448 |
+ cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON ) |
449 |
+ fi |
450 |
+ fi |
451 |
+ if [[ ${ECM_KDEINSTALLDIRS} != false ]] ; then |
452 |
+ cmakeargs+=( |
453 |
+ # install mkspecs in the same directory as qt stuff |
454 |
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON |
455 |
+ # move handbook outside of doc dir, bug 667138 |
456 |
+ -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help" |
457 |
+ ) |
458 |
fi |
459 |
- fi |
460 |
- fi |
461 |
- |
462 |
- if [[ ${KDE_QTHELP} != false ]]; then |
463 |
- cmakeargs+=( -DBUILD_QCH=$(usex doc) ) |
464 |
- fi |
465 |
- |
466 |
- if [[ ${ECM_KDEINSTALLDIRS} != false ]] ; then |
467 |
- cmakeargs+=( |
468 |
- # install mkspecs in the same directory as qt stuff |
469 |
- -DKDE_INSTALL_USE_QT_SYS_PATHS=ON |
470 |
- # move handbook outside of doc dir, bug 667138 |
471 |
- -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help" |
472 |
- ) |
473 |
- fi |
474 |
|
475 |
- # allow the ebuild to override what we set here |
476 |
- mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}") |
477 |
+ # allow the ebuild to override what we set here |
478 |
+ mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}") |
479 |
|
480 |
- cmake-utils_src_configure |
481 |
+ cmake-utils_src_configure |
482 |
+ ;; |
483 |
+ *) ecm-utils_src_configure ;; |
484 |
+ esac |
485 |
} |
486 |
|
487 |
# @FUNCTION: kde5_src_compile |
488 |
@@ -435,8 +320,10 @@ kde5_src_configure() { |
489 |
# is included as part of the API just in case it's needed in the future. |
490 |
kde5_src_compile() { |
491 |
debug-print-function ${FUNCNAME} "$@" |
492 |
- |
493 |
- cmake-utils_src_compile "$@" |
494 |
+ case ${KDE_AUTODEPS} in |
495 |
+ false) cmake-utils_src_compile ;; |
496 |
+ *) ecm-utils_src_compile ;; |
497 |
+ esac |
498 |
} |
499 |
|
500 |
# @FUNCTION: kde5_src_test |
501 |
@@ -445,30 +332,10 @@ kde5_src_compile() { |
502 |
# and virtualx. |
503 |
kde5_src_test() { |
504 |
debug-print-function ${FUNCNAME} "$@" |
505 |
- |
506 |
- _test_runner() { |
507 |
- if [[ -n "${VIRTUALDBUS_TEST}" ]]; then |
508 |
- export $(dbus-launch) |
509 |
- fi |
510 |
- |
511 |
- cmake-utils_src_test |
512 |
- } |
513 |
- |
514 |
- # When run as normal user during ebuild development with the ebuild command, the |
515 |
- # kde tests tend to access the session DBUS. This however is not possible in a real |
516 |
- # emerge or on the tinderbox. |
517 |
- # > make sure it does not happen, so bad tests can be recognized and disabled |
518 |
- unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID |
519 |
- |
520 |
- if [[ ${VIRTUALX_REQUIRED} = always || ${VIRTUALX_REQUIRED} = test ]]; then |
521 |
- virtx _test_runner |
522 |
- else |
523 |
- _test_runner |
524 |
- fi |
525 |
- |
526 |
- if [[ -n "${DBUS_SESSION_BUS_PID}" ]] ; then |
527 |
- kill ${DBUS_SESSION_BUS_PID} |
528 |
- fi |
529 |
+ case ${KDE_AUTODEPS} in |
530 |
+ false) cmake-utils_src_test ;; |
531 |
+ *) ecm-utils_src_test ;; |
532 |
+ esac |
533 |
} |
534 |
|
535 |
# @FUNCTION: kde5_src_install |
536 |
@@ -476,8 +343,10 @@ kde5_src_test() { |
537 |
# Wrapper for cmake-utils_src_install. Currently doesn't do anything extra. |
538 |
kde5_src_install() { |
539 |
debug-print-function ${FUNCNAME} "$@" |
540 |
- |
541 |
- cmake-utils_src_install |
542 |
+ case ${KDE_AUTODEPS} in |
543 |
+ false) cmake-utils_src_install ;; |
544 |
+ *) ecm-utils_src_install ;; |
545 |
+ esac |
546 |
} |
547 |
|
548 |
# @FUNCTION: kde5_pkg_preinst |
549 |
@@ -485,8 +354,10 @@ kde5_src_install() { |
550 |
# Sets up environment variables required in kde5_pkg_postinst. |
551 |
kde5_pkg_preinst() { |
552 |
debug-print-function ${FUNCNAME} "$@" |
553 |
- |
554 |
- xdg_pkg_preinst |
555 |
+ case ${KDE_AUTODEPS} in |
556 |
+ false) xdg_pkg_preinst ;; |
557 |
+ *) ecm-utils_pkg_preinst ;; |
558 |
+ esac |
559 |
} |
560 |
|
561 |
# @FUNCTION: kde5_pkg_postinst |
562 |
@@ -494,17 +365,10 @@ kde5_pkg_preinst() { |
563 |
# Updates the various XDG caches (icon, desktop, mime) if necessary. |
564 |
kde5_pkg_postinst() { |
565 |
debug-print-function ${FUNCNAME} "$@" |
566 |
- |
567 |
- xdg_pkg_postinst |
568 |
- |
569 |
- if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then |
570 |
- if [[ ${KDE_BUILD_TYPE} = live ]]; then |
571 |
- echo |
572 |
- einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}" |
573 |
- einfo "Use it at your own risk." |
574 |
- einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!" |
575 |
- fi |
576 |
- fi |
577 |
+ case ${KDE_AUTODEPS} in |
578 |
+ false) xdg_pkg_postinst ;; |
579 |
+ *) ecm-utils_pkg_postinst ;; |
580 |
+ esac |
581 |
} |
582 |
|
583 |
# @FUNCTION: kde5_pkg_postrm |
584 |
@@ -512,8 +376,10 @@ kde5_pkg_postinst() { |
585 |
# Updates the various XDG caches (icon, desktop, mime) if necessary. |
586 |
kde5_pkg_postrm() { |
587 |
debug-print-function ${FUNCNAME} "$@" |
588 |
- |
589 |
- xdg_pkg_postrm |
590 |
+ case ${KDE_AUTODEPS} in |
591 |
+ false) xdg_pkg_postrm ;; |
592 |
+ *) ecm-utils_pkg_postrm ;; |
593 |
+ esac |
594 |
} |
595 |
|
596 |
fi |