| 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.10 2002/02/06 20:38:10 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 |
7 | inherit functions |
| 8 | ECLASS=base |
8 | ECLASS=base |
| 9 | |
9 | |
| 10 | S=${WORKDIR}/${P} |
10 | S=${WORKDIR}/${P} |
| 11 | DESCRIPTION="Based on the $ECLASS eclass" |
11 | DESCRIPTION="Based on the $ECLASS eclass" |
| 12 | |
12 | |
| 13 | base_src_unpack() { |
13 | base_src_unpack() { |
| 14 | |
14 | |
| 15 | debug-print-function base_src_unpack $* |
15 | debug-print-function $FUNCNAME $* |
| 16 | [ -z "$1" ] && base_src_unpack all |
16 | [ -z "$1" ] && base_src_unpack all |
| 17 | |
17 | |
| 18 | while [ "$1" ]; do |
18 | while [ "$1" ]; do |
| 19 | |
19 | |
| 20 | case $1 in |
20 | case $1 in |
| 21 | unpack) |
21 | unpack) |
| 22 | debug-print-section unpack |
22 | debug-print-section unpack |
| 23 | unpack ${A} |
23 | unpack ${A} |
| 24 | ;; |
24 | ;; |
| 25 | patch) |
25 | patch) |
| 26 | debug-print-section patch |
26 | debug-print-section patch |
| … | |
… | |
| 29 | ;; |
29 | ;; |
| 30 | all) |
30 | all) |
| 31 | debug-print-section all |
31 | debug-print-section all |
| 32 | base_src_unpack unpack |
32 | base_src_unpack unpack |
| 33 | ;; |
33 | ;; |
| 34 | esac |
34 | esac |
| 35 | |
35 | |
| 36 | shift |
36 | shift |
| 37 | done |
37 | done |
| 38 | |
38 | |
| 39 | } |
39 | } |
| 40 | |
40 | |
| 41 | base_src_compile() { |
41 | base_src_compile() { |
| 42 | |
42 | |
| 43 | debug-print-function base_src_compile $* |
43 | debug-print-function $FUNCNAME $* |
| 44 | [ -z "$1" ] && base_src_compile all |
44 | [ -z "$1" ] && base_src_compile all |
| 45 | |
45 | |
| 46 | while [ "$1" ]; do |
46 | while [ "$1" ]; do |
| 47 | |
47 | |
| 48 | case $1 in |
48 | case $1 in |
| … | |
… | |
| 65 | |
65 | |
| 66 | } |
66 | } |
| 67 | |
67 | |
| 68 | base_src_install() { |
68 | base_src_install() { |
| 69 | |
69 | |
| 70 | debug-print-function base_src_install $* |
70 | debug-print-function $FUNCNAME $* |
| 71 | [ -z "$1" ] && base_src_install all |
71 | [ -z "$1" ] && base_src_install all |
| 72 | |
72 | |
| 73 | while [ "$1" ]; do |
73 | while [ "$1" ]; do |
| 74 | |
74 | |
| 75 | case $1 in |
75 | case $1 in |
| 76 | make) |
76 | make) |
| 77 | debug-print-section make |
77 | debug-print-section make |
| 78 | make DESTDIR=${D} install || die |
78 | make DESTDIR=${D} install || die |
| 79 | ;; |
79 | ;; |
| 80 | all) |
80 | all) |
| 81 | debug-prnit-section all |
81 | debug-prnit-section all |