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

Diff of /eclass/base.eclass

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

Revision 1.4 Revision 1.12
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.4 2001/09/29 12:35:38 danarmak Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.12 2002/03/27 22:33:53 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/eclass/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
16 echo "in base_src_unpack, 1st parameter is $1" 15 debug-print-function $FUNCNAME $*
17 [ -z "$1" ] && base_src_unpack all 16 [ -z "$1" ] && base_src_unpack all
18 17
18 cd ${WORKDIR}
19
19 while [ "$1" ]; do 20 while [ "$1" ]; do
20 21
21 case $1 in 22 case $1 in
22 unpack) 23 unpack)
23 echo "in base_src_unpack, action unpack" 24 debug-print-section unpack
24 unpack ${A} 25 unpack ${A}
25 ;; 26 ;;
27 patch)
28 debug-print-section patch
29 cd ${S}
30 patch -p0 < ${FILESDIR}/${P}-gentoo.diff
31 ;;
26 all) 32 all)
27 echo "in base_src_unpack, action all" 33 debug-print-section all
28 base_src_unpack unpack 34 base_src_unpack unpack
29 ;; 35 ;;
30 esac 36 esac
31 37
32 shift 38 shift
33 done 39 done
34 40
35} 41}
36 42
37base_src_compile() { 43base_src_compile() {
38 44
39 echo "in base_src_compile, 1st parameter is $1" 45 debug-print-function $FUNCNAME $*
40 [ -z "$1" ] && base_src_compile all 46 [ -z "$1" ] && base_src_compile all
41 47
48 cd ${S}
49
42 while [ "$1" ]; do 50 while [ "$1" ]; do
43 51
44 case $1 in 52 case $1 in
45 configure) 53 configure)
46 echo "in base_src_compile, action configure" 54 debug-print-section configure
47 ./configure || die 55 ./configure || die "died running ./configure, $FUNCNAME:configure"
48 ;; 56 ;;
49 make) 57 make)
50 echo "in base_src_compile, action make" 58 debug-print-section make
51 make || die 59 make || die "died running make, $FUNCNAME:make"
52 ;; 60 ;;
53 all) 61 all)
54 echo "in base_src_compile, action all" 62 debug-print-section all
55 base_src_compile configure make 63 base_src_compile configure make
56 ;; 64 ;;
57 esac 65 esac
58 66
59 shift 67 shift
61 69
62} 70}
63 71
64base_src_install() { 72base_src_install() {
65 73
66 echo "in base_src_install, 1st parameter is $1" 74 debug-print-function $FUNCNAME $*
67 [ -z "$1" ] && base_src_install all 75 [ -z "$1" ] && base_src_install all
68 76
77 cd ${S}
78
69 while [ "$1" ]; do 79 while [ "$1" ]; do
70 80
71 case $1 in 81 case $1 in
72 make) 82 make)
73 echo "in base_src_install, action make" 83 debug-print-section make
74 make DESTDIR=${D} install || die 84 make DESTDIR=${D} install || die "died running make install, $FUNCNAME:make"
75 ;; 85 ;;
76 all) 86 all)
77 echo "in base_src_install, action all" 87 debug-print-section all
78 base_src_install make 88 base_src_install make
79 ;; 89 ;;
80 esac 90 esac
81 91
82 shift 92 shift
83 done 93 done
84 94
85} 95}
86 96
87EXPORT_FUNCTIONS src_unpack src_compile src_install 97EXPORT_FUNCTIONS src_unpack src_compile src_install
88

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20