/[gentoo-x86]/eclass/autotools-utils.eclass
Gentoo

Diff of /eclass/autotools-utils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.33 Revision 1.35
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.33 2012/01/09 10:16:25 jlec Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.35 2012/01/14 14:50:05 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>
374 debug-print-function ${FUNCNAME} "$@" 374 debug-print-function ${FUNCNAME} "$@"
375 375
376 [[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]] \ 376 [[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]] \
377 || die 'autotools-utils.eclass: myeconfargs has to be an array.' 377 || die 'autotools-utils.eclass: myeconfargs has to be an array.'
378 378
379 [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
380
379 # Common args 381 # Common args
380 local econfargs=() 382 local econfargs=(
383 --docdir="${EPREFIX}/usr/share/doc/${PF}"
384 )
381 385
382 # Handle static-libs found in IUSE, disable them by default 386 # Handle static-libs found in IUSE, disable them by default
383 if in_iuse static-libs; then 387 if in_iuse static-libs; then
384 econfargs+=( 388 econfargs+=(
385 --enable-shared 389 --enable-shared
423 _check_build_dir 427 _check_build_dir
424 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null 428 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
425 emake DESTDIR="${D}" "$@" install || die "emake install failed" 429 emake DESTDIR="${D}" "$@" install || die "emake install failed"
426 popd > /dev/null 430 popd > /dev/null
427 431
432 # Move docs installed by autotools (in EAPI < 4).
433 if [[ ${EAPI} == [23] && -d ${D}${EPREFIX}/usr/share/doc/${PF} ]]; then
434 mkdir "${T}"/temp-docdir
435 mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/ \
436 || die "moving docs to tempdir failed"
437
438 local f
439 for f in "${T}"/temp-docdir/*; do
440 [[ -d ${f} ]] \
441 && die "directories in docdir require at least EAPI 4"
442 done
443
444 dodoc "${T}"/temp-docdir/* || die "docdir dodoc failed"
445 rm -r "${T}"/temp-docdir || die
446 fi
447
428 # XXX: support installing them from builddir as well? 448 # XXX: support installing them from builddir as well?
429 if [[ ${DOCS} ]]; then 449 if [[ ${DOCS} ]]; then
430 dodoc "${DOCS[@]}" || die "dodoc failed" 450 dodoc "${DOCS[@]}" || die "dodoc failed"
451 else
452 local f
453 # same list as in PMS
454 for f in README* ChangeLog AUTHORS NEWS TODO CHANGES \
455 THANKS BUGS FAQ CREDITS CHANGELOG; do
456 if [[ -s ${f} ]]; then
457 dodoc "${f}" || die "(default) dodoc ${f} failed"
458 fi
459 done
431 fi 460 fi
432 if [[ ${HTML_DOCS} ]]; then 461 if [[ ${HTML_DOCS} ]]; then
433 dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed" 462 dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed"
434 fi 463 fi
435 464

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.20