diff options
author | Michał Górny <mgorny@gentoo.org> | 2012-01-14 14:50:05 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2012-01-14 14:50:05 +0000 |
commit | 86f0389607cd18de7f725deea39d60c6559fdc2b (patch) | |
tree | 7a3786606ac9cea2f4ff3f07da2577e8e8d0eb63 /eclass | |
parent | Calligra 2.3.86 has been released (diff) | |
download | gentoo-2-86f0389607cd18de7f725deea39d60c6559fdc2b.tar.gz gentoo-2-86f0389607cd18de7f725deea39d60c6559fdc2b.tar.bz2 gentoo-2-86f0389607cd18de7f725deea39d60c6559fdc2b.zip |
Pass --docdir to configure, and install docs from it; wrt bug #350423.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/autotools-utils.eclass | 24 |
2 files changed, 26 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index bc51d8f820af..a07b0cac152e 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.79 2012/01/14 14:41:10 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.80 2012/01/14 14:50:05 mgorny Exp $ + + 14 Jan 2012; Michał Górny <mgorny@gentoo.org> autotools-utils.eclass: + Pass --docdir to configure, and install docs from it; wrt bug #350423. 14 Jan 2012; Michał Górny <mgorny@gentoo.org> autotools-utils.eclass: Support installing default docs, similarly to EAPI4; wrt bug #397659. diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass index 9611e54573ce..b1e3920a45bb 100644 --- a/eclass/autotools-utils.eclass +++ b/eclass/autotools-utils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.34 2012/01/14 14:41:10 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.35 2012/01/14 14:50:05 mgorny Exp $ # @ECLASS: autotools-utils.eclass # @MAINTAINER: @@ -376,8 +376,12 @@ 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=() + local econfargs=( + --docdir="${EPREFIX}/usr/share/doc/${PF}" + ) # Handle static-libs found in IUSE, disable them by default if in_iuse static-libs; then @@ -425,6 +429,22 @@ autotools-utils_src_install() { emake DESTDIR="${D}" "$@" install || die "emake install failed" popd > /dev/null + # Move docs installed by autotools (in EAPI < 4). + if [[ ${EAPI} == [23] && -d ${D}${EPREFIX}/usr/share/doc/${PF} ]]; 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 + # XXX: support installing them from builddir as well? if [[ ${DOCS} ]]; then dodoc "${DOCS[@]}" || die "dodoc failed" |