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 ) id 1RmB3z-0000AU-FO for garchives@archives.gentoo.org; Sat, 14 Jan 2012 21:22:59 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 59B04E08CA; Sat, 14 Jan 2012 21:22:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2E345E08CA for ; Sat, 14 Jan 2012 21:22:12 +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 A4D001B403D for ; Sat, 14 Jan 2012 21:22:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id C501480056 for ; Sat, 14 Jan 2012 21:22:10 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: 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: d781a725a056437643ca33ab927c63fb53d6baf5 Date: Sat, 14 Jan 2012 21:22:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ee38dcf3-654d-4978-bb7a-437116e69d59 X-Archives-Hash: 8af7bfacecf3f82a8d73dd56968c120b commit: d781a725a056437643ca33ab927c63fb53d6baf5 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Fri Jan 6 15:32:13 2012 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Sun Jan 8 10:08:46 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/mgorny.git;a=3D= commit;h=3Dd781a725 Pass --docdir to configure, and install docs from it. As EAPI 2 support is intended, this requires configuring the build system to install docs into a temporary location and moving files from it. Due to the lack of 'dodoc -r', directories inside docdir are supported only with EAPI 4. Fixes: https://bugs.gentoo.org/show_bug.cgi?id=3D350423 --- eclass/autotools-utils.eclass | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclas= s index 9a13a3a..fcdf219 100644 --- a/eclass/autotools-utils.eclass +++ b/eclass/autotools-utils.eclass @@ -392,8 +392,12 @@ autotools-utils_src_configure() { [[ -z ${myeconfargs+1} || $(declare -p myeconfargs) =3D=3D 'declare -a'= * ]] \ || die 'autotools-utils.eclass: myeconfargs has to be an array.' =20 + [[ ${EAPI} =3D=3D 2 ]] && ! use prefix && EPREFIX=3D + # Common args - local econfargs=3D() + local econfargs=3D( + --docdir=3D"${EPREFIX}/usr/share/doc/${PF}" + ) =20 # Handle static-libs found in IUSE, disable them by default if in_iuse static-libs; then @@ -441,6 +445,24 @@ autotools-utils_src_install() { emake DESTDIR=3D"${D}" "$@" install || die "emake install failed" popd > /dev/null =20 + # Move docs installed by autotools (in EAPI < 4). + if [[ -d ${D}${EPREFIX}/usr/share/doc/${PF} ]]; then + if [[ ${EAPI} =3D=3D [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"