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

Diff of /eclass/eutils.eclass

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

Revision 1.330 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.330 2010/02/15 02:10:39 vapier 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
47 sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null 47 sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null
48 echo -ne "\a" 48 echo -ne "\a"
49 sleep 1 49 sleep 1
50 done 50 done
51 fi 51 fi
52}
53
54else
55
56ebeep() {
57 [[ $(type -t eqawarn) == function ]] && \
58 eqawarn "QA Notice: ebeep is not defined in EAPI=3, please file a bug at http://bugs.gentoo.org"
59}
60
61epause() {
62 [[ $(type -t eqawarn) == function ]] && \
63 eqawarn "QA Notice: epause is not defined in EAPI=3, please file a bug at http://bugs.gentoo.org"
52} 64}
53 65
54fi 66fi
55 67
56# @FUNCTION: ecvs_clean 68# @FUNCTION: ecvs_clean
947 irc) type=IRCClient;; 959 irc) type=IRCClient;;
948 mail) type=Email;; 960 mail) type=Email;;
949 news) type=News;; 961 news) type=News;;
950 nntp) type=News;; 962 nntp) type=News;;
951 p2p) type=FileTransfer;; 963 p2p) type=FileTransfer;;
964 voip) type=Telephony;;
952 *) type=;; 965 *) type=;;
953 esac 966 esac
954 type="Network;${type}" 967 type="Network;${type}"
955 ;; 968 ;;
956 969
965 math*) type=Math;; 978 math*) type=Math;;
966 physics) type=Physics;; 979 physics) type=Physics;;
967 visual*) type=DataVisualization;; 980 visual*) type=DataVisualization;;
968 *) type=;; 981 *) type=;;
969 esac 982 esac
970 type="Science;${type}" 983 type="Education;Science;${type}"
971 ;; 984 ;;
972 985
973 sys) 986 sys)
974 type="System" 987 type="System"
975 ;; 988 ;;
977 www) 990 www)
978 case ${catmin} in 991 case ${catmin} in
979 client) type=WebBrowser;; 992 client) type=WebBrowser;;
980 *) type=;; 993 *) type=;;
981 esac 994 esac
982 type="Network" 995 type="Network;${type}"
983 ;; 996 ;;
984 997
985 *) 998 *)
986 type= 999 type=
987 ;; 1000 ;;
992 else 1005 else
993 local desktop_name="${PN}-${SLOT}" 1006 local desktop_name="${PN}-${SLOT}"
994 fi 1007 fi
995 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"
996 #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
997 1021
998 cat <<-EOF > "${desktop}" 1022 cat <<-EOF > "${desktop}"
999 [Desktop Entry] 1023 [Desktop Entry]
1000 Name=${name} 1024 Name=${name}
1001 Type=Application 1025 Type=Application
1002 Comment=${DESCRIPTION} 1026 Comment=${DESCRIPTION}
1003 Exec=${exec} 1027 Exec=${exec}
1004 TryExec=${exec%% *} 1028 TryExec=${exec%% *}
1005 Icon=${icon} 1029 Icon=${icon}
1006 Categories=${type}; 1030 Categories=${type}
1007 EOF 1031 EOF
1008 1032
1009 [[ ${path} ]] && echo "Path=${path}" >> "${desktop}" 1033 [[ ${path} ]] && echo "Path=${path}" >> "${desktop}"
1010 1034
1011 ( 1035 (

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

  ViewVC Help
Powered by ViewVC 1.1.20