# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Cross platform, object orientated threading library maintained by the OpenSceneGraph team." HOMEPAGE="http://www.openscenegraph.org" MY_P="OpenSceneGraph-${PV}" SRC_URI="http://www.openscenegraph.org/downloads/stable_releases/${MY_P}.zip" SLOT="0" LICENSE="LGPL-2.1" KEYWORDS="x86 amd64" IUSE="debug" DEPEND="virtual/opengl media-libs/jpeg media-libs/tiff media-libs/giflib media-libs/freetype dev-util/cmake >=media-libs/libpng-1.2 media-libs/lib3ds" S="${WORKDIR}/OpenSceneGraph" src_unpack() { unpack ${MY_P}.zip EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/patch_2.0_debug_pkgconfig.patch EPATCH_OPTS="-p0 ${S}/include/osg/AnimationPath" epatch ${FILESDIR}/AnimationPath-poker3d.patch } src_compile() { CCACHE=$(echo $FEATURES | grep 'ccache' | sed 's/.*ccache.*/ccache/g') if use debug; then cmake ${S} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG="-ggdb -gstabs" else cmake ${S} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release fi emake } src_install() { make DESTDIR=${D} install || die "einstall failed" insinto "/usr/lib/pkgconfig" doins ${S}/debian/openthreads.pc doins ${S}/debian/openscenegraph.pc }