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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.19 - (show annotations) (download)
Thu Jan 30 17:25:00 2003 UTC (11 years, 6 months ago) by danarmak
Branch: MAIN
Changes since 1.18: +2 -5 lines
remove no longer needed kde-path.eclass -related fix

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

  ViewVC Help
Powered by ViewVC 1.1.20