| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2012 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.55 2011/12/14 23:38:09 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.58 2012/09/27 16:35:41 axs Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: base.eclass |
5 | # @ECLASS: base.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # QA Team <qa@gentoo.org> |
7 | # QA Team <qa@gentoo.org> |
| 8 | # @AUTHOR: |
8 | # @AUTHOR: |
| 9 | # Original author: Dan Armak <danarmak@gentoo.org> |
9 | # Original author: Dan Armak <danarmak@gentoo.org> |
| 10 | # @BLURB: The base eclass defines some default functions and variables. |
10 | # @BLURB: The base eclass defines some default functions and variables. |
| 11 | # @DESCRIPTION: |
11 | # @DESCRIPTION: |
| 12 | # The base eclass defines some default functions and variables. Nearly |
12 | # The base eclass defines some default functions and variables. |
| 13 | # everything else inherits from here. |
|
|
| 14 | |
13 | |
| 15 | if [[ ${___ECLASS_ONCE_BASE} != "recur -_+^+_- spank" ]] ; then |
14 | if [[ ${___ECLASS_ONCE_BASE} != "recur -_+^+_- spank" ]] ; then |
| 16 | ___ECLASS_ONCE_BASE="recur -_+^+_- spank" |
15 | ___ECLASS_ONCE_BASE="recur -_+^+_- spank" |
| 17 | |
16 | |
| 18 | inherit eutils |
17 | inherit eutils |
| 19 | |
18 | |
| 20 | BASE_EXPF="src_unpack src_compile src_install" |
19 | BASE_EXPF="src_unpack src_compile src_install" |
| 21 | case "${EAPI:-0}" in |
20 | case "${EAPI:-0}" in |
| 22 | 2|3|4) BASE_EXPF+=" src_prepare src_configure" ;; |
21 | 2|3|4|5) BASE_EXPF+=" src_prepare src_configure" ;; |
| 23 | *) ;; |
22 | *) ;; |
| 24 | esac |
23 | esac |
| 25 | |
24 | |
| 26 | EXPORT_FUNCTIONS ${BASE_EXPF} |
25 | EXPORT_FUNCTIONS ${BASE_EXPF} |
| 27 | |
26 | |
| … | |
… | |
| 57 | base_src_unpack() { |
56 | base_src_unpack() { |
| 58 | debug-print-function $FUNCNAME "$@" |
57 | debug-print-function $FUNCNAME "$@" |
| 59 | |
58 | |
| 60 | pushd "${WORKDIR}" > /dev/null |
59 | pushd "${WORKDIR}" > /dev/null |
| 61 | |
60 | |
| 62 | [[ -n "${A}" ]] && unpack ${A} |
61 | if [[ $(type -t unpacker_src_unpack) == "function" ]] ; then |
|
|
62 | unpacker_src_unpack |
|
|
63 | elif [[ -n ${A} ]] ; then |
|
|
64 | unpack ${A} |
|
|
65 | fi |
| 63 | has src_prepare ${BASE_EXPF} || base_src_prepare |
66 | has src_prepare ${BASE_EXPF} || base_src_prepare |
| 64 | |
67 | |
| 65 | popd > /dev/null |
68 | popd > /dev/null |
| 66 | } |
69 | } |
| 67 | |
70 | |