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

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

  ViewVC Help
Powered by ViewVC 1.1.20