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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Wed Mar 27 22:33:53 2002 UTC (12 years, 6 months ago) by danarmak
Branch: MAIN
Changes since 1.11: +9 -4 lines
big commit that makes eclasses work wth both old portages (1.8.8, rc6 profile) and the new ones
(>=1.8.9_pre32, 1.0 profile). the latter have some parts of the eclasses in ebuild.sh. Now i ahve a
unified code base and commit changes easily.

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

  ViewVC Help
Powered by ViewVC 1.1.20