kde5.eclass: Limit use of gnome2-utils to EAPI-6
authorAndreas Sturmlechner <asturm@gentoo.org>
Thu, 13 Sep 2018 01:21:35 +0000 (03:21 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Thu, 7 Feb 2019 12:59:56 +0000 (13:59 +0100)
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
eclass/kde5.eclass

index 50fc23401b69496712a5dbf0cb91571d6007f4a2..68bf7b6201b995a3938e6114190543989fcedcc0 100644 (file)
@@ -31,10 +31,10 @@ _KDE5_ECLASS=1
 # for tests you should proceed with setting VIRTUALX_REQUIRED=test.
 : ${VIRTUALX_REQUIRED:=manual}
 
-inherit cmake-utils flag-o-matic gnome2-utils kde5-functions virtualx xdg
+inherit cmake-utils flag-o-matic kde5-functions virtualx xdg
 
 case ${EAPI} in
-       6) inherit eapi7-ver eutils ;;
+       6) inherit eapi7-ver eutils gnome2-utils ;;
 esac
 
 if [[ ${KDE_BUILD_TYPE} = live ]]; then
@@ -717,7 +717,7 @@ kde5_src_install() {
 kde5_pkg_preinst() {
        debug-print-function ${FUNCNAME} "$@"
 
-       gnome2_icon_savelist
+       [[ ${EAPI} == 6 ]] && gnome2_icon_savelist
        xdg_pkg_preinst
 }
 
@@ -727,7 +727,7 @@ kde5_pkg_preinst() {
 kde5_pkg_postinst() {
        debug-print-function ${FUNCNAME} "$@"
 
-       if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+       if [[ ${EAPI} == 6 && -n ${GNOME2_ECLASS_ICONS} ]]; then
                gnome2_icon_cache_update
        fi
        xdg_pkg_postinst
@@ -748,7 +748,7 @@ kde5_pkg_postinst() {
 kde5_pkg_postrm() {
        debug-print-function ${FUNCNAME} "$@"
 
-       if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+       if [[ ${EAPI} == 6 && -n ${GNOME2_ECLASS_ICONS} ]]; then
                gnome2_icon_cache_update
        fi
        xdg_pkg_postrm