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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.23 - (hide annotations) (download)
Tue Apr 8 17:48:12 2003 UTC (11 years, 3 months ago) by danarmak
Branch: MAIN
Branch point for: RELEASE-1_4
Changes since 1.22: +6 -2 lines
needed support for new kde 3.1.1a stuff. shouldn't touch anything else.

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

  ViewVC Help
Powered by ViewVC 1.1.20