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

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

  ViewVC Help
Powered by ViewVC 1.1.20