/[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.334
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.334 2010/02/26 03:15:26 abcd 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 [[ $(type -t eqawarn) == function ]] && \
57 eqawarn "QA Notice: ebeep is not defined in EAPI=3, please file a bug at http://bugs.gentoo.org" 58 eqawarn "QA Notice: ebeep is not defined in EAPI=3, please file a bug at http://bugs.gentoo.org"
58} 59}
59 60
60epause() { 61epause() {
62 [[ $(type -t eqawarn) == function ]] && \
61 eqawarn "QA Notice: epause is not defined in EAPI=3, please file a bug at http://bugs.gentoo.org" 63 eqawarn "QA Notice: epause is not defined in EAPI=3, please file a bug at http://bugs.gentoo.org"
62} 64}
63 65
64fi 66fi
65 67
66# @FUNCTION: ecvs_clean 68# @FUNCTION: ecvs_clean
957 irc) type=IRCClient;; 959 irc) type=IRCClient;;
958 mail) type=Email;; 960 mail) type=Email;;
959 news) type=News;; 961 news) type=News;;
960 nntp) type=News;; 962 nntp) type=News;;
961 p2p) type=FileTransfer;; 963 p2p) type=FileTransfer;;
964 voip) type=Telephony;;
962 *) type=;; 965 *) type=;;
963 esac 966 esac
964 type="Network;${type}" 967 type="Network;${type}"
965 ;; 968 ;;
966 969
975 math*) type=Math;; 978 math*) type=Math;;
976 physics) type=Physics;; 979 physics) type=Physics;;
977 visual*) type=DataVisualization;; 980 visual*) type=DataVisualization;;
978 *) type=;; 981 *) type=;;
979 esac 982 esac
980 type="Science;${type}" 983 type="Education;Science;${type}"
981 ;; 984 ;;
982 985
983 sys) 986 sys)
984 type="System" 987 type="System"
985 ;; 988 ;;
987 www) 990 www)
988 case ${catmin} in 991 case ${catmin} in
989 client) type=WebBrowser;; 992 client) type=WebBrowser;;
990 *) type=;; 993 *) type=;;
991 esac 994 esac
992 type="Network" 995 type="Network;${type}"
993 ;; 996 ;;
994 997
995 *) 998 *)
996 type= 999 type=
997 ;; 1000 ;;
1002 else 1005 else
1003 local desktop_name="${PN}-${SLOT}" 1006 local desktop_name="${PN}-${SLOT}"
1004 fi 1007 fi
1005 local desktop="${T}/$(echo ${exec} | sed 's:[[:space:]/:]:_:g')-${desktop_name}.desktop" 1008 local desktop="${T}/$(echo ${exec} | sed 's:[[:space:]/:]:_:g')-${desktop_name}.desktop"
1006 #local desktop=${T}/${exec%% *:-${desktop_name}}.desktop 1009 #local desktop=${T}/${exec%% *:-${desktop_name}}.desktop
1010
1011 # Don't append another ";" when a valid category value is provided.
1012 type=${type%;}${type:+;}
1013
1014 eshopts_push -s extglob
1015 if [[ -n ${icon} && ${icon} != /* && ${icon} == *.@(xpm|png|svg) ]]; then
1016 ewarn "As described in the Icon Theme Specification, icon file extensions are not"
1017 ewarn "allowed in .desktop files if the value is not an absolute path."
1018 icon=${icon%.@(xpm|png|svg)}
1019 fi
1020 eshopts_pop
1007 1021
1008 cat <<-EOF > "${desktop}" 1022 cat <<-EOF > "${desktop}"
1009 [Desktop Entry] 1023 [Desktop Entry]
1010 Name=${name} 1024 Name=${name}
1011 Type=Application 1025 Type=Application
1012 Comment=${DESCRIPTION} 1026 Comment=${DESCRIPTION}
1013 Exec=${exec} 1027 Exec=${exec}
1014 TryExec=${exec%% *} 1028 TryExec=${exec%% *}
1015 Icon=${icon} 1029 Icon=${icon}
1016 Categories=${type}; 1030 Categories=${type}
1017 EOF 1031 EOF
1018 1032
1019 [[ ${path} ]] && echo "Path=${path}" >> "${desktop}" 1033 [[ ${path} ]] && echo "Path=${path}" >> "${desktop}"
1020 1034
1021 ( 1035 (

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

  ViewVC Help
Powered by ViewVC 1.1.20