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

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

  ViewVC Help
Powered by ViewVC 1.1.20