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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Sat Dec 22 14:52:29 2001 UTC (12 years, 3 months ago) by danarmak
Branch: MAIN
Changes since 1.7: +4 -4 lines
I've modified all functions to use the bash builtin variable $FUNCNAME when calling debug-print-function

1 danarmak 1.1 # Copyright 1999-2000 Gentoo Technologies, Inc.
2     # Distributed under the terms of the GNU General Public License, v2 or later
3     # Author Dan Armak <danarmak@gentoo.org>
4 danarmak 1.8 # $Header: /home/cvsroot/gentoo-x86/eclass/base.eclass,v 1.7 2001/11/16 12:50:41 danarmak Exp $
5 danarmak 1.1 # The base eclass defines some default functions and variables. Nearly everything
6     # else inherits from here.
7     inherit virtual || die
8     ECLASS=base
9    
10     S=${WORKDIR}/${P}
11     DESCRIPTION="Based on the $ECLASS eclass"
12    
13     base_src_unpack() {
14 danarmak 1.6
15 danarmak 1.8 debug-print-function $FUNCNAME $*
16 danarmak 1.6 [ -z "$1" ] && base_src_unpack all
17    
18     while [ "$1" ]; do
19    
20 danarmak 1.1 case $1 in
21 danarmak 1.6 unpack)
22     debug-print-section unpack
23     unpack ${A}
24     ;;
25 danarmak 1.5 patch)
26 danarmak 1.6 debug-print-section patch
27     cd ${S}
28     patch -p0 < ${FILESDIR}/${P}-gentoo.diff
29     ;;
30 danarmak 1.1 all)
31 danarmak 1.6 debug-print-section all
32     base_src_unpack unpack
33     ;;
34     esac
35    
36     shift
37     done
38 danarmak 1.1
39     }
40    
41     base_src_compile() {
42 danarmak 1.4
43 danarmak 1.8 debug-print-function $FUNCNAME $*
44 danarmak 1.4 [ -z "$1" ] && base_src_compile all
45 danarmak 1.6
46 danarmak 1.1 while [ "$1" ]; do
47 danarmak 1.6
48 danarmak 1.1 case $1 in
49     configure)
50 danarmak 1.6 debug-print-section configure
51 danarmak 1.4 ./configure || die
52 danarmak 1.1 ;;
53     make)
54 danarmak 1.6 debug-print-section make
55 danarmak 1.1 make || die
56     ;;
57     all)
58 danarmak 1.6 debug-print-section all
59 danarmak 1.1 base_src_compile configure make
60     ;;
61     esac
62    
63     shift
64     done
65    
66     }
67    
68     base_src_install() {
69    
70 danarmak 1.8 debug-print-function $FUNCNAME $*
71 danarmak 1.6 [ -z "$1" ] && base_src_install all
72    
73     while [ "$1" ]; do
74 danarmak 1.4
75 danarmak 1.1 case $1 in
76 danarmak 1.6 make)
77     debug-print-section make
78     make DESTDIR=${D} install || die
79     ;;
80 danarmak 1.1 all)
81 danarmak 1.6 debug-prnit-section all
82     base_src_install make
83     ;;
84 danarmak 1.1 esac
85 danarmak 1.6
86     shift
87     done
88    
89 danarmak 1.1 }
90    
91 danarmak 1.4 EXPORT_FUNCTIONS src_unpack src_compile src_install
92 danarmak 1.7
93     # misc helper functions
94     # adds all parameters to DEPEND and RDEPEND
95     newdepend() {
96    
97     debug-print-function newdepend $*
98     debug-print "newdepend: DEPEND=$DEPEND RDEPEND=$RDEPEND"
99    
100     while [ -n "$1" ]; do
101     DEPEND="$DEPEND $1"
102     RDEPEND="$RDEPEND $1"
103     shift
104     done
105    
106     }

  ViewVC Help
Powered by ViewVC 1.1.20