# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_P="OpenSceneGraph-${PV}" DESCRIPTION="an open source high performance 3D graphics toolkit" HOMEPAGE="http://www.openscenegraph.org/" SRC_URI="http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-${PV}.zip" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~amd64" IUSE="debug" RDEPEND="virtual/opengl media-libs/jpeg media-libs/tiff media-libs/giflib media-libs/freetype media-libs/libpng media-libs/lib3ds" DEPEND="${DEPEND} dev-util/cmake" S="${MY_P}" src_unpack() { unpack ${A} cd "${S}" epatch ${FILESDIR}/${P}-pkgconfig.patch epatch ${FILESDIR}/${P}-debug.patch epatch ${FILESDIR}/${P}-openthreads.patch epatch ${FILESDIR}/${P}-osgga.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}/openthreads.pc || die "failed installing oth pkgconfig" doins ${S}/openscenegraph.pc || die "failed installing osg pkgconfig" }