| 1 | # Copyright 1999-2005 Gentoo Foundation |
1 | # Copyright 1999-2005 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.191 2005/07/13 19:15:05 eradicator Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.192 2005/07/15 22:16:49 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Martin Schlemmer <azarah@gentoo.org> |
5 | # Author: Martin Schlemmer <azarah@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # This eclass is for general purpose functions that most ebuilds |
7 | # This eclass is for general purpose functions that most ebuilds |
| 8 | # have to implement themselves. |
8 | # have to implement themselves. |
| … | |
… | |
| 728 | # name: the name that will show up in the menu |
728 | # name: the name that will show up in the menu |
| 729 | # icon: give your little like a pretty little icon ... |
729 | # icon: give your little like a pretty little icon ... |
| 730 | # this can be relative (to /usr/share/pixmaps) or |
730 | # this can be relative (to /usr/share/pixmaps) or |
| 731 | # a full path to an icon |
731 | # a full path to an icon |
| 732 | # type: what kind of application is this ? for categories: |
732 | # type: what kind of application is this ? for categories: |
| 733 | # http://www.freedesktop.org/wiki/Standards_2fmenu_2dspec |
733 | # http://www.freedesktop.org/Standards/desktop-entry-spec |
| 734 | # path: if your app needs to startup in a specific dir |
734 | # path: if your app needs to startup in a specific dir |
| 735 | make_desktop_entry() { |
735 | make_desktop_entry() { |
| 736 | [[ -z $1 ]] && eerror "make_desktop_entry: You must specify the executable" && return 1 |
736 | [[ -z $1 ]] && eerror "make_desktop_entry: You must specify the executable" && return 1 |
| 737 | |
737 | |
| 738 | local exec=${1} |
738 | local exec=${1} |
| … | |
… | |
| 764 | dev) |
764 | dev) |
| 765 | type="Development" |
765 | type="Development" |
| 766 | ;; |
766 | ;; |
| 767 | |
767 | |
| 768 | games) |
768 | games) |
| 769 | [[ -z ${path} ]] && path=${GAMES_BINDIR} |
|
|
| 770 | |
|
|
| 771 | case ${catmin} in |
769 | case ${catmin} in |
| 772 | action) type=ActionGame;; |
770 | action) type=ActionGame;; |
| 773 | arcade) type=ArcadeGame;; |
771 | arcade) type=ArcadeGame;; |
| 774 | board) type=BoardGame;; |
772 | board) type=BoardGame;; |
| 775 | kid) type=KidsGame;; |
773 | kid) type=KidsGame;; |
| … | |
… | |
| 1327 | # displayed and we'll hang out here until: |
1325 | # displayed and we'll hang out here until: |
| 1328 | # (1) the file is found on a mounted cdrom |
1326 | # (1) the file is found on a mounted cdrom |
| 1329 | # (2) the user hits CTRL+C |
1327 | # (2) the user hits CTRL+C |
| 1330 | cdrom_locate_file_on_cd() { |
1328 | cdrom_locate_file_on_cd() { |
| 1331 | while [[ -z ${CDROM_ROOT} ]] ; do |
1329 | while [[ -z ${CDROM_ROOT} ]] ; do |
| 1332 | local dir="$(dirname ${@})" |
1330 | local dir=$(dirname "$*") |
| 1333 | local file="$(basename ${@})" |
1331 | local file=$(basename "$*") |
| 1334 | local mline="" |
1332 | local mline="" |
| 1335 | local showedmsg=0 |
1333 | local showedmsg=0 |
| 1336 | |
1334 | |
| 1337 | for mline in $(mount | egrep -e '(iso|cdrom)' | awk '{print $3}') ; do |
1335 | for mline in $(mount | egrep -e '(iso|cdrom)' | awk '{print $3}') ; do |
| 1338 | [[ -d ${mline}/${dir} ]] || continue |
1336 | [[ -d ${mline}/${dir} ]] || continue |