# @ECLASS: kde5.eclass
# @MAINTAINER:
# kde@gentoo.org
+# @SUPPORTED_EAPIS: 7
# @BLURB: Support eclass for packages that follow KDE packaging conventions.
# @DESCRIPTION:
# This eclass is intended to streamline the creation of ebuilds for packages
inherit cmake-utils flag-o-matic kde5-functions virtualx xdg
-case ${EAPI} in
- 6) inherit eapi7-ver eutils gnome2-utils ;;
-esac
-
if [[ ${KDE_BUILD_TYPE} = live ]]; then
inherit git-r3
fi
# be set depending on the value of CATEGORY.
: ${KDE_AUTODEPS:=true}
-# @ECLASS-VARIABLE: KDE_BLOCK_SLOT4
-# @DESCRIPTION:
-# 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
-: ${KDE_BLOCK_SLOT4:=true}
-
# @ECLASS-VARIABLE: KDE_DEBUG
# @DESCRIPTION:
# If set to "false", add -DNDEBUG (via cmake-utils_src_configure) and -DQT_NO_DEBUG
# a proper error message via pkg_nofetch.
KDE_UNRELEASED=( )
-if [[ ${KDEBASE} = kdevelop ]]; then
- HOMEPAGE="https://www.kdevelop.org/"
-else
- HOMEPAGE="https://kde.org/"
-fi
-
+HOMEPAGE="https://kde.org/"
LICENSE="GPL-2"
SLOT=5
false) ;;
*)
IUSE+=" designer"
- BDEPEND+=" designer? ( $(add_frameworks_dep kdesignerplugin) )"
+ if [[ ${CATEGORY} = kde-apps && ${PV} = 19.0[48]* ]]; then
+ BDEPEND+=" designer? ( $(add_frameworks_dep kdesignerplugin) )"
+ else
+ BDEPEND+=" designer? ( $(add_qt_dep designer) )"
+ fi
esac
case ${KDE_EXAMPLES} in
;;
esac
-case ${EAPI} in
- 6) DEPEND+=" ${BDEPEND}" ;;
-esac
-
-DEPEND+=" ${COMMONDEPEND} dev-util/desktop-file-utils"
+DEPEND+=" ${COMMONDEPEND}"
RDEPEND+=" ${COMMONDEPEND}"
unset COMMONDEPEND
S=${WORKDIR}/${KMNAME}-${PV}
fi
-if [[ -n ${KDEBASE} && ${KDEBASE} = kdevelop && ${KDE_BUILD_TYPE} = release ]]; then
- if [[ -n ${KMNAME} ]]; then
- S=${WORKDIR}/${KMNAME}-${PV}
- else
- S=${WORKDIR}/${P}
- fi
-fi
-
_kde_is_unreleased() {
local pair
for pair in "${KDE_UNRELEASED[@]}" ; do
case ${PN} in
kdelibs4support | \
+ kdewebkit | \
khtml | \
kjs | \
kjsembed | \
kross)
_kmname="portingAids/${_kmname}"
;;
+ kdesignerplugin)
+ [[ ${PV} = 5.6[01].* ]] || _kmname="portingAids/${_kmname}"
+ ;;
esac
- DEPEND+=" app-arch/xz-utils"
-
case ${CATEGORY} in
kde-apps)
case ${PV} in
;;
esac
- if [[ -z ${SRC_URI} && -n ${KDEBASE} ]] ; then
- local _kdebase
- case ${PN} in
- kdevelop-pg-qt)
- _kdebase=${PN} ;;
- *)
- _kdebase=${KDEBASE} ;;
- esac
+ if [[ ${PN} = kdevelop* ]]; then
case ${PV} in
*.*.[6-9]? )
- SRC_URI="mirror://kde/unstable/${_kdebase}/${PV}/src/${_kmname}-${PV}.tar.xz"
+ SRC_URI="mirror://kde/unstable/kdevelop/${PV}/src/${_kmname}-${PV}.tar.xz"
RESTRICT+=" mirror"
;;
*)
- SRC_URI="mirror://kde/stable/${_kdebase}/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
+ SRC_URI="mirror://kde/stable/kdevelop/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
esac
- unset _kdebase
fi
if _kde_is_unreleased ; then
fi
# enable only the requested translations when required
- if [[ -v LINGUAS ]] ; then
+ # 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
local po
for po in ${KDE_PO_DIRS}; do
if [[ -d ${po} ]] ; then
cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON )
fi
- if in_iuse designer && ! use designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then
- cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DesignerPlugin=ON )
+ if in_iuse designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then
+ if [[ ${CATEGORY} = kde-frameworks ]]; then
+ cmakeargs+=( -DBUILD_DESIGNERPLUGIN=$(usex designer) )
+ else
+ cmakeargs+=( $(cmake-utils_use_find_package designer KF5DesignerPlugin) )
+ fi
fi
if [[ ${KDE_QTHELP} != false ]]; then
cmakeargs+=(
# install mkspecs in the same directory as qt stuff
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
+ # move handbook outside of doc dir, bug 667138
+ -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help"
)
- # move handbook outside of doc dir for at least two QA warnings, bug 667138
- [[ ${EAPI} != 6 ]] && cmakeargs+=( -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help" )
fi
# allow the ebuild to override what we set here
# @FUNCTION: kde5_src_install
# @DESCRIPTION:
-# 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.
+# Wrapper for cmake-utils_src_install. Currently doesn't do anything extra.
kde5_src_install() {
debug-print-function ${FUNCNAME} "$@"
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 [[ ${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
- fi
-
- 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
}
# @FUNCTION: kde5_pkg_preinst