From 40a480a83a10d1718e26a6f4fc54d271c1f13a95 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 20 Oct 2022 14:00:29 +0100 Subject: gentoo auto-resync : 20:10:2022 - 14:00:29 --- eclass/Manifest.gz | Bin 37652 -> 37656 bytes eclass/desktop.eclass | 23 ++++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index 798399dbc0fe..056b5dc3cfbb 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ 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" -- cgit v1.2.3