public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/mgorny:master commit in: eclass/
Date: Sun,  8 Jan 2012 16:32:01 +0000 (UTC)	[thread overview]
Message-ID: <d26b8b1ed6938af622c6041fdda3a98b518448e7.mgorny@gentoo> (raw)

commit:     d26b8b1ed6938af622c6041fdda3a98b518448e7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  8 10:07:23 2012 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jan  8 10:07:23 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=d26b8b1e

Fix passing temporary --docdir to packages.

Rather install in the actual docdir, and move forth and back whenever
necessary.

---
 eclass/autotools-utils.eclass |   39 +++++++++++++++++++++------------------
 1 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
index 1b19ed2..fcdf219 100644
--- a/eclass/autotools-utils.eclass
+++ b/eclass/autotools-utils.eclass
@@ -392,9 +392,11 @@ autotools-utils_src_configure() {
 	[[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]] \
 		|| die 'autotools-utils.eclass: myeconfargs has to be an array.'
 
+	[[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
+
 	# Common args
 	local econfargs=(
-		--docdir=/temporary-docdir
+		--docdir="${EPREFIX}/usr/share/doc/${PF}"
 	)
 
 	# Handle static-libs found in IUSE, disable them by default
@@ -443,6 +445,24 @@ autotools-utils_src_install() {
 	emake DESTDIR="${D}" "$@" install || die "emake install failed"
 	popd > /dev/null
 
+	# Move docs installed by autotools (in EAPI < 4).
+	if [[ -d ${D}${EPREFIX}/usr/share/doc/${PF} ]]; then
+		if [[ ${EAPI} == [23] ]]; then
+			mkdir "${T}"/temp-docdir
+			mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/ \
+				|| die "moving docs to tempdir failed"
+
+			local f
+			for f in "${T}"/temp-docdir/*; do
+				[[ -d ${f} ]] \
+					&& die "directories in docdir require at least EAPI 4"
+			done
+
+			dodoc "${T}"/temp-docdir/* || die "docdir dodoc failed"
+			rm -r "${T}"/temp-docdir || die
+		fi
+	fi
+
 	# XXX: support installing them from builddir as well?
 	if [[ ${DOCS} ]]; then
 		dodoc "${DOCS[@]}" || die "dodoc failed"
@@ -460,23 +480,6 @@ autotools-utils_src_install() {
 		dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed"
 	fi
 
-	# Move docs installed by autotools.
-	if [[ -d ${D}/temporary-docdir ]]; then
-		if [[ ${EAPI} = 4 ]]; then
-			dodoc -r "${D}"/temporary-docdir/* || die "docdir dodoc failed"
-		else
-			local f
-			for f in "${D}"/temporary-docdir/*; do
-				[[ -d ${f} ]] \
-					&& die "directories in docdir require at least EAPI 4"
-			done
-
-			dodoc "${D}"/temporary-docdir/* || die "docdir dodoc failed"
-		fi
-
-		rm -r "${D}"/temporary-docdir
-	fi
-
 	# Remove libtool files and unnecessary static libs
 	remove_libtool_files
 }



             reply	other threads:[~2012-01-08 16:32 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-08 16:32 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-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: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=d26b8b1ed6938af622c6041fdda3a98b518448e7.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