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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.26 - (hide annotations) (download)
Wed Jul 6 20:23:20 2005 UTC (9 years, 2 months ago) by agriffis
Branch: MAIN
Changes since 1.25: +1 -2 lines
Remove ECLASS= and INHERITED= which haven't been necessary for a long time now

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

  ViewVC Help
Powered by ViewVC 1.1.20