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

Diff of /eclass/base.eclass

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

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

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20