From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-405347-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1RXU4c-0003dy-St
	for garchives@archives.gentoo.org; Mon, 05 Dec 2011 08:38:55 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id CD9FA21C020;
	Mon,  5 Dec 2011 08:38:27 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 8FA7521C020
	for <gentoo-commits@lists.gentoo.org>; Mon,  5 Dec 2011 08:38:27 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 071581B4020
	for <gentoo-commits@lists.gentoo.org>; Mon,  5 Dec 2011 08:38:27 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 825E380042
	for <gentoo-commits@lists.gentoo.org>; Mon,  5 Dec 2011 08:38:26 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <d0a416cfdbcd3246b51b07b459793c9c41a8b41f.mgorny@gentoo>
Subject: [gentoo-commits] dev/mgorny:master commit in: eclass/
X-VCS-Repository: dev/mgorny
X-VCS-Files: eclass/autotools-utils.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: d0a416cfdbcd3246b51b07b459793c9c41a8b41f
Date: Mon,  5 Dec 2011 08:38:26 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: b1d8f27d-7b09-41fb-9bca-47ee4fa42b90
X-Archives-Hash: a49f99406c29bb862f7a9cb65d82643c

commit:     d0a416cfdbcd3246b51b07b459793c9c41a8b41f
Author:     Micha=C5=82 G=C3=B3rny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 30 17:50:12 2011 +0000
Commit:     Micha=C5=82 G=C3=B3rny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Nov 30 22:57:32 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Ddev/mgorny.git;a=3D=
commit;h=3Dd0a416cf

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=3D392651

---
 eclass/autotools-utils.eclass |   54 +++++++++++++++++++++++++++++++++++=
++----
 1 files changed, 49 insertions(+), 5 deletions(-)

diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclas=
s
index 0aa1679..87cbd4a 100644
--- a/eclass/autotools-utils.eclass
+++ b/eclass/autotools-utils.eclass
@@ -93,24 +93,28 @@ case ${EAPI:-0} in
 	*) die "EAPI=3D${EAPI} is not supported" ;;
 esac
=20
-inherit autotools base eutils libtool
+inherit autotools eutils libtool
=20
 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_t=
est
=20
 # @ECLASS-VARIABLE: AUTOTOOLS_BUILD_DIR
+# @DEFAULT_UNSET
 # @DESCRIPTION:
 # Build directory, location where all autotools generated files should b=
e
 # placed. For out of source builds it defaults to ${WORKDIR}/${P}_build.
=20
 # @ECLASS-VARIABLE: AUTOTOOLS_IN_SOURCE_BUILD
+# @DEFAULT_UNSET
 # @DESCRIPTION:
 # Set to enable in-source build.
=20
 # @ECLASS-VARIABLE: ECONF_SOURCE
+# @DEFAULT_UNSET
 # @DESCRIPTION:
 # Specify location of autotools' configure script. By default it uses ${=
S}.
=20
 # @ECLASS-VARIABLE: myeconfargs
+# @DEFAULT_UNSET
 # @DESCRIPTION:
 # Optional econf arguments as Bash array. Should be defined before calli=
ng src_configure.
 # @CODE
@@ -125,6 +129,36 @@ EXPORT_FUNCTIONS src_prepare src_configure src_compi=
le src_install src_test
 # }
 # @CODE
=20
+# @ECLASS-VARIABLE: DOCS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array containing documents passed to dodoc command.
+#
+# Example:
+# @CODE
+# DOCS=3D( NEWS README )
+# @CODE
+
+# @ECLASS-VARIABLE: HTML_DOCS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array containing documents passed to dohtml command.
+#
+# Example:
+# @CODE
+# HTML_DOCS=3D( doc/html/ )
+# @CODE
+
+# @ECLASS-VARIABLE: PATCHES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# PATCHES array variable containing all various patches to be applied.
+#
+# Example:
+# @CODE
+# PATCHES=3D( "${FILESDIR}"/${P}-mypatch.patch )
+# @CODE
+
 # Determine using IN or OUT source build
 _check_build_dir() {
 	: ${ECONF_SOURCE:=3D${S}}
@@ -224,7 +258,9 @@ remove_libtool_files() {
 autotools-utils_src_prepare() {
 	debug-print-function ${FUNCNAME} "$@"
=20
-	base_src_prepare
+	[[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
+	epatch_user
+
 	elibtoolize --patch-only
 }
=20
@@ -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
 }
=20
@@ -272,7 +308,7 @@ autotools-utils_src_compile() {
=20
 	_check_build_dir
 	pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
-	base_src_compile "$@"
+	emake "$@" || die 'emake failed'
 	popd > /dev/null
 }
=20
@@ -289,9 +325,17 @@ autotools-utils_src_install() {
=20
 	_check_build_dir
 	pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
-	base_src_install "$@"
+	emake DESTDIR=3D"${D}" "$@" install || die "emake install failed"
 	popd > /dev/null
=20
+	# 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
 }