summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJonathan Callen <abcd@gentoo.org>2010-02-26 05:33:57 +0000
committerJonathan Callen <abcd@gentoo.org>2010-02-26 05:33:57 +0000
commitc44ffc14289289c1777514c7bd40c3ac973c5167 (patch)
tree985306a9b95e4ece408ff0973e504ddf065960a3 /eclass
parentVersion bump (fixes #285220, #270941). Removed old ebuild. (diff)
downloadgentoo-2-c44ffc14289289c1777514c7bd40c3ac973c5167.tar.gz
gentoo-2-c44ffc14289289c1777514c7bd40c3ac973c5167.tar.bz2
gentoo-2-c44ffc14289289c1777514c7bd40c3ac973c5167.zip
Reapply patch, this time with workaround for an apparent bug in bash 3.2 and 4.0
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eutils.eclass20
1 files changed, 16 insertions, 4 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 8fc52129f8da..a9515725748d 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.335 2010/02/26 05:17:24 halcy0n Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.336 2010/02/26 05:33:57 abcd Exp $
# @ECLASS: eutils.eclass
# @MAINTAINER:
@@ -961,6 +961,7 @@ make_desktop_entry() {
news) type=News;;
nntp) type=News;;
p2p) type=FileTransfer;;
+ voip) type=Telephony;;
*) type=;;
esac
type="Network;${type}"
@@ -979,7 +980,7 @@ make_desktop_entry() {
visual*) type=DataVisualization;;
*) type=;;
esac
- type="Science;${type}"
+ type="Education;Science;${type}"
;;
sys)
@@ -991,7 +992,7 @@ make_desktop_entry() {
client) type=WebBrowser;;
*) type=;;
esac
- type="Network"
+ type="Network;${type}"
;;
*)
@@ -1007,6 +1008,17 @@ make_desktop_entry() {
local desktop="${T}/$(echo ${exec} | sed 's:[[:space:]/:]:_:g')-${desktop_name}.desktop"
#local desktop=${T}/${exec%% *:-${desktop_name}}.desktop
+ # Don't append another ";" when a valid category value is provided.
+ type=${type%;}${type:+;}
+
+ eshopts_push -s extglob
+ if [[ -n ${icon} && ${icon} != /* ]] && [[ ${icon} == *.xpm || ${icon} == *.png || ${icon} == *.svg ]]; then
+ ewarn "As described in the Icon Theme Specification, icon file extensions are not"
+ ewarn "allowed in .desktop files if the value is not an absolute path."
+ icon=${icon%.@(xpm|png|svg)}
+ fi
+ eshopts_pop
+
cat <<-EOF > "${desktop}"
[Desktop Entry]
Name=${name}
@@ -1015,7 +1027,7 @@ make_desktop_entry() {
Exec=${exec}
TryExec=${exec%% *}
Icon=${icon}
- Categories=${type};
+ Categories=${type}
EOF
[[ ${path} ]] && echo "Path=${path}" >> "${desktop}"