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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.22 - (hide annotations) (download)
Fri Feb 28 09:15:04 2003 UTC (11 years, 1 month ago) by vapier
Branch: MAIN
Changes since 1.21: +2 -2 lines
unfix earlier fixes

1 vapier 1.20 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 vapier 1.18 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.22 # $Header: /home/cvsroot/gentoo-x86/eclass/base.eclass,v 1.21 2003/02/18 09:00:45 carpaski 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 ECLASS=base
11 danarmak 1.16 INHERITED="$INHERITED $ECLASS"
12 danarmak 1.1 S=${WORKDIR}/${P}
13 vapier 1.22 DESCRIPTION="Based on the $ECLASS eclass"
14 danarmak 1.1
15     base_src_unpack() {
16 danarmak 1.6
17 danarmak 1.8 debug-print-function $FUNCNAME $*
18 danarmak 1.6 [ -z "$1" ] && base_src_unpack all
19    
20 danarmak 1.12 cd ${WORKDIR}
21    
22 danarmak 1.6 while [ "$1" ]; do
23    
24 danarmak 1.1 case $1 in
25 danarmak 1.17 unpack)
26 danarmak 1.6 debug-print-section unpack
27     unpack ${A}
28     ;;
29 danarmak 1.17 patch)
30 danarmak 1.6 debug-print-section patch
31     cd ${S}
32     patch -p0 < ${FILESDIR}/${P}-gentoo.diff
33     ;;
34 danarmak 1.17 autopatch)
35 danarmak 1.15 debug-print-section autopatch
36     debug-print "$FUNCNAME: autopatch: PATCHES=$PATCHES"
37     cd ${S}
38     for x in $PATCHES; do
39 danarmak 1.17 debug-print "$FUNCNAME: autopatch: patching from ${x}"
40     patch -p0 < ${x}
41 danarmak 1.15 done
42     ;;
43 danarmak 1.19 all)
44 danarmak 1.6 debug-print-section all
45 danarmak 1.15 base_src_unpack unpack autopatch
46 danarmak 1.6 ;;
47 danarmak 1.17 esac
48 danarmak 1.6
49     shift
50     done
51 danarmak 1.1
52     }
53    
54     base_src_compile() {
55 danarmak 1.4
56 danarmak 1.17 debug-print-function $FUNCNAME $*
57     [ -z "$1" ] && base_src_compile all
58 danarmak 1.6
59 danarmak 1.17 cd ${S}
60 danarmak 1.12
61 danarmak 1.17 while [ "$1" ]; do
62 danarmak 1.6
63 danarmak 1.1 case $1 in
64 danarmak 1.17 configure)
65 danarmak 1.6 debug-print-section configure
66 danarmak 1.13 econf || die "died running econf, $FUNCNAME:configure"
67 danarmak 1.1 ;;
68 danarmak 1.17 make)
69 danarmak 1.6 debug-print-section make
70 danarmak 1.13 emake || die "died running emake, $FUNCNAME:make"
71 danarmak 1.1 ;;
72 danarmak 1.17 all)
73 danarmak 1.6 debug-print-section all
74 danarmak 1.1 base_src_compile configure make
75     ;;
76     esac
77    
78 danarmak 1.17 shift
79     done
80 danarmak 1.1
81     }
82    
83     base_src_install() {
84    
85 danarmak 1.8 debug-print-function $FUNCNAME $*
86 danarmak 1.6 [ -z "$1" ] && base_src_install all
87    
88 danarmak 1.12 cd ${S}
89    
90 danarmak 1.6 while [ "$1" ]; do
91 danarmak 1.4
92 danarmak 1.1 case $1 in
93 danarmak 1.17 make)
94 danarmak 1.6 debug-print-section make
95 danarmak 1.11 make DESTDIR=${D} install || die "died running make install, $FUNCNAME:make"
96 danarmak 1.6 ;;
97 danarmak 1.17 all)
98 danarmak 1.11 debug-print-section all
99 danarmak 1.6 base_src_install make
100     ;;
101 danarmak 1.1 esac
102 danarmak 1.6
103     shift
104     done
105    
106 danarmak 1.1 }
107    
108 danarmak 1.4 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20