# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-games/ogre/ogre-1.0.7.ebuild,v 1.1 2006/05/09 20:25:47 mattepiu Exp $ inherit eutils MY_PV=${PV//./-} MY_PV=${MY_PV/_/} DESCRIPTION="Object-oriented Graphics Rendering Engine" HOMEPAGE="http://www.ogre3d.org/" SRC_URI="mirror://sourceforge/ogre/${PN}-linux_osx-v${MY_PV}.tar.bz2" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="cegui cg devil double-precision gtk openexr sdl threads" RDEPEND=">=dev-libs/zziplib-0.13.36 =media-libs/freetype-2* threads? ( >=dev-libs/boost-1.33.0 ) cegui? ( >=dev-games/cegui-0.3.0 ) devil? ( >=media-libs/devil-1.5 ) openexr? ( >=media-libs/openexr-1.2 ) sdl? ( >=media-libs/libsdl-1.2.6 ) gtk? ( >=dev-cpp/libglademm-2.4 >=dev-cpp/gtkmm-2.4 ) virtual/opengl sys-libs/zlib" DEPEND="${RDEPEND} sys-devel/flex cg? ( >=media-gfx/nvidia-cg-toolkit-1.2 )" S=${WORKDIR}/ogrenew src_unpack() { unpack ${A} cd "${S}" ./bootstrap || die "bootstrap failed" # Fails to build on amd64 w/gcc-3.4.4 so remove the flag ... sed -i \ -e 's:-fno-rtti::g' \ configure || die "sed CFLAGS" } src_compile() { # default to CLI run-time configuration prompt local mycfgtk local myplat if use gtk && ! use sdl; then mycfgtk="gtk" myplat="GLX" elif use sdl; then mycfgtk="cli" myplat="SDL" else mycfgtk="cli" myplat="GLX" fi econf \ --with-cfgtk=${mycfgtk} \ --with-platform=${myplat} \ $(use_enable devil) \ $(use_enable cg) \ $(use_enable openexr) \ $(use_enable threads threading) \ $(use_enable double-precision double) \ $(use_enable sdl sdltest) \ || die emake || die "emake failed" } src_install() { make DESTDIR="${D}" install || die "make install failed" insinto /usr/share/OGRE/Media doins Samples/Media/* dodoc AUTHORS BUGS LINUX.DEV README Docs/README.linux dohtml Docs/*.html } pkg_postinst() { echo einfo "There isn't a correct way to install examples" einfo "through ebuild." einfo "If you need to check examples, unpack the original" einfo "ogre archive to a local directory, go in main " einfo "directory and then run ./bootstrap and then" einfo "./configure --prefix=/usr" einfo "then modify /usr/local to /usr in files:" einfo "Samples/Common/bin/plugins.cfg and" einfo "Samples/Common/bin/quake3settings.cfg " einfo "now cd Samples ;make to compile them" einfo "then you'll need to run them from Common/bin" einfo "eg: ../../SkeletalAnimation/src/SkeletalAnimation" }