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

Diff of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20