eclass/desktop: Sync with Gentoo

It's from Gentoo commit e79856a80194b9d4228208b8fc7cf88e6ae8c620.
This commit is contained in:
Flatcar Buildbot 2024-10-21 07:06:16 +00:00
parent 24e7126fd9
commit aa9a23e984

View File

@ -4,21 +4,17 @@
# @ECLASS: desktop.eclass # @ECLASS: desktop.eclass
# @MAINTAINER: # @MAINTAINER:
# base-system@gentoo.org # base-system@gentoo.org
# @SUPPORTED_EAPIS: 6 7 8 # @SUPPORTED_EAPIS: 7 8
# @BLURB: support for desktop files, menus, and icons # @BLURB: support for desktop files, menus, and icons
case ${EAPI} in
6)
ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_DESKTOP_ECLASS} ]]; then if [[ -z ${_DESKTOP_ECLASS} ]]; then
_DESKTOP_ECLASS=1 _DESKTOP_ECLASS=1
case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# @FUNCTION: make_desktop_entry # @FUNCTION: make_desktop_entry
# @USAGE: <command> [name] [icon] [type] [fields] # @USAGE: <command> [name] [icon] [type] [fields]
# @DESCRIPTION: # @DESCRIPTION:
@ -216,7 +212,7 @@ make_desktop_entry() {
insopts -m 0644 insopts -m 0644
insinto /usr/share/applications insinto /usr/share/applications
doins "${desktop}" doins "${desktop}"
) || die "installing desktop file failed" )
} }
# @FUNCTION: make_session_desktop # @FUNCTION: make_session_desktop
@ -357,7 +353,7 @@ _iconins() {
if [[ ${funcname} == newicon ]] ; then if [[ ${funcname} == newicon ]] ; then
newins "$@" newins "$@"
fi fi
) || die )
} }
# @FUNCTION: doicon # @FUNCTION: doicon