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

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

  ViewVC Help
Powered by ViewVC 1.1.20