/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.332 Revision 1.337
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.332 2010/02/17 02:22:43 reavertm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.337 2010/03/02 00:52:26 reavertm Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
52} 52}
53 53
54else 54else
55 55
56ebeep() { 56ebeep() {
57 eqawarn "QA Notice: ebeep is not defined in EAPI=3, please file a bug at http://bugs.gentoo.org" 57 ewarn "QA Notice: ebeep is not defined in EAPI=${EAPI}, please file a bug at http://bugs.gentoo.org"
58} 58}
59 59
60epause() { 60epause() {
61 eqawarn "QA Notice: epause is not defined in EAPI=3, please file a bug at http://bugs.gentoo.org" 61 ewarn "QA Notice: epause is not defined in EAPI=${EAPI}, please file a bug at http://bugs.gentoo.org"
62} 62}
63 63
64fi 64fi
65 65
66# @FUNCTION: ecvs_clean 66# @FUNCTION: ecvs_clean
957 irc) type=IRCClient;; 957 irc) type=IRCClient;;
958 mail) type=Email;; 958 mail) type=Email;;
959 news) type=News;; 959 news) type=News;;
960 nntp) type=News;; 960 nntp) type=News;;
961 p2p) type=FileTransfer;; 961 p2p) type=FileTransfer;;
962 voip) type=Telephony;;
962 *) type=;; 963 *) type=;;
963 esac 964 esac
964 type="Network;${type}" 965 type="Network;${type}"
965 ;; 966 ;;
966 967
975 math*) type=Math;; 976 math*) type=Math;;
976 physics) type=Physics;; 977 physics) type=Physics;;
977 visual*) type=DataVisualization;; 978 visual*) type=DataVisualization;;
978 *) type=;; 979 *) type=;;
979 esac 980 esac
980 type="Science;${type}" 981 type="Education;Science;${type}"
981 ;; 982 ;;
982 983
983 sys) 984 sys)
984 type="System" 985 type="System"
985 ;; 986 ;;
987 www) 988 www)
988 case ${catmin} in 989 case ${catmin} in
989 client) type=WebBrowser;; 990 client) type=WebBrowser;;
990 *) type=;; 991 *) type=;;
991 esac 992 esac
992 type="Network" 993 type="Network;${type}"
993 ;; 994 ;;
994 995
995 *) 996 *)
996 type= 997 type=
997 ;; 998 ;;
1002 else 1003 else
1003 local desktop_name="${PN}-${SLOT}" 1004 local desktop_name="${PN}-${SLOT}"
1004 fi 1005 fi
1005 local desktop="${T}/$(echo ${exec} | sed 's:[[:space:]/:]:_:g')-${desktop_name}.desktop" 1006 local desktop="${T}/$(echo ${exec} | sed 's:[[:space:]/:]:_:g')-${desktop_name}.desktop"
1006 #local desktop=${T}/${exec%% *:-${desktop_name}}.desktop 1007 #local desktop=${T}/${exec%% *:-${desktop_name}}.desktop
1008
1009 # Don't append another ";" when a valid category value is provided.
1010 type=${type%;}${type:+;}
1011
1012 eshopts_push -s extglob
1013 if [[ -n ${icon} && ${icon} != /* ]] && [[ ${icon} == *.xpm || ${icon} == *.png || ${icon} == *.svg ]]; then
1014 ewarn "As described in the Icon Theme Specification, icon file extensions are not"
1015 ewarn "allowed in .desktop files if the value is not an absolute path."
1016 icon=${icon%.@(xpm|png|svg)}
1017 fi
1018 eshopts_pop
1007 1019
1008 cat <<-EOF > "${desktop}" 1020 cat <<-EOF > "${desktop}"
1009 [Desktop Entry] 1021 [Desktop Entry]
1010 Name=${name} 1022 Name=${name}
1011 Type=Application 1023 Type=Application
1012 Comment=${DESCRIPTION} 1024 Comment=${DESCRIPTION}
1013 Exec=${exec} 1025 Exec=${exec}
1014 TryExec=${exec%% *} 1026 TryExec=${exec%% *}
1015 Icon=${icon} 1027 Icon=${icon}
1016 Categories=${type}; 1028 Categories=${type}
1017 EOF 1029 EOF
1018 1030
1019 [[ ${path} ]] && echo "Path=${path}" >> "${desktop}" 1031 [[ ${path} ]] && echo "Path=${path}" >> "${desktop}"
1020 1032
1021 ( 1033 (

Legend:
Removed from v.1.332  
changed lines
  Added in v.1.337

  ViewVC Help
Powered by ViewVC 1.1.20