summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-12-14 14:55:03 +0000
committerMichał Górny <mgorny@gentoo.org>2011-12-14 14:55:03 +0000
commit1c14cd042b060c8ab135250d056689e6707737c0 (patch)
tree00f06ebd6927a3be989cd8575cddf81b3fc2b1c5 /eclass
parentnew ebuild (diff)
downloadgentoo-2-1c14cd042b060c8ab135250d056689e6707737c0.tar.gz
gentoo-2-1c14cd042b060c8ab135250d056689e6707737c0.tar.bz2
gentoo-2-1c14cd042b060c8ab135250d056689e6707737c0.zip
autotools-utils: drop base.eclass inherit and thus src_unpack() export.
Importing base.eclass causes us to export src_unpack() phase function which is entirely useless in EAPIs 2+ (which we only support), and causes trouble importing autotools-utils e.g. after VCS eclasses. Fixes: https://bugs.gentoo.org/show_bug.cgi?id=392651
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/autotools-utils.eclass56
2 files changed, 54 insertions, 7 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index c5d10983ede0..968a57dac111 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.39 2011/12/13 14:42:39 sera Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.40 2011/12/14 14:55:03 mgorny Exp $
+
+ 14 Dec 2011; Michał Górny <mgorny@gentoo.org> autotools-utils.eclass:
+ Drop base.eclass inherit and thus src_unpack() export.
13 Dec 2011; Ralph Sennhauser <sera@gentoo.org> java-utils-2.eclass:
No longer require JDK for installing java binpkg. #206024
diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
index 0aa1679337e7..ae65537514cf 100644
--- a/eclass/autotools-utils.eclass
+++ b/eclass/autotools-utils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.29 2011/11/27 09:57:20 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.30 2011/12/14 14:55:03 mgorny Exp $
# @ECLASS: autotools-utils.eclass
# @MAINTAINER:
@@ -93,24 +93,28 @@ case ${EAPI:-0} in
*) die "EAPI=${EAPI} is not supported" ;;
esac
-inherit autotools base eutils libtool
+inherit autotools eutils libtool
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
# @ECLASS-VARIABLE: AUTOTOOLS_BUILD_DIR
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Build directory, location where all autotools generated files should be
# placed. For out of source builds it defaults to ${WORKDIR}/${P}_build.
# @ECLASS-VARIABLE: AUTOTOOLS_IN_SOURCE_BUILD
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Set to enable in-source build.
# @ECLASS-VARIABLE: ECONF_SOURCE
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Specify location of autotools' configure script. By default it uses ${S}.
# @ECLASS-VARIABLE: myeconfargs
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Optional econf arguments as Bash array. Should be defined before calling src_configure.
# @CODE
@@ -125,6 +129,36 @@ EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
# }
# @CODE
+# @ECLASS-VARIABLE: DOCS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array containing documents passed to dodoc command.
+#
+# Example:
+# @CODE
+# DOCS=( NEWS README )
+# @CODE
+
+# @ECLASS-VARIABLE: HTML_DOCS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array containing documents passed to dohtml command.
+#
+# Example:
+# @CODE
+# HTML_DOCS=( doc/html/ )
+# @CODE
+
+# @ECLASS-VARIABLE: PATCHES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# PATCHES array variable containing all various patches to be applied.
+#
+# Example:
+# @CODE
+# PATCHES=( "${FILESDIR}"/${P}-mypatch.patch )
+# @CODE
+
# Determine using IN or OUT source build
_check_build_dir() {
: ${ECONF_SOURCE:=${S}}
@@ -224,7 +258,9 @@ remove_libtool_files() {
autotools-utils_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
- base_src_prepare
+ [[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
+ epatch_user
+
elibtoolize --patch-only
}
@@ -260,7 +296,7 @@ autotools-utils_src_configure() {
_check_build_dir
mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed"
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
- base_src_configure "${econfargs[@]}" "$@"
+ econf "${econfargs[@]}" "$@"
popd > /dev/null
}
@@ -272,7 +308,7 @@ autotools-utils_src_compile() {
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
- base_src_compile "$@"
+ emake "$@" || die 'emake failed'
popd > /dev/null
}
@@ -289,9 +325,17 @@ autotools-utils_src_install() {
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
- base_src_install "$@"
+ emake DESTDIR="${D}" "$@" install || die "emake install failed"
popd > /dev/null
+ # XXX: support installing them from builddir as well?
+ if [[ ${DOCS} ]]; then
+ dodoc "${DOCS[@]}" || die "dodoc failed"
+ fi
+ if [[ ${HTML_DOCS} ]]; then
+ dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed"
+ fi
+
# Remove libtool files and unnecessary static libs
remove_libtool_files
}