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

Diff of /eclass/base.eclass

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

Revision 1.1.1.1 Revision 1.4
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2000 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License, v2 or later
3# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.1.1.1 2005/11/30 09:59:24 chriswhite Exp $
4#
5# Author Dan Armak <danarmak@gentoo.org> 3# Author Dan Armak <danarmak@gentoo.org>
6# 4# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.4 2001/09/29 12:35:38 danarmak Exp $
7# The base eclass defines some default functions and variables. Nearly everything 5# The base eclass defines some default functions and variables. Nearly everything
8# else inherits from here. 6# else inherits from here.
9 7. /usr/portage/eclass/inherit.eclass || die
10inherit eutils 8inherit virtual || die
9ECLASS=base
11 10
12S=${WORKDIR}/${P} 11S=${WORKDIR}/${P}
13DESCRIPTION="Based on the $ECLASS eclass" 12DESCRIPTION="Based on the $ECLASS eclass"
14 13
15base_src_unpack() { 14base_src_unpack() {
16 15
17 debug-print-function $FUNCNAME $* 16 echo "in base_src_unpack, 1st parameter is $1"
18 [ -z "$1" ] && base_src_unpack all 17 [ -z "$1" ] && base_src_unpack all
19 18
20 cd ${WORKDIR}
21
22 while [ "$1" ]; do 19 while [ "$1" ]; do
23 20
24 case $1 in 21 case $1 in
25 unpack) 22 unpack)
26 debug-print-section unpack 23 echo "in base_src_unpack, action unpack"
27 unpack ${A} 24 unpack ${A}
28 ;; 25 ;;
29 patch) 26 all)
30 debug-print-section patch 27 echo "in base_src_unpack, action all"
31 cd ${S} 28 base_src_unpack unpack
32 epatch ${FILESDIR}/${P}-gentoo.diff
33 ;; 29 ;;
34 autopatch) 30 esac
35 debug-print-section autopatch 31
36 debug-print "$FUNCNAME: autopatch: PATCHES=$PATCHES, PATCHES1=$PATCHES1" 32 shift
37 cd ${S} 33 done
38 for x in $PATCHES $PATCHES1; do 34
39 debug-print "$FUNCNAME: autopatch: patching from ${x}"
40 epatch ${x}
41 done
42 ;;
43 all)
44 debug-print-section all
45 base_src_unpack unpack autopatch
46 ;;
47 esac
48
49 shift
50 done
51
52} 35}
53 36
54base_src_compile() { 37base_src_compile() {
55 38
56 debug-print-function $FUNCNAME $* 39 echo "in base_src_compile, 1st parameter is $1"
57 [ -z "$1" ] && base_src_compile all 40 [ -z "$1" ] && base_src_compile all
58 41
59 cd ${S}
60
61 while [ "$1" ]; do 42 while [ "$1" ]; do
62 43
63 case $1 in 44 case $1 in
64 configure) 45 configure)
65 debug-print-section configure 46 echo "in base_src_compile, action configure"
66 econf || die "died running econf, $FUNCNAME:configure" 47 ./configure || die
67 ;; 48 ;;
68 make) 49 make)
69 debug-print-section make 50 echo "in base_src_compile, action make"
70 emake || die "died running emake, $FUNCNAME:make" 51 make || die
71 ;; 52 ;;
72 all) 53 all)
73 debug-print-section all 54 echo "in base_src_compile, action all"
74 base_src_compile configure make 55 base_src_compile configure make
75 ;; 56 ;;
76 esac 57 esac
77 58
78 shift 59 shift
79 done 60 done
80 61
81} 62}
82 63
83base_src_install() { 64base_src_install() {
84 65
85 debug-print-function $FUNCNAME $* 66 echo "in base_src_install, 1st parameter is $1"
86 [ -z "$1" ] && base_src_install all 67 [ -z "$1" ] && base_src_install all
87 68
88 cd ${S}
89
90 while [ "$1" ]; do 69 while [ "$1" ]; do
91 70
92 case $1 in 71 case $1 in
93 make) 72 make)
94 debug-print-section make 73 echo "in base_src_install, action make"
95 make DESTDIR=${D} install || die "died running make install, $FUNCNAME:make" 74 make DESTDIR=${D} install || die
96 ;; 75 ;;
97 all) 76 all)
98 debug-print-section all 77 echo "in base_src_install, action all"
99 base_src_install make 78 base_src_install make
100 ;; 79 ;;
101 esac 80 esac
102 81
103 shift 82 shift
104 done 83 done
105 84
106} 85}
107 86
108EXPORT_FUNCTIONS src_unpack src_compile src_install 87EXPORT_FUNCTIONS src_unpack src_compile src_install
88

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

  ViewVC Help
Powered by ViewVC 1.1.20