summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthoine Bourgeois <anthoine.bourgeois@gmail.com>2011-12-20 23:15:41 +0100
committerAnthoine Bourgeois <anthoine.bourgeois@gmail.com>2011-12-20 23:15:41 +0100
commit12d1da9be7f74809fd9c2b833280a88f49888707 (patch)
tree382f1eb8456965f61d284a7be2c0cc04ce0de101
parentblender-2.60a: Update with upstream version. (diff)
downloadaluco-12d1da9be7f74809fd9c2b833280a88f49888707.tar.gz
aluco-12d1da9be7f74809fd9c2b833280a88f49888707.tar.bz2
aluco-12d1da9be7f74809fd9c2b833280a88f49888707.zip
+blender-2.61.ebuild
+cycles use flag with deps +eigen3 and bullet extern libs removed. +CVE-2009-3850 patch to 2.61 (No change, still v3). +Keep the SLOT=2.60. Thank to Simone Scanzoni.
-rw-r--r--media-gfx/blender/Manifest10
-rw-r--r--media-gfx/blender/blender-2.61.ebuild446
-rw-r--r--media-gfx/blender/files/blender-2.60-bullet.patch192
-rw-r--r--media-gfx/blender/files/blender-2.60-libav-0.7.patch30
-rw-r--r--media-gfx/blender/files/blender-2.61-CVE-2009-3850-v3.patch146
-rw-r--r--media-gfx/blender/files/blender-2.61-desktop.patch20
-rw-r--r--media-gfx/blender/files/blender-2.61-eigen.patch543
-rw-r--r--media-gfx/blender/files/blender-2.61-enable_site_module.patch31
-rw-r--r--media-gfx/blender/files/blender-2.61-glew.patch44
-rw-r--r--media-gfx/blender/files/blender-2.61-insecure.desktop15
10 files changed, 1477 insertions, 0 deletions
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 16d3d1a..e0239b4 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,7 +1,9 @@
AUX blender-2.60-bmake.patch 3429 RMD160 585fe2729d0756fbb80d62b35da96d7c7d07b78d SHA1 7832d676e4625ec139bfc9fe113604f4c810a614 SHA256 3432df1f780503ad34a96c83d3faea9fabe2fa58f1bcdf6a52a2d7ae33874f16
+AUX blender-2.60-bullet.patch 7975 RMD160 3309d8ff9b5784963c85b0ec6fa5be29dab70015 SHA1 978d53a49fe76f107899432a4a88975cead1dddc SHA256 5b76da258eb6ce5533afa400838ee87819aece386911993de69a7864d0290467
AUX blender-2.60-doxyfile.patch 595 RMD160 f4890f0ead6943f323bc61e7f6766c2133e8591b SHA1 0fd7c202f044224cf9944596cf36cfcd56b39067 SHA256 d267e0fab4ecb9be78b9238a9c2af60ac9d5ddb7b42f73f479b9266704605883
AUX blender-2.60-eigen.patch 13804 RMD160 67b2d444f35ac5b9f2e2fc1ee93a105feadc83db SHA1 943ba7ebd2f37102b62d790d7ad4795695fba268 SHA256 b973b07db667ab84eebae24c47805772f6f2694bb77cb8846431d502c56b54d8
AUX blender-2.60-glew.patch 1128 RMD160 392907190c8c970a1b2f0b20067d9f1bf108edbc SHA1 e9890bc4c420b16ce4f9c9c6cfc71c13852e4de3 SHA256 a43f0a0ac2a0cc5096e8488c926e7a32933a5910300440590a1cac5e1bb73f20
+AUX blender-2.60-libav-0.7.patch 1181 RMD160 66dc84d6ca37a97bb43886ed86b72499383636b6 SHA1 be60d7fd39821fb28b3e23a659df8f7eb51d1f60 SHA256 d8e7a08b042ce8311bd71e2edec7457ddf8fe8b64243f30f179d391ea170ab50
AUX blender-2.60-linux-3.patch 414 RMD160 cb1cfc00e363e00c67a3c6d3567768418be78f39 SHA1 71f4701aa2e88de35843661cf5eecfe411ccd99b SHA256 4f1f8960e1b5706b426e272c17b70682b1eaa5903fa325e4d4db21efd540d732
AUX blender-2.60-openjpeg.patch 1731 RMD160 898318cfdc0c5daafd39d1f0f116531c6a2fd69f SHA1 5870c4f7b50f9edc4d12b68a684b8bb32548ad20 SHA256 3a684711e40ba365152593a6c90bbf38b190c84132e288c3dd3c7409dc6f9a62
AUX blender-2.60a-CVE-2009-3850-v3.patch 7787 RMD160 02afc6ef3bcdf314c693c44be0cfc649ffd4ebf3 SHA1 031b42d09021b027dde631f08bc8e973299edab9 SHA256 1aebbdd475ccdb1d4e77c4c1ae4c3205e76a1a06f7dcd5e70624c141f42d204b
@@ -11,7 +13,15 @@ AUX blender-2.60a-enable_site_module.patch 974 RMD160 e93ddcd1372751951b6e56f72c
AUX blender-2.60a-insecure.desktop 594 RMD160 48d7b683f4ae057a1766dabb267e5048e92114f6 SHA1 1d6d2c61a0c79b6c78842ad354746ffe5a2d7ffa SHA256 2b7920c517c93d4f1430dc7ee70a414d32c1b17648a0e8395bbd900d1be8dd84
AUX blender-2.60a-libav-0.7.patch 1181 RMD160 66dc84d6ca37a97bb43886ed86b72499383636b6 SHA1 be60d7fd39821fb28b3e23a659df8f7eb51d1f60 SHA256 d8e7a08b042ce8311bd71e2edec7457ddf8fe8b64243f30f179d391ea170ab50
AUX blender-2.60a-linux-3.patch 414 RMD160 cb1cfc00e363e00c67a3c6d3567768418be78f39 SHA1 71f4701aa2e88de35843661cf5eecfe411ccd99b SHA256 4f1f8960e1b5706b426e272c17b70682b1eaa5903fa325e4d4db21efd540d732
+AUX blender-2.61-CVE-2009-3850-v3.patch 7515 RMD160 0faf4de3a330fd2920bdf2b688d3bc5cb530d86f SHA1 77c637a4e6be816534887dab06614bb3dddad3af SHA256 f9d2eb3e09d30c21a3f51de34bc978d25c598a2fc420e809ea49293c55178139
+AUX blender-2.61-desktop.patch 642 RMD160 5706c6cdcad1655fb9c4f3b5feeb47c5f11f2c7a SHA1 689e9c8bbf2ce001cac08a74d7ed13ac00d7b2b4 SHA256 11dcfa44db29728c518e2b560ce9f3ccbd67af372aa3421e4f5d6512f9298a33
+AUX blender-2.61-eigen.patch 27106 RMD160 3042ba69913c98531ad60bd3a7fadf7817c5b062 SHA1 cde414399438b7d9ea7e756ef86aa08b5c9983e2 SHA256 e1e465f158a49287795d0f1a046d59b8d7ff8459c3ea8d57ee4b40518897d903
+AUX blender-2.61-enable_site_module.patch 1061 RMD160 60ba42b15c490776200fa0eea38ae7c856a1f567 SHA1 a9e5bf42d9b6ade5fb595009c6fde7412b002a8f SHA256 3d7b7c0814d97ed5db76828e243120782a0fb0a5304b90d978c3a20e1fb37a83
+AUX blender-2.61-glew.patch 1495 RMD160 86060b81c7649f9a47c44ce1f7393b5bc3becab1 SHA1 9612b2c580b640f8fd1509c70509b9816f05d176 SHA256 2c65e2bdf281672e2e25ca9d31afb66b3e34492dda7a5c613cd235ca78b0e45e
+AUX blender-2.61-insecure.desktop 593 RMD160 d5c2e3e29700e193d98c7f982a36a995df4e0ab1 SHA1 6ba00fbdc75eb7e874bb74ee630187eca1c1d709 SHA256 ec99f755e480419376c4d6aec89a55a815e51baf973c181e0aacc60e4d9f1d1a
AUX blender-desktop.patch 641 RMD160 5be612d2836005e51e1bcfed10959e75315f201f SHA1 b0f99cdefc6c1a21b32ea97a237e214b22e5f9e6 SHA256 f52bc6f42eb07e693bfbe578747cf126b242b04273cbcd78a8ee4879eae8b514
DIST blender-2.60a.tar.gz 25679123 RMD160 74434c4e748872322386971cf6021255b0bfa1c8 SHA1 f23551e6ed661626c61de4a758d9ff67e0f27529 SHA256 7d788599ab46dac37f630dec026d06f7e3d73508f243eeb4ade8bcdcb661f124
+DIST blender-2.61.tar.gz 25087312 RMD160 fb3b368144d31cd850a0602b7b5e746fca17d7fc SHA1 1b0d008e8022cb29efc9b4a337379eeb93bdcbb7 SHA256 58563583c8775fa0f746a7f4899b1619fec3df69accfa536544fdcbf372685f1
EBUILD blender-2.60a.ebuild 13760 RMD160 bc4458ccf226e20c140ed022325c35bda09a1add SHA1 95a5894363e730db0a66a16f9e8fcb775ea6896a SHA256 146e61d01da115d202f5c77b17ae938a4c2e92344b71b5422bcf6165d4d71d29
+EBUILD blender-2.61.ebuild 13619 RMD160 1a7a76ce3f2ab0a041b6a81fdc4a75a16594a846 SHA1 38578304d44fe4687719587ebc674a9ba9e0a1bd SHA256 fa23873336677309cb686d32184239adba8f9e98becf0ac8737948e5fb708203
MISC metadata.xml 2030 RMD160 e0ad1191e983fb32112e2c5a997ac00896725d41 SHA1 aff5d7831e667d1347f98908ef442f64b791fe4f SHA256 2edc933d4b22020293f8bdcd5b847b30fa2c4ae6f8aac61d368667dca1dab948
diff --git a/media-gfx/blender/blender-2.61.ebuild b/media-gfx/blender/blender-2.61.ebuild
new file mode 100644
index 0000000..b299092
--- /dev/null
+++ b/media-gfx/blender/blender-2.61.ebuild
@@ -0,0 +1,446 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.60a.ebuild,v 1.4 2011/11/13 22:43:48 sping Exp $
+
+PYTHON_DEPEND="3:3.2"
+EAPI=4
+
+if [[ ${PV} == *9999 ]] ; then
+SCM="subversion"
+ESVN_REPO_URI="https://svn.blender.org/svnroot/bf-blender/trunk/blender"
+fi
+
+inherit scons-utils eutils python versionator flag-o-matic toolchain-funcs ${SCM}
+
+IUSE="cycles +game-engine player +elbeem +openexr ffmpeg jpeg2k openal openmp \
+ +dds debug doc fftw jack apidoc sndfile lcms tweak-mode sdl sse \
+ redcode +zlib iconv contrib 3dmouse"
+
+LANGS="en ar bg ca cs de el es fi fr hr it ja ko nl pl pt_BR ro ru sr sv uk zh_CN"
+for X in ${LANGS} ; do
+ IUSE="${IUSE} linguas_${X}"
+done
+
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="http://www.blender.org"
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="http://download.blender.org/source/${P}.tar.gz"
+fi
+
+#SLOT="$(get_version_component_range 1-2)"
+SLOT="2.60"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="virtual/jpeg
+ media-libs/libpng
+ x11-libs/libXi
+ x11-libs/libX11
+ media-libs/tiff
+ media-libs/libsamplerate
+ virtual/opengl
+ >=media-libs/freetype-2.0
+ virtual/libintl
+ media-libs/glew
+ >=sci-physics/bullet-2.76
+ dev-cpp/eigen:3
+ cycles? (
+ media-libs/openimageio
+ dev-libs/boost
+ )
+ iconv? ( virtual/libiconv )
+ zlib? ( sys-libs/zlib )
+ sdl? ( media-libs/libsdl[audio,joystick] )
+ openexr? ( media-libs/openexr )
+ ffmpeg? (
+ >=virtual/ffmpeg-0.6.90[x264,mp3,encode,theora]
+ jpeg2k? ( >=virtual/ffmpeg-0.6.90[x264,mp3,encode,theora,jpeg2k] )
+ )
+ openal? ( >=media-libs/openal-1.6.372 )
+ fftw? ( sci-libs/fftw:3.0 )
+ jack? ( media-sound/jack-audio-connection-kit )
+ sndfile? ( media-libs/libsndfile )
+ lcms? ( media-libs/lcms )"
+
+DEPEND="dev-util/scons
+ apidoc? (
+ dev-python/sphinx
+ app-doc/doxygen[-nodot]
+ game-engine? ( dev-python/epydoc )
+ )
+ ${RDEPEND}"
+
+# configure internationalization only if LINGUAS have more
+# languages than 'en', otherwise must be disabled
+if [[ ${LINGUAS} != "en" && -n ${LINGUAS} ]]; then
+ DEPEND="${DEPEND}
+ sys-devel/gettext"
+fi
+
+blend_with() {
+ local UWORD="$2"
+ [ -z "${UWORD}" ] && UWORD="$1"
+ if use $1; then
+ echo "WITH_BF_${UWORD}=1" | tr '[:lower:]' '[:upper:]' \
+ >> "${S}"/user-config.py
+ else
+ echo "WITH_BF_${UWORD}=0" | tr '[:lower:]' '[:upper:]' \
+ >> "${S}"/user-config.py
+ fi
+}
+
+src_unpack() {
+if [[ ${PV} == *9999 ]] ; then
+ subversion_fetch
+ if use contrib; then
+ S="${S}"/release/scripts/addons_contrib subversion_fetch \
+ "https://svn.blender.org/svnroot/bf-extensions/contrib/py/scripts/addons/"
+ fi
+else
+ unpack ${A}
+fi
+}
+
+pkg_setup() {
+ enable_openmp=0
+ if use openmp; then
+ if tc-has-openmp; then
+ enable_openmp=1
+ else
+ ewarn "You are using gcc built without 'openmp' USE."
+ ewarn "Switch CXX to an OpenMP capable compiler."
+ die "Need openmp"
+ fi
+ fi
+ python_set_active_version 3
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-desktop.patch
+
+ # TODO: write a proper Makefile to replace the borked bmake script
+ epatch "${FILESDIR}"/${PN}-${SLOT}-bmake.patch
+ chmod 755 "${WORKDIR}"/${P}/release/plugins/bmake
+
+ # OpenJPEG
+ einfo "Removing bundled OpenJPEG ..."
+ rm -r extern/libopenjpeg
+ epatch "${FILESDIR}"/${PN}-${SLOT}-openjpeg.patch
+
+ # Glew
+ einfo "Removing bundled Glew ..."
+ rm -r extern/glew
+ epatch "${FILESDIR}"/${P}-glew.patch
+
+ # Eigen3
+ einfo "Removing bundled Eigen3 ..."
+ rm -r extern/Eigen3
+ epatch "${FILESDIR}"/${P}-eigen.patch
+
+ # Bullet3
+ einfo "Removing bundled Bullet2 ..."
+ rm -r extern/bullet2
+ epatch "${FILESDIR}"/${PN}-${SLOT}-bullet.patch
+
+ # Linux 3.x (bug #381099)
+ epatch "${FILESDIR}"/${PN}-${SLOT}-linux-3.patch
+
+ epatch "${FILESDIR}"/${PN}-${SLOT}-libav-0.7.patch
+ epatch "${FILESDIR}"/${P}-CVE-2009-3850-v3.patch
+ epatch "${FILESDIR}"/${P}-enable_site_module.patch
+}
+
+src_configure() {
+ # add system openjpeg into Scons build options.
+ cat <<- EOF >> "${S}"/user-config.py
+ BF_OPENJPEG="/usr"
+ BF_OPENJPEG_INC="/usr/include"
+ BF_OPENJPEG_LIB="openjpeg"
+ EOF
+
+ # FIX: littlecms includes path aren't specified
+ if use lcms; then
+ cat <<- EOF >> "${S}"/user-config.py
+ BF_LCMS_INC="/usr/include/"
+ BF_LCMS_LIB="lcms"
+ BF_LCMS_LIBPATH="/usr/lib/"
+ EOF
+ fi
+
+ # add system sci-physic/bullet into Scons build options.
+ cat <<- EOF >> "${S}"/user-config.py
+ WITH_BF_BULLET=1
+ BF_BULLET="/usr/include"
+ BF_BULLET_INC="/usr/include/bullet /usr/include/bullet/BulletCollision /usr/include/bullet/BulletDynamics /usr/include/bullet/LinearMath /usr/include/bullet/BulletSoftBody"
+ BF_BULLET_LIB="BulletSoftBody BulletDynamics BulletCollision LinearMath"
+ EOF
+
+ #add iconv into Scons build options.
+ if use !elibc_glibc && use !elibc_uclibc && use iconv; then
+ cat <<- EOF >> "${S}"/user-config.py
+ WITH_BF_ICONV=1
+ BF_ICONV="/usr"
+ EOF
+ fi
+
+ # configure internationalization only if LINGUAS have more
+ # languages than 'en', otherwise must be disabled
+ [[ -z ${LINGUAS} ]] || [[ ${LINGUAS} == "en" ]] && echo "WITH_BF_INTERNATIONAL=0" >> "${S}"/user-config.py
+
+ # configure Elbeem fluid system
+ use elbeem || echo "BF_NO_ELBEEM=1" >> "${S}"/user-config.py
+
+ # configure Tweak Mode
+ use tweak-mode && echo "BF_TWEAK_MODE=1" >> "${S}"/user-config.py
+
+ # FIX: Game Engine module needs to be active to build the Blender Player
+ if ! use game-engine && use player; then
+ elog "Forcing Game Engine [+game-engine] as required by Blender Player [+player]"
+ echo "WITH_BF_GAMEENGINE=1" >> "${S}"/user-config.py
+ else
+ blend_with game-engine gameengine
+ fi
+
+ # set CFLAGS used in /etc/make.conf correctly
+ echo "CFLAGS=[`for i in ${CFLAGS[@]}; do printf "%s \'$i"\',; done`] " \
+ | sed -e "s:,]: ]:" >> "${S}"/user-config.py
+
+ # set CXXFLAGS used in /etc/make.conf correctly
+ local FILTERED_CXXFLAGS="`for i in ${CXXFLAGS[@]}; do printf "%s \'$i"\',; done`"
+ echo "CXXFLAGS=[${FILTERED_CXXFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py
+ echo "BGE_CXXFLAGS=[${FILTERED_CXXFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py
+
+ # reset general options passed to the C/C++ compilers (useless hardcoded flags)
+ # FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
+ # shadows, see bug #276338 for reference
+ echo "CCFLAGS= ['-funsigned-char', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']" >> "${S}"/user-config.py
+
+ # set LDFLAGS used in /etc/make.conf correctly
+ local FILTERED_LDFLAGS="`for i in ${LDFLAGS[@]}; do printf "%s \'$i"\',; done`"
+ echo "LINKFLAGS=[${FILTERED_LDFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py
+ echo "PLATFORM_LINKFLAGS=[${FILTERED_LDFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py
+
+ # reset REL_* variables (useless hardcoded flags)
+ cat <<- EOF >> "${S}"/user-config.py
+ REL_CFLAGS=[]
+ REL_CXXFLAGS=[]
+ REL_CCFLAGS=[]
+ EOF
+
+ # reset warning flags (useless for NON blender developers)
+ cat <<- EOF >> "${S}"/user-config.py
+ C_WARN =[ '-w', '-g0' ]
+ CC_WARN =[ '-w', '-g0' ]
+ CXX_WARN=[ '-w', '-g0' ]
+ EOF
+
+ # detecting -j value from MAKEOPTS
+ local NUMJOBS="$( echo "${MAKEOPTS}" | sed -ne 's,.*-j\([[:digit:]]\+\).*,\1,p' )"
+ [[ -z "${NUMJOBS}" ]] && NUMJOBS=1 # resetting to -j1 for empty MAKEOPTS
+
+ # generic settings which differ from the defaults from linux2-config.py
+ cat <<- EOF >> "${S}"/user-config.py
+ BF_OPENGL_LIB='GL GLU X11 Xi GLEW'
+ BF_INSTALLDIR="../install"
+ WITH_PYTHON_SECURITY=1
+ WITHOUT_BF_PYTHON_INSTALL=1
+ BF_PYTHON="/usr"
+ BF_PYTHON_VERSION="3.2"
+ BF_PYTHON_ABI_FLAGS=""
+ BF_BUILDINFO=0
+ BF_QUIET=1
+ BF_NUMJOBS=${NUMJOBS}
+ BF_LINE_OVERWRITE=0
+ WITH_BF_FHS=1
+ WITH_BF_BINRELOC=0
+ WITH_BF_STATICOPENGL=0
+ WITH_BF_OPENMP=${enable_openmp}
+ EOF
+
+ # configure WITH_BF* Scons build options
+ for arg in \
+ 'sdl' \
+ 'apidoc docs' \
+ 'lcms' \
+ 'jack' \
+ 'sndfile' \
+ 'openexr' \
+ 'dds' \
+ 'fftw fftw3' \
+ 'jpeg2k openjpeg' \
+ 'openal'\
+ 'ffmpeg' \
+ 'ffmpeg ogg' \
+ 'player' \
+ 'sse rayoptimization' \
+ 'redcode' \
+ 'zlib' \
+ '3dmouse' ; do
+ blend_with ${arg}
+ done
+
+ # enable debugging/testing support
+ use debug && echo "BF_DEBUG=1" >> "${S}"/user-config.py
+ use test && echo "BF_UNIT_TEST=1" >> "${S}"/user-config.py
+
+ # enables Cycles render engine
+ if use cycles; then
+ cat <<- EOF >> "${S}"/user-config.py
+ WITH_BF_CYCLES=1
+ WITH_BF_OIIO=1
+ BF_OIIO="/usr"
+ BF_OIIO_INC="/usr/include"
+ BF_OIIO_LIB="OpenImageIO"
+ WITH_BF_BOOST=1
+ BF_BOOST="/usr"
+ BF_BOOST_INC="/usr/include/boost"
+ EOF
+ fi
+
+}
+
+src_compile() {
+ escons || die \
+ '!!! Please add "${S}/scons.config" when filing bugs reports \
+ to bugs.gentoo.org'
+
+ einfo "Building plugins ..."
+ # FIX: plugins are built without respecting user's LDFLAGS
+ emake \
+ CFLAGS="${CFLAGS} -fPIC" \
+ LDFLAGS="$(raw-ldflags) -Bshareable" \
+ -C release/plugins
+}
+
+src_install() {
+ # creating binary wrapper
+ cat <<- EOF >> "${WORKDIR}/install/blender-${PV}"
+ #!/bin/sh
+
+ # stop this script if the local blender path is a symlink
+ if [ -L \${HOME}/.blender ]; then
+ echo "Detected a symbolic link for \${HOME}/.blender"
+ echo "Sorry, to avoid dangerous situations, the Blender binary can"
+ echo "not be started until you have removed the symbolic link:"
+ echo " # rm -i \${HOME}/.blender"
+ exit 1
+ fi
+
+ export BLENDER_SYSTEM_SCRIPTS="/usr/share/blender/${PV}/scripts"
+ export BLENDER_SYSTEM_DATAFILES="/usr/share/blender/${PV}/datafiles"
+ export BLENDER_SYSTEM_PLUGINS="/usr/lib/blender/${PV}/plugins"
+ exec /usr/bin/blender-bin-${PV} \$*
+ EOF
+
+ # install binaries
+ exeinto /usr/bin/
+ cp "${WORKDIR}/install/blender" "${WORKDIR}/install/blender-bin-${PV}"
+ doexe "${WORKDIR}/install/blender-bin-${PV}"
+ doexe "${WORKDIR}/install/blender-${PV}"
+ if use player; then
+ cp "${WORKDIR}/install/blenderplayer" \
+ "${WORKDIR}/install/blenderplayer-${PV}"
+ doexe "${WORKDIR}/install/blenderplayer-${PV}"
+ fi
+
+ # install plugins
+ exeinto /usr/$(get_libdir)/${PN}/${PV}/plugins/texture
+ doexe "${WORKDIR}"/${P}/release/plugins/texture/*.so
+ exeinto /usr/$(get_libdir)/${PN}/${PV}/plugins/sequences
+ doexe "${WORKDIR}"/${P}/release/plugins/sequence/*.so
+ insinto /usr/include/${PN}/${PV}
+ doins "${WORKDIR}"/${P}/source/blender/blenpluginapi/*.h
+
+ # install desktop file
+ insinto /usr/share/pixmaps
+ cp release/freedesktop/icons/scalable/apps/blender.svg \
+ release/freedesktop/icons/scalable/apps/blender-${PV}.svg
+ doins release/freedesktop/icons/scalable/apps/blender-${PV}.svg
+ insinto /usr/share/applications
+ cp release/freedesktop/blender.desktop \
+ release/freedesktop/blender-${PV}.desktop
+ doins release/freedesktop/blender-${PV}.desktop
+ newins "${FILESDIR}"/${P}-insecure.desktop ${P}-insecure.desktop
+
+ # install docs
+ doman "${WORKDIR}"/${P}/doc/manpage/blender.1
+ use doc && dodoc -r "${WORKDIR}"/${P}/doc/guides/*
+ if use apidoc; then
+
+ einfo "Generating (BGE) Blender Game Engine API docs ..."
+ epydoc source/gameengine/PyDoc/*.py -v \
+ -o doc/BGE_API \
+ --quiet --quiet --quiet \
+ --simple-term \
+ --url "http://www.blender.org" \
+ --top API_intro \
+ --name "Blender GameEngine" \
+ --no-private --no-sourcecode \
+ --inheritance=included \
+ --graph=all \
+ --dotpath /usr/bin/dot \
+ || die "epydoc failed."
+ docinto "API/gameengine"
+ dohtml -r "${WORKDIR}"/${P}/doc/BGE_API/*
+
+ #einfo "Generating (BPY) Blender Python API docs ..."
+ "${D}"/usr/bin/blender-bin-${PV} --background --python doc/python_api/sphinx_doc_gen.py || die "blender failed."
+ pushd doc/python_api > /dev/null
+ sphinx-build sphinx-in BPY_API || die "sphinx failed."
+ popd > /dev/null
+ docinto "API/python"
+ dohtml -r doc/python_api/BPY_API/*
+
+ einfo "Generating Blender C/C++ API docs ..."
+ pushd "${WORKDIR}"/${P}/doc/doxygen > /dev/null
+ doxygen -u Doxyfile
+ doxygen || die "doxygen failed to build API docs."
+ docinto "API/blender"
+ dohtml -r html/*
+ popd > /dev/null
+ fi
+
+ # final cleanup
+ rm -r "${WORKDIR}"/install/{Python-license.txt,icons,GPL-license.txt,copyright.txt}
+
+ # installing blender
+ insinto /usr/share/${PN}/${PV}
+ doins -r "${WORKDIR}"/install/${PV}/*
+
+ # FIX: making all python scripts readable only by group 'users',
+ # so nobody can modify scripts apart root user, but python
+ # cache (*.pyc) can be written and shared across the users.
+# chown root:users -R "${D}/usr/share/${PN}/${SLOT}/scripts" || die
+# chmod 755 -R "${D}/usr/share/${PN}/${SLOT}/scripts" || die
+}
+
+pkg_postinst() {
+ echo
+ elog "Blender uses python integration. As such, may have some"
+ elog "inherit risks with running unknown python scripting."
+ elog
+ elog "It is recommended to change your blender temp directory"
+ elog "from /tmp to /home/user/tmp or another tmp file under your"
+ elog "home directory. This can be done by starting blender, then"
+ elog "dragging the main menu down do display all paths."
+ elog
+ elog "Blender has its own internal rendering engine but you"
+ elog "can export to external renderers for image computation"
+ elog "like: YafRay[1], sunflow[2], PovRay[3] and luxrender[4]"
+ elog
+ elog "If you need one of them just emerge it:"
+ elog " [1] emerge -av media-gfx/yafray"
+ elog " [2] emerge -av media-gfx/sunflow"
+ elog " [3] emerge -av media-gfx/povray"
+ elog " [4] emerge -av media-gfx/luxrender"
+ elog
+ elog "When setting the Blender paths with the User Preferences"
+ elog "dialog box, remember to NOT declare your home's paths as:"
+ elog "~/.blender, but as: /home/user/.blender; in other words,"
+ elog "DO NOT USE the tilde inside the paths, as Blender is not"
+ elog "able to handle it, ignoring your customizations."
+}
diff --git a/media-gfx/blender/files/blender-2.60-bullet.patch b/media-gfx/blender/files/blender-2.60-bullet.patch
new file mode 100644
index 0000000..05e47fb
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.60-bullet.patch
@@ -0,0 +1,192 @@
+diff -Npur blender-2.61.orig/build_files/scons/tools/Blender.py blender-2.61/build_files/scons/tools/Blender.py
+--- blender-2.61.orig/build_files/scons/tools/Blender.py 2011-12-20 22:36:19.299620183 +0100
++++ blender-2.61/build_files/scons/tools/Blender.py 2011-12-20 22:36:50.517619833 +0100
+@@ -270,6 +270,8 @@ def setup_syslibs(lenv):
+ syslibs += Split(lenv['BF_SDL_LIB'])
+ if not lenv['WITH_BF_STATICOPENGL']:
+ syslibs += Split(lenv['BF_OPENGL_LIB'])
++ if lenv['WITH_BF_BULLET']:
++ syslibs += Split(lenv['BF_BULLET_LIB'])
+ if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw','linuxcross', 'win64-vc'):
+ syslibs += Split(lenv['BF_PTHREADS_LIB'])
+ if lenv['WITH_BF_COLLADA']:
+diff -Npur blender-2.61.orig/doc/doxygen/Doxyfile blender-2.61/doc/doxygen/Doxyfile
+--- blender-2.61.orig/doc/doxygen/Doxyfile 2011-12-20 22:36:19.254620184 +0100
++++ blender-2.61/doc/doxygen/Doxyfile 2011-12-20 22:36:50.544619631 +0100
+@@ -617,8 +617,7 @@ INPUT = doxygen.main \
+ doxygen.intern \
+ doxygen.extern \
+ ../../source \
+- ../../intern \
+- ../../extern/bullet2
++ ../../intern
+
+ # This tag can be used to specify the character encoding of the source files
+ # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+diff -Npur blender-2.61.orig/extern/CMakeLists.txt blender-2.61/extern/CMakeLists.txt
+--- blender-2.61.orig/extern/CMakeLists.txt 2011-12-20 22:36:19.296620183 +0100
++++ blender-2.61/extern/CMakeLists.txt 2011-12-20 22:36:50.544619631 +0100
+@@ -28,10 +28,6 @@ remove_strict_flags()
+
+ add_subdirectory(colamd)
+
+-if(WITH_BULLET)
+- add_subdirectory(bullet2)
+-endif()
+-
+ if(WITH_MOD_CLOTH_ELTOPO)
+ add_subdirectory(eltopo)
+ endif()
+diff -Npur blender-2.61.orig/extern/SConscript blender-2.61/extern/SConscript
+--- blender-2.61.orig/extern/SConscript 2011-12-20 22:36:19.295620183 +0100
++++ blender-2.61/extern/SConscript 2011-12-20 22:36:50.544619631 +0100
+@@ -10,9 +10,6 @@ if env['WITH_BF_GAMEENGINE']:
+ if env['WITH_BF_ELTOPO']:
+ SConscript(['eltopo/SConscript'])
+
+-if env['WITH_BF_BULLET']:
+- SConscript(['bullet2/src/SConscript'])
+-
+ if env['WITH_BF_REDCODE'] and env['BF_REDCODE_LIB'] == '':
+ SConscript(['libredcode/SConscript'])
+
+diff -Npur blender-2.61.orig/intern/smoke/CMakeLists.txt blender-2.61/intern/smoke/CMakeLists.txt
+--- blender-2.61.orig/intern/smoke/CMakeLists.txt 2011-12-20 22:36:19.501620180 +0100
++++ blender-2.61/intern/smoke/CMakeLists.txt 2011-12-20 22:36:50.544619631 +0100
+@@ -26,10 +26,10 @@
+ set(INC
+ intern
+ ../memutil
+- ../../extern/bullet2/src
+ )
+
+ set(INC_SYS
++ /usr/include/bullet2
+ ${PNG_INCLUDE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
+ )
+diff -Npur blender-2.61.orig/intern/smoke/SConscript blender-2.61/intern/smoke/SConscript
+--- blender-2.61.orig/intern/smoke/SConscript 2011-12-20 22:36:19.501620180 +0100
++++ blender-2.61/intern/smoke/SConscript 2011-12-20 22:36:50.545619631 +0100
+@@ -13,7 +13,7 @@ if env['WITH_BF_OPENMP']:
+ defs += ' PARALLEL=1'
+
+ incs += ' ' + env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC']
+-incs += ' intern ../../extern/bullet2/src ../memutil ../guardealloc '
++incs += ' intern /usr/include/bullet ../memutil ../guardealloc '
+
+ if env['WITH_BF_FFTW3']:
+ defs += ' WITH_FFTW3'
+diff -Npur blender-2.61.orig/source/blender/blenkernel/CMakeLists.txt blender-2.61/source/blender/blenkernel/CMakeLists.txt
+--- blender-2.61.orig/source/blender/blenkernel/CMakeLists.txt 2011-12-20 22:36:19.325620183 +0100
++++ blender-2.61/source/blender/blenkernel/CMakeLists.txt 2011-12-20 22:36:50.545619631 +0100
+@@ -253,8 +253,8 @@ if(WITH_AUDASPACE)
+ endif()
+
+ if(WITH_BULLET)
+- list(APPEND INC
+- ../../../extern/bullet2/src
++ list(APPEND INC_SYS
++ /usr/include/bullet
+ )
+ add_definitions(-DUSE_BULLET)
+ endif()
+diff -Npur blender-2.61.orig/source/blender/blenkernel/SConscript blender-2.61/source/blender/blenkernel/SConscript
+--- blender-2.61.orig/source/blender/blenkernel/SConscript 2011-12-20 22:36:19.325620183 +0100
++++ blender-2.61/source/blender/blenkernel/SConscript 2011-12-20 22:36:50.545619631 +0100
+@@ -9,7 +9,7 @@ incs += ' ../blenlib ../blenfont ../make
+ incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
+ incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers'
+ incs += ' #/intern/iksolver/extern ../blenloader'
+-incs += ' #/extern/bullet2/src'
++incs += ' /usr/include/bullet'
+ incs += ' #/intern/opennl/extern #/intern/bsp/extern'
+ incs += ' ../gpu #/extern/glew/include'
+ incs += ' #/intern/smoke/extern'
+diff -Npur blender-2.61.orig/source/gameengine/BlenderRoutines/CMakeLists.txt blender-2.61/source/gameengine/BlenderRoutines/CMakeLists.txt
+--- blender-2.61.orig/source/gameengine/BlenderRoutines/CMakeLists.txt 2011-12-20 22:36:19.307620183 +0100
++++ blender-2.61/source/gameengine/BlenderRoutines/CMakeLists.txt 2011-12-20 22:36:50.545619631 +0100
+@@ -23,7 +23,6 @@ set(INC
+ ../../blender/makesdna
+ ../../blender/makesrna
+ ../../blender/windowmanager
+- ../../../extern/bullet2/src
+ ../../../intern/container
+ ../../../intern/guardedalloc
+ ../../../intern/moto/include
+@@ -32,7 +31,7 @@ set(INC
+ )
+
+ set(INC_SYS
+-
++ /usr/include/bullet
+ )
+
+ set(SRC
+diff -Npur blender-2.61.orig/source/gameengine/Converter/CMakeLists.txt blender-2.61/source/gameengine/Converter/CMakeLists.txt
+--- blender-2.61.orig/source/gameengine/Converter/CMakeLists.txt 2011-12-20 22:36:19.311620183 +0100
++++ blender-2.61/source/gameengine/Converter/CMakeLists.txt 2011-12-20 22:36:50.545619631 +0100
+@@ -49,7 +49,6 @@ set(INC
+ ../../blender/makesdna
+ ../../blender/makesrna
+ ../../blender/windowmanager
+- ../../../extern/bullet2/src
+ ../../../intern/container
+ ../../../intern/guardedalloc
+ ../../../intern/moto/include
+@@ -59,6 +58,7 @@ set(INC
+
+ set(INC_SYS
+ /usr/include/eigen3
++ /usr/include/bullet
+ )
+
+ set(SRC
+diff -Npur blender-2.61.orig/source/gameengine/Ketsji/CMakeLists.txt blender-2.61/source/gameengine/Ketsji/CMakeLists.txt
+--- blender-2.61.orig/source/gameengine/Ketsji/CMakeLists.txt 2011-12-20 22:36:19.317620183 +0100
++++ blender-2.61/source/gameengine/Ketsji/CMakeLists.txt 2011-12-20 22:36:50.545619631 +0100
+@@ -241,9 +241,11 @@ endif()
+
+ if(WITH_BULLET)
+ list(APPEND INC
+- ../../../extern/bullet2/src
+ ../Physics/Bullet
+ )
++ list(APPEND INC_SYS
++ /usr/include/bullet
++ )
+ add_definitions(-DUSE_BULLET)
+ endif()
+
+diff -Npur blender-2.61.orig/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp blender-2.61/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+--- blender-2.61.orig/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp 2011-12-20 22:36:19.306620183 +0100
++++ blender-2.61/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp 2011-12-20 22:37:37.479618806 +0100
+@@ -2804,7 +2804,8 @@ float CcdPhysicsEnvironment::getApplied
+
+ void CcdPhysicsEnvironment::exportFile(const char* filename)
+ {
+- btDefaultSerializer* serializer = new btDefaultSerializer();
++ // Workaround bullet-2.77 api change.
++ btDefaultSerializer* serializer = new btDefaultSerializer(0);
+
+
+ for (int i=0;i<m_dynamicsWorld->getNumCollisionObjects();i++)
+diff -Npur blender-2.61.orig/source/gameengine/Physics/Bullet/CMakeLists.txt blender-2.61/source/gameengine/Physics/Bullet/CMakeLists.txt
+--- blender-2.61.orig/source/gameengine/Physics/Bullet/CMakeLists.txt 2011-12-20 22:36:19.306620183 +0100
++++ blender-2.61/source/gameengine/Physics/Bullet/CMakeLists.txt 2011-12-20 22:36:50.545619631 +0100
+@@ -37,7 +37,6 @@ set(INC
+ ../../../blender/blenkernel
+ ../../../blender/blenlib
+ ../../../blender/makesdna
+- ../../../../extern/bullet2/src
+ ../../../../intern/container
+ ../../../../intern/guardedalloc
+ ../../../../intern/moto/include
+@@ -45,6 +44,7 @@ set(INC
+ )
+
+ set(INC_SYS
++ /usr/include/bullet
+ ${GLEW_INCLUDE_PATH}
+ ${PYTHON_INCLUDE_DIRS}
+ )
diff --git a/media-gfx/blender/files/blender-2.60-libav-0.7.patch b/media-gfx/blender/files/blender-2.60-libav-0.7.patch
new file mode 100644
index 0000000..3bae020
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.60-libav-0.7.patch
@@ -0,0 +1,30 @@
+--- blender-2.60a.orig/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp 2011-10-24 20:09:01.000000000 +0200
++++ blender-2.60a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp 2011-11-13 12:34:01.000000000 +0100
+@@ -40,6 +40,8 @@
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+ #include <libavformat/avio.h>
++#include <libavutil/mathematics.h>
++#include <libavutil/avstring.h>
+ #include "ffmpeg_compat.h"
+ }
+
+@@ -57,10 +58,15 @@
+ {
+ static const char* formats[] = { NULL, "ac3", "flac", "matroska", "mp2", "mp3", "ogg", "wav" };
+
+- if(avformat_alloc_output_context2(&m_formatCtx, NULL, formats[format], filename.c_str()))
+- AUD_THROW(AUD_ERROR_FFMPEG, context_error);
++ m_formatCtx = avformat_alloc_context();
++ if (!m_formatCtx) AUD_THROW(AUD_ERROR_FFMPEG, context_error);
+
+- m_outputFmt = m_formatCtx->oformat;
++ av_strlcpy(m_formatCtx->filename, filename.c_str(), sizeof(m_formatCtx->filename));
++ m_outputFmt = m_formatCtx->oformat = av_guess_format(formats[format], filename.c_str(), NULL);
++ if (!m_outputFmt) {
++ avformat_free_context(m_formatCtx);
++ AUD_THROW(AUD_ERROR_FFMPEG, context_error);
++ }
+
+ switch(codec)
+ {
diff --git a/media-gfx/blender/files/blender-2.61-CVE-2009-3850-v3.patch b/media-gfx/blender/files/blender-2.61-CVE-2009-3850-v3.patch
new file mode 100644
index 0000000..48895a8
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.61-CVE-2009-3850-v3.patch
@@ -0,0 +1,146 @@
+diff -Npur blender-2.61.orig/source/blender/blenkernel/intern/blender.c blender-2.61/source/blender/blenkernel/intern/blender.c
+--- blender-2.61.orig/source/blender/blenkernel/intern/blender.c 2011-12-20 20:47:10.884735950 +0100
++++ blender-2.61/source/blender/blenkernel/intern/blender.c 2011-12-20 20:47:58.500735116 +0100
+@@ -144,6 +144,7 @@ void initglobals(void)
+ G.f |= G_SCRIPT_AUTOEXEC;
+ #else
+ G.f &= ~G_SCRIPT_AUTOEXEC;
++ G.f |= G_SCRIPT_OVERRIDE_PREF; /* Disables turning G_SCRIPT_AUTOEXEC on from user prefs */
+ #endif
+ }
+
+diff -Npur blender-2.61.orig/source/blender/makesrna/intern/rna_userdef.c blender-2.61/source/blender/makesrna/intern/rna_userdef.c
+--- blender-2.61.orig/source/blender/makesrna/intern/rna_userdef.c 2011-12-20 20:47:10.891735952 +0100
++++ blender-2.61/source/blender/makesrna/intern/rna_userdef.c 2011-12-20 20:50:32.755732385 +0100
+@@ -114,9 +114,17 @@ static void rna_userdef_show_manipulator
+
+ static void rna_userdef_script_autoexec_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+ {
+- UserDef *userdef = (UserDef*)ptr->data;
+- if (userdef->flag & USER_SCRIPT_AUTOEXEC_DISABLE) G.f &= ~G_SCRIPT_AUTOEXEC;
+- else G.f |= G_SCRIPT_AUTOEXEC;
++ if ((G.f & G_SCRIPT_OVERRIDE_PREF) == 0) {
++ /* Blender run with --enable-autoexec */
++ UserDef *userdef = (UserDef*)ptr->data;
++ if (userdef->flag & USER_SCRIPT_AUTOEXEC_DISABLE) G.f &= ~G_SCRIPT_AUTOEXEC;
++ else G.f |= G_SCRIPT_AUTOEXEC;
++ }
++}
++
++static int rna_userdef_script_autoexec_editable(Main *bmain, Scene *scene, PointerRNA *ptr) {
++ /* Disable "Auto Run Python Scripts" checkbox unless Blender run with --enable-autoexec */
++ return !(G.f & G_SCRIPT_OVERRIDE_PREF);
+ }
+
+ static void rna_userdef_mipmap_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+@@ -2729,6 +2737,8 @@ static void rna_def_userdef_system(Blend
+ "Allow any .blend file to run scripts automatically "
+ "(unsafe with blend files from an untrusted source)");
+ RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update");
++ /* Disable "Auto Run Python Scripts" checkbox unless Blender run with --enable-autoexec */
++ RNA_def_property_editable_func(prop, "rna_userdef_script_autoexec_editable");
+
+ prop= RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TXT_TABSTOSPACES_DISABLE);
+diff -Npur blender-2.61.orig/source/blender/windowmanager/intern/wm_files.c blender-2.61/source/blender/windowmanager/intern/wm_files.c
+--- blender-2.61.orig/source/blender/windowmanager/intern/wm_files.c 2011-12-20 20:47:10.943735949 +0100
++++ blender-2.61/source/blender/windowmanager/intern/wm_files.c 2011-12-20 20:52:16.097730555 +0100
+@@ -286,13 +286,18 @@ static void wm_init_userdef(bContext *C)
+
+ /* set the python auto-execute setting from user prefs */
+ /* enabled by default, unless explicitly enabled in the command line which overrides */
+- if((G.f & G_SCRIPT_OVERRIDE_PREF) == 0) {
++ if (! G.background && ((G.f & G_SCRIPT_OVERRIDE_PREF) == 0)) {
++ /* Blender run with --enable-autoexec */
+ if ((U.flag & USER_SCRIPT_AUTOEXEC_DISABLE) == 0) G.f |= G_SCRIPT_AUTOEXEC;
+ else G.f &= ~G_SCRIPT_AUTOEXEC;
+ }
+
+ /* update tempdir from user preferences */
+ BLI_init_temporary_dir(U.tempdir);
++
++ /* Workaround to fix default of "Auto Run Python Scripts" checkbox */
++ if ((G.f & G_SCRIPT_OVERRIDE_PREF) && !(G.f & G_SCRIPT_AUTOEXEC))
++ U.flag |= USER_SCRIPT_AUTOEXEC_DISABLE;
+ }
+
+
+diff -Npur blender-2.61.orig/source/blender/windowmanager/intern/wm_operators.c blender-2.61/source/blender/windowmanager/intern/wm_operators.c
+--- blender-2.61.orig/source/blender/windowmanager/intern/wm_operators.c 2011-12-20 20:47:10.943735949 +0100
++++ blender-2.61/source/blender/windowmanager/intern/wm_operators.c 2011-12-20 20:57:09.176725378 +0100
+@@ -1601,12 +1601,13 @@ static int wm_open_mainfile_exec(bContex
+ G.fileflags &= ~G_FILE_NO_UI;
+ else
+ G.fileflags |= G_FILE_NO_UI;
+-
+- if(RNA_boolean_get(op->ptr, "use_scripts"))
++
++ /* Restrict "Trusted Source" mode to Blender in --enable-autoexec mode */
++ if(RNA_boolean_get(op->ptr, "use_scripts") && (!(G.f & G_SCRIPT_OVERRIDE_PREF)))
+ G.f |= G_SCRIPT_AUTOEXEC;
+ else
+ G.f &= ~G_SCRIPT_AUTOEXEC;
+-
++
+ // XXX wm in context is not set correctly after WM_read_file -> crash
+ // do it before for now, but is this correct with multiple windows?
+ WM_event_add_notifier(C, NC_WINDOW, NULL);
+@@ -1618,6 +1619,8 @@ static int wm_open_mainfile_exec(bContex
+
+ static void WM_OT_open_mainfile(wmOperatorType *ot)
+ {
++ PropertyRNA * use_scripts_checkbox = NULL;
++
+ ot->name= "Open Blender File";
+ ot->idname= "WM_OT_open_mainfile";
+ ot->description="Open a Blender file";
+@@ -1629,7 +1632,12 @@ static void WM_OT_open_mainfile(wmOperat
+ WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH);
+
+ RNA_def_boolean(ot->srna, "load_ui", 1, "Load UI", "Load user interface setup in the .blend file");
+- RNA_def_boolean(ot->srna, "use_scripts", 1, "Trusted Source", "Allow blend file execute scripts automatically, default available from system preferences");
++ use_scripts_checkbox = RNA_def_boolean(ot->srna, "use_scripts",
++ !!(G.f & G_SCRIPT_AUTOEXEC), "Trusted Source",
++ "Allow blend file execute scripts automatically, default available from system preferences");
++ /* Disable "Trusted Source" checkbox unless Blender run with --enable-autoexec */
++ if (use_scripts_checkbox && (G.f & G_SCRIPT_OVERRIDE_PREF))
++ RNA_def_property_clear_flag(use_scripts_checkbox, PROP_EDITABLE);
+ }
+
+ /* **************** link/append *************** */
+diff -Npur blender-2.61.orig/source/creator/creator.c blender-2.61/source/creator/creator.c
+--- blender-2.61.orig/source/creator/creator.c 2011-12-20 20:47:10.878735951 +0100
++++ blender-2.61/source/creator/creator.c 2011-12-20 20:59:23.778723050 +0100
+@@ -262,6 +262,7 @@ static int print_help(int UNUSED(argc),
+
+ printf("\n");
+
++ BLI_argsPrintArgDoc(ba, "-666");
+ BLI_argsPrintArgDoc(ba, "--enable-autoexec");
+ BLI_argsPrintArgDoc(ba, "--disable-autoexec");
+
+@@ -330,14 +331,14 @@ static int end_arguments(int UNUSED(argc
+ static int enable_python(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
+ {
+ G.f |= G_SCRIPT_AUTOEXEC;
+- G.f |= G_SCRIPT_OVERRIDE_PREF;
++ G.f &= ~G_SCRIPT_OVERRIDE_PREF; /* Enables turning G_SCRIPT_AUTOEXEC off from user prefs */
+ return 0;
+ }
+
+ static int disable_python(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
+ {
+ G.f &= ~G_SCRIPT_AUTOEXEC;
+- G.f |= G_SCRIPT_OVERRIDE_PREF;
++ G.f |= G_SCRIPT_OVERRIDE_PREF; /* Disables turning G_SCRIPT_AUTOEXEC on from user prefs */
+ return 0;
+ }
+
+@@ -1042,6 +1043,7 @@ static void setupArguments(bContext *C,
+ # define PY_DISABLE_AUTO ", (compiled as non-standard default)"
+ #endif
+
++ BLI_argsAdd(ba, 1, NULL, "-666", "\n\tEnable automatic python script execution (port from CVE-2009-3850 patch to Blender 2.61)" PY_ENABLE_AUTO, enable_python, NULL);
+ BLI_argsAdd(ba, 1, "-y", "--enable-autoexec", "\n\tEnable automatic python script execution" PY_ENABLE_AUTO, enable_python, NULL);
+ BLI_argsAdd(ba, 1, "-Y", "--disable-autoexec", "\n\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes)" PY_DISABLE_AUTO, disable_python, NULL);
+
diff --git a/media-gfx/blender/files/blender-2.61-desktop.patch b/media-gfx/blender/files/blender-2.61-desktop.patch
new file mode 100644
index 0000000..dc89ae6
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.61-desktop.patch
@@ -0,0 +1,20 @@
+--- release/freedesktop/blender.desktop 2010-09-12 00:05:51.000000000 -0700
++++ release/freedesktop/blender.desktop 2010-09-12 00:07:32.000000000 -0700
+@@ -1,5 +1,5 @@
+ [Desktop Entry]
+-Name=Blender
++Name=Blender-2.61
+ GenericName=3D modeller
+ GenericName[es]=modelador 3D
+ GenericName[de]=3D Modellierer
+@@ -7,8 +7,8 @@
+ GenericName[ru]=Редактор 3D-моделей
+ Comment=3D modeling, animation, rendering and post-production
+ Comment[es]=modelado 3D, animación, renderizado y post-producción
+-Exec=blender
+-Icon=blender
++Exec=blender-2.61
++Icon=blender-2.61
+ Terminal=false
+ Type=Application
+ Categories=Graphics;3DGraphics;
diff --git a/media-gfx/blender/files/blender-2.61-eigen.patch b/media-gfx/blender/files/blender-2.61-eigen.patch
new file mode 100644
index 0000000..bd40ceb
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.61-eigen.patch
@@ -0,0 +1,543 @@
+diff -Npur blender-2.61.orig/extern/libmv/bundle.sh blender-2.61/extern/libmv/bundle.sh
+--- blender-2.61.orig/extern/libmv/bundle.sh 2011-12-20 20:22:31.563762104 +0100
++++ blender-2.61/extern/libmv/bundle.sh 2011-12-20 20:35:09.876748698 +0100
+@@ -116,13 +116,13 @@ cat > CMakeLists.txt << EOF
+
+ set(INC
+ .
+- ../Eigen3
+ ./third_party/ssba
+ ./third_party/ldl/Include
+ ../colamd/Include
+ )
+
+ set(INC_SYS
++ /usr/include/eigen3
+ ${PNG_INCLUDE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
+ )
+@@ -224,7 +224,7 @@ defs.append('GOOGLE_GLOG_DLL_DECL=')
+ src = env.Glob("*.cpp")
+ $src
+
+-incs = '. ../Eigen3'
++incs = '. /usr/include/eigen3'
+ incs += ' ' + env['BF_PNG_INC']
+ incs += ' ' + env['BF_ZLIB_INC']
+
+diff -Npur blender-2.61.orig/extern/libmv/CMakeLists.txt blender-2.61/extern/libmv/CMakeLists.txt
+--- blender-2.61.orig/extern/libmv/CMakeLists.txt 2011-12-20 20:22:31.545762104 +0100
++++ blender-2.61/extern/libmv/CMakeLists.txt 2011-12-20 20:34:30.205749406 +0100
+@@ -24,13 +24,13 @@
+
+ set(INC
+ .
+- ../Eigen3
+ third_party/ssba
+ third_party/ldl/Include
+ ../colamd/Include
+ )
+
+ set(INC_SYS
++ /usr/include/eigen3
+ ${PNG_INCLUDE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
+ )
+diff -Npur blender-2.61.orig/extern/libmv/SConscript blender-2.61/extern/libmv/SConscript
+--- blender-2.61.orig/extern/libmv/SConscript 2011-12-20 20:22:31.545762104 +0100
++++ blender-2.61/extern/libmv/SConscript 2011-12-20 20:31:51.516752243 +0100
+@@ -25,7 +25,7 @@ src += env.Glob('third_party/ldl/Source/
+ src += env.Glob('third_party/ssba/Geometry/*.cpp')
+ src += env.Glob('third_party/ssba/Math/*.cpp')
+
+-incs = '. ../Eigen3'
++incs = '. /usr/include/eigen3'
+ incs += ' ' + env['BF_PNG_INC']
+ incs += ' ' + env['BF_ZLIB_INC']
+
+diff -Npur blender-2.61.orig/intern/itasc/CMakeLists.txt blender-2.61/intern/itasc/CMakeLists.txt
+--- blender-2.61.orig/intern/itasc/CMakeLists.txt 2011-12-20 20:22:32.147762093 +0100
++++ blender-2.61/intern/itasc/CMakeLists.txt 2011-12-20 20:27:46.428756570 +0100
+@@ -24,11 +24,11 @@
+ # ***** END GPL LICENSE BLOCK *****
+
+ set(INC
+- ../../extern/Eigen3
++
+ )
+
+ set(INC_SYS
+-
++ /usr/include/eigen3
+ )
+
+ set(SRC
+@@ -121,201 +121,201 @@ set(SRC
+ kdl/framevel.inl
+
+ # until we have another user...
+- ../../extern/Eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h
+- ../../extern/Eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h
+- ../../extern/Eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h
+- ../../extern/Eigen3/Eigen/src/plugins/BlockMethods.h
+- ../../extern/Eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h
+- ../../extern/Eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h
+- ../../extern/Eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h
+- ../../extern/Eigen3/Eigen/src/misc/Kernel.h
+- ../../extern/Eigen3/Eigen/src/misc/Image.h
+- ../../extern/Eigen3/Eigen/src/misc/Solve.h
+- ../../extern/Eigen3/Eigen/src/QR/HouseholderQR.h
+- ../../extern/Eigen3/Eigen/src/QR/ColPivHouseholderQR.h
+- ../../extern/Eigen3/Eigen/src/QR/FullPivHouseholderQR.h
+- ../../extern/Eigen3/Eigen/src/StlSupport/details.h
+- ../../extern/Eigen3/Eigen/src/StlSupport/StdList.h
+- ../../extern/Eigen3/Eigen/src/StlSupport/StdDeque.h
+- ../../extern/Eigen3/Eigen/src/StlSupport/StdVector.h
+- ../../extern/Eigen3/Eigen/src/SVD/UpperBidiagonalization.h
+- ../../extern/Eigen3/Eigen/src/SVD/JacobiSVD.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/ComplexSchur.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/RealSchur.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/EigenvaluesCommon.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h
+- ../../extern/Eigen3/Eigen/src/Eigenvalues/EigenSolver.h
+- ../../extern/Eigen3/Eigen/src/Jacobi/Jacobi.h
+- ../../extern/Eigen3/Eigen/src/Householder/Householder.h
+- ../../extern/Eigen3/Eigen/src/Householder/BlockHouseholder.h
+- ../../extern/Eigen3/Eigen/src/Householder/HouseholderSequence.h
+- ../../extern/Eigen3/Eigen/src/Geometry/RotationBase.h
+- ../../extern/Eigen3/Eigen/src/Geometry/Rotation2D.h
+- ../../extern/Eigen3/Eigen/src/Geometry/Homogeneous.h
+- ../../extern/Eigen3/Eigen/src/Geometry/Hyperplane.h
+- ../../extern/Eigen3/Eigen/src/Geometry/EulerAngles.h
+- ../../extern/Eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h
+- ../../extern/Eigen3/Eigen/src/Geometry/ParametrizedLine.h
+- ../../extern/Eigen3/Eigen/src/Geometry/OrthoMethods.h
+- ../../extern/Eigen3/Eigen/src/Geometry/AngleAxis.h
+- ../../extern/Eigen3/Eigen/src/Geometry/Umeyama.h
+- ../../extern/Eigen3/Eigen/src/Geometry/Scaling.h
+- ../../extern/Eigen3/Eigen/src/Geometry/Translation.h
+- ../../extern/Eigen3/Eigen/src/Geometry/AlignedBox.h
+- ../../extern/Eigen3/Eigen/src/Geometry/Transform.h
+- ../../extern/Eigen3/Eigen/src/Geometry/Quaternion.h
+- ../../extern/Eigen3/Eigen/src/LU/PartialPivLU.h
+- ../../extern/Eigen3/Eigen/src/LU/Determinant.h
+- ../../extern/Eigen3/Eigen/src/LU/arch/Inverse_SSE.h
+- ../../extern/Eigen3/Eigen/src/LU/FullPivLU.h
+- ../../extern/Eigen3/Eigen/src/LU/Inverse.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseMatrixBase.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseSelfAdjointView.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseVector.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseDiagonalProduct.h
+- ../../extern/Eigen3/Eigen/src/Sparse/TriangularSolver.h
+- ../../extern/Eigen3/Eigen/src/Sparse/AmbiVector.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseDenseProduct.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseBlock.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseTriangularView.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseCwiseBinaryOp.h
+- ../../extern/Eigen3/Eigen/src/Sparse/CoreIterators.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseMatrix.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseAssign.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseSparseProduct.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseDot.h
+- ../../extern/Eigen3/Eigen/src/Sparse/DynamicSparseMatrix.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseRedux.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseFuzzy.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseCwiseUnaryOp.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseView.h
+- ../../extern/Eigen3/Eigen/src/Sparse/MappedSparseMatrix.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseUtil.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseTranspose.h
+- ../../extern/Eigen3/Eigen/src/Sparse/SparseProduct.h
+- ../../extern/Eigen3/Eigen/src/Sparse/CompressedStorage.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Cwise.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/TriangularSolver.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/QR.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Lazy.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Memory.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/SVD.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/CwiseOperators.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/VectorBlock.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Meta.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Macros.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/LeastSquares.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/LU.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Block.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/RotationBase.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/Rotation2D.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/Hyperplane.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/AngleAxis.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/Scaling.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/All.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/Translation.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/AlignedBox.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/Transform.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Geometry/Quaternion.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/Minor.h
+- ../../extern/Eigen3/Eigen/src/Eigen2Support/MathFunctions.h
+- ../../extern/Eigen3/Eigen/src/Core/SelfAdjointView.h
+- ../../extern/Eigen3/Eigen/src/Core/MatrixBase.h
+- ../../extern/Eigen3/Eigen/src/Core/Swap.h
+- ../../extern/Eigen3/Eigen/src/Core/DenseCoeffsBase.h
+- ../../extern/Eigen3/Eigen/src/Core/DenseBase.h
+- ../../extern/Eigen3/Eigen/src/Core/GlobalFunctions.h
+- ../../extern/Eigen3/Eigen/src/Core/ProductBase.h
+- ../../extern/Eigen3/Eigen/src/Core/CwiseBinaryOp.h
+- ../../extern/Eigen3/Eigen/src/Core/Stride.h
+- ../../extern/Eigen3/Eigen/src/Core/Matrix.h
+- ../../extern/Eigen3/Eigen/src/Core/Visitor.h
+- ../../extern/Eigen3/Eigen/src/Core/Array.h
+- ../../extern/Eigen3/Eigen/src/Core/ReturnByValue.h
+- ../../extern/Eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h
+- ../../extern/Eigen3/Eigen/src/Core/EigenBase.h
+- ../../extern/Eigen3/Eigen/src/Core/Random.h
+- ../../extern/Eigen3/Eigen/src/Core/Redux.h
+- ../../extern/Eigen3/Eigen/src/Core/arch/Default/Settings.h
+- ../../extern/Eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h
+- ../../extern/Eigen3/Eigen/src/Core/arch/AltiVec/Complex.h
+- ../../extern/Eigen3/Eigen/src/Core/arch/NEON/PacketMath.h
+- ../../extern/Eigen3/Eigen/src/Core/arch/NEON/Complex.h
+- ../../extern/Eigen3/Eigen/src/Core/arch/SSE/PacketMath.h
+- ../../extern/Eigen3/Eigen/src/Core/arch/SSE/Complex.h
+- ../../extern/Eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h
+- ../../extern/Eigen3/Eigen/src/Core/BooleanRedux.h
+- ../../extern/Eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h
+- ../../extern/Eigen3/Eigen/src/Core/util/BlasUtil.h
+- ../../extern/Eigen3/Eigen/src/Core/util/Memory.h
+- ../../extern/Eigen3/Eigen/src/Core/util/Meta.h
+- ../../extern/Eigen3/Eigen/src/Core/util/Constants.h
+- ../../extern/Eigen3/Eigen/src/Core/util/Macros.h
+- ../../extern/Eigen3/Eigen/src/Core/util/ForwardDeclarations.h
+- ../../extern/Eigen3/Eigen/src/Core/util/StaticAssert.h
+- ../../extern/Eigen3/Eigen/src/Core/util/DisableStupidWarnings.h
+- ../../extern/Eigen3/Eigen/src/Core/util/XprHelper.h
+- ../../extern/Eigen3/Eigen/src/Core/VectorBlock.h
+- ../../extern/Eigen3/Eigen/src/Core/Transpositions.h
+- ../../extern/Eigen3/Eigen/src/Core/Select.h
+- ../../extern/Eigen3/Eigen/src/Core/BandMatrix.h
+- ../../extern/Eigen3/Eigen/src/Core/CwiseUnaryView.h
+- ../../extern/Eigen3/Eigen/src/Core/Dot.h
+- ../../extern/Eigen3/Eigen/src/Core/GenericPacketMath.h
+- ../../extern/Eigen3/Eigen/src/Core/Product.h
+- ../../extern/Eigen3/Eigen/src/Core/Transpose.h
+- ../../extern/Eigen3/Eigen/src/Core/Block.h
+- ../../extern/Eigen3/Eigen/src/Core/ArrayWrapper.h
+- ../../extern/Eigen3/Eigen/src/Core/MapBase.h
+- ../../extern/Eigen3/Eigen/src/Core/NoAlias.h
+- ../../extern/Eigen3/Eigen/src/Core/ForceAlignedAccess.h
+- ../../extern/Eigen3/Eigen/src/Core/PlainObjectBase.h
+- ../../extern/Eigen3/Eigen/src/Core/IO.h
+- ../../extern/Eigen3/Eigen/src/Core/DiagonalMatrix.h
+- ../../extern/Eigen3/Eigen/src/Core/CwiseUnaryOp.h
+- ../../extern/Eigen3/Eigen/src/Core/Reverse.h
+- ../../extern/Eigen3/Eigen/src/Core/Fuzzy.h
+- ../../extern/Eigen3/Eigen/src/Core/DenseStorage.h
+- ../../extern/Eigen3/Eigen/src/Core/StableNorm.h
+- ../../extern/Eigen3/Eigen/src/Core/NumTraits.h
+- ../../extern/Eigen3/Eigen/src/Core/Map.h
+- ../../extern/Eigen3/Eigen/src/Core/Functors.h
+- ../../extern/Eigen3/Eigen/src/Core/PermutationMatrix.h
+- ../../extern/Eigen3/Eigen/src/Core/ArrayBase.h
+- ../../extern/Eigen3/Eigen/src/Core/CwiseNullaryOp.h
+- ../../extern/Eigen3/Eigen/src/Core/SolveTriangular.h
+- ../../extern/Eigen3/Eigen/src/Core/NestByValue.h
+- ../../extern/Eigen3/Eigen/src/Core/DiagonalProduct.h
+- ../../extern/Eigen3/Eigen/src/Core/CommaInitializer.h
+- ../../extern/Eigen3/Eigen/src/Core/MathFunctions.h
+- ../../extern/Eigen3/Eigen/src/Core/Diagonal.h
+- ../../extern/Eigen3/Eigen/src/Core/Replicate.h
+- ../../extern/Eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h
+- ../../extern/Eigen3/Eigen/src/Core/products/SelfadjointProduct.h
+- ../../extern/Eigen3/Eigen/src/Core/products/GeneralMatrixVector.h
+- ../../extern/Eigen3/Eigen/src/Core/products/CoeffBasedProduct.h
+- ../../extern/Eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h
+- ../../extern/Eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h
+- ../../extern/Eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h
+- ../../extern/Eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h
+- ../../extern/Eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h
+- ../../extern/Eigen3/Eigen/src/Core/products/Parallelizer.h
+- ../../extern/Eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h
+- ../../extern/Eigen3/Eigen/src/Core/products/TriangularSolverVector.h
+- ../../extern/Eigen3/Eigen/src/Core/products/TriangularMatrixVector.h
+- ../../extern/Eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h
+- ../../extern/Eigen3/Eigen/src/Core/TriangularMatrix.h
+- ../../extern/Eigen3/Eigen/src/Core/VectorwiseOp.h
+- ../../extern/Eigen3/Eigen/src/Core/Assign.h
+- ../../extern/Eigen3/Eigen/src/Core/Flagged.h
+- ../../extern/Eigen3/Eigen/src/Cholesky/LDLT.h
+- ../../extern/Eigen3/Eigen/src/Cholesky/LLT.h
++ /usr/include/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h
++ /usr/include/eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h
++ /usr/include/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h
++ /usr/include/eigen3/Eigen/src/plugins/BlockMethods.h
++ /usr/include/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h
++ /usr/include/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h
++ /usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h
++ /usr/include/eigen3/Eigen/src/misc/Kernel.h
++ /usr/include/eigen3/Eigen/src/misc/Image.h
++ /usr/include/eigen3/Eigen/src/misc/Solve.h
++ /usr/include/eigen3/Eigen/src/QR/HouseholderQR.h
++ /usr/include/eigen3/Eigen/src/QR/ColPivHouseholderQR.h
++ /usr/include/eigen3/Eigen/src/QR/FullPivHouseholderQR.h
++ /usr/include/eigen3/Eigen/src/StlSupport/details.h
++ /usr/include/eigen3/Eigen/src/StlSupport/StdList.h
++ /usr/include/eigen3/Eigen/src/StlSupport/StdDeque.h
++ /usr/include/eigen3/Eigen/src/StlSupport/StdVector.h
++ /usr/include/eigen3/Eigen/src/SVD/UpperBidiagonalization.h
++ /usr/include/eigen3/Eigen/src/SVD/JacobiSVD.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/ComplexSchur.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/RealSchur.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/EigenvaluesCommon.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h
++ /usr/include/eigen3/Eigen/src/Eigenvalues/EigenSolver.h
++ /usr/include/eigen3/Eigen/src/Jacobi/Jacobi.h
++ /usr/include/eigen3/Eigen/src/Householder/Householder.h
++ /usr/include/eigen3/Eigen/src/Householder/BlockHouseholder.h
++ /usr/include/eigen3/Eigen/src/Householder/HouseholderSequence.h
++ /usr/include/eigen3/Eigen/src/Geometry/RotationBase.h
++ /usr/include/eigen3/Eigen/src/Geometry/Rotation2D.h
++ /usr/include/eigen3/Eigen/src/Geometry/Homogeneous.h
++ /usr/include/eigen3/Eigen/src/Geometry/Hyperplane.h
++ /usr/include/eigen3/Eigen/src/Geometry/EulerAngles.h
++ /usr/include/eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h
++ /usr/include/eigen3/Eigen/src/Geometry/ParametrizedLine.h
++ /usr/include/eigen3/Eigen/src/Geometry/OrthoMethods.h
++ /usr/include/eigen3/Eigen/src/Geometry/AngleAxis.h
++ /usr/include/eigen3/Eigen/src/Geometry/Umeyama.h
++ /usr/include/eigen3/Eigen/src/Geometry/Scaling.h
++ /usr/include/eigen3/Eigen/src/Geometry/Translation.h
++ /usr/include/eigen3/Eigen/src/Geometry/AlignedBox.h
++ /usr/include/eigen3/Eigen/src/Geometry/Transform.h
++ /usr/include/eigen3/Eigen/src/Geometry/Quaternion.h
++ /usr/include/eigen3/Eigen/src/LU/PartialPivLU.h
++ /usr/include/eigen3/Eigen/src/LU/Determinant.h
++ /usr/include/eigen3/Eigen/src/LU/arch/Inverse_SSE.h
++ /usr/include/eigen3/Eigen/src/LU/FullPivLU.h
++ /usr/include/eigen3/Eigen/src/LU/Inverse.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseMatrixBase.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseSelfAdjointView.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseVector.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseDiagonalProduct.h
++ /usr/include/eigen3/Eigen/src/Sparse/TriangularSolver.h
++ /usr/include/eigen3/Eigen/src/Sparse/AmbiVector.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseDenseProduct.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseBlock.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseTriangularView.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseCwiseBinaryOp.h
++ /usr/include/eigen3/Eigen/src/Sparse/CoreIterators.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseMatrix.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseAssign.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseSparseProduct.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseDot.h
++ /usr/include/eigen3/Eigen/src/Sparse/DynamicSparseMatrix.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseRedux.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseFuzzy.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseCwiseUnaryOp.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseView.h
++ /usr/include/eigen3/Eigen/src/Sparse/MappedSparseMatrix.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseUtil.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseTranspose.h
++ /usr/include/eigen3/Eigen/src/Sparse/SparseProduct.h
++ /usr/include/eigen3/Eigen/src/Sparse/CompressedStorage.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Cwise.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/TriangularSolver.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/QR.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Lazy.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Memory.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/SVD.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/CwiseOperators.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/VectorBlock.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Meta.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Macros.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/LeastSquares.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/LU.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Block.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/RotationBase.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/Rotation2D.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/Hyperplane.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/AngleAxis.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/Scaling.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/All.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/Translation.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/AlignedBox.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/Transform.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Geometry/Quaternion.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/Minor.h
++ /usr/include/eigen3/Eigen/src/Eigen2Support/MathFunctions.h
++ /usr/include/eigen3/Eigen/src/Core/SelfAdjointView.h
++ /usr/include/eigen3/Eigen/src/Core/MatrixBase.h
++ /usr/include/eigen3/Eigen/src/Core/Swap.h
++ /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h
++ /usr/include/eigen3/Eigen/src/Core/DenseBase.h
++ /usr/include/eigen3/Eigen/src/Core/GlobalFunctions.h
++ /usr/include/eigen3/Eigen/src/Core/ProductBase.h
++ /usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h
++ /usr/include/eigen3/Eigen/src/Core/Stride.h
++ /usr/include/eigen3/Eigen/src/Core/Matrix.h
++ /usr/include/eigen3/Eigen/src/Core/Visitor.h
++ /usr/include/eigen3/Eigen/src/Core/Array.h
++ /usr/include/eigen3/Eigen/src/Core/ReturnByValue.h
++ /usr/include/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h
++ /usr/include/eigen3/Eigen/src/Core/EigenBase.h
++ /usr/include/eigen3/Eigen/src/Core/Random.h
++ /usr/include/eigen3/Eigen/src/Core/Redux.h
++ /usr/include/eigen3/Eigen/src/Core/arch/Default/Settings.h
++ /usr/include/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h
++ /usr/include/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h
++ /usr/include/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h
++ /usr/include/eigen3/Eigen/src/Core/arch/NEON/Complex.h
++ /usr/include/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h
++ /usr/include/eigen3/Eigen/src/Core/arch/SSE/Complex.h
++ /usr/include/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h
++ /usr/include/eigen3/Eigen/src/Core/BooleanRedux.h
++ /usr/include/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h
++ /usr/include/eigen3/Eigen/src/Core/util/BlasUtil.h
++ /usr/include/eigen3/Eigen/src/Core/util/Memory.h
++ /usr/include/eigen3/Eigen/src/Core/util/Meta.h
++ /usr/include/eigen3/Eigen/src/Core/util/Constants.h
++ /usr/include/eigen3/Eigen/src/Core/util/Macros.h
++ /usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h
++ /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h
++ /usr/include/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h
++ /usr/include/eigen3/Eigen/src/Core/util/XprHelper.h
++ /usr/include/eigen3/Eigen/src/Core/VectorBlock.h
++ /usr/include/eigen3/Eigen/src/Core/Transpositions.h
++ /usr/include/eigen3/Eigen/src/Core/Select.h
++ /usr/include/eigen3/Eigen/src/Core/BandMatrix.h
++ /usr/include/eigen3/Eigen/src/Core/CwiseUnaryView.h
++ /usr/include/eigen3/Eigen/src/Core/Dot.h
++ /usr/include/eigen3/Eigen/src/Core/GenericPacketMath.h
++ /usr/include/eigen3/Eigen/src/Core/Product.h
++ /usr/include/eigen3/Eigen/src/Core/Transpose.h
++ /usr/include/eigen3/Eigen/src/Core/Block.h
++ /usr/include/eigen3/Eigen/src/Core/ArrayWrapper.h
++ /usr/include/eigen3/Eigen/src/Core/MapBase.h
++ /usr/include/eigen3/Eigen/src/Core/NoAlias.h
++ /usr/include/eigen3/Eigen/src/Core/ForceAlignedAccess.h
++ /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h
++ /usr/include/eigen3/Eigen/src/Core/IO.h
++ /usr/include/eigen3/Eigen/src/Core/DiagonalMatrix.h
++ /usr/include/eigen3/Eigen/src/Core/CwiseUnaryOp.h
++ /usr/include/eigen3/Eigen/src/Core/Reverse.h
++ /usr/include/eigen3/Eigen/src/Core/Fuzzy.h
++ /usr/include/eigen3/Eigen/src/Core/DenseStorage.h
++ /usr/include/eigen3/Eigen/src/Core/StableNorm.h
++ /usr/include/eigen3/Eigen/src/Core/NumTraits.h
++ /usr/include/eigen3/Eigen/src/Core/Map.h
++ /usr/include/eigen3/Eigen/src/Core/Functors.h
++ /usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h
++ /usr/include/eigen3/Eigen/src/Core/ArrayBase.h
++ /usr/include/eigen3/Eigen/src/Core/CwiseNullaryOp.h
++ /usr/include/eigen3/Eigen/src/Core/SolveTriangular.h
++ /usr/include/eigen3/Eigen/src/Core/NestByValue.h
++ /usr/include/eigen3/Eigen/src/Core/DiagonalProduct.h
++ /usr/include/eigen3/Eigen/src/Core/CommaInitializer.h
++ /usr/include/eigen3/Eigen/src/Core/MathFunctions.h
++ /usr/include/eigen3/Eigen/src/Core/Diagonal.h
++ /usr/include/eigen3/Eigen/src/Core/Replicate.h
++ /usr/include/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h
++ /usr/include/eigen3/Eigen/src/Core/products/SelfadjointProduct.h
++ /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h
++ /usr/include/eigen3/Eigen/src/Core/products/CoeffBasedProduct.h
++ /usr/include/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h
++ /usr/include/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h
++ /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h
++ /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h
++ /usr/include/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h
++ /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h
++ /usr/include/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h
++ /usr/include/eigen3/Eigen/src/Core/products/TriangularSolverVector.h
++ /usr/include/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h
++ /usr/include/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h
++ /usr/include/eigen3/Eigen/src/Core/TriangularMatrix.h
++ /usr/include/eigen3/Eigen/src/Core/VectorwiseOp.h
++ /usr/include/eigen3/Eigen/src/Core/Assign.h
++ /usr/include/eigen3/Eigen/src/Core/Flagged.h
++ /usr/include/eigen3/Eigen/src/Cholesky/LDLT.h
++ /usr/include/eigen3/Eigen/src/Cholesky/LLT.h
+ )
+
+ if(WIN32)
+diff -Npur blender-2.61.orig/intern/itasc/SConscript blender-2.61/intern/itasc/SConscript
+--- blender-2.61.orig/intern/itasc/SConscript 2011-12-20 20:22:32.147762093 +0100
++++ blender-2.61/intern/itasc/SConscript 2011-12-20 20:23:36.948760947 +0100
+@@ -5,7 +5,7 @@ sources = env.Glob('*.cpp')
+ sources += env.Glob('kdl/*.cpp')
+ sources += env.Glob('kdl/utilities/*.cpp')
+
+-incs = '. ../../extern/Eigen3'
++incs = '. /usr/include/eigen3'
+
+ defs = []
+
+diff -Npur blender-2.61.orig/source/blender/ikplugin/CMakeLists.txt blender-2.61/source/blender/ikplugin/CMakeLists.txt
+--- blender-2.61.orig/source/blender/ikplugin/CMakeLists.txt 2011-12-20 20:22:32.116762096 +0100
++++ blender-2.61/source/blender/ikplugin/CMakeLists.txt 2011-12-20 20:29:42.547754494 +0100
+@@ -49,9 +49,11 @@ set(SRC
+ if(WITH_IK_ITASC)
+ add_definitions(-DWITH_IK_ITASC)
+ list(APPEND INC
+- ../../../extern/Eigen3
+ ../../../intern/itasc
+ )
++ list(APPEND INC_SYS
++ /usr/include/eigen3
++ )
+ list(APPEND SRC
+ intern/itasc_plugin.cpp
+ )
+diff -Npur blender-2.61.orig/source/blender/ikplugin/SConscript blender-2.61/source/blender/ikplugin/SConscript
+--- blender-2.61.orig/source/blender/ikplugin/SConscript 2011-12-20 20:22:32.116762096 +0100
++++ blender-2.61/source/blender/ikplugin/SConscript 2011-12-20 20:24:26.328760105 +0100
+@@ -4,7 +4,7 @@ defs = []
+ sources = env.Glob('intern/*.c') + env.Glob('intern/*.cpp')
+
+ incs = '#/intern/guardedalloc #/intern/iksolver/extern ../makesdna ../blenlib'
+-incs += ' ../blenkernel ../include ../ikplugin #/intern/itasc #/extern/Eigen3'
++incs += ' ../blenkernel ../include ../ikplugin #/intern/itasc /usr/include/eigen3'
+
+ defs.append('WITH_IK_ITASC')
+
+diff -Npur blender-2.61.orig/source/gameengine/Converter/CMakeLists.txt blender-2.61/source/gameengine/Converter/CMakeLists.txt
+--- blender-2.61.orig/source/gameengine/Converter/CMakeLists.txt 2011-12-20 20:22:31.708762102 +0100
++++ blender-2.61/source/gameengine/Converter/CMakeLists.txt 2011-12-20 20:28:50.404755406 +0100
+@@ -50,7 +50,6 @@ set(INC
+ ../../blender/makesrna
+ ../../blender/windowmanager
+ ../../../extern/bullet2/src
+- ../../../extern/Eigen3
+ ../../../intern/container
+ ../../../intern/guardedalloc
+ ../../../intern/moto/include
+@@ -59,7 +58,7 @@ set(INC
+ )
+
+ set(INC_SYS
+-
++ /usr/include/eigen3
+ )
+
+ set(SRC
+diff -Npur blender-2.61.orig/source/gameengine/Converter/SConscript blender-2.61/source/gameengine/Converter/SConscript
+--- blender-2.61.orig/source/gameengine/Converter/SConscript 2011-12-20 20:22:31.708762102 +0100
++++ blender-2.61/source/gameengine/Converter/SConscript 2011-12-20 20:25:17.397759112 +0100
+@@ -21,7 +21,7 @@ incs += ' #source/blender/windowmanager'
+ incs += ' #source/blender/makesrna'
+ incs += ' #source/blender/ikplugin'
+ incs += ' #extern/recastnavigation/Detour/Include'
+-incs += ' #extern/Eigen3'
++incs += ' /usr/include/eigen3'
+
+ incs += ' ' + env['BF_BULLET_INC']
+
diff --git a/media-gfx/blender/files/blender-2.61-enable_site_module.patch b/media-gfx/blender/files/blender-2.61-enable_site_module.patch
new file mode 100644
index 0000000..b913acd
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.61-enable_site_module.patch
@@ -0,0 +1,31 @@
+--- source/blender/python/intern/bpy_interface.c-original 2011-12-15 23:01:09.059429414 +0100
++++ source/blender/python/intern/bpy_interface.c 2011-12-15 23:01:17.312478333 +0100
+@@ -219,10 +219,6 @@
+ * blender is utf-8 too - campbell */
+ BLI_setenv("PYTHONIOENCODING", "utf-8:surrogateescape");
+
+- /* Python 3.2 now looks for '2.xx/python/include/python3.2d/pyconfig.h' to
+- * parse from the 'sysconfig' module which is used by 'site',
+- * so for now disable site. alternatively we could copy the file. */
+- Py_NoSiteFlag= 1;
+
+ Py_Initialize();
+
+--- source/gameengine/Ketsji/KX_PythonInit.cpp-original 2011-12-15 23:01:05.043919062 +0100
++++ source/gameengine/Ketsji/KX_PythonInit.cpp 2011-12-15 23:01:23.926318921 +0100
+@@ -1823,7 +1823,6 @@
+ STR_String pname = progname;
+ Py_SetProgramName(pname.Ptr());
+ #endif
+- Py_NoSiteFlag=1;
+ Py_FrozenFlag=1;
+
+ /* must run before python initializes */
+@@ -1896,7 +1895,6 @@
+ STR_String pname = progname;
+ Py_SetProgramName(pname.Ptr());
+ #endif
+- Py_NoSiteFlag=1;
+ Py_FrozenFlag=1;
+
+ initPyTypes();
diff --git a/media-gfx/blender/files/blender-2.61-glew.patch b/media-gfx/blender/files/blender-2.61-glew.patch
new file mode 100644
index 0000000..365fc08
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.61-glew.patch
@@ -0,0 +1,44 @@
+--- extern/SConscript-original 2011-12-15 16:25:29.379238136 +0100
++++ extern/SConscript 2011-12-15 16:26:10.376448670 +0100
+@@ -2,7 +2,6 @@
+
+ Import('env')
+
+-SConscript(['glew/SConscript'])
+ SConscript(['colamd/SConscript'])
+
+ if env['WITH_BF_GAMEENGINE']:
+--- source/blender/editors/include/BIF_gl.h-original 2011-12-15 16:27:31.299733603 +0100
++++ source/blender/editors/include/BIF_gl.h 2011-12-15 16:30:50.993113607 +0100
+@@ -33,7 +33,7 @@
+ #ifndef BIF_GL_H
+ #define BIF_GL_H
+
+-#include "GL/glew.h"
++#include <GL/glew.h>
+
+ /*
+ * these should be phased out. cpack should be replaced in
+--- extern/CMakeLists.txt-original 2011-12-15 16:26:50.104497900 +0100
++++ extern/CMakeLists.txt 2011-12-15 16:28:04.397940215 +0100
+@@ -40,9 +40,6 @@
+ add_subdirectory(binreloc)
+ endif()
+
+-if(WITH_BUILTIN_GLEW)
+- add_subdirectory(glew)
+-endif()
+
+ if(WITH_GAMEENGINE)
+ add_subdirectory(recastnavigation)
+--- CMakeLists.txt-original 2011-12-15 16:27:03.309176149 +0100
++++ CMakeLists.txt 2011-12-15 16:29:02.001261302 +0100
+@@ -156,7 +156,7 @@
+
+ if(UNIX AND NOT APPLE)
+ option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
+- option(WITH_BUILTIN_GLEW "Use GLEW OpenGL wrapper library bundled with blender" ON)
++ option(WITH_BUILTIN_GLEW "Use GLEW OpenGL wrapper library bundled with blender" OFF)
+ option(WITH_XDG_USER_DIRS "Build with XDG Base Directory Specification (only config and documents for now)" OFF)
+ mark_as_advanced(WITH_XDG_USER_DIRS)
+ else()
diff --git a/media-gfx/blender/files/blender-2.61-insecure.desktop b/media-gfx/blender/files/blender-2.61-insecure.desktop
new file mode 100644
index 0000000..bd2824d
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.61-insecure.desktop
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Name=Blender-2.61 (reduced security)
+GenericName=3D modeller (reduced security)
+GenericName[es]=modelador 3D (reduced security)
+GenericName[de]=3D Modellierer (weniger Sicherheit)
+GenericName[fr]=modeleur 3D (reduced security)
+GenericName[ru]=Редактор 3D-моделей (reduced security)
+Comment=3D modeling, animation, rendering and post-production
+Comment[es]=modelado 3D, animación, renderizado y post-producción
+Exec=blender-2.61 --enable-autoexec
+Icon=blender-2.61
+Terminal=false
+Type=Application
+Categories=Graphics;3DGraphics;
+MimeType=application/x-blender;