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

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

  ViewVC Help
Powered by ViewVC 1.1.20