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

Diff of /eclass/base.eclass

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

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

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.20