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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (hide annotations) (download)
Wed Mar 27 22:33:53 2002 UTC (12 years ago) by danarmak
Branch: MAIN
Changes since 1.11: +9 -4 lines
big commit that makes eclasses work wth both old portages (1.8.8, rc6 profile) and the new ones
(>=1.8.9_pre32, 1.0 profile). the latter have some parts of the eclasses in ebuild.sh. Now i ahve a
unified code base and commit changes easily.

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.12 # $Header: /home/cvsroot/gentoo-x86/eclass/base.eclass,v 1.11 2002/02/07 18:52:18 danarmak Exp $
5 danarmak 1.1 # The base eclass defines some default functions and variables. Nearly everything
6     # else inherits from here.
7 danarmak 1.12 [ -n "$COMPAT" ] && inherit functions
8 danarmak 1.1 ECLASS=base
9    
10     S=${WORKDIR}/${P}
11     DESCRIPTION="Based on the $ECLASS eclass"
12    
13     base_src_unpack() {
14 danarmak 1.6
15 danarmak 1.8 debug-print-function $FUNCNAME $*
16 danarmak 1.6 [ -z "$1" ] && base_src_unpack all
17    
18 danarmak 1.12 cd ${WORKDIR}
19    
20 danarmak 1.6 while [ "$1" ]; do
21    
22 danarmak 1.1 case $1 in
23 danarmak 1.10 unpack)
24 danarmak 1.6 debug-print-section unpack
25     unpack ${A}
26     ;;
27 danarmak 1.5 patch)
28 danarmak 1.6 debug-print-section patch
29     cd ${S}
30     patch -p0 < ${FILESDIR}/${P}-gentoo.diff
31     ;;
32 danarmak 1.1 all)
33 danarmak 1.6 debug-print-section all
34     base_src_unpack unpack
35     ;;
36 danarmak 1.10 esac
37 danarmak 1.6
38     shift
39     done
40 danarmak 1.1
41     }
42    
43     base_src_compile() {
44 danarmak 1.4
45 danarmak 1.12 debug-print-function $FUNCNAME $*
46 danarmak 1.4 [ -z "$1" ] && base_src_compile all
47 danarmak 1.6
48 danarmak 1.12 cd ${S}
49    
50 danarmak 1.1 while [ "$1" ]; do
51 danarmak 1.6
52 danarmak 1.1 case $1 in
53     configure)
54 danarmak 1.6 debug-print-section configure
55 danarmak 1.11 ./configure || die "died running ./configure, $FUNCNAME:configure"
56 danarmak 1.1 ;;
57     make)
58 danarmak 1.6 debug-print-section make
59 danarmak 1.11 make || die "died running make, $FUNCNAME:make"
60 danarmak 1.1 ;;
61     all)
62 danarmak 1.6 debug-print-section all
63 danarmak 1.1 base_src_compile configure make
64     ;;
65     esac
66    
67     shift
68     done
69    
70     }
71    
72     base_src_install() {
73    
74 danarmak 1.8 debug-print-function $FUNCNAME $*
75 danarmak 1.6 [ -z "$1" ] && base_src_install all
76    
77 danarmak 1.12 cd ${S}
78    
79 danarmak 1.6 while [ "$1" ]; do
80 danarmak 1.4
81 danarmak 1.1 case $1 in
82 danarmak 1.10 make)
83 danarmak 1.6 debug-print-section make
84 danarmak 1.11 make DESTDIR=${D} install || die "died running make install, $FUNCNAME:make"
85 danarmak 1.6 ;;
86 danarmak 1.1 all)
87 danarmak 1.11 debug-print-section all
88 danarmak 1.6 base_src_install make
89     ;;
90 danarmak 1.1 esac
91 danarmak 1.6
92     shift
93     done
94    
95 danarmak 1.1 }
96    
97 danarmak 1.4 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20