--- /usr/portage/media-libs/cal3d/cal3d-0.11.0-r1.ebuild 2008-04-27 18:06:24.000000000 -0400 +++ /usr/local/portage/media-libs/cal3d/cal3d-0.11.0-r1.ebuild 2008-05-08 16:26:38.000000000 -0400 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-libs/cal3d/cal3d-0.11.0-r1.ebuild,v 1.6 2008/04/27 21:36:45 tupone Exp $ -inherit eutils +inherit eutils autotools DESCRIPTION="Cal3D is a skeletal based character animation library" HOMEPAGE="http://home.gna.org/cal3d" @@ -11,14 +11,27 @@ LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="amd64 ~ia64 ppc x86 ~x86-fbsd" -IUSE="16bit-indices debug" +IUSE="16bit-indices debug doc" DEPEND="" +RDEPEND="doc? ( app-doc/doxygen + app-text/docbook-sgml-utils )" src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${P}-gcc43.patch + if use doc ; then + sed s/db2html/docbook2html/ configure.in > configure.2 + mv configure.2 configure.in + sed s/db2html/docbook2html/ docs/Makefile.am > docs/Makefile.2 + mv docs/Makefile.2 docs/Makefile.am + eaclocal + eautoheader + _elibtoolize + eautomake + eautoconf + fi } src_compile() { @@ -27,8 +40,29 @@ $(use_enable 16bit-indices) \ || die emake || die + if use doc ; then + cd docs + emake doc-api || die + emake doc-guide || die + cd faq + doxygen cal3dfaq.doxygen || die + fi } src_install() { einstall || die + if use doc ; then + mkdir -p "${D}"/usr/share/doc/${PF}/api + for x in docs/api/html/* ; do + install -m 644 -t "${D}"/usr/share/doc/${PF}/api ${x} || die + done + mkdir -p "${D}"/usr/share/doc/${PF}/guide + for x in docs/*.html docs/*.gif ; do + install -m 644 -t "${D}"/usr/share/doc/${PF}/guide ${x} || die + done + mkdir -p "${D}"/usr/share/doc/${PF}/faq + for x in docs/faq/html/* ; do + install -m 644 -t "${D}"/usr/share/doc/${PF}/faq ${x} || die + done + fi }