1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 # @BLURB: Support eclass for KDE 5-related packages.
10 # The kde5.eclass provides support for building KDE 5-related packages.
12 if [[ -z ${_KDE5_ECLASS} ]]; then
15 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
17 # For proper description see virtualx.eclass manpage.
18 # Here we redefine default value to be manual, if your package needs virtualx
19 # for tests you should proceed with setting VIRTUALX_REQUIRED=test.
20 : ${VIRTUALX_REQUIRED:=manual}
22 inherit cmake-utils eutils flag-o-matic gnome2-utils kde5-functions versionator virtualx xdg
24 if [[ ${KDE_BUILD_TYPE} = live ]]; then
26 git) inherit git-r3 ;;
30 if [[ -v KDE_GCC_MINIMAL ]]; then
31 EXPORT_FUNCTIONS pkg_pretend
34 EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
36 # @ECLASS-VARIABLE: KDE_AUTODEPS
38 # If set to "false", do nothing.
39 # For any other value, add a dependency on dev-qt/qtcore:5 and kde-frameworks/extra-cmake-modules:5.
40 : ${KDE_AUTODEPS:=true}
42 # @ECLASS-VARIABLE: KDE_BLOCK_SLOT4
44 # This variable is used when KDE_AUTODEPS is set.
45 # If set to "true", add RDEPEND block on kde-apps/${PN}:4
46 : ${KDE_BLOCK_SLOT4:=true}
48 # @ECLASS-VARIABLE: KDE_DEBUG
50 # If set to "false", unconditionally build with -DNDEBUG.
51 # Otherwise, add debug to IUSE to control building with that flag.
54 # @ECLASS-VARIABLE: KDE_DESIGNERPLUGIN
56 # If set to "false", do nothing.
57 # Otherwise, add "designer" to IUSE to toggle build of designer plugins
58 # and add the necessary DEPENDs.
59 : ${KDE_DESIGNERPLUGIN:=false}
61 # @ECLASS-VARIABLE: KDE_EXAMPLES
63 # If set to "false", unconditionally ignore a top-level examples subdirectory.
64 # Otherwise, add "examples" to IUSE to toggle adding that subdirectory.
65 : ${KDE_EXAMPLES:=false}
67 # @ECLASS-VARIABLE: KDE_HANDBOOK
69 # If set to "false", do nothing.
70 # Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and
71 # generate and install KDE handbook.
72 # If set to "optional", config with -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON
73 # when USE=!handbook. In case package requires KF5KDELibs4Support, see next:
74 # If set to "forceoptional", remove a KF5DocTools dependency from the root
75 # CMakeLists.txt in addition to the above.
76 : ${KDE_HANDBOOK:=false}
78 # @ECLASS-VARIABLE: KDE_DOC_DIR
80 # Defaults to "doc". Otherwise, use alternative KDE handbook path.
83 # @ECLASS-VARIABLE: KDE_TEST
85 # If set to "false", do nothing.
86 # For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5.
87 # If set to "optional", configure with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON
89 # If set to "forceoptional", remove a Qt5Test dependency and comment test
90 # subdirs from the root CMakeLists.txt in addition to the above.
91 # If set to "forceoptional-recursive", remove a Qt5Test dependency and comment
92 # test subdirs from *any* CMakeLists.txt in addition to the above.
93 if [[ ${CATEGORY} = kde-frameworks ]]; then
99 # @ECLASS-VARIABLE: KDE_L10N
101 # This is an array of translations this ebuild supports. These translations
102 # are automatically added to IUSE.
103 if [[ ${KDEBASE} = kdel10n ]]; then
104 if [[ -n ${KDE_L10N} ]]; then
105 IUSE="${IUSE} $(printf 'l10n_%s ' ${KDE_L10N[@]})"
109 # @ECLASS-VARIABLE: KDE_SELINUX_MODULE
111 # If set to "none", do nothing.
112 # For any other value, add selinux to IUSE, and depending on that useflag
113 # add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND.
114 : ${KDE_SELINUX_MODULE:=none}
116 # @ECLASS-VARIABLE: KDE_SUBSLOT
118 # If set to "false", do nothing.
119 # If set to "true", add a subslot to the package, where subslot is either
120 # defined as major.minor version for kde-*/ categories or ${PV} if other.
121 # For any other value, that value will be used as subslot.
122 : ${KDE_SUBSLOT:=false}
124 # @ECLASS-VARIABLE: KDE_UNRELEASED
127 # An array of $CATEGORY-$PV pairs of packages that are unreleased upstream.
128 # Any package matching this will have fetch restriction enabled, and receive
129 # a proper error message via pkg_nofetch.
132 if [[ ${KDEBASE} = kdevelop ]]; then
133 HOMEPAGE="https://www.kdevelop.org/"
134 elif [[ ${KDEBASE} = kdel10n ]]; then
135 HOMEPAGE="http://l10n.kde.org"
136 elif [[ ${KMNAME} = kdepim ]]; then
137 HOMEPAGE="https://www.kde.org/applications/office/kontact/"
139 HOMEPAGE="https://www.kde.org/"
146 if [[ ${CATEGORY} = kde-frameworks ]]; then
150 case ${KDE_SUBSLOT} in
157 SLOT+="/$(get_version_component_range 1-2)"
165 SLOT+="/${KDE_SUBSLOT}"
169 case ${KDE_AUTODEPS} in
172 DEPEND+=" $(add_frameworks_dep extra-cmake-modules)"
173 RDEPEND+=" >=kde-frameworks/kf-env-4"
174 COMMONDEPEND+=" $(add_qt_dep qtcore)"
176 if [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma && ${PN} != polkit-kde-agent ]]; then
177 RDEPEND+=" !<kde-apps/kde4-l10n-15.12.3-r1"
180 if [[ ${KDE_BLOCK_SLOT4} = true && ${CATEGORY} = kde-apps ]]; then
181 RDEPEND+=" !kde-apps/${PN}:4"
193 case ${KDE_DESIGNERPLUGIN} in
197 DEPEND+=" designer? (
198 $(add_frameworks_dep kdesignerplugin)
199 $(add_qt_dep designer)
204 case ${KDE_EXAMPLES} in
211 case ${KDE_HANDBOOK} in
215 DEPEND+=" handbook? ( $(add_frameworks_dep kdoctools) )"
223 DEPEND+=" test? ( $(add_qt_dep qttest) )"
227 case ${KDE_SELINUX_MODULE} in
231 RDEPEND+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
235 DEPEND+=" ${COMMONDEPEND} dev-util/desktop-file-utils"
236 RDEPEND+=" ${COMMONDEPEND}"
239 if [[ -n ${KMNAME} && ${KMNAME} != ${PN} && ${KDE_BUILD_TYPE} = release ]]; then
240 S=${WORKDIR}/${KMNAME}-${PV}
243 if [[ -n ${KDEBASE} && ${KDEBASE} = kdevelop && ${KDE_BUILD_TYPE} = release ]]; then
244 if [[ -n ${KMNAME} ]]; then
245 S=${WORKDIR}/${KMNAME}-${PV%.0} # kdevelop missing trailing .0 in first release
247 S=${WORKDIR}/${PN}-${PV%.0} # kdevelop missing trailing .0 in first release
251 _kde_is_unreleased() {
253 for pair in "${KDE_UNRELEASED[@]}" ; do
254 if [[ "${pair}" = "${CATEGORY}-${PV}" ]]; then
262 # Determine fetch location for released tarballs
263 _calculate_src_uri() {
264 debug-print-function ${FUNCNAME} "$@"
268 if [[ -n ${KMNAME} ]]; then
281 _kmname="portingAids/${_kmname}"
285 DEPEND+=" app-arch/xz-utils"
290 ??.?.[6-9]? | ??.??.[6-9]? )
291 SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
295 SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
299 SRC_URI="mirror://kde/stable/frameworks/${PV%.*}/${_kmname}-${PV}.tar.xz" ;;
301 local plasmapv=$(get_version_component_range 1-3)
305 # Plasma 5 beta releases
306 SRC_URI="mirror://kde/unstable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz"
310 # Plasma 5 stable releases
311 SRC_URI="mirror://kde/stable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz" ;;
316 if [[ -z ${SRC_URI} && -n ${KDEBASE} ]] ; then
322 _kdebase=${KDEBASE} ;;
326 SRC_URI="mirror://kde/unstable/${_kdebase}/${PV}/src/${_kmname}-${PV}.tar.xz"
330 SRC_URI="mirror://kde/stable/${_kdebase}/${PV}/src/${_kmname}-${PV%.0}.tar.xz" ;;
335 if [[ ${KDEBASE} = kdel10n ]] ; then
336 local uri_base="${SRC_URI/${_kmname}-${PV}.tar.xz/}kde-l10n/kde-l10n"
338 for my_l10n in ${KDE_L10N[@]} ; do
340 sr | sr-ijekavsk | sr-Latn-ijekavsk | sr-Latn)
341 SRC_URI="${SRC_URI} l10n_${my_l10n}? ( ${uri_base}-sr-${PV}.tar.xz )"
344 SRC_URI="${SRC_URI} l10n_${my_l10n}? ( ${uri_base}-$(kde_l10n2lingua ${my_l10n})-${PV}.tar.xz )"
350 if _kde_is_unreleased ; then
355 # Determine fetch location for live sources
356 _calculate_live_repo() {
357 debug-print-function ${FUNCNAME} "$@"
363 # @ECLASS-VARIABLE: EGIT_MIRROR
365 # This variable allows easy overriding of default kde mirror service
366 # (anongit) with anything else you might want to use.
367 EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org}
371 # @ECLASS-VARIABLE: EGIT_REPONAME
373 # This variable allows overriding of default repository
374 # name. Specify only if this differ from PN and KMNAME.
375 if [[ -n ${EGIT_REPONAME} ]]; then
376 # the repository and kmname different
377 _kmname=${EGIT_REPONAME}
378 elif [[ -n ${KMNAME} ]]; then
384 if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then
385 EGIT_BRANCH="Applications/$(get_version_component_range 1-2)"
388 if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then
389 EGIT_BRANCH="Plasma/$(get_version_component_range 1-2)"
392 EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}"
397 case ${KDE_BUILD_TYPE} in
398 live) _calculate_live_repo ;;
399 *) _calculate_src_uri ;;
402 debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
404 # @FUNCTION: kde5_pkg_pretend
406 # Do some basic settings
408 debug-print-function ${FUNCNAME} "$@"
412 # @FUNCTION: kde5_pkg_setup
414 # Do some basic settings
416 debug-print-function ${FUNCNAME} "$@"
420 # @FUNCTION: kde5_pkg_nofetch
422 # Display package publication status
424 if ! _kde_is_unreleased ; then
428 eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ "
429 eerror "| | | | \ | | _ \| ____| | | ____| / \ / ___|| ____| _ \ "
430 eerror "| | | | \| | |_) | _| | | | _| / _ \ \___ \| _| | | | |"
431 eerror "| |_| | |\ | _ <| |___| |___| |___ / ___ \ ___) | |___| |_| |"
432 eerror " \___/|_| \_|_| \_\_____|_____|_____/_/ \_\____/|_____|____/ "
434 eerror " ____ _ ____ _ __ _ ____ _____ "
435 eerror "| _ \ / \ / ___| |/ / / \ / ___| ____|"
436 eerror "| |_) / _ \| | | ' / / _ \| | _| _| "
437 eerror "| __/ ___ \ |___| . \ / ___ \ |_| | |___ "
438 eerror "|_| /_/ \_\____|_|\_\/_/ \_\____|_____|"
440 eerror "${CATEGORY}/${P} has not been released to the public yet"
441 eerror "and is only available to packagers right now."
443 eerror "This is not a bug. Please do not file bugs or contact upstream about this."
445 eerror "Please consult the upstream release schedule to see when this "
446 eerror "package is scheduled to be released:"
447 eerror "https://community.kde.org/Schedules"
450 # @FUNCTION: kde5_src_unpack
452 # Function for unpacking KDE 5.
454 debug-print-function ${FUNCNAME} "$@"
456 if [[ ${KDE_BUILD_TYPE} = live ]]; then
462 elif [[ ${KDEBASE} = kdel10n ]]; then
464 [[ ${PN} = kde4-l10n ]] && l10npart=4
465 mkdir -p "${S}" || die "Failed to create source dir ${S}"
467 for my_tar in ${A}; do
468 tar -xpf "${DISTDIR}/${my_tar}" --xz \
469 "${my_tar/.tar.xz/}/CMakeLists.txt" "${my_tar/.tar.xz/}/${l10npart}" 2> /dev/null ||
470 elog "${my_tar}: tar extract command failed at least partially - continuing"
477 # @FUNCTION: kde5_src_prepare
479 # Function for preparing the KDE 5 sources.
481 debug-print-function ${FUNCNAME} "$@"
483 if [[ ${KDEBASE} = kdel10n ]]; then
485 [[ ${PN} = kde4-l10n ]] && l10npart=4
486 # move known variant subdirs to root dir, currently sr@*
487 use_if_iuse l10n_sr-ijekavsk && _l10n_variant_subdir2root sr-ijekavsk sr
488 use_if_iuse l10n_sr-Latn-ijekavsk && _l10n_variant_subdir2root sr-Latn-ijekavsk sr
489 use_if_iuse l10n_sr-Latn && _l10n_variant_subdir2root sr-Latn sr
490 if use_if_iuse l10n_sr; then
491 rm -rf kde-l10n-sr-${PV}/${l10npart}/sr/sr@* || die "Failed to cleanup L10N=sr"
492 _l10n_variant_subdir_buster sr
493 elif [[ -d kde-l10n-sr-${PV} ]]; then
494 # having any variant selected means parent lingua will be unpacked as well
495 rm -r kde-l10n-sr-${PV} || die "Failed to remove sr parent lingua"
498 cat <<-EOF > CMakeLists.txt || die
500 cmake_minimum_required(VERSION 2.8.12)
502 # add all l10n directories to cmake
503 if [[ -n ${A} ]]; then
504 cat <<-EOF >> CMakeLists.txt || die
505 $(printf "add_subdirectory( %s )\n" \
506 `find . -mindepth 1 -maxdepth 1 -type d | sed -e "s:^\./::"`)
510 # for KF5: drop KDE4-based part; for KDE4: drop KF5-based part
512 5) find -maxdepth 2 -type f -name CMakeLists.txt -exec \
513 sed -i -e "/add_subdirectory(4)/ s/^/#DONT/" {} + || die ;;
514 4) find -maxdepth 2 -type f -name CMakeLists.txt -exec \
515 sed -i -e "/add_subdirectory(5)/ s/^/#DONT/" {} + || die ;;
519 cmake-utils_src_prepare
521 # only build examples when required
522 if ! use_if_iuse examples || ! use examples ; then
523 cmake_comment_add_subdirectory examples
526 # only enable handbook when required
527 if ! use_if_iuse handbook ; then
528 cmake_comment_add_subdirectory ${KDE_DOC_DIR}
530 if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then
531 punt_bogus_dep KF5 DocTools
535 # drop translations when nls is not wanted
536 if [[ -d po ]] && in_iuse nls && ! use nls ; then
540 # enable only the requested translations
542 if [[ -d po && -v LINGUAS ]] ; then
543 pushd po > /dev/null || die
546 if [[ -d ${lang} ]] && ! has ${lang} ${LINGUAS} ; then
548 if [[ -e CMakeLists.txt ]] ; then
549 cmake_comment_add_subdirectory ${lang}
551 elif [[ -f ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
552 if [[ ${lang} != CMakeLists.txt && ${lang} != ${PN}.pot ]] ; then
557 popd > /dev/null || die
560 if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then
561 if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && -v LINGUAS ]] ; then
562 pushd ${KDE_DOC_DIR} > /dev/null || die
565 if ! has ${lang} ${LINGUAS} ; then
566 cmake_comment_add_subdirectory ${lang}
569 popd > /dev/null || die
573 # in frameworks, tests = manual tests so never build them
574 if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then
575 cmake_comment_add_subdirectory tests
578 # only build unit tests when required
579 if ! use_if_iuse test ; then
580 if [[ ${KDE_TEST} = forceoptional ]] ; then
581 punt_bogus_dep Qt5 Test
582 # if forceoptional, also cover non-kde categories
583 cmake_comment_add_subdirectory autotests test tests
584 elif [[ ${KDE_TEST} = forceoptional-recursive ]] ; then
585 punt_bogus_dep Qt5 Test
587 for d in $(find . -type d -name "autotests" -or -name "tests" -or -name "test" -or -name "unittests"); do
588 pushd ${d%/*} > /dev/null || die
589 punt_bogus_dep Qt5 Test
590 cmake_comment_add_subdirectory autotests test tests
591 popd > /dev/null || die
593 elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then
594 cmake_comment_add_subdirectory autotests test tests
599 # @FUNCTION: kde5_src_configure
601 # Function for configuring the build of KDE 5.
602 kde5_src_configure() {
603 debug-print-function ${FUNCNAME} "$@"
605 # we rely on cmake-utils.eclass to append -DNDEBUG too
606 if ! use_if_iuse debug; then
607 append-cppflags -DQT_NO_DEBUG
612 if ! use_if_iuse test ; then
613 cmakeargs+=( -DBUILD_TESTING=OFF )
615 if [[ ${KDE_TEST} = optional ]] ; then
616 cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON )
620 if ! use_if_iuse handbook && [[ ${KDE_HANDBOOK} = optional ]] ; then
621 cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON )
624 if ! use_if_iuse designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then
625 cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=ON )
628 # install mkspecs in the same directory as qt stuff
629 cmakeargs+=(-DKDE_INSTALL_USE_QT_SYS_PATHS=ON)
631 # allow the ebuild to override what we set here
632 mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
634 cmake-utils_src_configure
637 # @FUNCTION: kde5_src_compile
639 # Function for compiling KDE 5.
641 debug-print-function ${FUNCNAME} "$@"
643 cmake-utils_src_compile "$@"
646 # @FUNCTION: kde5_src_test
648 # Function for testing KDE 5.
650 debug-print-function ${FUNCNAME} "$@"
653 if [[ -n "${VIRTUALDBUS_TEST}" ]]; then
654 export $(dbus-launch)
660 # When run as normal user during ebuild development with the ebuild command, the
661 # kde tests tend to access the session DBUS. This however is not possible in a real
662 # emerge or on the tinderbox.
663 # > make sure it does not happen, so bad tests can be recognized and disabled
664 unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
666 if [[ ${VIRTUALX_REQUIRED} = always || ${VIRTUALX_REQUIRED} = test ]]; then
672 if [[ -n "${DBUS_SESSION_BUS_PID}" ]] ; then
673 kill ${DBUS_SESSION_BUS_PID}
677 # @FUNCTION: kde5_src_install
679 # Function for installing KDE 5.
681 debug-print-function ${FUNCNAME} "$@"
683 cmake-utils_src_install
685 # We don't want ${PREFIX}/share/doc/HTML to be compressed,
686 # because then khelpcenter can't find the docs
687 if [[ -d ${ED}/${PREFIX}/share/doc/HTML ]]; then
688 docompress -x ${PREFIX}/share/doc/HTML
692 # @FUNCTION: kde5_pkg_preinst
694 # Function storing icon caches
696 debug-print-function ${FUNCNAME} "$@"
702 # @FUNCTION: kde5_pkg_postinst
704 # Function to rebuild the KDE System Configuration Cache after an application has been installed.
705 kde5_pkg_postinst() {
706 debug-print-function ${FUNCNAME} "$@"
708 gnome2_icon_cache_update
711 if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
712 if [[ ${KDE_BUILD_TYPE} = live ]]; then
714 einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}"
715 einfo "Use it at your own risk."
716 einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
718 # for kf5-based applications tell user that he SHOULD NOT be using kde-plasma/plasma-workspace:4
719 if [[ ${KDEBASE} != kde-base || ${CATEGORY} = kde-apps ]] && \
720 has_version 'kde-plasma/plasma-workspace:4'; then
722 ewarn "WARNING! Your system configuration still contains \"kde-plasma/plasma-workspace:4\","
723 ewarn "indicating a Plasma 4 setup. With this setting you are unsupported by KDE team."
724 ewarn "Please consider upgrading to Plasma 5."
729 # @FUNCTION: kde5_pkg_postrm
731 # Function to rebuild the KDE System Configuration Cache after an application has been removed.
733 debug-print-function ${FUNCNAME} "$@"
735 gnome2_icon_cache_update
739 _l10n_variant_subdir2root() {
741 [[ ${PN} = kde4-l10n ]] && l10npart=4
742 local lingua=$(kde_l10n2lingua ${1})
743 local src=kde-l10n-${2}-${PV}
744 local dest=kde-l10n-${lingua}-${PV}/${l10npart}
746 # create variant rootdir structure from parent lingua and adapt it
747 mkdir -p ${dest} || die "Failed to create ${dest}"
748 mv ${src}/${l10npart}/${2}/${lingua} ${dest}/${lingua} || die "Failed to create ${dest}/${lingua}"
749 cp -f ${src}/CMakeLists.txt kde-l10n-${lingua}-${PV} || die "Failed to prepare L10N=${1} subdir"
750 echo "add_subdirectory(${lingua})" > ${dest}/CMakeLists.txt ||
751 die "Failed to prepare ${dest}/CMakeLists.txt"
752 cp -f ${src}/${l10npart}/${2}/CMakeLists.txt ${dest}/${lingua} ||
753 die "Failed to create ${dest}/${lingua}/CMakeLists.txt"
754 sed -e "s/${2}/${lingua}/" -i ${dest}/${lingua}/CMakeLists.txt ||
755 die "Failed to prepare ${dest}/${lingua}/CMakeLists.txt"
757 _l10n_variant_subdir_buster ${1}
760 _l10n_variant_subdir_buster() {
762 [[ ${PN} = kde4-l10n ]] && l10npart=4
763 local dir=kde-l10n-$(kde_l10n2lingua ${1})-${PV}/${l10npart}/$(kde_l10n2lingua ${1})
766 5) sed -e "/^add_subdirectory(/d" -i ${dir}/CMakeLists.txt || die "Failed to cleanup ${dir} subdir" ;;
767 4) sed -e "/^macro.*subdirectory(/d" -i ${dir}/CMakeLists.txt || die "Failed to cleanup ${dir} subdir" ;;
770 for subdir in $(find ${dir} -mindepth 1 -maxdepth 1 -type d | sed -e "s:^\./::"); do
771 if [[ ${subdir##*/} != "cmake_modules" ]] ; then
772 echo "add_subdirectory(${subdir##*/})" >> ${dir}/CMakeLists.txt || die