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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.28 - (hide annotations) (download)
Wed Sep 7 10:40:28 2005 UTC (9 years ago) by flameeyes
Branch: MAIN
Changes since 1.27: +4 -8 lines
Use epatch instead of patch, as discussed on gentoo-dev.

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 flameeyes 1.28 # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.27 2005/07/11 15:08:06 swegener 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 flameeyes 1.28 epatch ${FILESDIR}/${P}-gentoo.diff
31 danarmak 1.6 ;;
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 flameeyes 1.28 for x in $PATCHES $PATCHES1; do
37 danarmak 1.17 debug-print "$FUNCNAME: autopatch: patching from ${x}"
38 flameeyes 1.28 epatch ${x}
39 danarmak 1.15 done
40     ;;
41 danarmak 1.19 all)
42 danarmak 1.6 debug-print-section all
43 danarmak 1.15 base_src_unpack unpack autopatch
44 danarmak 1.6 ;;
45 danarmak 1.17 esac
46 danarmak 1.6
47     shift
48     done
49 swegener 1.27
50 danarmak 1.1 }
51    
52     base_src_compile() {
53 danarmak 1.4
54 danarmak 1.17 debug-print-function $FUNCNAME $*
55     [ -z "$1" ] && base_src_compile all
56 danarmak 1.6
57 danarmak 1.17 cd ${S}
58 danarmak 1.12
59 danarmak 1.17 while [ "$1" ]; do
60 danarmak 1.6
61 danarmak 1.1 case $1 in
62 danarmak 1.17 configure)
63 danarmak 1.6 debug-print-section configure
64 danarmak 1.13 econf || die "died running econf, $FUNCNAME:configure"
65 danarmak 1.1 ;;
66 danarmak 1.17 make)
67 danarmak 1.6 debug-print-section make
68 danarmak 1.13 emake || die "died running emake, $FUNCNAME:make"
69 danarmak 1.1 ;;
70 danarmak 1.17 all)
71 danarmak 1.6 debug-print-section all
72 danarmak 1.1 base_src_compile configure make
73     ;;
74     esac
75 swegener 1.27
76 danarmak 1.17 shift
77     done
78 swegener 1.27
79 danarmak 1.1 }
80    
81     base_src_install() {
82    
83 danarmak 1.8 debug-print-function $FUNCNAME $*
84 danarmak 1.6 [ -z "$1" ] && base_src_install all
85    
86 danarmak 1.12 cd ${S}
87    
88 danarmak 1.6 while [ "$1" ]; do
89 danarmak 1.4
90 danarmak 1.1 case $1 in
91 danarmak 1.17 make)
92 danarmak 1.6 debug-print-section make
93 danarmak 1.11 make DESTDIR=${D} install || die "died running make install, $FUNCNAME:make"
94 danarmak 1.6 ;;
95 danarmak 1.17 all)
96 danarmak 1.11 debug-print-section all
97 danarmak 1.6 base_src_install make
98     ;;
99 danarmak 1.1 esac
100 danarmak 1.6
101     shift
102     done
103    
104 danarmak 1.1 }
105    
106 danarmak 1.4 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20