/[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.34 Revision 1.36
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.34 2012/01/14 14:41:10 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.36 2012/01/14 14:58:29 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>
330 eaclocal 330 eaclocal
331 fi 331 fi
332 332
333 eautoconf 333 eautoconf
334 eautoheader 334 eautoheader
335 eautomake 335 FROM_EAUTORECONF=sure eautomake
336 336
337 local x 337 local x
338 for x in $(autotools_get_subdirs); do 338 for x in $(autotools_get_subdirs); do
339 if [[ -d ${x} ]] ; then 339 if [[ -d ${x} ]] ; then
340 pushd "${x}" >/dev/null 340 pushd "${x}" >/dev/null
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
422 426
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
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
427 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"
431 else 451 else

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.36

  ViewVC Help
Powered by ViewVC 1.1.20