| 1 | # Copyright 1999-2000 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2000 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 or later |
| 3 | # Author Dan Armak <danarmak@gentoo.org> |
3 | # Author Dan Armak <danarmak@gentoo.org> |
| 4 | # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.6 2001/10/01 13:54:38 danarmak Exp $ |
4 | # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.9 2002/01/04 12:06:28 danarmak Exp $ |
| 5 | # The base eclass defines some default functions and variables. Nearly everything |
5 | # The base eclass defines some default functions and variables. Nearly everything |
| 6 | # else inherits from here. |
6 | # else inherits from here. |
| 7 | inherit virtual || die |
|
|
| 8 | ECLASS=base |
7 | ECLASS=base |
| 9 | |
8 | |
| 10 | S=${WORKDIR}/${P} |
9 | S=${WORKDIR}/${P} |
| 11 | DESCRIPTION="Based on the $ECLASS eclass" |
10 | DESCRIPTION="Based on the $ECLASS eclass" |
| 12 | |
11 | |
| 13 | base_src_unpack() { |
12 | base_src_unpack() { |
| 14 | |
13 | |
| 15 | debug-print-function base_src_unpack $* |
14 | debug-print-function $FUNCNAME $* |
| 16 | [ -z "$1" ] && base_src_unpack all |
15 | [ -z "$1" ] && base_src_unpack all |
| 17 | |
16 | |
| 18 | while [ "$1" ]; do |
17 | while [ "$1" ]; do |
| 19 | |
18 | |
| 20 | case $1 in |
19 | case $1 in |
| … | |
… | |
| 38 | |
37 | |
| 39 | } |
38 | } |
| 40 | |
39 | |
| 41 | base_src_compile() { |
40 | base_src_compile() { |
| 42 | |
41 | |
| 43 | debug-print-function base_src_compile $* |
42 | debug-print-function $FUNCNAME $* |
| 44 | [ -z "$1" ] && base_src_compile all |
43 | [ -z "$1" ] && base_src_compile all |
| 45 | |
44 | |
| 46 | while [ "$1" ]; do |
45 | while [ "$1" ]; do |
| 47 | |
46 | |
| 48 | case $1 in |
47 | case $1 in |
| … | |
… | |
| 65 | |
64 | |
| 66 | } |
65 | } |
| 67 | |
66 | |
| 68 | base_src_install() { |
67 | base_src_install() { |
| 69 | |
68 | |
| 70 | debug-print-function base_src_install $* |
69 | debug-print-function $FUNCNAME $* |
| 71 | [ -z "$1" ] && base_src_install all |
70 | [ -z "$1" ] && base_src_install all |
| 72 | |
71 | |
| 73 | while [ "$1" ]; do |
72 | while [ "$1" ]; do |
| 74 | |
73 | |
| 75 | case $1 in |
74 | case $1 in |
| … | |
… | |
| 88 | |
87 | |
| 89 | } |
88 | } |
| 90 | |
89 | |
| 91 | EXPORT_FUNCTIONS src_unpack src_compile src_install |
90 | EXPORT_FUNCTIONS src_unpack src_compile src_install |
| 92 | |
91 | |
|
|
92 | # misc helper functions |
|
|
93 | # adds all parameters to DEPEND and RDEPEND |
|
|
94 | newdepend() { |
|
|
95 | |
|
|
96 | debug-print-function newdepend $* |
|
|
97 | debug-print "newdepend: DEPEND=$DEPEND RDEPEND=$RDEPEND" |
|
|
98 | |
|
|
99 | while [ -n "$1" ]; do |
|
|
100 | DEPEND="$DEPEND $1" |
|
|
101 | RDEPEND="$RDEPEND $1" |
|
|
102 | shift |
|
|
103 | done |
|
|
104 | |
|
|
105 | } |
|
|
106 | |