diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-20 14:00:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-20 14:00:29 +0100 |
commit | 40a480a83a10d1718e26a6f4fc54d271c1f13a95 (patch) | |
tree | bfe08ce789f69c5862fd8e5d1bc17b22f9f21b86 /eclass | |
parent | 2eda3a3b8ebdb3fc8552feb6f49e466d3bc8e88c (diff) |
gentoo auto-resync : 20:10:2022 - 14:00:29
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 37652 -> 37656 bytes | |||
-rw-r--r-- | eclass/desktop.eclass | 23 |
2 files changed, 14 insertions, 9 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 798399dbc0fe..056b5dc3cfbb 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/desktop.eclass b/eclass/desktop.eclass index de912bb80932..aa1b9ac68d85 100644 --- a/eclass/desktop.eclass +++ b/eclass/desktop.eclass @@ -1,11 +1,17 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: desktop.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 6 7 8 # @BLURB: support for desktop files, menus, and icons +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_DESKTOP_ECLASS} ]]; then _DESKTOP_ECLASS=1 @@ -156,19 +162,18 @@ make_desktop_entry() { ;; esac fi - local slot=${SLOT%/*} - if [[ ${slot} == "0" ]] ; then - local desktop_name="${PN}" - else - local desktop_name="${PN}-${slot}" - fi + local desktop_exec="${exec%%[[:space:]]*}" desktop_exec="${desktop_exec##*/}" + local desktop_suffix="-${PN}" + [[ ${SLOT%/*} != 0 ]] && desktop_suffix+="-${SLOT%/*}" + # Replace foo-foo.desktop by foo.desktop + [[ ${desktop_suffix#-} == "${desktop_exec}" ]] && desktop_suffix="" # Prevent collisions if a file with the same name already exists #771708 - local desktop="${desktop_exec}-${desktop_name}" count=0 + local desktop="${desktop_exec}${desktop_suffix}" count=0 while [[ -e ${ED}/usr/share/applications/${desktop}.desktop ]]; do - desktop="${desktop_exec}-$((++count))-${desktop_name}" + desktop="${desktop_exec}-$((++count))${desktop_suffix}" done desktop="${T}/${desktop}.desktop" |