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

  ViewVC Help
Powered by ViewVC 1.1.20