2019-01-10 09:00:33 +03:00
|
|
|
# Copyright 1999-2019 Gentoo Authors
|
2014-10-15 23:19:12 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
# @ECLASS: kde5.eclass
|
|
|
|
# @MAINTAINER:
|
|
|
|
# kde@gentoo.org
|
2017-10-26 17:28:39 +03:00
|
|
|
# @BLURB: Support eclass for packages that follow KDE packaging conventions.
|
2014-10-15 23:19:12 +04:00
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# This eclass is intended to streamline the creation of ebuilds for packages
|
|
|
|
# that follow KDE upstream packaging conventions. It's primarily intended for
|
|
|
|
# the three upstream release groups (Frameworks, Plasma, Applications) but
|
|
|
|
# is also for any package that follows similar conventions.
|
|
|
|
#
|
|
|
|
# This eclass unconditionally inherits kde5-functions.eclass and all its public
|
|
|
|
# functions and variables may be considered as part of this eclass's API.
|
|
|
|
#
|
|
|
|
# This eclass unconditionally inherits cmake-utils.eclass and all its public
|
|
|
|
# variables and helper functions (not phase functions) may be considered as part
|
|
|
|
# of this eclass's API.
|
|
|
|
#
|
|
|
|
# This eclass's phase functions are not intended to be mixed and matched, so if
|
2018-03-30 19:27:59 +03:00
|
|
|
# any phase functions are overridden the version here should also be called.
|
2014-10-15 23:19:12 +04:00
|
|
|
|
|
|
|
if [[ -z ${_KDE5_ECLASS} ]]; then
|
|
|
|
_KDE5_ECLASS=1
|
|
|
|
|
|
|
|
# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# For proper description see virtualx.eclass manpage.
|
|
|
|
# Here we redefine default value to be manual, if your package needs virtualx
|
|
|
|
# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
|
|
|
|
: ${VIRTUALX_REQUIRED:=manual}
|
|
|
|
|
2019-02-15 12:22:50 +03:00
|
|
|
inherit cmake-utils flag-o-matic kde5-functions virtualx xdg
|
2018-05-13 00:11:41 +03:00
|
|
|
|
|
|
|
case ${EAPI} in
|
2019-02-15 12:22:50 +03:00
|
|
|
6) inherit eapi7-ver eutils gnome2-utils ;;
|
2018-05-13 00:11:41 +03:00
|
|
|
esac
|
2014-10-15 23:19:12 +04:00
|
|
|
|
|
|
|
if [[ ${KDE_BUILD_TYPE} = live ]]; then
|
2018-08-16 14:08:53 +03:00
|
|
|
inherit git-r3
|
2014-10-15 23:19:12 +04:00
|
|
|
fi
|
|
|
|
|
2016-07-07 18:52:56 +03:00
|
|
|
if [[ -v KDE_GCC_MINIMAL ]]; then
|
2016-04-21 22:42:37 +03:00
|
|
|
EXPORT_FUNCTIONS pkg_pretend
|
|
|
|
fi
|
|
|
|
|
2016-10-05 23:10:24 +03:00
|
|
|
EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
|
2014-10-15 23:19:12 +04:00
|
|
|
|
2018-07-16 16:46:09 +03:00
|
|
|
# @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# If set to "false", do nothing.
|
|
|
|
# For any other value, assume the package is using KDEInstallDirs macro and switch
|
|
|
|
# KDE_INSTALL_USE_QT_SYS_PATHS to ON.
|
|
|
|
: ${ECM_KDEINSTALLDIRS:=true}
|
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
# @ECLASS-VARIABLE: KDE_AUTODEPS
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# If set to "false", do nothing.
|
2017-10-26 17:28:39 +03:00
|
|
|
# For any other value, add dependencies on dev-qt/qtcore:5, kde-frameworks/kf-env
|
|
|
|
# and kde-frameworks/extra-cmake-modules:5. Additionally, required blockers may
|
|
|
|
# be set depending on the value of CATEGORY.
|
2014-10-15 23:19:12 +04:00
|
|
|
: ${KDE_AUTODEPS:=true}
|
|
|
|
|
2015-05-31 21:21:17 +03:00
|
|
|
# @ECLASS-VARIABLE: KDE_BLOCK_SLOT4
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# This variable only has any effect when when CATEGORY = "kde-apps" and
|
|
|
|
# KDE_AUTODEPS is also set. If set to "true", add RDEPEND block on kde-apps/${PN}:4
|
2015-05-31 21:21:17 +03:00
|
|
|
: ${KDE_BLOCK_SLOT4:=true}
|
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
# @ECLASS-VARIABLE: KDE_DEBUG
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# If set to "false", add -DNDEBUG (via cmake-utils_src_configure) and -DQT_NO_DEBUG
|
|
|
|
# to CPPFLAGS.
|
|
|
|
# Otherwise, add debug to IUSE.
|
2014-10-15 23:19:12 +04:00
|
|
|
: ${KDE_DEBUG:=true}
|
|
|
|
|
2016-06-17 00:35:49 +03:00
|
|
|
# @ECLASS-VARIABLE: KDE_DESIGNERPLUGIN
|
2014-10-15 23:19:12 +04:00
|
|
|
# @DESCRIPTION:
|
|
|
|
# If set to "false", do nothing.
|
2016-06-17 00:35:49 +03:00
|
|
|
# Otherwise, add "designer" to IUSE to toggle build of designer plugins
|
|
|
|
# and add the necessary DEPENDs.
|
|
|
|
: ${KDE_DESIGNERPLUGIN:=false}
|
2015-10-26 22:20:41 +03:00
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
# @ECLASS-VARIABLE: KDE_EXAMPLES
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# If set to "false", unconditionally ignore a top-level examples subdirectory.
|
|
|
|
# Otherwise, add "examples" to IUSE to toggle adding that subdirectory.
|
|
|
|
: ${KDE_EXAMPLES:=false}
|
|
|
|
|
|
|
|
# @ECLASS-VARIABLE: KDE_HANDBOOK
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# If set to "false", do nothing.
|
|
|
|
# Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and
|
|
|
|
# generate and install KDE handbook.
|
2016-03-13 23:34:16 +03:00
|
|
|
# If set to "optional", config with -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON
|
|
|
|
# when USE=!handbook. In case package requires KF5KDELibs4Support, see next:
|
2015-11-14 01:15:08 +03:00
|
|
|
# If set to "forceoptional", remove a KF5DocTools dependency from the root
|
|
|
|
# CMakeLists.txt in addition to the above.
|
2014-10-15 23:19:12 +04:00
|
|
|
: ${KDE_HANDBOOK:=false}
|
|
|
|
|
2015-08-14 09:38:55 +03:00
|
|
|
# @ECLASS-VARIABLE: KDE_DOC_DIR
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Specifies the location of the KDE handbook if not the default.
|
2015-08-14 09:38:55 +03:00
|
|
|
: ${KDE_DOC_DIR:=doc}
|
|
|
|
|
2018-01-14 23:56:28 +03:00
|
|
|
# @ECLASS-VARIABLE: KDE_PO_DIRS
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# Specifies the possible locations of KDE l10n files if not the default.
|
|
|
|
: ${KDE_PO_DIRS:="po poqm"}
|
|
|
|
|
2017-07-11 09:00:12 +03:00
|
|
|
# @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.
|
2017-10-26 17:28:39 +03:00
|
|
|
if [[ ${CATEGORY} = kde-frameworks ]]; then
|
2017-07-11 09:00:12 +03:00
|
|
|
: ${KDE_QTHELP:=true}
|
|
|
|
fi
|
2017-12-03 14:25:48 +03:00
|
|
|
: ${KDE_QTHELP:=false}
|
2017-07-11 09:00:12 +03:00
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
# @ECLASS-VARIABLE: KDE_TEST
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# If set to "false", do nothing.
|
|
|
|
# For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5.
|
2016-03-13 23:34:16 +03:00
|
|
|
# If set to "optional", configure with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON
|
|
|
|
# when USE=!test.
|
2016-08-31 21:08:58 +03:00
|
|
|
# If set to "forceoptional", remove a Qt5Test dependency and comment test
|
|
|
|
# subdirs from the root CMakeLists.txt in addition to the above.
|
2017-08-18 09:08:14 +03:00
|
|
|
# If set to "forceoptional-recursive", remove Qt5Test dependencies and make
|
2019-01-10 09:00:33 +03:00
|
|
|
# autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt in ${S}
|
2017-08-18 09:08:14 +03:00
|
|
|
# and below conditional on BUILD_TESTING. This is always meant as a short-term
|
|
|
|
# fix and creates ${T}/${P}-tests-optional.patch to refine and submit upstream.
|
2014-10-15 23:19:12 +04:00
|
|
|
if [[ ${CATEGORY} = kde-frameworks ]]; then
|
|
|
|
: ${KDE_TEST:=true}
|
|
|
|
fi
|
2017-12-03 14:25:48 +03:00
|
|
|
: ${KDE_TEST:=false}
|
2014-10-15 23:19:12 +04:00
|
|
|
|
2015-03-19 17:44:35 +03:00
|
|
|
# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# If set to "none", do nothing.
|
|
|
|
# For any other value, add selinux to IUSE, and depending on that useflag
|
2015-05-09 18:55:54 +03:00
|
|
|
# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND.
|
2015-03-19 17:44:35 +03:00
|
|
|
: ${KDE_SELINUX_MODULE:=none}
|
|
|
|
|
2016-11-26 21:55:16 +03:00
|
|
|
# @ECLASS-VARIABLE: KDE_SUBSLOT
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# If set to "false", do nothing.
|
|
|
|
# If set to "true", add a subslot to the package, where subslot is either
|
|
|
|
# defined as major.minor version for kde-*/ categories or ${PV} if other.
|
|
|
|
# For any other value, that value will be used as subslot.
|
|
|
|
: ${KDE_SUBSLOT:=false}
|
|
|
|
|
2016-10-05 23:10:24 +03:00
|
|
|
# @ECLASS-VARIABLE: KDE_UNRELEASED
|
|
|
|
# @INTERNAL
|
|
|
|
# @DESCRIPTION
|
|
|
|
# An array of $CATEGORY-$PV pairs of packages that are unreleased upstream.
|
|
|
|
# Any package matching this will have fetch restriction enabled, and receive
|
|
|
|
# a proper error message via pkg_nofetch.
|
|
|
|
KDE_UNRELEASED=( )
|
|
|
|
|
2019-04-02 12:04:09 +03:00
|
|
|
HOMEPAGE="https://kde.org/"
|
2014-10-15 23:19:12 +04:00
|
|
|
LICENSE="GPL-2"
|
|
|
|
|
2016-11-26 21:55:16 +03:00
|
|
|
SLOT=5
|
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
if [[ ${CATEGORY} = kde-frameworks ]]; then
|
2016-11-26 21:55:16 +03:00
|
|
|
KDE_SUBSLOT=true
|
2014-10-15 23:19:12 +04:00
|
|
|
fi
|
|
|
|
|
2016-11-26 21:55:16 +03:00
|
|
|
case ${KDE_SUBSLOT} in
|
|
|
|
false) ;;
|
|
|
|
true)
|
|
|
|
case ${CATEGORY} in
|
|
|
|
kde-frameworks | \
|
|
|
|
kde-plasma | \
|
|
|
|
kde-apps)
|
2018-05-13 00:11:41 +03:00
|
|
|
SLOT+="/$(ver_cut 1-2)"
|
2015-03-19 17:44:35 +03:00
|
|
|
;;
|
2016-11-26 21:55:16 +03:00
|
|
|
*)
|
|
|
|
SLOT+="/${PV}"
|
2015-03-19 17:44:35 +03:00
|
|
|
;;
|
2016-11-26 21:55:16 +03:00
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
SLOT+="/${KDE_SUBSLOT}"
|
|
|
|
;;
|
|
|
|
esac
|
2016-10-05 23:10:24 +03:00
|
|
|
|
2016-11-26 21:55:16 +03:00
|
|
|
case ${KDE_AUTODEPS} in
|
|
|
|
false) ;;
|
|
|
|
*)
|
2019-02-09 21:57:21 +03:00
|
|
|
BDEPEND+=" $(add_frameworks_dep extra-cmake-modules)"
|
2017-01-17 08:52:50 +03:00
|
|
|
RDEPEND+=" >=kde-frameworks/kf-env-4"
|
2016-03-13 23:34:16 +03:00
|
|
|
COMMONDEPEND+=" $(add_qt_dep qtcore)"
|
2014-10-15 23:19:12 +04:00
|
|
|
|
2017-11-15 01:26:45 +03:00
|
|
|
# all packages need breeze/oxygen icons for basic iconset, bug #564838
|
|
|
|
if [[ ${PN} != breeze-icons && ${PN} != oxygen-icons ]]; then
|
|
|
|
RDEPEND+=" || ( $(add_frameworks_dep breeze-icons) kde-frameworks/oxygen-icons:* )"
|
|
|
|
fi
|
2014-10-15 23:19:12 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2016-06-17 00:35:49 +03:00
|
|
|
case ${KDE_DEBUG} in
|
2014-10-15 23:19:12 +04:00
|
|
|
false) ;;
|
|
|
|
*)
|
2016-06-17 00:35:49 +03:00
|
|
|
IUSE+=" debug"
|
2014-10-15 23:19:12 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2016-06-17 00:35:49 +03:00
|
|
|
case ${KDE_DESIGNERPLUGIN} in
|
|
|
|
false) ;;
|
2014-10-15 23:19:12 +04:00
|
|
|
*)
|
2016-06-17 00:35:49 +03:00
|
|
|
IUSE+=" designer"
|
2019-02-09 21:57:21 +03:00
|
|
|
BDEPEND+=" designer? ( $(add_frameworks_dep kdesignerplugin) )"
|
2014-10-15 23:19:12 +04:00
|
|
|
esac
|
|
|
|
|
|
|
|
case ${KDE_EXAMPLES} in
|
|
|
|
false) ;;
|
|
|
|
*)
|
|
|
|
IUSE+=" examples"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case ${KDE_HANDBOOK} in
|
|
|
|
false) ;;
|
|
|
|
*)
|
|
|
|
IUSE+=" +handbook"
|
2019-02-09 21:57:21 +03:00
|
|
|
BDEPEND+=" handbook? ( $(add_frameworks_dep kdoctools) )"
|
2014-10-15 23:19:12 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2017-07-11 09:00:12 +03:00
|
|
|
case ${KDE_QTHELP} in
|
|
|
|
false) ;;
|
|
|
|
*)
|
|
|
|
IUSE+=" doc"
|
|
|
|
COMMONDEPEND+=" doc? ( $(add_qt_dep qt-docs) )"
|
2019-02-09 21:57:21 +03:00
|
|
|
BDEPEND+=" doc? (
|
2017-07-11 09:00:12 +03:00
|
|
|
$(add_qt_dep qthelp)
|
|
|
|
>=app-doc/doxygen-1.8.13-r1
|
|
|
|
)"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
case ${KDE_TEST} in
|
|
|
|
false) ;;
|
|
|
|
*)
|
|
|
|
IUSE+=" test"
|
2016-03-13 23:34:16 +03:00
|
|
|
DEPEND+=" test? ( $(add_qt_dep qttest) )"
|
2014-10-15 23:19:12 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2015-03-19 17:44:35 +03:00
|
|
|
case ${KDE_SELINUX_MODULE} in
|
|
|
|
none) ;;
|
|
|
|
*)
|
|
|
|
IUSE+=" selinux"
|
2015-05-31 21:21:17 +03:00
|
|
|
RDEPEND+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
|
2015-03-19 17:44:35 +03:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2019-02-09 21:57:21 +03:00
|
|
|
case ${EAPI} in
|
|
|
|
6) DEPEND+=" ${BDEPEND}" ;;
|
|
|
|
esac
|
|
|
|
|
2019-07-05 08:25:16 +03:00
|
|
|
DEPEND+=" ${COMMONDEPEND}"
|
2014-10-15 23:19:12 +04:00
|
|
|
RDEPEND+=" ${COMMONDEPEND}"
|
|
|
|
unset COMMONDEPEND
|
|
|
|
|
|
|
|
if [[ -n ${KMNAME} && ${KMNAME} != ${PN} && ${KDE_BUILD_TYPE} = release ]]; then
|
|
|
|
S=${WORKDIR}/${KMNAME}-${PV}
|
|
|
|
fi
|
|
|
|
|
2016-10-05 23:10:24 +03:00
|
|
|
_kde_is_unreleased() {
|
|
|
|
local pair
|
|
|
|
for pair in "${KDE_UNRELEASED[@]}" ; do
|
|
|
|
if [[ "${pair}" = "${CATEGORY}-${PV}" ]]; then
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
# Determine fetch location for released tarballs
|
|
|
|
_calculate_src_uri() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
|
|
|
local _kmname
|
|
|
|
|
|
|
|
if [[ -n ${KMNAME} ]]; then
|
|
|
|
_kmname=${KMNAME}
|
|
|
|
else
|
|
|
|
_kmname=${PN}
|
|
|
|
fi
|
|
|
|
|
|
|
|
case ${PN} in
|
|
|
|
kdelibs4support | \
|
|
|
|
khtml | \
|
|
|
|
kjs | \
|
|
|
|
kjsembed | \
|
|
|
|
kmediaplayer | \
|
2016-05-16 00:44:35 +03:00
|
|
|
kross)
|
2014-10-15 23:19:12 +04:00
|
|
|
_kmname="portingAids/${_kmname}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case ${CATEGORY} in
|
2015-02-11 08:49:24 +03:00
|
|
|
kde-apps)
|
|
|
|
case ${PV} in
|
|
|
|
??.?.[6-9]? | ??.??.[6-9]? )
|
|
|
|
SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
|
|
|
|
RESTRICT+=" mirror"
|
|
|
|
;;
|
2014-11-13 16:12:49 +03:00
|
|
|
*)
|
2015-02-11 08:49:24 +03:00
|
|
|
SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
|
2014-11-13 16:12:49 +03:00
|
|
|
esac
|
2014-10-15 23:19:12 +04:00
|
|
|
;;
|
2015-02-11 08:49:24 +03:00
|
|
|
kde-frameworks)
|
2017-06-15 13:02:42 +03:00
|
|
|
SRC_URI="mirror://kde/stable/frameworks/${PV%.*}/${_kmname}-${PV}.tar.xz" ;;
|
2015-02-11 08:49:24 +03:00
|
|
|
kde-plasma)
|
2018-05-13 00:11:41 +03:00
|
|
|
local plasmapv=$(ver_cut 1-3)
|
2015-12-16 18:13:01 +03:00
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
case ${PV} in
|
2017-10-26 17:28:39 +03:00
|
|
|
5.?.[6-9]? | 5.??.[6-9]? )
|
2014-10-15 23:19:12 +04:00
|
|
|
# Plasma 5 beta releases
|
2015-12-16 18:13:01 +03:00
|
|
|
SRC_URI="mirror://kde/unstable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz"
|
2014-10-15 23:19:12 +04:00
|
|
|
RESTRICT+=" mirror"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# Plasma 5 stable releases
|
2015-12-16 18:13:01 +03:00
|
|
|
SRC_URI="mirror://kde/stable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz" ;;
|
2014-10-15 23:19:12 +04:00
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
2016-07-14 12:31:48 +03:00
|
|
|
|
2019-04-02 12:04:09 +03:00
|
|
|
if [[ ${PN} = kdevelop* ]]; then
|
2016-08-31 21:08:58 +03:00
|
|
|
case ${PV} in
|
|
|
|
*.*.[6-9]? )
|
2019-04-02 12:04:09 +03:00
|
|
|
SRC_URI="mirror://kde/unstable/kdevelop/${PV}/src/${_kmname}-${PV}.tar.xz"
|
2016-08-31 21:08:58 +03:00
|
|
|
RESTRICT+=" mirror"
|
|
|
|
;;
|
|
|
|
*)
|
2019-04-02 12:04:09 +03:00
|
|
|
SRC_URI="mirror://kde/stable/kdevelop/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
|
2016-08-31 21:08:58 +03:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2016-10-05 23:10:24 +03:00
|
|
|
if _kde_is_unreleased ; then
|
|
|
|
RESTRICT+=" fetch"
|
|
|
|
fi
|
2014-10-15 23:19:12 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# Determine fetch location for live sources
|
|
|
|
_calculate_live_repo() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
|
|
|
SRC_URI=""
|
|
|
|
|
2018-08-16 14:08:53 +03:00
|
|
|
# @ECLASS-VARIABLE: EGIT_MIRROR
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# This variable allows easy overriding of default kde mirror service
|
|
|
|
# (anongit) with anything else you might want to use.
|
|
|
|
EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org}
|
|
|
|
|
|
|
|
local _kmname
|
|
|
|
|
|
|
|
# @ECLASS-VARIABLE: EGIT_REPONAME
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# This variable allows overriding of default repository
|
|
|
|
# name. Specify only if this differ from PN and KMNAME.
|
|
|
|
if [[ -n ${EGIT_REPONAME} ]]; then
|
|
|
|
# the repository and kmname different
|
|
|
|
_kmname=${EGIT_REPONAME}
|
|
|
|
elif [[ -n ${KMNAME} ]]; then
|
|
|
|
_kmname=${KMNAME}
|
|
|
|
else
|
|
|
|
_kmname=${PN}
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then
|
|
|
|
EGIT_BRANCH="Applications/$(ver_cut 1-2)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then
|
|
|
|
EGIT_BRANCH="Plasma/$(ver_cut 1-2)"
|
|
|
|
fi
|
|
|
|
|
2019-03-22 12:12:40 +03:00
|
|
|
if [[ ${PV} != 9999 && ${PN} = kdevelop* ]]; then
|
|
|
|
EGIT_BRANCH="$(ver_cut 1-2)"
|
|
|
|
fi
|
|
|
|
|
2018-08-16 14:08:53 +03:00
|
|
|
EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}"
|
2014-10-15 23:19:12 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
case ${KDE_BUILD_TYPE} in
|
|
|
|
live) _calculate_live_repo ;;
|
2015-05-31 21:21:17 +03:00
|
|
|
*) _calculate_src_uri ;;
|
2014-10-15 23:19:12 +04:00
|
|
|
esac
|
|
|
|
|
|
|
|
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
|
|
|
|
|
|
|
|
# @FUNCTION: kde5_pkg_pretend
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Checks if the active compiler meets the minimum version requirements.
|
|
|
|
# phase function is only exported if KDE_GCC_MINIMAL is defined.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_pkg_pretend() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
2016-04-21 22:42:37 +03:00
|
|
|
_check_gcc_version
|
2014-10-15 23:19:12 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# @FUNCTION: kde5_pkg_setup
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Checks if the active compiler meets the minimum version requirements.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_pkg_setup() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
2016-04-21 22:42:37 +03:00
|
|
|
_check_gcc_version
|
2014-10-15 23:19:12 +04:00
|
|
|
}
|
|
|
|
|
2016-10-05 23:10:24 +03:00
|
|
|
# @FUNCTION: kde5_pkg_nofetch
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Intended for use in the KDE overlay. If this package matches something in
|
|
|
|
# KDE_UNRELEASED, display a giant warning that the package has not yet been
|
|
|
|
# released upstream and should not be used.
|
2016-10-05 23:10:24 +03:00
|
|
|
kde5_pkg_nofetch() {
|
|
|
|
if ! _kde_is_unreleased ; then
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ "
|
|
|
|
eerror "| | | | \ | | _ \| ____| | | ____| / \ / ___|| ____| _ \ "
|
|
|
|
eerror "| | | | \| | |_) | _| | | | _| / _ \ \___ \| _| | | | |"
|
|
|
|
eerror "| |_| | |\ | _ <| |___| |___| |___ / ___ \ ___) | |___| |_| |"
|
|
|
|
eerror " \___/|_| \_|_| \_\_____|_____|_____/_/ \_\____/|_____|____/ "
|
|
|
|
eerror " "
|
|
|
|
eerror " ____ _ ____ _ __ _ ____ _____ "
|
|
|
|
eerror "| _ \ / \ / ___| |/ / / \ / ___| ____|"
|
|
|
|
eerror "| |_) / _ \| | | ' / / _ \| | _| _| "
|
|
|
|
eerror "| __/ ___ \ |___| . \ / ___ \ |_| | |___ "
|
|
|
|
eerror "|_| /_/ \_\____|_|\_\/_/ \_\____|_____|"
|
|
|
|
eerror
|
|
|
|
eerror "${CATEGORY}/${P} has not been released to the public yet"
|
|
|
|
eerror "and is only available to packagers right now."
|
|
|
|
eerror ""
|
|
|
|
eerror "This is not a bug. Please do not file bugs or contact upstream about this."
|
|
|
|
eerror ""
|
|
|
|
eerror "Please consult the upstream release schedule to see when this "
|
|
|
|
eerror "package is scheduled to be released:"
|
|
|
|
eerror "https://community.kde.org/Schedules"
|
|
|
|
}
|
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
# @FUNCTION: kde5_src_unpack
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Unpack the sources, automatically handling both release and live ebuilds.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_src_unpack() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
|
|
|
if [[ ${KDE_BUILD_TYPE} = live ]]; then
|
2018-08-16 14:08:53 +03:00
|
|
|
git-r3_src_unpack
|
2014-10-15 23:19:12 +04:00
|
|
|
else
|
|
|
|
default
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# @FUNCTION: kde5_src_prepare
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Wrapper for cmake-utils_src_prepare with lots of extra logic for magic
|
|
|
|
# handling of linguas, tests, handbook etc.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_src_prepare() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
2016-01-04 23:39:21 +03:00
|
|
|
cmake-utils_src_prepare
|
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
# only build examples when required
|
2018-07-04 08:25:36 +03:00
|
|
|
if ! { in_iuse examples && use examples; } ; then
|
2016-01-27 08:32:01 +03:00
|
|
|
cmake_comment_add_subdirectory examples
|
2014-10-15 23:19:12 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
# only enable handbook when required
|
2018-07-04 08:25:36 +03:00
|
|
|
if in_iuse handbook && ! use handbook ; then
|
2016-01-27 08:32:01 +03:00
|
|
|
cmake_comment_add_subdirectory ${KDE_DOC_DIR}
|
2015-12-09 09:00:38 +03:00
|
|
|
|
|
|
|
if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then
|
|
|
|
punt_bogus_dep KF5 DocTools
|
2017-05-12 10:16:23 +03:00
|
|
|
sed -i -e "/kdoctools_install/ s/^/#DONT/" CMakeLists.txt || die
|
2015-12-09 09:00:38 +03:00
|
|
|
fi
|
2014-10-15 23:19:12 +04:00
|
|
|
fi
|
|
|
|
|
2016-04-23 22:16:46 +03:00
|
|
|
# drop translations when nls is not wanted
|
2017-04-23 15:28:53 +03:00
|
|
|
if in_iuse nls && ! use nls ; then
|
2018-01-14 23:56:28 +03:00
|
|
|
local po
|
|
|
|
for po in ${KDE_PO_DIRS}; do
|
|
|
|
if [[ -d ${po} ]] ; then
|
|
|
|
rm -r ${po} || die
|
|
|
|
fi
|
|
|
|
done
|
2016-04-23 22:16:46 +03:00
|
|
|
fi
|
|
|
|
|
2017-04-23 15:28:53 +03:00
|
|
|
# enable only the requested translations when required
|
2019-07-05 08:25:16 +03:00
|
|
|
# always install unconditionally for kconfigwidgets - if you use language
|
|
|
|
# X as system language, and there is a combobox with language names, the
|
|
|
|
# translated language name for language Y is taken from /usr/share/locale/Y/kf5_entry.desktop
|
|
|
|
if [[ -v LINGUAS && ${PN} != kconfigwidgets ]] ; then
|
2017-04-23 15:28:53 +03:00
|
|
|
local po
|
2018-01-14 23:56:28 +03:00
|
|
|
for po in ${KDE_PO_DIRS}; do
|
2017-04-23 15:28:53 +03:00
|
|
|
if [[ -d ${po} ]] ; then
|
|
|
|
pushd ${po} > /dev/null || die
|
|
|
|
local lang
|
|
|
|
for lang in *; do
|
2017-05-29 09:54:32 +03:00
|
|
|
if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
|
|
|
|
case ${lang} in
|
|
|
|
cmake_modules | \
|
|
|
|
CMakeLists.txt | \
|
|
|
|
${PN}.pot) ;;
|
|
|
|
*) rm -r ${lang} || die ;;
|
|
|
|
esac
|
2017-04-23 15:28:53 +03:00
|
|
|
if [[ -e CMakeLists.txt ]] ; then
|
|
|
|
cmake_comment_add_subdirectory ${lang}
|
|
|
|
sed -e "/add_subdirectory([[:space:]]*${lang}\/.*[[:space:]]*)/d" \
|
|
|
|
-i CMakeLists.txt || die
|
|
|
|
fi
|
2016-04-03 00:47:04 +03:00
|
|
|
fi
|
2017-04-23 15:28:53 +03:00
|
|
|
done
|
|
|
|
popd > /dev/null || die
|
|
|
|
fi
|
2016-04-03 00:47:04 +03:00
|
|
|
done
|
|
|
|
fi
|
2015-04-12 08:43:48 +03:00
|
|
|
|
2016-08-31 21:08:58 +03:00
|
|
|
if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then
|
|
|
|
if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && -v LINGUAS ]] ; then
|
2015-10-26 22:20:41 +03:00
|
|
|
pushd ${KDE_DOC_DIR} > /dev/null || die
|
2016-08-31 21:08:58 +03:00
|
|
|
local lang
|
2015-06-29 10:13:00 +03:00
|
|
|
for lang in *; do
|
2015-04-12 08:43:48 +03:00
|
|
|
if ! has ${lang} ${LINGUAS} ; then
|
2016-01-27 08:32:01 +03:00
|
|
|
cmake_comment_add_subdirectory ${lang}
|
2015-04-12 08:43:48 +03:00
|
|
|
fi
|
|
|
|
done
|
2015-10-26 22:20:41 +03:00
|
|
|
popd > /dev/null || die
|
2015-04-12 08:43:48 +03:00
|
|
|
fi
|
2014-10-15 23:19:12 +04:00
|
|
|
fi
|
|
|
|
|
2015-12-09 09:00:38 +03:00
|
|
|
# only build unit tests when required
|
2018-07-04 08:25:36 +03:00
|
|
|
if ! { in_iuse test && use test; } ; then
|
2015-12-09 09:00:38 +03:00
|
|
|
if [[ ${KDE_TEST} = forceoptional ]] ; then
|
2015-11-14 01:15:08 +03:00
|
|
|
punt_bogus_dep Qt5 Test
|
2015-12-09 09:00:38 +03:00
|
|
|
# if forceoptional, also cover non-kde categories
|
2016-08-31 21:08:58 +03:00
|
|
|
cmake_comment_add_subdirectory autotests test tests
|
|
|
|
elif [[ ${KDE_TEST} = forceoptional-recursive ]] ; then
|
|
|
|
punt_bogus_dep Qt5 Test
|
2017-08-18 09:08:14 +03:00
|
|
|
local f pf="${T}/${P}"-tests-optional.patch
|
|
|
|
touch ${pf} || die "Failed to touch patch file"
|
|
|
|
for f in $(find . -type f -name "CMakeLists.txt" -exec \
|
2019-01-10 09:00:33 +03:00
|
|
|
grep -l "^\s*add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)" {} \;); do
|
2017-08-18 09:08:14 +03:00
|
|
|
cp ${f} ${f}.old || die "Failed to prepare patch origfile"
|
|
|
|
pushd ${f%/*} > /dev/null || die
|
2016-08-31 21:08:58 +03:00
|
|
|
punt_bogus_dep Qt5 Test
|
2017-08-18 09:08:14 +03:00
|
|
|
sed -i CMakeLists.txt -e \
|
2019-01-10 09:00:33 +03:00
|
|
|
"/^#/! s/add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/" \
|
2017-08-18 09:08:14 +03:00
|
|
|
|| die
|
2016-08-31 21:08:58 +03:00
|
|
|
popd > /dev/null || die
|
2017-08-18 09:08:14 +03:00
|
|
|
diff -Naur ${f}.old ${f} 1>>${pf}
|
|
|
|
rm ${f}.old || die "Failed to clean up"
|
2016-08-31 21:08:58 +03:00
|
|
|
done
|
2017-08-18 09:08:14 +03:00
|
|
|
einfo "Build system was modified by KDE_TEST=forceoptional-recursive."
|
|
|
|
einfo "Unified diff file ready for pickup in:"
|
|
|
|
einfo " ${pf}"
|
|
|
|
einfo "Push it upstream to make this message go away."
|
2015-12-09 09:00:38 +03:00
|
|
|
elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then
|
2016-08-31 21:08:58 +03:00
|
|
|
cmake_comment_add_subdirectory autotests test tests
|
2015-11-14 01:15:08 +03:00
|
|
|
fi
|
|
|
|
fi
|
2017-08-18 09:08:14 +03:00
|
|
|
|
|
|
|
# in frameworks, tests = manual tests so never build them
|
|
|
|
if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then
|
|
|
|
cmake_comment_add_subdirectory tests
|
|
|
|
fi
|
2014-10-15 23:19:12 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# @FUNCTION: kde5_src_configure
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Wrapper for cmake-utils_src_configure with extra logic for magic handling of
|
|
|
|
# handbook, tests etc.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_src_configure() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
|
|
|
# we rely on cmake-utils.eclass to append -DNDEBUG too
|
2018-07-04 08:25:36 +03:00
|
|
|
if in_iuse debug && ! use debug; then
|
2014-10-15 23:19:12 +04:00
|
|
|
append-cppflags -DQT_NO_DEBUG
|
|
|
|
fi
|
|
|
|
|
|
|
|
local cmakeargs
|
|
|
|
|
2017-10-26 17:28:39 +03:00
|
|
|
if in_iuse test && ! use test ; then
|
2014-10-15 23:19:12 +04:00
|
|
|
cmakeargs+=( -DBUILD_TESTING=OFF )
|
2016-03-13 23:34:16 +03:00
|
|
|
|
|
|
|
if [[ ${KDE_TEST} = optional ]] ; then
|
|
|
|
cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON )
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2018-07-04 08:25:36 +03:00
|
|
|
if in_iuse handbook && ! use handbook && [[ ${KDE_HANDBOOK} = optional ]] ; then
|
2016-03-13 23:34:16 +03:00
|
|
|
cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON )
|
2014-10-15 23:19:12 +04:00
|
|
|
fi
|
|
|
|
|
2018-07-04 08:25:36 +03:00
|
|
|
if in_iuse designer && ! use designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then
|
2018-04-20 18:03:56 +03:00
|
|
|
cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DesignerPlugin=ON )
|
2016-06-17 00:35:49 +03:00
|
|
|
fi
|
|
|
|
|
2017-07-11 09:00:12 +03:00
|
|
|
if [[ ${KDE_QTHELP} != false ]]; then
|
|
|
|
cmakeargs+=( -DBUILD_QCH=$(usex doc) )
|
|
|
|
fi
|
|
|
|
|
2018-07-16 16:46:09 +03:00
|
|
|
if [[ ${ECM_KDEINSTALLDIRS} != false ]] ; then
|
|
|
|
cmakeargs+=(
|
|
|
|
# install mkspecs in the same directory as qt stuff
|
|
|
|
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
|
|
|
)
|
2019-02-09 21:57:21 +03:00
|
|
|
# move handbook outside of doc dir for at least two QA warnings, bug 667138
|
|
|
|
[[ ${EAPI} != 6 ]] && cmakeargs+=( -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help" )
|
2018-07-16 16:46:09 +03:00
|
|
|
fi
|
2014-10-15 23:19:12 +04:00
|
|
|
|
|
|
|
# allow the ebuild to override what we set here
|
|
|
|
mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
|
|
|
|
|
|
|
|
cmake-utils_src_configure
|
|
|
|
}
|
|
|
|
|
|
|
|
# @FUNCTION: kde5_src_compile
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Wrapper for cmake-utils_src_compile. Currently doesn't do anything extra, but
|
|
|
|
# is included as part of the API just in case it's needed in the future.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_src_compile() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
|
|
|
cmake-utils_src_compile "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
# @FUNCTION: kde5_src_test
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Wrapper for cmake-utils_src_test with extra logic for magic handling of dbus
|
|
|
|
# and virtualx.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_src_test() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
|
|
|
_test_runner() {
|
|
|
|
if [[ -n "${VIRTUALDBUS_TEST}" ]]; then
|
|
|
|
export $(dbus-launch)
|
|
|
|
fi
|
|
|
|
|
|
|
|
cmake-utils_src_test
|
2015-04-12 08:43:48 +03:00
|
|
|
}
|
2014-10-15 23:19:12 +04:00
|
|
|
|
|
|
|
# When run as normal user during ebuild development with the ebuild command, the
|
|
|
|
# kde tests tend to access the session DBUS. This however is not possible in a real
|
|
|
|
# emerge or on the tinderbox.
|
|
|
|
# > make sure it does not happen, so bad tests can be recognized and disabled
|
|
|
|
unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
|
|
|
|
|
|
|
|
if [[ ${VIRTUALX_REQUIRED} = always || ${VIRTUALX_REQUIRED} = test ]]; then
|
2016-01-27 08:32:01 +03:00
|
|
|
virtx _test_runner
|
2014-10-15 23:19:12 +04:00
|
|
|
else
|
|
|
|
_test_runner
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -n "${DBUS_SESSION_BUS_PID}" ]] ; then
|
|
|
|
kill ${DBUS_SESSION_BUS_PID}
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# @FUNCTION: kde5_src_install
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Wrapper for cmake-utils_src_install with extra logic to avoid compressing
|
|
|
|
# certain types of files. For example, khelpcenter is not able to read
|
|
|
|
# compressed handbooks.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_src_install() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
|
|
|
cmake-utils_src_install
|
2015-08-04 08:59:06 +03:00
|
|
|
|
2017-07-11 09:00:12 +03:00
|
|
|
# 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)
|
2019-03-22 12:12:40 +03:00
|
|
|
if [[ ${pv} = 5.11* ]]; then
|
|
|
|
#todo: clean up trailing slash check when EAPI <7 is removed
|
|
|
|
if [[ -d ${ED%/}/usr/share/doc/qt-${pv} ]]; then
|
|
|
|
docompress -x /usr/share/doc/qt-${pv}
|
|
|
|
fi
|
2017-07-11 09:00:12 +03:00
|
|
|
fi
|
|
|
|
|
2019-02-09 21:57:21 +03:00
|
|
|
if [[ ${EAPI} = 6 ]]; then
|
|
|
|
# We don't want /usr/share/doc/HTML to be compressed,
|
|
|
|
# because then khelpcenter can't find the docs
|
|
|
|
#todo: clean up trailing slash check when EAPI <7 is removed
|
|
|
|
if [[ -d ${ED%/}/usr/share/doc/HTML ]]; then
|
|
|
|
docompress -x /usr/share/doc/HTML
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2014-10-15 23:19:12 +04:00
|
|
|
# @FUNCTION: kde5_pkg_preinst
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Sets up environment variables required in kde5_pkg_postinst.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_pkg_preinst() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
2019-02-15 12:22:50 +03:00
|
|
|
xdg_pkg_preinst
|
2014-10-15 23:19:12 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# @FUNCTION: kde5_pkg_postinst
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Updates the various XDG caches (icon, desktop, mime) if necessary.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_pkg_postinst() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
2019-02-15 12:22:50 +03:00
|
|
|
xdg_pkg_postinst
|
2016-10-05 23:10:24 +03:00
|
|
|
|
|
|
|
if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
|
|
|
|
if [[ ${KDE_BUILD_TYPE} = live ]]; then
|
|
|
|
echo
|
|
|
|
einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}"
|
|
|
|
einfo "Use it at your own risk."
|
|
|
|
einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
|
|
|
|
fi
|
|
|
|
fi
|
2014-10-15 23:19:12 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# @FUNCTION: kde5_pkg_postrm
|
|
|
|
# @DESCRIPTION:
|
2017-10-26 17:28:39 +03:00
|
|
|
# Updates the various XDG caches (icon, desktop, mime) if necessary.
|
2014-10-15 23:19:12 +04:00
|
|
|
kde5_pkg_postrm() {
|
|
|
|
debug-print-function ${FUNCNAME} "$@"
|
|
|
|
|
2019-02-15 12:22:50 +03:00
|
|
|
xdg_pkg_postrm
|
2014-10-15 23:19:12 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
fi
|