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

Diff of /eclass/eutils.eclass

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

Revision 1.334 Revision 1.340
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.334 2010/02/26 03:15:26 abcd Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.340 2010/03/07 03:00:08 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 [[ $(type -t eqawarn) == function ]] && \
58 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"
59} 58}
60 59
61epause() { 60epause() {
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" 61 ewarn "QA Notice: epause is not defined in EAPI=${EAPI}, please file a bug at http://bugs.gentoo.org"
64} 62}
65 63
66fi 64fi
67 65
68# @FUNCTION: ecvs_clean 66# @FUNCTION: ecvs_clean
884 local catmin=${CATEGORY##*-} 882 local catmin=${CATEGORY##*-}
885 case ${catmaj} in 883 case ${catmaj} in
886 app) 884 app)
887 case ${catmin} in 885 case ${catmin} in
888 accessibility) type=Accessibility;; 886 accessibility) type=Accessibility;;
889 admin) type=System;; 887 admin) type=System;;
890 antivirus) type=System;; 888 antivirus) type=System;;
891 arch) type=Archiving;; 889 arch) type=Archiving;;
892 backup) type=Archiving;; 890 backup) type=Archiving;;
893 cdr) type=DiscBurning;; 891 cdr) type=DiscBurning;;
894 dicts) type=Dictionary;; 892 dicts) type=Dictionary;;
895 doc) type=Documentation;; 893 doc) type=Documentation;;
896 editors) type=TextEditor;; 894 editors) type=TextEditor;;
897 emacs) type=TextEditor;; 895 emacs) type=TextEditor;;
898 emulation) type=Emulator;; 896 emulation) type=Emulator;;
899 laptop) type=HardwareSettings;; 897 laptop) type=HardwareSettings;;
900 office) type=Office;; 898 office) type=Office;;
901 pda) type=PDA;; 899 pda) type=PDA;;
902 vim) type=TextEditor;; 900 vim) type=TextEditor;;
903 xemacs) type=TextEditor;; 901 xemacs) type=TextEditor;;
904 *) type=;;
905 esac 902 esac
906 ;; 903 ;;
907 904
908 dev) 905 dev)
909 type="Development" 906 type="Development"
910 ;; 907 ;;
911 908
912 games) 909 games)
913 case ${catmin} in 910 case ${catmin} in
914 action|fps) type=ActionGame;; 911 action|fps) type=ActionGame;;
915 arcade) type=ArcadeGame;; 912 arcade) type=ArcadeGame;;
916 board) type=BoardGame;; 913 board) type=BoardGame;;
917 emulation) type=Emulator;; 914 emulation) type=Emulator;;
918 kids) type=KidsGame;; 915 kids) type=KidsGame;;
919 puzzle) type=LogicGame;; 916 puzzle) type=LogicGame;;
920 roguelike) type=RolePlaying;; 917 roguelike) type=RolePlaying;;
921 rpg) type=RolePlaying;; 918 rpg) type=RolePlaying;;
922 simulation) type=Simulation;; 919 simulation) type=Simulation;;
923 sports) type=SportsGame;; 920 sports) type=SportsGame;;
924 strategy) type=StrategyGame;; 921 strategy) type=StrategyGame;;
925 *) type=;;
926 esac 922 esac
927 type="Game;${type}" 923 type="Game;${type}"
928 ;; 924 ;;
929 925
930 gnome) 926 gnome)
939 type="Network;Email" 935 type="Network;Email"
940 ;; 936 ;;
941 937
942 media) 938 media)
943 case ${catmin} in 939 case ${catmin} in
940 gfx)
944 gfx) type=Graphics;; 941 type=Graphics
942 ;;
943 *)
944 case ${catmin} in
945 radio) type=Tuner;; 945 radio) type=Tuner;;
946 sound) type=Audio;; 946 sound) type=Audio;;
947 tv) type=TV;; 947 tv) type=TV;;
948 video) type=Video;; 948 video) type=Video;;
949 *) type=;; 949 esac
950 type="AudioVideo;${type}"
951 ;;
950 esac 952 esac
951 type="AudioVideo;${type}"
952 ;; 953 ;;
953 954
954 net) 955 net)
955 case ${catmin} in 956 case ${catmin} in
956 dialup) type=Dialup;; 957 dialup) type=Dialup;;
957 ftp) type=FileTransfer;; 958 ftp) type=FileTransfer;;
958 im) type=InstantMessaging;; 959 im) type=InstantMessaging;;
959 irc) type=IRCClient;; 960 irc) type=IRCClient;;
960 mail) type=Email;; 961 mail) type=Email;;
961 news) type=News;; 962 news) type=News;;
962 nntp) type=News;; 963 nntp) type=News;;
963 p2p) type=FileTransfer;; 964 p2p) type=FileTransfer;;
964 voip) type=Telephony;; 965 voip) type=Telephony;;
965 *) type=;;
966 esac 966 esac
967 type="Network;${type}" 967 type="Network;${type}"
968 ;; 968 ;;
969 969
970 sci) 970 sci)
971 case ${catmin} in 971 case ${catmin} in
972 astro*) type=Astronomy;; 972 astro*) type=Astronomy;;
973 bio*) type=Biology;; 973 bio*) type=Biology;;
974 calc*) type=Calculator;; 974 calc*) type=Calculator;;
975 chem*) type=Chemistry;; 975 chem*) type=Chemistry;;
976 elec*) type=Electronics;; 976 elec*) type=Electronics;;
977 geo*) type=Geology;; 977 geo*) type=Geology;;
978 math*) type=Math;; 978 math*) type=Math;;
979 physics) type=Physics;; 979 physics) type=Physics;;
980 visual*) type=DataVisualization;; 980 visual*) type=DataVisualization;;
981 *) type=;;
982 esac 981 esac
983 type="Education;Science;${type}" 982 type="Education;Science;${type}"
984 ;; 983 ;;
985 984
986 sys) 985 sys)
988 ;; 987 ;;
989 988
990 www) 989 www)
991 case ${catmin} in 990 case ${catmin} in
992 client) type=WebBrowser;; 991 client) type=WebBrowser;;
993 *) type=;;
994 esac 992 esac
995 type="Network;${type}" 993 type="Network;${type}"
996 ;; 994 ;;
997 995
998 *) 996 *)
1010 1008
1011 # Don't append another ";" when a valid category value is provided. 1009 # Don't append another ";" when a valid category value is provided.
1012 type=${type%;}${type:+;} 1010 type=${type%;}${type:+;}
1013 1011
1014 eshopts_push -s extglob 1012 eshopts_push -s extglob
1015 if [[ -n ${icon} && ${icon} != /* && ${icon} == *.@(xpm|png|svg) ]]; then 1013 if [[ -n ${icon} && ${icon} != /* ]] && [[ ${icon} == *.xpm || ${icon} == *.png || ${icon} == *.svg ]]; then
1016 ewarn "As described in the Icon Theme Specification, icon file extensions are not" 1014 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." 1015 ewarn "allowed in .desktop files if the value is not an absolute path."
1018 icon=${icon%.@(xpm|png|svg)} 1016 icon=${icon%.@(xpm|png|svg)}
1019 fi 1017 fi
1020 eshopts_pop 1018 eshopts_pop
1035 ( 1033 (
1036 # wrap the env here so that the 'insinto' call 1034 # wrap the env here so that the 'insinto' call
1037 # doesn't corrupt the env of the caller 1035 # doesn't corrupt the env of the caller
1038 insinto /usr/share/applications 1036 insinto /usr/share/applications
1039 doins "${desktop}" 1037 doins "${desktop}"
1040 ) 1038 ) || die "installing desktop file failed"
1041} 1039}
1042 1040
1043# @FUNCTION: validate_desktop_entries 1041# @FUNCTION: validate_desktop_entries
1044# @USAGE: [directories] 1042# @USAGE: [directories]
1045# @MAINTAINER: 1043# @MAINTAINER:

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

  ViewVC Help
Powered by ViewVC 1.1.20