/[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.338
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.338 2010/03/07 02:52:25 vapier 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
882 local catmin=${CATEGORY##*-} 882 local catmin=${CATEGORY##*-}
883 case ${catmaj} in 883 case ${catmaj} in
884 app) 884 app)
885 case ${catmin} in 885 case ${catmin} in
886 accessibility) type=Accessibility;; 886 accessibility) type=Accessibility;;
887 admin) type=System;; 887 admin) type=System;;
888 antivirus) type=System;; 888 antivirus) type=System;;
889 arch) type=Archiving;; 889 arch) type=Archiving;;
890 backup) type=Archiving;; 890 backup) type=Archiving;;
891 cdr) type=DiscBurning;; 891 cdr) type=DiscBurning;;
892 dicts) type=Dictionary;; 892 dicts) type=Dictionary;;
893 doc) type=Documentation;; 893 doc) type=Documentation;;
894 editors) type=TextEditor;; 894 editors) type=TextEditor;;
895 emacs) type=TextEditor;; 895 emacs) type=TextEditor;;
896 emulation) type=Emulator;; 896 emulation) type=Emulator;;
897 laptop) type=HardwareSettings;; 897 laptop) type=HardwareSettings;;
898 office) type=Office;; 898 office) type=Office;;
899 pda) type=PDA;; 899 pda) type=PDA;;
900 vim) type=TextEditor;; 900 vim) type=TextEditor;;
901 xemacs) type=TextEditor;; 901 xemacs) type=TextEditor;;
902 *) type=;;
903 esac 902 esac
904 ;; 903 ;;
905 904
906 dev) 905 dev)
907 type="Development" 906 type="Development"
908 ;; 907 ;;
909 908
910 games) 909 games)
911 case ${catmin} in 910 case ${catmin} in
912 action|fps) type=ActionGame;; 911 action|fps) type=ActionGame;;
913 arcade) type=ArcadeGame;; 912 arcade) type=ArcadeGame;;
914 board) type=BoardGame;; 913 board) type=BoardGame;;
915 emulation) type=Emulator;; 914 emulation) type=Emulator;;
916 kids) type=KidsGame;; 915 kids) type=KidsGame;;
917 puzzle) type=LogicGame;; 916 puzzle) type=LogicGame;;
918 roguelike) type=RolePlaying;; 917 roguelike) type=RolePlaying;;
919 rpg) type=RolePlaying;; 918 rpg) type=RolePlaying;;
920 simulation) type=Simulation;; 919 simulation) type=Simulation;;
921 sports) type=SportsGame;; 920 sports) type=SportsGame;;
922 strategy) type=StrategyGame;; 921 strategy) type=StrategyGame;;
923 *) type=;;
924 esac 922 esac
925 type="Game;${type}" 923 type="Game;${type}"
926 ;; 924 ;;
927 925
928 gnome) 926 gnome)
940 media) 938 media)
941 case ${catmin} in 939 case ${catmin} in
942 gfx) type=Graphics;; 940 gfx) type=Graphics;;
943 radio) type=Tuner;; 941 radio) type=Tuner;;
944 sound) type=Audio;; 942 sound) type=Audio;;
945 tv) type=TV;; 943 tv) type=TV;;
946 video) type=Video;; 944 video) type=Video;;
947 *) type=;;
948 esac 945 esac
949 type="AudioVideo;${type}" 946 type="AudioVideo;${type}"
950 ;; 947 ;;
951 948
952 net) 949 net)
953 case ${catmin} in 950 case ${catmin} in
954 dialup) type=Dialup;; 951 dialup) type=Dialup;;
955 ftp) type=FileTransfer;; 952 ftp) type=FileTransfer;;
956 im) type=InstantMessaging;; 953 im) type=InstantMessaging;;
957 irc) type=IRCClient;; 954 irc) type=IRCClient;;
958 mail) type=Email;; 955 mail) type=Email;;
959 news) type=News;; 956 news) type=News;;
960 nntp) type=News;; 957 nntp) type=News;;
961 p2p) type=FileTransfer;; 958 p2p) type=FileTransfer;;
962 *) type=;; 959 voip) type=Telephony;;
963 esac 960 esac
964 type="Network;${type}" 961 type="Network;${type}"
965 ;; 962 ;;
966 963
967 sci) 964 sci)
968 case ${catmin} in 965 case ${catmin} in
969 astro*) type=Astronomy;; 966 astro*) type=Astronomy;;
970 bio*) type=Biology;; 967 bio*) type=Biology;;
971 calc*) type=Calculator;; 968 calc*) type=Calculator;;
972 chem*) type=Chemistry;; 969 chem*) type=Chemistry;;
973 elec*) type=Electronics;; 970 elec*) type=Electronics;;
974 geo*) type=Geology;; 971 geo*) type=Geology;;
975 math*) type=Math;; 972 math*) type=Math;;
976 physics) type=Physics;; 973 physics) type=Physics;;
977 visual*) type=DataVisualization;; 974 visual*) type=DataVisualization;;
978 *) type=;;
979 esac 975 esac
980 type="Science;${type}" 976 type="Education;Science;${type}"
981 ;; 977 ;;
982 978
983 sys) 979 sys)
984 type="System" 980 type="System"
985 ;; 981 ;;
986 982
987 www) 983 www)
988 case ${catmin} in 984 case ${catmin} in
989 client) type=WebBrowser;; 985 client) type=WebBrowser;;
990 *) type=;;
991 esac 986 esac
992 type="Network" 987 type="Network;${type}"
993 ;; 988 ;;
994 989
995 *) 990 *)
996 type= 991 type=
997 ;; 992 ;;
1002 else 997 else
1003 local desktop_name="${PN}-${SLOT}" 998 local desktop_name="${PN}-${SLOT}"
1004 fi 999 fi
1005 local desktop="${T}/$(echo ${exec} | sed 's:[[:space:]/:]:_:g')-${desktop_name}.desktop" 1000 local desktop="${T}/$(echo ${exec} | sed 's:[[:space:]/:]:_:g')-${desktop_name}.desktop"
1006 #local desktop=${T}/${exec%% *:-${desktop_name}}.desktop 1001 #local desktop=${T}/${exec%% *:-${desktop_name}}.desktop
1002
1003 # Don't append another ";" when a valid category value is provided.
1004 type=${type%;}${type:+;}
1005
1006 eshopts_push -s extglob
1007 if [[ -n ${icon} && ${icon} != /* ]] && [[ ${icon} == *.xpm || ${icon} == *.png || ${icon} == *.svg ]]; then
1008 ewarn "As described in the Icon Theme Specification, icon file extensions are not"
1009 ewarn "allowed in .desktop files if the value is not an absolute path."
1010 icon=${icon%.@(xpm|png|svg)}
1011 fi
1012 eshopts_pop
1007 1013
1008 cat <<-EOF > "${desktop}" 1014 cat <<-EOF > "${desktop}"
1009 [Desktop Entry] 1015 [Desktop Entry]
1010 Name=${name} 1016 Name=${name}
1011 Type=Application 1017 Type=Application
1012 Comment=${DESCRIPTION} 1018 Comment=${DESCRIPTION}
1013 Exec=${exec} 1019 Exec=${exec}
1014 TryExec=${exec%% *} 1020 TryExec=${exec%% *}
1015 Icon=${icon} 1021 Icon=${icon}
1016 Categories=${type}; 1022 Categories=${type}
1017 EOF 1023 EOF
1018 1024
1019 [[ ${path} ]] && echo "Path=${path}" >> "${desktop}" 1025 [[ ${path} ]] && echo "Path=${path}" >> "${desktop}"
1020 1026
1021 ( 1027 (

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

  ViewVC Help
Powered by ViewVC 1.1.20