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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.32 - (hide annotations) (download)
Tue Feb 12 23:51:51 2008 UTC (6 years, 9 months ago) by betelgeuse
Branch: MAIN
Changes since 1.31: +8 -8 lines
Quote variables

1 vapier 1.24 # Copyright 1999-2004 Gentoo Foundation
2 vapier 1.18 # Distributed under the terms of the GNU General Public License v2
3 betelgeuse 1.32 # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.31 2007/09/12 20:05:33 betelgeuse Exp $
4 vapier 1.20 #
5 betelgeuse 1.31 # Author Dan Armak <danarmak@gentoo.org> (nowadays retired)
6 vapier 1.20 #
7 danarmak 1.1 # The base eclass defines some default functions and variables. Nearly everything
8     # else inherits from here.
9 vapier 1.18
10 flameeyes 1.29 inherit eutils
11    
12 vapier 1.22 DESCRIPTION="Based on the $ECLASS eclass"
13 danarmak 1.1
14     base_src_unpack() {
15 danarmak 1.6
16 danarmak 1.8 debug-print-function $FUNCNAME $*
17 danarmak 1.6 [ -z "$1" ] && base_src_unpack all
18    
19 betelgeuse 1.32 cd "${WORKDIR}"
20 danarmak 1.12
21 danarmak 1.6 while [ "$1" ]; do
22    
23 danarmak 1.1 case $1 in
24 danarmak 1.17 unpack)
25 danarmak 1.6 debug-print-section unpack
26     unpack ${A}
27     ;;
28 danarmak 1.17 patch)
29 danarmak 1.6 debug-print-section patch
30 betelgeuse 1.32 cd "${S}"
31     epatch "${FILESDIR}/${P}-gentoo.diff"
32 danarmak 1.6 ;;
33 danarmak 1.17 autopatch)
34 danarmak 1.15 debug-print-section autopatch
35 danarmak 1.23 debug-print "$FUNCNAME: autopatch: PATCHES=$PATCHES, PATCHES1=$PATCHES1"
36 betelgeuse 1.32 cd "${S}"
37 flameeyes 1.28 for x in $PATCHES $PATCHES1; do
38 danarmak 1.17 debug-print "$FUNCNAME: autopatch: patching from ${x}"
39 flameeyes 1.28 epatch ${x}
40 danarmak 1.15 done
41     ;;
42 george 1.30 all)
43 danarmak 1.6 debug-print-section all
44 danarmak 1.15 base_src_unpack unpack autopatch
45 danarmak 1.6 ;;
46 danarmak 1.17 esac
47 danarmak 1.6
48     shift
49     done
50 swegener 1.27
51 danarmak 1.1 }
52    
53     base_src_compile() {
54 danarmak 1.4
55 danarmak 1.17 debug-print-function $FUNCNAME $*
56     [ -z "$1" ] && base_src_compile all
57 danarmak 1.6
58 betelgeuse 1.32 cd "${S}"
59 danarmak 1.12
60 danarmak 1.17 while [ "$1" ]; do
61 danarmak 1.6
62 danarmak 1.1 case $1 in
63 danarmak 1.17 configure)
64 george 1.30 debug-print-section configure
65     econf || die "died running econf, $FUNCNAME:configure"
66     ;;
67 danarmak 1.17 make)
68 george 1.30 debug-print-section make
69     emake || die "died running emake, $FUNCNAME:make"
70     ;;
71 danarmak 1.17 all)
72 george 1.30 debug-print-section all
73     base_src_compile configure make
74     ;;
75 danarmak 1.1 esac
76 swegener 1.27
77 danarmak 1.17 shift
78     done
79 swegener 1.27
80 danarmak 1.1 }
81    
82     base_src_install() {
83    
84 danarmak 1.8 debug-print-function $FUNCNAME $*
85 danarmak 1.6 [ -z "$1" ] && base_src_install all
86    
87 betelgeuse 1.32 cd "${S}"
88 danarmak 1.12
89 danarmak 1.6 while [ "$1" ]; do
90 danarmak 1.4
91 danarmak 1.1 case $1 in
92 danarmak 1.17 make)
93 danarmak 1.6 debug-print-section make
94 betelgeuse 1.32 make DESTDIR="${D}" install || die "died running make install, $FUNCNAME:make"
95 danarmak 1.6 ;;
96 danarmak 1.17 all)
97 danarmak 1.11 debug-print-section all
98 danarmak 1.6 base_src_install make
99     ;;
100 danarmak 1.1 esac
101 danarmak 1.6
102     shift
103     done
104    
105 danarmak 1.1 }
106    
107 danarmak 1.4 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20