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

Diff of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.52 Revision 1.58
1# Copyright 1999-2008 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.52 2010/05/25 21:16:54 reavertm 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# 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. 13
14if [[ ${___ECLASS_ONCE_BASE} != "recur -_+^+_- spank" ]] ; then
15___ECLASS_ONCE_BASE="recur -_+^+_- spank"
14 16
15inherit eutils 17inherit eutils
16 18
17BASE_EXPF="src_unpack src_compile src_install" 19BASE_EXPF="src_unpack src_compile src_install"
18case "${EAPI:-0}" in 20case "${EAPI:-0}" in
19 2|3|4) BASE_EXPF+=" src_prepare src_configure" ;; 21 2|3|4|5) BASE_EXPF+=" src_prepare src_configure" ;;
20 *) ;; 22 *) ;;
21esac 23esac
22 24
23EXPORT_FUNCTIONS ${BASE_EXPF} 25EXPORT_FUNCTIONS ${BASE_EXPF}
24 26
54base_src_unpack() { 56base_src_unpack() {
55 debug-print-function $FUNCNAME "$@" 57 debug-print-function $FUNCNAME "$@"
56 58
57 pushd "${WORKDIR}" > /dev/null 59 pushd "${WORKDIR}" > /dev/null
58 60
59 [[ -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
60 has src_prepare ${BASE_EXPF} || base_src_prepare 66 has src_prepare ${BASE_EXPF} || base_src_prepare
61 67
62 popd > /dev/null 68 popd > /dev/null
63} 69}
64 70
140# Actual function that runs emake command. 146# Actual function that runs emake command.
141base_src_make() { 147base_src_make() {
142 debug-print-function $FUNCNAME "$@" 148 debug-print-function $FUNCNAME "$@"
143 149
144 if [[ -f Makefile || -f GNUmakefile || -f makefile ]]; then 150 if [[ -f Makefile || -f GNUmakefile || -f makefile ]]; then
145 emake "$@" || die "died running emake, $FUNCNAME:make" 151 emake "$@" || die "died running emake, $FUNCNAME"
146 fi 152 fi
147} 153}
148 154
149# @FUNCTION: base_src_install 155# @FUNCTION: base_src_install
150# @DESCRIPTION: 156# @DESCRIPTION:
152# installs documents and html documents from DOCS and HTML_DOCS 158# installs documents and html documents from DOCS and HTML_DOCS
153# arrays. 159# arrays.
154base_src_install() { 160base_src_install() {
155 debug-print-function $FUNCNAME "$@" 161 debug-print-function $FUNCNAME "$@"
156 162
157 emake DESTDIR="${D}" "$@" install || die "died running make install, $FUNCNAME:make" 163 emake DESTDIR="${D}" "$@" install || die "died running make install, $FUNCNAME"
158 base_src_install_docs 164 base_src_install_docs
159} 165}
160 166
161# @FUNCTION: base_src_install_docs 167# @FUNCTION: base_src_install_docs
162# @DESCRIPTION: 168# @DESCRIPTION:
182 done 188 done
183 fi 189 fi
184 190
185 popd > /dev/null 191 popd > /dev/null
186} 192}
193
194fi

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.58

  ViewVC Help
Powered by ViewVC 1.1.20