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

Diff of /eclass/base.eclass

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

Revision 1.10 Revision 1.24
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.24 2004/06/25 00:39:48 vapier 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.10 2002/02/06 20:38:10 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.
7inherit functions 9
8ECLASS=base 10ECLASS=base
9 11INHERITED="$INHERITED $ECLASS"
10S=${WORKDIR}/${P} 12S=${WORKDIR}/${P}
11DESCRIPTION="Based on the $ECLASS eclass" 13DESCRIPTION="Based on the $ECLASS eclass"
12 14
13base_src_unpack() { 15base_src_unpack() {
14 16
15 debug-print-function $FUNCNAME $* 17 debug-print-function $FUNCNAME $*
16 [ -z "$1" ] && base_src_unpack all 18 [ -z "$1" ] && base_src_unpack all
17 19
20 cd ${WORKDIR}
21
18 while [ "$1" ]; do 22 while [ "$1" ]; do
19 23
20 case $1 in 24 case $1 in
21 unpack) 25 unpack)
22 debug-print-section unpack 26 debug-print-section unpack
23 unpack ${A} 27 unpack ${A}
24 ;; 28 ;;
25 patch) 29 patch)
26 debug-print-section patch 30 debug-print-section patch
27 cd ${S} 31 cd ${S}
28 patch -p0 < ${FILESDIR}/${P}-gentoo.diff 32 patch -p0 < ${FILESDIR}/${P}-gentoo.diff
29 ;; 33 ;;
34 autopatch)
35 debug-print-section autopatch
36 debug-print "$FUNCNAME: autopatch: PATCHES=$PATCHES, PATCHES1=$PATCHES1"
37 cd ${S}
38 for x in $PATCHES; do
39 debug-print "$FUNCNAME: autopatch: patching from ${x}"
40 patch -p0 < ${x}
41 done
42 for x in $PATCHES1; do
43 debug-print "$FUNCNAME: autopatch: patching -p1 from ${x}"
44 patch -p1 < ${x}
45 done
46 ;;
30 all) 47 all)
31 debug-print-section all 48 debug-print-section all
32 base_src_unpack unpack 49 base_src_unpack unpack autopatch
33 ;; 50 ;;
34 esac 51 esac
35 52
36 shift 53 shift
37 done 54 done
38 55
39} 56}
40 57
41base_src_compile() { 58base_src_compile() {
42 59
43 debug-print-function $FUNCNAME $* 60 debug-print-function $FUNCNAME $*
44 [ -z "$1" ] && base_src_compile all 61 [ -z "$1" ] && base_src_compile all
45 62
63 cd ${S}
64
46 while [ "$1" ]; do 65 while [ "$1" ]; do
47 66
48 case $1 in 67 case $1 in
49 configure) 68 configure)
50 debug-print-section configure 69 debug-print-section configure
51 ./configure || die 70 econf || die "died running econf, $FUNCNAME:configure"
52 ;; 71 ;;
53 make) 72 make)
54 debug-print-section make 73 debug-print-section make
55 make || die 74 emake || die "died running emake, $FUNCNAME:make"
56 ;; 75 ;;
57 all) 76 all)
58 debug-print-section all 77 debug-print-section all
59 base_src_compile configure make 78 base_src_compile configure make
60 ;; 79 ;;
61 esac 80 esac
62 81
63 shift 82 shift
64 done 83 done
65 84
66} 85}
67 86
68base_src_install() { 87base_src_install() {
69 88
70 debug-print-function $FUNCNAME $* 89 debug-print-function $FUNCNAME $*
71 [ -z "$1" ] && base_src_install all 90 [ -z "$1" ] && base_src_install all
72 91
92 cd ${S}
93
73 while [ "$1" ]; do 94 while [ "$1" ]; do
74 95
75 case $1 in 96 case $1 in
76 make) 97 make)
77 debug-print-section make 98 debug-print-section make
78 make DESTDIR=${D} install || die 99 make DESTDIR=${D} install || die "died running make install, $FUNCNAME:make"
79 ;; 100 ;;
80 all) 101 all)
81 debug-prnit-section all 102 debug-print-section all
82 base_src_install make 103 base_src_install make
83 ;; 104 ;;
84 esac 105 esac
85 106
86 shift 107 shift
87 done 108 done
88 109
89} 110}
90 111
91EXPORT_FUNCTIONS src_unpack src_compile src_install 112EXPORT_FUNCTIONS src_unpack src_compile src_install
92

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.20