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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (hide annotations) (download)
Wed Jun 5 19:09:21 2002 UTC (12 years, 3 months ago) by danarmak
Branch: MAIN
Changes since 1.14: +14 -2 lines
for the upcoming kde 3.0.1.20020604

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

  ViewVC Help
Powered by ViewVC 1.1.20