/[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.37 Revision 1.40
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.37 2012/01/14 14:59:18 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.40 2012/01/14 18:53:56 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>
305 305
306 # gettext 306 # gettext
307 if [[ $(autotools_check_macro AM_GLIB_GNU_GETTEXT) ]]; then 307 if [[ $(autotools_check_macro AM_GLIB_GNU_GETTEXT) ]]; then
308 echo 'no' | autotools_run_tool glib-gettextize --copy 308 echo 'no' | autotools_run_tool glib-gettextize --copy
309 elif [[ $(autotools_check_macro AM_GNU_GETTEXT) ]]; then 309 elif [[ $(autotools_check_macro AM_GNU_GETTEXT) ]]; then
310 eautopoint 310 eautopoint --force
311 fi 311 fi
312 312
313 # intltool 313 # intltool
314 if [[ $(autotools_check_macro AC_PROG_INTLTOOL IT_PROG_INTLTOOL) ]] 314 if [[ $(autotools_check_macro AC_PROG_INTLTOOL IT_PROG_INTLTOOL) ]]
315 then 315 then
316 autotools_run_tool intltoolize --copy --automake 316 autotools_run_tool intltoolize --copy --automake --force
317 fi 317 fi
318 318
319 # gtk-doc 319 # gtk-doc
320 if [[ $(autotools_check_macro GTK_DOC_CHECK) ]]; then 320 if [[ $(autotools_check_macro GTK_DOC_CHECK) ]]; then
321 autotools_run_tool gtkdocize --copy 321 autotools_run_tool gtkdocize --copy
322 fi 322 fi
323 323
324 # gnome-doc 324 # gnome-doc
325 if [[ $(autotools_check_macro GNOME_DOC_INIT) ]]; then 325 if [[ $(autotools_check_macro GNOME_DOC_INIT) ]]; then
326 autotools_run_tool gnome-doc-prepare --copy 326 autotools_run_tool gnome-doc-prepare --copy --force
327 fi 327 fi
328 328
329 # We need to perform the check twice to know whether to run eaclocal. 329 # We need to perform the check twice to know whether to run eaclocal.
330 # (_elibtoolize does that itself) 330 # (_elibtoolize does that itself)
331 if [[ $(autotools_check_macro AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT) ]] 331 if [[ $(autotools_check_macro AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT) ]]
444 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null 444 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
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] ]] \
450 && path_exists "${D}${EPREFIX}"/usr/share/doc/${PF}/*; then
451 if [[ $(find "${D}${EPREFIX}"/usr/share/doc/${PF}/* -type d) ]]; then
452 eqawarn "autotools-utils: directories in docdir require at least EAPI 4"
453 else
450 mkdir "${T}"/temp-docdir 454 mkdir "${T}"/temp-docdir
451 mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/ \ 455 mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/ \
452 || die "moving docs to tempdir failed" 456 || die "moving docs to tempdir failed"
453 457
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" 458 dodoc "${T}"/temp-docdir/* || die "docdir dodoc failed"
461 rm -r "${T}"/temp-docdir || die 459 rm -r "${T}"/temp-docdir || die
460 fi
462 fi 461 fi
463 462
464 # XXX: support installing them from builddir as well? 463 # XXX: support installing them from builddir as well?
465 if [[ ${DOCS} ]]; then 464 if [[ ${DOCS} ]]; then
466 dodoc "${DOCS[@]}" || die "dodoc failed" 465 dodoc "${DOCS[@]}" || die "dodoc failed"

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20