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

Diff of /eclass/base.eclass

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

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

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20