# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: gearbox-8.07.ebuild $ inherit eutils flag-o-matic autotools DESCRIPTION="A collection of libraries for robotics, including hardware drivers and algorithms." SRC_URI="http://downloads.sourceforge.net/${PN}/${P}.tar.gz" HOMEPAGE="http://gearbox.sourceforge.net" LICENSE="GPL-2" KEYWORDS="~x86" SLOT="0" IUSE="doc Ice" RESTRICT="mirror" DEPEND=">=dev-util/cmake-2.6 doc? ( app-doc/doxygen virtual/latex-base virtual/ghostscript app-text/psutils ) Ice? ( dev-cpp/Ice )" RDEPEND="${DEPEND}" S=${WORKDIR}/${PN} src_unpack() { unpack ${A} || die "Unpacking ${A} failed!" cd ${S} epatch "${FILESDIR}"/svn308.patch || die "patching failed !" cp "${FILESDIR}"/gearbox_logo.png "${S}"/doc/images/ } src_compile() { if ! use Ice; then elog " Lack of cpp-lib/Ice will disable same drivers " fi cmake . || die "cmake faield !" make ||die "make failed !" if use doc; then cd ${S}/doc sed -i -e 's/GENERATE_LATEX = NO/GENERATE_LATEX = YES/' doxyfile || die "sed1" sed -i -e 's/GENERATE_MAN = NO/GENERATE_MAN = YES/' doxyfile || die "sed2" doxygen doxyfile || die "building doc failed !" cd ${S}/doc/latex make ps ps_2on1 pdf pdf_2on1 || die "latex errors!" cd ${S} fi } src_install () { einstall DESTDIR="${D}" || die "install failed !" dodoc LICENSE dolib.so ${D}/usr/lib/gearbox/*.so rm -rf ${D}/usr/lib/gearbox dohtml -r doc/html/* doman doc/man/man3/* cd ${S}/doc/latex insinto /usr/share/doc/${P} doins *.pdf *.ps || die "latex errors!" }