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

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

  ViewVC Help
Powered by ViewVC 1.1.20