# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils libtool DESCRIPTION="Object-oriented Graphics Rendering Engine" HOMEPAGE="http://www.ogre3d.org/" SRC_URI="mirror://sourceforge/ogre/${PN}-linux_osx-v${PV//./-}.tar.bz2" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~x86 ~amd64 ~ppc" # A note on some of the USE flags: # devil - compiles image loading stuff, recommended unless you have your own image loading code # double-precision - uses double precision floats, runs slower. # - # gtk - compiles the gtk opengl renderer and platform manager # sdl - compiles the sdl opengl renderer and platform manager # The above two are mutually exclusive. If they are omitted, the GLX renderer and platform manager is used # - # gtk-config - this is separate from the renderers/platforms, it's the toolkit used for config dialogs. # Uses cli if not specified. # Perhaps should be renamed to avoid confusion? # threads - Enables threading support, this is highly experimental. IUSE="cegui cg devil double-precision doc gtk gtk-config openexr sdl threads" RDEPEND=">=dev-libs/zziplib-0.13.36 sdl? ( >=media-libs/libsdl-1.2.6 ) =media-libs/freetype-2* cegui? ( >=dev-games/cegui-0.2.0 ) devil? ( >=media-libs/devil-1.5 ) openexr? ( >=media-libs/openexr-1.0 ) gtk-config? ( >=dev-cpp/libglademm-2.0 >=dev-cpp/gtkmm-2.0 ) gtk? ( >=dev-cpp/gtkglextmm-1.0 >=dev-cpp/libglademm-2.0 ) virtual/opengl sys-libs/zlib" DEPEND="${RDEPEND} >=sys-devel/libtool-1.5.0 sys-devel/flex cg? ( >=media-gfx/nvidia-cg-toolkit-1.2 ) amd64? || ( dev-libs/STLport >=sys-devel/gcc-3.0 )" S="${WORKDIR}/ogrenew" pkg_setup() { if use gtk && use sdl; then die "The sdl and gtk USE flags are mutually exclusive! Please choose one or the other." fi ewarn "Please note:" if ! use cg; then ewarn "It is recommended that you emerge ogre with the cg USE flag." fi if use double-precision; then ewarn "You are using the double-precision USE flag; double floating point precision mode is much slower than normal." fi if use threads; then ewarn "You are using the threads USE flag; threading is still highly experimental. Use with caution." fi ewarn "The gtk and sdl flags are mutually exclusive. If neither is selected glx support is assumed." ewarn "The gtk-config flag is used to specify the toolkit used for configuration dialogs. If not selected, cli will be used." epause 10 } src_compile() { elibtoolize local myconf="cli" local myplat="GLX" local flags="" use gtk-config && myconf="gtk" use sdl && myplat="SDL" use gtk && myplat="gtk" # use_enable was not used because it doesn't work correctly with ogre. use double-precision && flags="$flags --enable-double" use threads && flags="$flags --enable-threading" use devil || flags="$flags --disable-devil" use cg || flags="$flags --disable-cg" use openexr && flags="$flags --enable-openexr" use sdl || flags="$flags --disable-sdltest" econf --with-cfgtk=${myconf} \ --with-platform=${myplat} \ --with-gl-support=${myplat} \ $flags \ || die emake || die "emake failed" } src_install() { make DESTDIR="${D}" install || die "make install failed" if use doc ; then dohtml -r Docs/* Docs/Tutorials/* fi insinto /usr/share/OGRE/Media doins Samples/Media/* dodoc AUTHORS BUGS LINUX.DEV README Docs/README.linux dohtml Docs/*.html # Maybe install the sample applications somewhere as well? }