# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit flag-o-matic eutils replace-flags -march=pentium4 -march=pentium3 #IUSE="sdl jpeg png mozilla truetype static openal fmod" IUSE="static openal fmod blender-game" #IUSE="${IUSE} blender-game blender-plugin" S=${WORKDIR}/${P} DESCRIPTION="3D Creation/Animation/Publishing System" HOMEPAGE="http://www.blender.org/" SRC_URI="http://download.blender.org/source/${P}.tar.bz2" SLOT="0" LICENSE="GPL-2 | BL" KEYWORDS="~x86 ~ppc ~amd64" DEPEND="virtual/x11 dev-util/scons media-libs/libsdl media-libs/jpeg media-libs/libpng >=media-libs/freetype-2.0 fmod? ( media-libs/fmod ) openal? ( >=media-libs/openal-20020127 ) >=media-libs/libsdl-1.2 >=media-libs/libvorbis-1.0 >=dev-libs/openssl-0.9.6 >=media-gfx/yafray-0.0.6" src_unpack() { unpack ${A} epatch ${FILESDIR}/${P}-gcc34.patch } src_compile() { cd ${S} # Just to create config.opts for futher editing scons -q use blender-game && sed -i "s/GAMEENGINE = 'false'/GAMEENGINE = 'true'/g" config.opts use fmod && sed -i "s/FMOD = 'false'/FMOD = 'true'/g" config.opts use openal && sed -i "s/OPENAL = 'false'/OPENAL = 'true'/g" config.opts # use quicktime && sed -i "s/QUICKTIME = 'false'/QUICKTIME = 'true'/g" config.opts use static && sed -i "s/_DYNAMIC = 'true'/_DYNAMIC = 'false'/g" config.opts \ && sed -i "s/_STATIC = 'false'/_STATIC = 'true'/g" config.opts # There's a bug either in sed or in my # sed skills, so we have to replace # all instances of -O2 with our CFLAGS # but it doesn't seem to break anything. flags=`echo $CFLAGS | sed "s/\ /\',\ \'/g"` sed -i "s/-O2/${flags}/g" SConstruct scons ${MAKEOPTS} || die # cd ${S}/release/plugins # emake || die } src_install() { exeinto /usr/bin/ doexe ${S}/blender # exeinto /usr/lib/${PN}/textures # doexe ${S}/release/plugins/texture/*.so # exeinto /usr/lib/${PN}/sequences # doexe ${S}/release/plugins/sequence/*.so insinto /usr/share/pixmaps doins ${FILESDIR}/${PN}.png insinto /usr/share/applications doins ${FILESDIR}/${PN}.desktop dodoc COPYING INSTALL README release_2* }