From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/mgorny:master commit in: eclass/
Date: Mon, 5 Dec 2011 08:38:26 +0000 (UTC) [thread overview]
Message-ID: <d0a416cfdbcd3246b51b07b459793c9c41a8b41f.mgorny@gentoo> (raw)
commit: d0a416cfdbcd3246b51b07b459793c9c41a8b41f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 30 17:50:12 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Nov 30 22:57:32 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=d0a416cf
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
---
eclass/autotools-utils.eclass | 54 +++++++++++++++++++++++++++++++++++++----
1 files changed, 49 insertions(+), 5 deletions(-)
diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
index 0aa1679..87cbd4a 100644
--- a/eclass/autotools-utils.eclass
+++ b/eclass/autotools-utils.eclass
@@ -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
}
next reply other threads:[~2011-12-05 8:38 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 8:38 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-05-21 17:32 [gentoo-commits] dev/mgorny:master commit in: eclass/ Michał Górny
2012-01-14 21:22 Michał Górny
2012-01-14 21:22 Michał Górny
2012-01-14 21:22 Michał Górny
2012-01-08 16:32 Michał Górny
2012-01-07 22:36 Michał Górny
2012-01-07 22:36 Michał Górny
2012-01-07 22:36 Michał Górny
2012-01-07 22:36 Michał Górny
2011-12-29 20:25 Michał Górny
2011-12-05 8:38 Michał Górny
2011-12-05 8:38 Michał Górny
2011-12-05 8:38 Michał Górny
2011-12-05 8:38 Michał Górny
2011-12-05 8:38 Michał Górny
2011-12-05 8:38 Michał Górny
2011-12-05 8:36 Michał Górny
2011-11-29 21:41 Michał Górny
2011-11-29 21:41 Michał Górny
2011-09-18 9:42 Michał Górny
2011-04-30 21:14 Michał Górny
2011-04-30 6:45 Michał Górny
2011-04-30 6:45 Michał Górny
2011-04-30 6:45 Michał Górny
2011-04-30 6:45 Michał Górny
2011-04-28 16:33 Michał Górny
2011-04-28 14:33 Michał Górny
2011-04-28 14:33 Michał Górny
2011-04-28 14:02 Michał Górny
2011-04-17 19:41 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0a416cfdbcd3246b51b07b459793c9c41a8b41f.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox