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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Fri Jan 4 12:06:28 2002 UTC (12 years, 8 months ago) by danarmak
Branch: MAIN
Changes since 1.8: +1 -2 lines
merged virtual.eclass -> inherit.eclass. added || die to inherit(). added cvs snapshot support to
kde.eclass (runs make -f admin/Makefile.common where appropriate). misc small fixes.

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

  ViewVC Help
Powered by ViewVC 1.1.20