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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show 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 # 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 # $Header: /home/cvsroot/gentoo-x86/eclass/base.eclass,v 1.8 2001/12/22 14:52:29 danarmak Exp $
5 # 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
14 debug-print-function $FUNCNAME $*
15 [ -z "$1" ] && base_src_unpack all
16
17 while [ "$1" ]; do
18
19 case $1 in
20 unpack)
21 debug-print-section unpack
22 unpack ${A}
23 ;;
24 patch)
25 debug-print-section patch
26 cd ${S}
27 patch -p0 < ${FILESDIR}/${P}-gentoo.diff
28 ;;
29 all)
30 debug-print-section all
31 base_src_unpack unpack
32 ;;
33 esac
34
35 shift
36 done
37
38 }
39
40 base_src_compile() {
41
42 debug-print-function $FUNCNAME $*
43 [ -z "$1" ] && base_src_compile all
44
45 while [ "$1" ]; do
46
47 case $1 in
48 configure)
49 debug-print-section configure
50 ./configure || die
51 ;;
52 make)
53 debug-print-section make
54 make || die
55 ;;
56 all)
57 debug-print-section all
58 base_src_compile configure make
59 ;;
60 esac
61
62 shift
63 done
64
65 }
66
67 base_src_install() {
68
69 debug-print-function $FUNCNAME $*
70 [ -z "$1" ] && base_src_install all
71
72 while [ "$1" ]; do
73
74 case $1 in
75 make)
76 debug-print-section make
77 make DESTDIR=${D} install || die
78 ;;
79 all)
80 debug-prnit-section all
81 base_src_install make
82 ;;
83 esac
84
85 shift
86 done
87
88 }
89
90 EXPORT_FUNCTIONS src_unpack src_compile src_install
91
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