| 1 | # Copyright 1999-2012 Gentoo Foundation |
1 | # Copyright 1999-2012 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.38 2012/01/14 15:18:05 mgorny Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.39 2012/01/14 18:14:39 mgorny Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: autotools-utils.eclass |
5 | # @ECLASS: autotools-utils.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Maciej Mrozowski <reavertm@gentoo.org> |
7 | # Maciej Mrozowski <reavertm@gentoo.org> |
| 8 | # Michał Górny <mgorny@gentoo.org> |
8 | # Michał Górny <mgorny@gentoo.org> |
| … | |
… | |
| 445 | emake DESTDIR="${D}" "$@" install || die "emake install failed" |
445 | emake DESTDIR="${D}" "$@" install || die "emake install failed" |
| 446 | popd > /dev/null |
446 | popd > /dev/null |
| 447 | |
447 | |
| 448 | # Move docs installed by autotools (in EAPI < 4). |
448 | # Move docs installed by autotools (in EAPI < 4). |
| 449 | if [[ ${EAPI} == [23] && -d ${D}${EPREFIX}/usr/share/doc/${PF} ]]; then |
449 | if [[ ${EAPI} == [23] && -d ${D}${EPREFIX}/usr/share/doc/${PF} ]]; then |
|
|
450 | if [[ $(find "${D}${EPREFIX}"/usr/share/doc/${PF}/* -type d) ]]; then |
|
|
451 | eqawarn "autotools-utils: directories in docdir require at least EAPI 4" |
|
|
452 | else |
| 450 | mkdir "${T}"/temp-docdir |
453 | mkdir "${T}"/temp-docdir |
| 451 | mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/ \ |
454 | mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/ \ |
| 452 | || die "moving docs to tempdir failed" |
455 | || die "moving docs to tempdir failed" |
| 453 | |
456 | |
| 454 | local f |
|
|
| 455 | for f in "${T}"/temp-docdir/*; do |
|
|
| 456 | [[ -d ${f} ]] \ |
|
|
| 457 | && die "directories in docdir require at least EAPI 4" |
|
|
| 458 | done |
|
|
| 459 | |
|
|
| 460 | dodoc "${T}"/temp-docdir/* || die "docdir dodoc failed" |
457 | dodoc "${T}"/temp-docdir/* || die "docdir dodoc failed" |
| 461 | rm -r "${T}"/temp-docdir || die |
458 | rm -r "${T}"/temp-docdir || die |
|
|
459 | fi |
| 462 | fi |
460 | fi |
| 463 | |
461 | |
| 464 | # XXX: support installing them from builddir as well? |
462 | # XXX: support installing them from builddir as well? |
| 465 | if [[ ${DOCS} ]]; then |
463 | if [[ ${DOCS} ]]; then |
| 466 | dodoc "${DOCS[@]}" || die "dodoc failed" |
464 | dodoc "${DOCS[@]}" || die "dodoc failed" |