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

Diff of /eclass/base.eclass

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

Revision 1.1 Revision 1.13
1# Copyright 1999-2000 Gentoo Technologies, Inc. 1# Copyright 1999-2000 Gentoo Technologies, Inc.
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 or later
3# Author Dan Armak <danarmak@gentoo.org> 3# Author Dan Armak <danarmak@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.1 2001/09/28 19:25:33 danarmak Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.13 2002/03/30 12:52:14 danarmak Exp $
5# The base eclass defines some default functions and variables. Nearly everything 5# The base eclass defines some default functions and variables. Nearly everything
6# else inherits from here. 6# else inherits from here.
7. /usr/portage/inherit.eclass || die 7[ -n "$COMPAT" ] && inherit functions
8inherit virtual || die
9ECLASS=base 8ECLASS=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 ;;
27 patch)
28 debug-print-section patch
29 cd ${S}
30 patch -p0 < ${FILESDIR}/${P}-gentoo.diff
31 ;;
22 all) 32 all)
33 debug-print-section all
23 base_src_unpack unpack 34 base_src_unpack unpack
24 ;; 35 ;;
25 esac 36 esac
26 37
27 shift 38 shift
28 done 39 done
29 40
30} 41}
31 42
32base_src_compile() { 43base_src_compile() {
33 44
45 debug-print-function $FUNCNAME $*
46 [ -z "$1" ] && base_src_compile all
47
48 cd ${S}
49
34 while [ "$1" ]; do 50 while [ "$1" ]; do
35 51
36 case $1 in 52 case $1 in
37 configure) 53 configure)
38 configure || die 54 debug-print-section configure
55 econf || die "died running econf, $FUNCNAME:configure"
39 ;; 56 ;;
40 make) 57 make)
41 make || die 58 debug-print-section make
59 emake || die "died running emake, $FUNCNAME:make"
42 ;; 60 ;;
43 all) 61 all)
62 debug-print-section all
44 base_src_compile configure make 63 base_src_compile configure make
45 ;; 64 ;;
46 esac 65 esac
47 66
48 shift 67 shift
50 69
51} 70}
52 71
53base_src_install() { 72base_src_install() {
54 73
74 debug-print-function $FUNCNAME $*
75 [ -z "$1" ] && base_src_install all
76
77 cd ${S}
78
55 while [ "$1" ]; do 79 while [ "$1" ]; do
56 80
57 case $1 in 81 case $1 in
58 make) 82 make)
59 make DESTDIR=${D} install || die 83 debug-print-section make
84 make DESTDIR=${D} install || die "died running make install, $FUNCNAME:make"
60 ;; 85 ;;
61 all) 86 all)
87 debug-print-section all
62 base_src_install make 88 base_src_install make
63 ;; 89 ;;
64 esac 90 esac
65 91
66 shift 92 shift
67 done 93 done
68 94
69} 95}
70 96
71EXPORT_FUNCTIONS 97EXPORT_FUNCTIONS src_unpack src_compile src_install
72

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20