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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.31 - (show annotations) (download)
Wed Sep 12 20:05:33 2007 UTC (7 years, 2 months ago) by betelgeuse
Branch: MAIN
Changes since 1.30: +2 -3 lines
Remove setting S to default and add a comment to note that danarmak is retired.

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

  ViewVC Help
Powered by ViewVC 1.1.20