summaryrefslogtreecommitdiff
blob: 8937f226a6ba295630c6ef789ce9e1b138e2f8c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Dan Armak <danarmak@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.5 2001/10/01 11:04:22 danarmak Exp $
# The base eclass defines some default functions and variables. Nearly everything
# else inherits from here.
. /usr/portage/eclass/inherit.eclass || die
inherit virtual || die
ECLASS=base

S=${WORKDIR}/${P}
DESCRIPTION="Based on the $ECLASS eclass"

base_src_unpack() {
    
    echo "in base_src_unpack, 1st parameter is $1"
    [ -z "$1" ] && base_src_unpack all
    
    while [ "$1" ]; do
    
	case $1 in
	    unpack)
		echo "in base_src_unpack, action unpack"
		unpack ${A}
		;;
	    patch)
		cd ${S}
		patch -p0 < ${FILESDIR}/${P}-gentoo.diff
		;;
	    all)
		echo "in base_src_unpack, action all"
		base_src_unpack unpack
		;;
        esac
    
    shift
    done
    
}

base_src_compile() {

    echo "in base_src_compile, 1st parameter is $1"
    [ -z "$1" ] && base_src_compile all
    
    while [ "$1" ]; do
    
	case $1 in
	    configure)
		echo "in base_src_compile, action configure"
		./configure || die
		;;
	    make)
		echo "in base_src_compile, action make"
		make || die
		;;
	    all)
		echo "in base_src_compile, action all"
		base_src_compile configure make
		;;
	esac
	
    shift
    done
    
}

base_src_install() {

    echo "in base_src_install, 1st parameter is $1"    
    [ -z "$1" ] && base_src_install all

    while [ "$1" ]; do
    
	case $1 in
	    make)
		echo "in base_src_install, action make"
		make DESTDIR=${D} install || die
		;;
	    all)
		echo "in base_src_install, action all"
		base_src_install make
		;;
	esac
	
    shift
    done
    
}

EXPORT_FUNCTIONS src_unpack src_compile src_install