summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-07-13 23:56:11 +0000
committerLuca Barbato <lu_zero@gentoo.org>2012-07-13 23:56:11 +0000
commit6086b7b80d943f68503782c2b2a8d37a17b49df5 (patch)
tree8a3b2f6b0b6507168ce414dc0ac3913b3c839b7e /media-gfx/blender
parentVersion bump to 6.1.5 (diff)
downloadgentoo-2-6086b7b80d943f68503782c2b2a8d37a17b49df5.tar.gz
gentoo-2-6086b7b80d943f68503782c2b2a8d37a17b49df5.tar.bz2
gentoo-2-6086b7b80d943f68503782c2b2a8d37a17b49df5.zip
New version, thanks to Simone Scanzoni <nonno.cicala@libero.it> for the updated ebuild
(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)
Diffstat (limited to 'media-gfx/blender')
-rw-r--r--media-gfx/blender/ChangeLog29
-rw-r--r--media-gfx/blender/blender-2.63a.ebuild444
-rw-r--r--media-gfx/blender/files/blender-2.63-CVE-2009-3850-v5.patch164
-rw-r--r--media-gfx/blender/files/blender-2.63-doxyfile.patch11
-rw-r--r--media-gfx/blender/files/blender-2.63-enable_site_module.patch34
-rw-r--r--media-gfx/blender/files/blender-2.63-glew.patch49
-rw-r--r--media-gfx/blender/files/blender-2.63-opencollada-debug.patch15
-rw-r--r--media-gfx/blender/files/blender-2.63a-bullet.patch178
-rw-r--r--media-gfx/blender/files/blender-2.63a-colamd.patch174
-rw-r--r--media-gfx/blender/files/blender-2.63a-desktop.patch20
-rw-r--r--media-gfx/blender/files/blender-2.63a-eigen.patch554
-rw-r--r--media-gfx/blender/files/blender-2.63a-insecure.desktop17
-rw-r--r--media-gfx/blender/files/blender-2.63a-libav-0.8.patch561
-rw-r--r--media-gfx/blender/metadata.xml3
14 files changed, 2245 insertions, 8 deletions
diff --git a/media-gfx/blender/ChangeLog b/media-gfx/blender/ChangeLog
index 63ace125d7dc..8203ef2f10c4 100644
--- a/media-gfx/blender/ChangeLog
+++ b/media-gfx/blender/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for media-gfx/blender
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.226 2012/06/27 21:25:30 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.227 2012/07/13 23:56:11 lu_zero Exp $
+
+*blender-2.63a (13 Jul 2012)
+
+ 13 Jul 2012; Luca Barbato <lu_zero@gentoo.org>
+ +files/blender-2.63-CVE-2009-3850-v5.patch,
+ +files/blender-2.63-doxyfile.patch,
+ +files/blender-2.63-enable_site_module.patch, +files/blender-2.63-glew.patch,
+ +files/blender-2.63-opencollada-debug.patch, +blender-2.63a.ebuild,
+ +files/blender-2.63a-bullet.patch, +files/blender-2.63a-colamd.patch,
+ +files/blender-2.63a-desktop.patch, +files/blender-2.63a-eigen.patch,
+ +files/blender-2.63a-insecure.desktop, +files/blender-2.63a-libav-0.8.patch:
+ New version, thanks to Simone Scanzoni <nonno.cicala@libero.it> for the
+ updated ebuild
27 Jun 2012; Samuli Suominen <ssuominen@gentoo.org> blender-2.48a-r3.ebuild,
-files/blender.png:
@@ -842,7 +855,7 @@
adding categorie. see 45110 for details
07 Mar 2004; Jon Portnoy <avenj@gentoo.org> :
- Removed AMD64 keywords from all versions prior to 2.32.
+ Removed AMD64 keywords from all versions prior to 2.32.
Added !amd64() contruct for dev-games/ode.
18 Feb 2004; <augustus@gentoo.org> blender-2.32.ebuild:
@@ -879,10 +892,10 @@
*blender-2.30 (07 Nov 2003)
- 07 Nov 2003; Philip Walls <malverian@gentoo.org> blender-2.30.ebuild
+ 07 Nov 2003; Philip Walls <malverian@gentoo.org> blender-2.30.ebuild
files/configure-fix-2.30.patch metadata.xml:
- Version bump, changed to "use foo && ..." instead of ifs. Thanks to
- Dan Bryant <dan@omega.blackdaemon.net> in bug #32585 for configure
+ Version bump, changed to "use foo && ..." instead of ifs. Thanks to
+ Dan Bryant <dan@omega.blackdaemon.net> in bug #32585 for configure
patch. Cleaned up ChangeLog.
*blender-2.28c (11 Oct 2003)
@@ -890,7 +903,7 @@
30 Oct 2003; Luca Barbato <lu_zero@gentoo.org> blender-2.28c.ebuild:
Moved to stable
- 11 Oct 2003; Luca Barbato <lu_zero@gentoo.org> blender-2.28c.ebuild,
+ 11 Oct 2003; Luca Barbato <lu_zero@gentoo.org> blender-2.28c.ebuild,
blender-2.27.ebuild :
Minor fixes, blender-2.27 bumped to stable for ppc and x86
@@ -939,9 +952,9 @@
for me on PPC and x86. Testers wanted.
06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
-
+
*blender-2.23-r1 (13 Feb 2003)
-
+
12 Jul 2003; Daniel Ahlberg <aliz@gentoo.org> :
Added missing changelog entry.
diff --git a/media-gfx/blender/blender-2.63a.ebuild b/media-gfx/blender/blender-2.63a.ebuild
new file mode 100644
index 000000000000..9204bbf1f27e
--- /dev/null
+++ b/media-gfx/blender/blender-2.63a.ebuild
@@ -0,0 +1,444 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.63a.ebuild,v 1.1 2012/07/13 23:56:11 lu_zero Exp $
+
+EAPI=4
+PYTHON_DEPEND="3:3.2"
+
+if [[ ${PV} == *9999 ]] ; then
+SCM="subversion"
+ESVN_REPO_URI="https://svn.blender.org/svnroot/bf-blender/trunk/blender"
+fi
+
+inherit multilib scons-utils eutils python versionator flag-o-matic toolchain-funcs pax-utils ${SCM}
+
+IUSE="cycles +game-engine player +elbeem +openexr ffmpeg jpeg2k openal openmp \
+ +dds doc fftw jack apidoc sndfile tweak-mode sdl sse \
+ redcode iconv contrib collada 3dmouse"
+
+LANGS="en ar bg ca cs de el es es_ES fa fi fr hr id it ja ky ne pl pt ru sr sr@latin sv tr uk zh_CN zh_TW"
+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:0
+ x11-libs/libXi
+ x11-libs/libX11
+ media-libs/tiff:0
+ media-libs/libsamplerate
+ virtual/opengl
+ >=media-libs/freetype-2.0
+ virtual/libintl
+ media-libs/glew
+ >=sci-physics/bullet-2.78[-double-precision]
+ dev-cpp/eigen:3
+ sci-libs/colamd
+ sys-libs/zlib
+ cycles? (
+ media-libs/openimageio
+ dev-libs/boost
+ )
+ iconv? ( virtual/libiconv )
+ 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 )
+ collada? ( media-libs/opencollada )
+ 3dmouse? ( dev-libs/libspnav )"
+
+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
+ epatch "${FILESDIR}"/${PN}-${SLOT}a-collada.patch
+ epatch "${FILESDIR}"/${P/a}-doxyfile.patch
+
+ # 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/a}-glew.patch
+
+ # Eigen3
+ einfo "Removing bundled Eigen3 ..."
+ rm -r extern/Eigen3
+ epatch "${FILESDIR}"/${P}-eigen.patch
+
+ # Bullet2
+ einfo "Removing bundled Bullet2 ..."
+ rm -r extern/bullet2
+ epatch "${FILESDIR}"/${P}-bullet.patch
+
+ # Colamd
+ einfo "Removing bundled Colamd ..."
+ rm -r extern/colamd
+ epatch "${FILESDIR}"/${P}-colamd.patch
+
+ ewarn "$(echo "Remaining bundled dependencies:";
+ find extern -mindepth 1 -maxdepth 1 -type d | sed 's|^|- |')"
+
+ epatch "${FILESDIR}"/${P}-libav-0.8.patch
+ epatch "${FILESDIR}"/${P/a}-CVE-2009-3850-v5.patch
+ epatch "${FILESDIR}"/${P/a}-enable_site_module.patch
+ epatch "${FILESDIR}"/${P/a}-opencollada-debug.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
+
+ # 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 system sci-libs/colamd into Scons build options.
+ cat <<- EOF >> "${S}"/user-config.py
+ WITH_BF_COLAMD=1
+ BF_COLAMD="/usr"
+ BF_COLAMD_INC="/usr/include"
+ BF_COLAMD_LIB="colamd"
+ 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
+
+ # Ocean sim system needs fftw
+ use fftw || echo "WITH_BF_OCEANSIM=0" >> "${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 \
+ 'elbeem fluid' \
+ 'sdl' \
+ 'apidoc docs' \
+ 'jack' \
+ 'sndfile' \
+ 'openexr' \
+ 'dds' \
+ 'fftw fftw3' \
+ 'jpeg2k openjpeg' \
+ 'openal'\
+ 'ffmpeg' \
+ 'ffmpeg ogg' \
+ 'player' \
+ 'sse rayoptimization' \
+ 'redcode' \
+ 'collada' \
+ '3dmouse' ; do
+ blend_with ${arg}
+ done
+
+ # add system media-libs/opencollada into Scons build options.
+ echo 'BF_OPENCOLLADA_INC="/usr/include/opencollada/"' >> "${S}"/user-config.py
+ echo 'BF_OPENCOLLADA_LIBPATH="/usr/'$(get_libdir)'/opencollada/"' >> "${S}"/user-config.py
+
+ # enable debugging/testing support
+ is-flag "-g*" && 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'
+}
+
+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/a}/scripts"
+ export BLENDER_SYSTEM_DATAFILES="/usr/share/blender/${PV/a}/datafiles"
+ export BLENDER_SYSTEM_PLUGINS="/usr/lib/blender/${PV/a}/plugins"
+ exec /usr/bin/blender-bin-${PV} \$*
+ EOF
+
+ # Pax mark blender for hardened support.
+ pax-mark m "${WORKDIR}/install/blender"
+
+ # 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 plugin headers
+ insinto /usr/include/${PN}/${PV/a}
+ doins "${WORKDIR}"/${P}/source/blender/blenpluginapi/*.h
+
+ # install contrib scripts addons
+ insinto /usr/share/${PN}/${PV/a}/scripts
+ use contrib && doins -r "${WORKDIR}"/${P}/release/scripts/addons_contrib
+
+ # 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 --noaudio || 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}
+ if [[ -z ${LINGUAS} || ${LINGUAS} == "en" ]]; then
+ rm -r "${WORKDIR}/install/${PV/a}/datafiles/locale"
+ else
+ for x in "${WORKDIR}"/install/${PV/a}/datafiles/locale/* ; do
+ mylang=${x##*/}
+ has ${mylang} ${LINGUAS} || rm -r ${x}
+ done
+ fi
+
+ # installing blender
+ insinto /usr/share/${PN}/${PV/a}
+ doins -r "${WORKDIR}"/install/${PV/a}/*
+
+ # 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
+}
diff --git a/media-gfx/blender/files/blender-2.63-CVE-2009-3850-v5.patch b/media-gfx/blender/files/blender-2.63-CVE-2009-3850-v5.patch
new file mode 100644
index 000000000000..671e0377e6d0
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63-CVE-2009-3850-v5.patch
@@ -0,0 +1,164 @@
+diff -Npur blender-2.63.orig/build_files/scons/tools/btools.py blender-2.63/build_files/scons/tools/btools.py
+--- blender-2.63.orig/build_files/scons/tools/btools.py 2012-05-08 00:05:06.963498491 +0200
++++ blender-2.63/build_files/scons/tools/btools.py 2012-05-08 00:06:42.238496807 +0200
+@@ -96,7 +96,7 @@ def print_arguments(args, bc):
+
+ def validate_arguments(args, bc):
+ opts_list = [
+- 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS',
++ 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS', 'WITH_PYTHON_SECURITY',
+ 'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
+ 'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH',
+ 'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH',
+@@ -261,6 +261,7 @@ def read_opts(env, cfg, args):
+ (BoolVariable('WITH_BF_STATICPYTHON', 'Staticly link to python', False)),
+ (BoolVariable('WITH_OSX_STATICPYTHON', 'Staticly link to python', True)),
+ ('BF_PYTHON_ABI_FLAGS', 'Python ABI flags (suffix in library version: m, mu, etc)', ''),
++ (BoolVariable('WITH_PYTHON_SECURITY', 'Disables execution of scripts within blend files by default (recommend to leave off)', False)),
+
+ (BoolVariable('WITH_BF_FLUID', 'Build with Fluid simulation (Elbeem)', True)),
+ (BoolVariable('WITH_BF_DECIMATE', 'Build with decimate modifier', True)),
+diff -Npur blender-2.63.orig/SConstruct blender-2.63/SConstruct
+--- blender-2.63.orig/SConstruct 2012-05-08 00:05:06.933498492 +0200
++++ blender-2.63/SConstruct 2012-05-08 00:05:45.665497801 +0200
+@@ -349,6 +349,10 @@ if 'blenderplayer' in B.targets:
+ if 'blendernogame' in B.targets:
+ env['WITH_BF_GAMEENGINE'] = False
+
++# build without python autoexec security?
++if env['WITH_PYTHON_SECURITY'] == True:
++ env.Append(CPPFLAGS=['-DWITH_PYTHON_SECURITY'])
++
+ # build without elbeem (fluidsim)?
+ if env['WITH_BF_FLUID'] == 1:
+ env['CPPFLAGS'].append('-DWITH_MOD_FLUID')
+diff -Npur blender-2.63.orig/source/blender/blenkernel/intern/blender.c blender-2.63/source/blender/blenkernel/intern/blender.c
+--- blender-2.63.orig/source/blender/blenkernel/intern/blender.c 2012-05-08 00:05:06.994498491 +0200
++++ blender-2.63/source/blender/blenkernel/intern/blender.c 2012-05-08 00:07:04.274496414 +0200
+@@ -145,6 +145,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.63.orig/source/blender/makesrna/intern/rna_userdef.c blender-2.63/source/blender/makesrna/intern/rna_userdef.c
+--- blender-2.63.orig/source/blender/makesrna/intern/rna_userdef.c 2012-05-08 00:05:07.002498491 +0200
++++ blender-2.63/source/blender/makesrna/intern/rna_userdef.c 2012-05-08 00:08:04.547495355 +0200
+@@ -126,9 +126,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)
+@@ -2994,6 +3002,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.63.orig/source/blender/windowmanager/intern/wm_files.c blender-2.63/source/blender/windowmanager/intern/wm_files.c
+--- blender-2.63.orig/source/blender/windowmanager/intern/wm_files.c 2012-05-08 00:05:07.094498489 +0200
++++ blender-2.63/source/blender/windowmanager/intern/wm_files.c 2012-05-08 00:09:20.964493999 +0200
+@@ -288,13 +288,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.63.orig/source/blender/windowmanager/intern/wm_operators.c blender-2.63/source/blender/windowmanager/intern/wm_operators.c
+--- blender-2.63.orig/source/blender/windowmanager/intern/wm_operators.c 2012-05-08 00:05:07.093498489 +0200
++++ blender-2.63/source/blender/windowmanager/intern/wm_operators.c 2012-05-08 00:10:59.325492259 +0200
+@@ -1627,12 +1627,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);
+@@ -1644,6 +1645,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";
+@@ -1656,8 +1659,12 @@ static void WM_OT_open_mainfile(wmOperat
+ WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+
+ 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",
++ use_scripts_checkbox = RNA_def_boolean(ot->srna, "use_scripts",
++ !!(G.f & G_SCRIPT_AUTOEXEC), "Trusted Source",
+ "Allow .blend file to 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.63.orig/source/creator/creator.c blender-2.63/source/creator/creator.c
+--- blender-2.63.orig/source/creator/creator.c 2012-05-08 00:05:06.987498491 +0200
++++ blender-2.63/source/creator/creator.c 2012-05-08 00:11:37.213491621 +0200
+@@ -342,14 +342,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;
+ }
+
diff --git a/media-gfx/blender/files/blender-2.63-doxyfile.patch b/media-gfx/blender/files/blender-2.63-doxyfile.patch
new file mode 100644
index 000000000000..c52c23408e5d
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63-doxyfile.patch
@@ -0,0 +1,11 @@
+--- blender-2.60a.orig/work/blender-2.60a/doc/doxygen/Doxyfile 2012-02-12 23:05:35.390883778 +0100
++++ blender-2.60a/work/blender-2.60a/doc/doxygen/Doxyfile 2012-02-12 23:07:22.539860341 +0100
+@@ -952,7 +952,7 @@
+ # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+ # the HTML help compiler on the generated index.hhp.
+
+-HHC_LOCATION = "C:/Program Files (x86)/HTML Help Workshop/hhc.exe"
++HHC_LOCATION =
+
+ # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+ # controls if a separate .chi index file is generated (YES) or that
diff --git a/media-gfx/blender/files/blender-2.63-enable_site_module.patch b/media-gfx/blender/files/blender-2.63-enable_site_module.patch
new file mode 100644
index 000000000000..2d6ca00c19cd
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63-enable_site_module.patch
@@ -0,0 +1,34 @@
+diff -Npur blender-2.63.orig/source/blender/python/intern/bpy_interface.c blender-2.63/source/blender/python/intern/bpy_interface.c
+--- blender-2.63.orig/source/blender/python/intern/bpy_interface.c 2012-05-08 00:14:54.141488111 +0200
++++ blender-2.63/source/blender/python/intern/bpy_interface.c 2012-05-08 00:15:14.861487739 +0200
+@@ -241,11 +241,6 @@ void BPY_python_start(int argc, const ch
+ * 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();
+
+ // PySys_SetArgv(argc, argv); // broken in py3, not a huge deal
+diff -Npur blender-2.63.orig/source/gameengine/Ketsji/KX_PythonInit.cpp blender-2.63/source/gameengine/Ketsji/KX_PythonInit.cpp
+--- blender-2.63.orig/source/gameengine/Ketsji/KX_PythonInit.cpp 2012-05-08 00:14:54.118488110 +0200
++++ blender-2.63/source/gameengine/Ketsji/KX_PythonInit.cpp 2012-05-08 00:15:23.305487596 +0200
+@@ -1848,7 +1848,6 @@ PyObject* initGamePlayerPythonScripting(
+ STR_String pname = progname;
+ Py_SetProgramName(pname.Ptr());
+ #endif
+- Py_NoSiteFlag=1;
+ Py_FrozenFlag=1;
+
+ /* must run before python initializes */
+@@ -1929,7 +1928,6 @@ PyObject* initGamePythonScripting(const
+ STR_String pname = progname;
+ Py_SetProgramName(pname.Ptr());
+ #endif
+- Py_NoSiteFlag=1;
+ Py_FrozenFlag=1;
+
+ #ifdef WITH_AUDASPACE
diff --git a/media-gfx/blender/files/blender-2.63-glew.patch b/media-gfx/blender/files/blender-2.63-glew.patch
new file mode 100644
index 000000000000..736bedd8185d
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63-glew.patch
@@ -0,0 +1,49 @@
+diff -Npur blender-2.63.orig/CMakeLists.txt blender-2.63/CMakeLists.txt
+--- blender-2.63.orig/CMakeLists.txt 2012-05-07 23:02:18.166565118 +0200
++++ blender-2.63/CMakeLists.txt 2012-05-07 23:02:45.907564652 +0200
+@@ -160,7 +160,7 @@ unset(PLATFORM_DEFAULT)
+ if(UNIX AND NOT APPLE)
+ option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
+ option(WITH_X11_XF86VMODE "Enable X11 video mode switching" 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)
+
+diff -Npur blender-2.63.orig/extern/CMakeLists.txt blender-2.63/extern/CMakeLists.txt
+--- blender-2.63.orig/extern/CMakeLists.txt 2012-05-07 23:02:18.134565119 +0200
++++ blender-2.63/extern/CMakeLists.txt 2012-05-07 23:02:58.458564406 +0200
+@@ -40,10 +40,6 @@ if(WITH_BINRELOC)
+ add_subdirectory(binreloc)
+ endif()
+
+-if(WITH_BUILTIN_GLEW)
+- add_subdirectory(glew)
+-endif()
+-
+ if(WITH_GAMEENGINE)
+ add_subdirectory(recastnavigation)
+ endif()
+diff -Npur blender-2.63.orig/extern/SConscript blender-2.63/extern/SConscript
+--- blender-2.63.orig/extern/SConscript 2012-05-07 23:02:18.132565119 +0200
++++ blender-2.63/extern/SConscript 2012-05-07 23:03:14.094564130 +0200
+@@ -2,7 +2,6 @@
+
+ Import('env')
+
+-SConscript(['glew/SConscript'])
+ SConscript(['colamd/SConscript'])
+
+ if env['WITH_BF_GAMEENGINE']:
+diff -Npur blender-2.63.orig/source/blender/editors/include/BIF_gl.h blender-2.63/source/blender/editors/include/BIF_gl.h
+--- blender-2.63.orig/source/blender/editors/include/BIF_gl.h 2012-05-07 23:02:18.433565114 +0200
++++ blender-2.63/source/blender/editors/include/BIF_gl.h 2012-05-07 23:03:35.555563750 +0200
+@@ -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
diff --git a/media-gfx/blender/files/blender-2.63-opencollada-debug.patch b/media-gfx/blender/files/blender-2.63-opencollada-debug.patch
new file mode 100644
index 000000000000..0798cfde0745
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63-opencollada-debug.patch
@@ -0,0 +1,15 @@
+diff -Npur blender-2.63.orig/build_files/scons/tools/Blender.py blender-2.63/build_files/scons/tools/Blender.py
+--- blender-2.63.orig/build_files/scons/tools/Blender.py 2012-05-08 00:15:58.091486980 +0200
++++ blender-2.63/build_files/scons/tools/Blender.py 2012-05-08 00:17:01.805485854 +0200
+@@ -276,10 +276,7 @@ def setup_syslibs(lenv):
+ syslibs += Split(lenv['BF_PTHREADS_LIB'])
+ if lenv['WITH_BF_COLLADA']:
+ syslibs.append(lenv['BF_PCRE_LIB'])
+- if lenv['BF_DEBUG'] and (lenv['OURPLATFORM'] != 'linux'):
+- syslibs += [colladalib+'_d' for colladalib in Split(lenv['BF_OPENCOLLADA_LIB'])]
+- else:
+- syslibs += Split(lenv['BF_OPENCOLLADA_LIB'])
++ syslibs += Split(lenv['BF_OPENCOLLADA_LIB'])
+ syslibs.append(lenv['BF_EXPAT_LIB'])
+ if lenv['WITH_BF_COLAMD']:
+ syslibs += Split(lenv['BF_COLAMD_LIB'])
diff --git a/media-gfx/blender/files/blender-2.63a-bullet.patch b/media-gfx/blender/files/blender-2.63a-bullet.patch
new file mode 100644
index 000000000000..e8ebd736305d
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63a-bullet.patch
@@ -0,0 +1,178 @@
+diff -Npur blender-2.63a.eigen/build_files/scons/tools/Blender.py blender-2.63a/build_files/scons/tools/Blender.py
+--- blender-2.63a.eigen/build_files/scons/tools/Blender.py 2012-05-10 16:53:28.000000000 +0200
++++ blender-2.63a/build_files/scons/tools/Blender.py 2012-06-03 18:43:16.699242778 +0200
+@@ -268,6 +268,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', 'win64-mingw'):
+ syslibs += Split(lenv['BF_PTHREADS_LIB'])
+ if lenv['WITH_BF_COLLADA']:
+diff -Npur blender-2.63a.eigen/doc/doxygen/Doxyfile blender-2.63a/doc/doxygen/Doxyfile
+--- blender-2.63a.eigen/doc/doxygen/Doxyfile 2012-05-10 16:53:36.000000000 +0200
++++ blender-2.63a/doc/doxygen/Doxyfile 2012-06-03 18:43:16.700242905 +0200
+@@ -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.63a.eigen/extern/CMakeLists.txt blender-2.63a/extern/CMakeLists.txt
+--- blender-2.63a.eigen/extern/CMakeLists.txt 2012-05-10 16:54:50.000000000 +0200
++++ blender-2.63a/extern/CMakeLists.txt 2012-06-03 18:43:16.701243032 +0200
+@@ -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.63a.eigen/intern/smoke/CMakeLists.txt blender-2.63a/intern/smoke/CMakeLists.txt
+--- blender-2.63a.eigen/intern/smoke/CMakeLists.txt 2012-05-10 16:46:35.000000000 +0200
++++ blender-2.63a/intern/smoke/CMakeLists.txt 2012-06-03 18:43:16.702243159 +0200
+@@ -26,10 +26,10 @@
+ set(INC
+ intern
+ ../memutil
+- ../../extern/bullet2/src
+ )
+
+ set(INC_SYS
++ /usr/include/bullet
+ ${PNG_INCLUDE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
+ )
+diff -Npur blender-2.63a.eigen/intern/smoke/SConscript blender-2.63a/intern/smoke/SConscript
+--- blender-2.63a.eigen/intern/smoke/SConscript 2012-05-10 16:46:35.000000000 +0200
++++ blender-2.63a/intern/smoke/SConscript 2012-06-03 18:43:16.702243159 +0200
+@@ -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.63a.eigen/source/blender/blenkernel/CMakeLists.txt blender-2.63a/source/blender/blenkernel/CMakeLists.txt
+--- blender-2.63a.eigen/source/blender/blenkernel/CMakeLists.txt 2012-05-10 16:50:24.000000000 +0200
++++ blender-2.63a/source/blender/blenkernel/CMakeLists.txt 2012-06-03 18:43:16.703243286 +0200
+@@ -241,8 +241,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.63a.eigen/source/blender/blenkernel/SConscript blender-2.63a/source/blender/blenkernel/SConscript
+--- blender-2.63a.eigen/source/blender/blenkernel/SConscript 2012-05-10 16:50:24.000000000 +0200
++++ blender-2.63a/source/blender/blenkernel/SConscript 2012-06-03 18:43:16.704243413 +0200
+@@ -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 += ' ../bmesh'
+diff -Npur blender-2.63a.eigen/source/gameengine/BlenderRoutines/CMakeLists.txt blender-2.63a/source/gameengine/BlenderRoutines/CMakeLists.txt
+--- blender-2.63a.eigen/source/gameengine/BlenderRoutines/CMakeLists.txt 2012-05-10 16:48:35.000000000 +0200
++++ blender-2.63a/source/gameengine/BlenderRoutines/CMakeLists.txt 2012-06-03 18:43:16.704243413 +0200
+@@ -23,7 +23,6 @@ set(INC
+ ../../blender/makesdna
+ ../../blender/makesrna
+ ../../blender/windowmanager
+- ../../../extern/bullet2/src
+ ../../../intern/container
+ ../../../intern/guardedalloc
+ ../../../intern/moto/include
+@@ -33,6 +32,7 @@ set(INC
+
+ set(INC_SYS
+ ${PTHREADS_INCLUDE_DIRS}
++ /usr/include/bullet
+ )
+
+ set(SRC
+diff -Npur blender-2.63a.eigen/source/gameengine/Converter/CMakeLists.txt blender-2.63a/source/gameengine/Converter/CMakeLists.txt
+--- blender-2.63a.eigen/source/gameengine/Converter/CMakeLists.txt 2012-06-03 18:42:31.632515028 +0200
++++ blender-2.63a/source/gameengine/Converter/CMakeLists.txt 2012-06-03 18:43:16.705243540 +0200
+@@ -49,7 +49,6 @@ set(INC
+ ../../blender/makesdna
+ ../../blender/makesrna
+ ../../blender/windowmanager
+- ../../../extern/bullet2/src
+ ../../../intern/container
+ ../../../intern/guardedalloc
+ ../../../intern/moto/include
+@@ -60,6 +59,7 @@ set(INC
+ set(INC_SYS
+ ${PTHREADS_INCLUDE_DIRS}
+ /usr/include/eigen3
++ /usr/include/bullet
+
+ )
+
+diff -Npur blender-2.63a.eigen/source/gameengine/Ketsji/CMakeLists.txt blender-2.63a/source/gameengine/Ketsji/CMakeLists.txt
+--- blender-2.63a.eigen/source/gameengine/Ketsji/CMakeLists.txt 2012-05-10 16:48:58.000000000 +0200
++++ blender-2.63a/source/gameengine/Ketsji/CMakeLists.txt 2012-06-03 18:43:16.706243667 +0200
+@@ -242,9 +242,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.63a.eigen/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp blender-2.63a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+--- blender-2.63a.eigen/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp 2012-05-10 16:48:32.000000000 +0200
++++ blender-2.63a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp 2012-06-03 18:43:16.708243921 +0200
+@@ -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.63a.eigen/source/gameengine/Physics/Bullet/CMakeLists.txt blender-2.63a/source/gameengine/Physics/Bullet/CMakeLists.txt
+--- blender-2.63a.eigen/source/gameengine/Physics/Bullet/CMakeLists.txt 2012-05-10 16:48:32.000000000 +0200
++++ blender-2.63a/source/gameengine/Physics/Bullet/CMakeLists.txt 2012-06-03 18:43:16.709244048 +0200
+@@ -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.63a-colamd.patch b/media-gfx/blender/files/blender-2.63a-colamd.patch
new file mode 100644
index 000000000000..80c04e89f996
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63a-colamd.patch
@@ -0,0 +1,174 @@
+diff -Npur blender-2.63a.eigen-bullet/build_files/scons/config/linux-config.py blender-2.63a/build_files/scons/config/linux-config.py
+--- blender-2.63a.eigen-bullet/build_files/scons/config/linux-config.py 2012-05-10 16:53:29.000000000 +0200
++++ blender-2.63a/build_files/scons/config/linux-config.py 2012-06-03 18:43:55.121126001 +0200
+@@ -192,6 +192,11 @@ BF_EXPAT = '/usr'
+ BF_EXPAT_LIB = 'expat'
+ BF_EXPAT_LIBPATH = '/usr/lib'
+
++WITH_BF_COLAMD = True
++BF_COLAMD = '#extern/colamd'
++BF_COLAMD_INC = '${BF_COLAMD}/include'
++BF_COLAMD_LIB = 'extern_colamd'
++
+ WITH_BF_JEMALLOC = False
+ WITH_BF_STATICJEMALLOC = False
+ BF_JEMALLOC = '/usr'
+diff -Npur blender-2.63a.eigen-bullet/build_files/scons/tools/Blender.py blender-2.63a/build_files/scons/tools/Blender.py
+--- blender-2.63a.eigen-bullet/build_files/scons/tools/Blender.py 2012-06-03 18:43:16.699242778 +0200
++++ blender-2.63a/build_files/scons/tools/Blender.py 2012-06-03 18:43:55.123126255 +0200
+@@ -279,6 +279,8 @@ def setup_syslibs(lenv):
+ else:
+ syslibs += Split(lenv['BF_OPENCOLLADA_LIB'])
+ syslibs.append(lenv['BF_EXPAT_LIB'])
++ if lenv['WITH_BF_COLAMD']:
++ syslibs += Split(lenv['BF_COLAMD_LIB'])
+
+ if lenv['WITH_BF_JEMALLOC']:
+ if not lenv['WITH_BF_STATICJEMALLOC']:
+diff -Npur blender-2.63a.eigen-bullet/build_files/scons/tools/btools.py blender-2.63a/build_files/scons/tools/btools.py
+--- blender-2.63a.eigen-bullet/build_files/scons/tools/btools.py 2012-05-10 16:53:28.000000000 +0200
++++ blender-2.63a/build_files/scons/tools/btools.py 2012-06-03 18:43:55.124126382 +0200
+@@ -126,6 +126,7 @@ def validate_arguments(args, bc):
+ 'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH', 'WITH_BF_STATICFFTW3', 'BF_FFTW3_LIB_STATIC',
+ 'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
+ 'WITH_BF_COLLADA', 'BF_COLLADA', 'BF_COLLADA_INC', 'BF_COLLADA_LIB', 'BF_OPENCOLLADA', 'BF_OPENCOLLADA_INC', 'BF_OPENCOLLADA_LIB', 'BF_OPENCOLLADA_LIBPATH', 'BF_PCRE', 'BF_PCRE_LIB', 'BF_PCRE_LIBPATH', 'BF_EXPAT', 'BF_EXPAT_LIB', 'BF_EXPAT_LIBPATH',
++ 'WITH_BF_COLAMD', 'BF_COLAMD', 'BF_COLAMD_INC', 'BF_COLAMD_LIB',
+ 'WITH_BF_PLAYER',
+ 'WITH_BF_NOBLENDER',
+ 'WITH_BF_BINRELOC',
+@@ -455,6 +456,11 @@ def read_opts(env, cfg, args):
+ ('BF_EXPAT_LIB', 'Expat library', ''),
+ ('BF_EXPAT_LIBPATH', 'Expat library path', ''),
+
++ (BoolVariable('WITH_BF_COLAMD', 'Use Colamd if true', True)),
++ ('BF_COLAMD', 'Colamd base dir', ''),
++ ('BF_COLAMD_INC', 'Colamd include path', ''),
++ ('BF_COLAMD_LIB', 'Colamd library', ''),
++
+ (BoolVariable('WITH_BF_JEMALLOC', 'Use jemalloc if true', False)),
+ (BoolVariable('WITH_BF_STATICJEMALLOC', 'Staticly link to jemalloc', False)),
+ ('BF_JEMALLOC', 'jemalloc base path', ''),
+diff -Npur blender-2.63a.eigen-bullet/extern/libmv/bundle.sh blender-2.63a/extern/libmv/bundle.sh
+--- blender-2.63a.eigen-bullet/extern/libmv/bundle.sh 2012-06-03 18:42:31.626514266 +0200
++++ blender-2.63a/extern/libmv/bundle.sh 2012-06-03 18:43:55.125126509 +0200
+@@ -122,13 +122,13 @@ set(INC
+ .
+ third_party/ssba
+ third_party/ldl/Include
+- ../colamd/Include
+ )
+
+ set(INC_SYS
+ /usr/include/eigen3
+ \${PNG_INCLUDE_DIR}
+ \${ZLIB_INCLUDE_DIRS}
++ \${COLAMD_INCLUDE_DIRS}
+ )
+
+
+@@ -247,6 +247,7 @@ $src
+ incs = '. /usr/include/eigen3'
+ incs += ' ' + env['BF_PNG_INC']
+ incs += ' ' + env['BF_ZLIB_INC']
++incs += ' ' + env['BF_COLAMD_INC']
+
+ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
+ incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog'
+@@ -276,7 +277,7 @@ else:
+ ccflags_libmv += Split(env['REL_CCFLAGS'])
+ cxxflags_libmv += Split(env['REL_CXXFLAGS'])
+
+-incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include'
++incs += ' ./third_party/ssba ./third_party/ldl/Include'
+
+ env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv )
+ EOF
+diff -Npur blender-2.63a.eigen-bullet/extern/libmv/CMakeLists.txt blender-2.63a/extern/libmv/CMakeLists.txt
+--- blender-2.63a.eigen-bullet/extern/libmv/CMakeLists.txt 2012-06-03 18:42:31.627514393 +0200
++++ blender-2.63a/extern/libmv/CMakeLists.txt 2012-06-03 18:43:55.125126509 +0200
+@@ -30,13 +30,13 @@ set(INC
+ .
+ third_party/ssba
+ third_party/ldl/Include
+- ../colamd/Include
+ )
+
+ set(INC_SYS
+ /usr/include/eigen3
+ ${PNG_INCLUDE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
++ ${COLAMD_INCLUDE_DIRS}
+ )
+
+
+diff -Npur blender-2.63a.eigen-bullet/extern/libmv/SConscript blender-2.63a/extern/libmv/SConscript
+--- blender-2.63a.eigen-bullet/extern/libmv/SConscript 2012-06-03 18:42:31.627514393 +0200
++++ blender-2.63a/extern/libmv/SConscript 2012-06-03 18:43:55.127126763 +0200
+@@ -33,6 +33,7 @@ src += env.Glob('third_party/ssba/Math/*
+ incs = '. /usr/include/eigen3'
+ incs += ' ' + env['BF_PNG_INC']
+ incs += ' ' + env['BF_ZLIB_INC']
++incs += ' ' + env['BF_COLAMD_INC']
+
+ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
+ incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog'
+@@ -62,6 +63,6 @@ else:
+ ccflags_libmv += Split(env['REL_CCFLAGS'])
+ cxxflags_libmv += Split(env['REL_CXXFLAGS'])
+
+-incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include'
++incs += ' ./third_party/ssba ./third_party/ldl/Include'
+
+ env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv )
+diff -Npur blender-2.63a.eigen-bullet/extern/libmv/third_party/ssba/Math/v3d_optimization.cpp blender-2.63a/extern/libmv/third_party/ssba/Math/v3d_optimization.cpp
+--- blender-2.63a.eigen-bullet/extern/libmv/third_party/ssba/Math/v3d_optimization.cpp 2012-05-10 16:54:38.000000000 +0200
++++ blender-2.63a/extern/libmv/third_party/ssba/Math/v3d_optimization.cpp 2012-06-03 18:43:55.128126890 +0200
+@@ -21,7 +21,7 @@ with SSBA. If not, see <http://www.gnu.o
+
+ #if defined(V3DLIB_ENABLE_SUITESPARSE)
+ //# include "COLAMD/Include/colamd.h"
+-# include "colamd.h"
++# include <colamd.h>
+ extern "C"
+ {
+ //# include "LDL/Include/ldl.h"
+diff -Npur blender-2.63a.eigen-bullet/intern/opennl/CMakeLists.txt blender-2.63a/intern/opennl/CMakeLists.txt
+--- blender-2.63a.eigen-bullet/intern/opennl/CMakeLists.txt 2012-05-10 16:46:04.000000000 +0200
++++ blender-2.63a/intern/opennl/CMakeLists.txt 2012-06-03 18:43:55.129127017 +0200
+@@ -40,11 +40,10 @@ add_definitions(
+ set(INC
+ extern
+ superlu
+- ../../extern/colamd/Include
+ )
+
+ set(INC_SYS
+-
++ /usr/include
+ )
+
+ set(SRC
+diff -Npur blender-2.63a.eigen-bullet/intern/opennl/SConscript blender-2.63a/intern/opennl/SConscript
+--- blender-2.63a.eigen-bullet/intern/opennl/SConscript 2012-05-10 16:46:04.000000000 +0200
++++ blender-2.63a/intern/opennl/SConscript 2012-06-03 18:43:55.129127017 +0200
+@@ -3,7 +3,7 @@ Import ('env')
+
+ sources = env.Glob('intern/*.c') + env.Glob('superlu/*.c')
+
+-incs = 'extern superlu ../../extern/colamd/Include'
++incs = 'extern superlu /usr/include'
+
+ if (env['OURPLATFORM'] in ('win32-mingw', 'win64-mingw')):
+ env.BlenderLib ('bf_intern_opennl', sources, Split(incs), [], libtype=['core','intern'], priority=[1,80] )
+diff -Npur blender-2.63a.eigen-bullet/intern/opennl/superlu/get_perm_c.c blender-2.63a/intern/opennl/superlu/get_perm_c.c
+--- blender-2.63a.eigen-bullet/intern/opennl/superlu/get_perm_c.c 2012-05-10 16:46:04.000000000 +0200
++++ blender-2.63a/intern/opennl/superlu/get_perm_c.c 2012-06-03 18:43:55.130127145 +0200
+@@ -10,7 +10,7 @@
+ */
+
+ #include "ssp_defs.h"
+-#include "colamd.h"
++#include <colamd.h>
+
+ extern int genmmd_(int *, int *, int *, int *, int *, int *, int *,
+ int *, int *, int *, int *, int *);
diff --git a/media-gfx/blender/files/blender-2.63a-desktop.patch b/media-gfx/blender/files/blender-2.63a-desktop.patch
new file mode 100644
index 000000000000..2894ee8616cb
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63a-desktop.patch
@@ -0,0 +1,20 @@
+--- release/freedesktop/blender.desktop-original 2012-04-26 22:43:53.000000000 +0200
++++ release/freedesktop/blender.desktop 2012-05-04 00:49:30.263479607 +0200
+@@ -1,5 +1,5 @@
+ [Desktop Entry]
+-Name=Blender
++Name=Blender-2.63a
+ GenericName=3D modeller
+ GenericName[es]=modelador 3D
+ GenericName[de]=3D-Modellierer
+@@ -8,8 +8,8 @@
+ Comment=3D modeling, animation, rendering and post-production
+ Comment[es]=modelado 3D, animación, renderizado y post-producción
+ Comment[de]=3D-Modellierung, Animation, Rendering und Nachbearbeitung
+-Exec=blender
+-Icon=blender
++Exec=blender-2.63a %f
++Icon=blender-2.63a
+ Terminal=false
+ Type=Application
+ Categories=Graphics;3DGraphics;
diff --git a/media-gfx/blender/files/blender-2.63a-eigen.patch b/media-gfx/blender/files/blender-2.63a-eigen.patch
new file mode 100644
index 000000000000..6638cd01ff3c
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63a-eigen.patch
@@ -0,0 +1,554 @@
+diff -Npur blender-2.63a.orig/extern/libmv/bundle.sh blender-2.63a/extern/libmv/bundle.sh
+--- blender-2.63a.orig/extern/libmv/bundle.sh 2012-05-10 16:54:39.000000000 +0200
++++ blender-2.63a/extern/libmv/bundle.sh 2012-06-03 17:08:48.536848484 +0200
+@@ -120,13 +120,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}
+ )
+@@ -244,7 +244,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.63a.orig/extern/libmv/CMakeLists.txt blender-2.63a/extern/libmv/CMakeLists.txt
+--- blender-2.63a.orig/extern/libmv/CMakeLists.txt 2012-05-10 16:54:39.000000000 +0200
++++ blender-2.63a/extern/libmv/CMakeLists.txt 2012-06-03 17:08:48.536848484 +0200
+@@ -28,13 +28,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.63a.orig/extern/libmv/SConscript blender-2.63a/extern/libmv/SConscript
+--- blender-2.63a.orig/extern/libmv/SConscript 2012-05-10 16:54:39.000000000 +0200
++++ blender-2.63a/extern/libmv/SConscript 2012-06-03 17:08:48.553850645 +0200
+@@ -30,7 +30,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.63a.orig/intern/dualcon/SConscript blender-2.63a/intern/dualcon/SConscript
+--- blender-2.63a.orig/intern/dualcon/SConscript 2012-05-10 16:44:30.000000000 +0200
++++ blender-2.63a/intern/dualcon/SConscript 2012-06-03 17:08:48.554850772 +0200
+@@ -3,7 +3,7 @@ Import ('env')
+
+ sources = env.Glob('intern/*.cpp')
+
+-incs = '. ../../extern/Eigen3'
++incs = '. /usr/include/eigen3'
+ defs = ''
+
+ env.BlenderLib ('bf_intern_dualcon', sources, Split(incs), Split(defs), libtype=['intern'], priority=[100] )
+diff -Npur blender-2.63a.orig/intern/itasc/CMakeLists.txt blender-2.63a/intern/itasc/CMakeLists.txt
+--- blender-2.63a.orig/intern/itasc/CMakeLists.txt 2012-05-10 16:46:17.000000000 +0200
++++ blender-2.63a/intern/itasc/CMakeLists.txt 2012-06-03 17:08:48.555850899 +0200
+@@ -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.63a.orig/intern/itasc/SConscript blender-2.63a/intern/itasc/SConscript
+--- blender-2.63a.orig/intern/itasc/SConscript 2012-05-10 16:46:17.000000000 +0200
++++ blender-2.63a/intern/itasc/SConscript 2012-06-03 17:08:48.556851026 +0200
+@@ -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.63a.orig/source/blender/ikplugin/CMakeLists.txt blender-2.63a/source/blender/ikplugin/CMakeLists.txt
+--- blender-2.63a.orig/source/blender/ikplugin/CMakeLists.txt 2012-05-10 16:50:26.000000000 +0200
++++ blender-2.63a/source/blender/ikplugin/CMakeLists.txt 2012-06-03 17:08:48.578853823 +0200
+@@ -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.63a.orig/source/blender/ikplugin/SConscript blender-2.63a/source/blender/ikplugin/SConscript
+--- blender-2.63a.orig/source/blender/ikplugin/SConscript 2012-05-10 16:50:26.000000000 +0200
++++ blender-2.63a/source/blender/ikplugin/SConscript 2012-06-03 17:08:48.579853950 +0200
+@@ -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.63a.orig/source/gameengine/Converter/CMakeLists.txt blender-2.63a/source/gameengine/Converter/CMakeLists.txt
+--- blender-2.63a.orig/source/gameengine/Converter/CMakeLists.txt 2012-05-10 16:48:47.000000000 +0200
++++ blender-2.63a/source/gameengine/Converter/CMakeLists.txt 2012-06-03 17:08:48.579853950 +0200
+@@ -50,7 +50,6 @@ set(INC
+ ../../blender/makesrna
+ ../../blender/windowmanager
+ ../../../extern/bullet2/src
+- ../../../extern/Eigen3
+ ../../../intern/container
+ ../../../intern/guardedalloc
+ ../../../intern/moto/include
+@@ -60,6 +59,7 @@ set(INC
+
+ set(INC_SYS
+ ${PTHREADS_INCLUDE_DIRS}
++ /usr/include/eigen3
+
+ )
+
+diff -Npur blender-2.63a.orig/source/gameengine/Converter/SConscript blender-2.63a/source/gameengine/Converter/SConscript
+--- blender-2.63a.orig/source/gameengine/Converter/SConscript 2012-05-10 16:48:47.000000000 +0200
++++ blender-2.63a/source/gameengine/Converter/SConscript 2012-06-03 17:08:48.579853950 +0200
+@@ -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.63a-insecure.desktop b/media-gfx/blender/files/blender-2.63a-insecure.desktop
new file mode 100644
index 000000000000..c4ccb308ca60
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63a-insecure.desktop
@@ -0,0 +1,17 @@
+[Desktop Entry]
+Name=Blender-2.63a (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
+Comment[de]=3D-Modellierung, Animation, Rendering und Nachbearbeitung
+Comment[fr]=modeleur 3D, animation, rendu et post-production
+Exec=blender-2.63a --enable-autoexec %f
+Icon=blender-2.63a
+Terminal=false
+Type=Application
+Categories=Graphics;3DGraphics;
+MimeType=application/x-blender;
diff --git a/media-gfx/blender/files/blender-2.63a-libav-0.8.patch b/media-gfx/blender/files/blender-2.63a-libav-0.8.patch
new file mode 100644
index 000000000000..e4789d166eaa
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.63a-libav-0.8.patch
@@ -0,0 +1,561 @@
+diff -urNb blender-2.63a.old//intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp blender-2.63a.new//intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
+--- blender-2.63a.old//intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2012-05-10 16:45:40.000000000 +0200
++++ blender-2.63a.new//intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2012-07-13 22:10:47.615293287 +0200
+@@ -107,7 +107,7 @@
+ m_position = 0;
+ m_pkgbuf_left = 0;
+
+- if(av_find_stream_info(m_formatCtx)<0)
++ if(avformat_find_stream_info(m_formatCtx, NULL)<0)
+ AUD_THROW(AUD_ERROR_FFMPEG, streaminfo_error);
+
+ // find audio stream and codec
+@@ -133,7 +133,7 @@
+ if(!aCodec)
+ AUD_THROW(AUD_ERROR_FFMPEG, nodecoder_error);
+
+- if(avcodec_open(m_codecCtx, aCodec)<0)
++ if(avcodec_open2(m_codecCtx, aCodec, NULL)<0)
+ AUD_THROW(AUD_ERROR_FFMPEG, codecopen_error);
+
+ // XXX this prints file information to stdout:
+@@ -143,23 +143,23 @@
+
+ switch(m_codecCtx->sample_fmt)
+ {
+- case SAMPLE_FMT_U8:
++ case AV_SAMPLE_FMT_U8:
+ m_convert = AUD_convert_u8_float;
+ m_specs.format = AUD_FORMAT_U8;
+ break;
+- case SAMPLE_FMT_S16:
++ case AV_SAMPLE_FMT_S16:
+ m_convert = AUD_convert_s16_float;
+ m_specs.format = AUD_FORMAT_S16;
+ break;
+- case SAMPLE_FMT_S32:
++ case AV_SAMPLE_FMT_S32:
+ m_convert = AUD_convert_s32_float;
+ m_specs.format = AUD_FORMAT_S32;
+ break;
+- case SAMPLE_FMT_FLT:
++ case AV_SAMPLE_FMT_FLT:
+ m_convert = AUD_convert_copy<float>;
+ m_specs.format = AUD_FORMAT_FLOAT32;
+ break;
+- case SAMPLE_FMT_DBL:
++ case AV_SAMPLE_FMT_DBL:
+ m_convert = AUD_convert_double_float;
+ m_specs.format = AUD_FORMAT_FLOAT64;
+ break;
+@@ -189,7 +189,7 @@
+ }
+ catch(AUD_Exception&)
+ {
+- av_close_input_file(m_formatCtx);
++ avformat_close_input(&m_formatCtx);
+ throw;
+ }
+ }
+@@ -227,8 +227,7 @@
+ }
+ catch(AUD_Exception&)
+ {
+- av_close_input_stream(m_formatCtx);
+- av_free(m_aviocontext);
++ avformat_close_input(&m_formatCtx);
+ throw;
+ }
+ }
+@@ -237,13 +236,7 @@
+ {
+ avcodec_close(m_codecCtx);
+
+- if(m_aviocontext)
+- {
+- av_close_input_stream(m_formatCtx);
+- av_free(m_aviocontext);
+- }
+- else
+- av_close_input_file(m_formatCtx);
++ avformat_close_input(&m_formatCtx);
+ }
+
+ int AUD_FFMPEGReader::read_packet(void* opaque, uint8_t* buf, int buf_size)
+diff -urNb blender-2.63a.old//intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp blender-2.63a.new//intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
+--- blender-2.63a.old//intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp 2012-05-10 16:45:40.000000000 +0200
++++ blender-2.63a.new//intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp 2012-07-13 22:11:17.910292184 +0200
+@@ -38,6 +38,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"
+ }
+
+@@ -55,10 +57,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)
+ {
+@@ -116,7 +123,7 @@
+ if(m_outputFmt->audio_codec == CODEC_ID_NONE)
+ AUD_THROW(AUD_ERROR_SPECS, codec_error);
+
+- m_stream = av_new_stream(m_formatCtx, 0);
++ m_stream = avformat_new_stream(m_formatCtx, NULL);
+ if(!m_stream)
+ AUD_THROW(AUD_ERROR_FFMPEG, stream_error);
+
+@@ -133,23 +140,23 @@
+ {
+ case AUD_FORMAT_U8:
+ m_convert = AUD_convert_float_u8;
+- m_codecCtx->sample_fmt = SAMPLE_FMT_U8;
++ m_codecCtx->sample_fmt = AV_SAMPLE_FMT_U8;
+ break;
+ case AUD_FORMAT_S16:
+ m_convert = AUD_convert_float_s16;
+- m_codecCtx->sample_fmt = SAMPLE_FMT_S16;
++ m_codecCtx->sample_fmt = AV_SAMPLE_FMT_S16;
+ break;
+ case AUD_FORMAT_S32:
+ m_convert = AUD_convert_float_s32;
+- m_codecCtx->sample_fmt = SAMPLE_FMT_S32;
++ m_codecCtx->sample_fmt = AV_SAMPLE_FMT_S32;
+ break;
+ case AUD_FORMAT_FLOAT32:
+ m_convert = AUD_convert_copy<float>;
+- m_codecCtx->sample_fmt = SAMPLE_FMT_FLT;
++ m_codecCtx->sample_fmt = AV_SAMPLE_FMT_FLT;
+ break;
+ case AUD_FORMAT_FLOAT64:
+ m_convert = AUD_convert_float_double;
+- m_codecCtx->sample_fmt = SAMPLE_FMT_DBL;
++ m_codecCtx->sample_fmt = AV_SAMPLE_FMT_DBL;
+ break;
+ default:
+ AUD_THROW(AUD_ERROR_FFMPEG, format_error);
+@@ -164,7 +171,7 @@
+ if(!codec)
+ AUD_THROW(AUD_ERROR_FFMPEG, codec_error);
+
+- if(avcodec_open(m_codecCtx, codec))
++ if(avcodec_open2(m_codecCtx, codec, NULL))
+ AUD_THROW(AUD_ERROR_FFMPEG, codec_error);
+
+ m_output_buffer.resize(FF_MIN_BUFFER_SIZE);
+diff -urNb blender-2.63a.old//intern/ffmpeg/ffmpeg_compat.h blender-2.63a.new//intern/ffmpeg/ffmpeg_compat.h
+--- blender-2.63a.old//intern/ffmpeg/ffmpeg_compat.h 2012-05-10 16:46:17.000000000 +0200
++++ blender-2.63a.new//intern/ffmpeg/ffmpeg_compat.h 2012-07-13 21:22:36.462398523 +0200
+@@ -40,7 +40,6 @@
+ #endif
+
+ #include <libswscale/swscale.h>
+-#include <libavcodec/opt.h>
+
+ #if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 105))
+ #define FFMPEG_HAVE_AVIO 1
+diff -urNb blender-2.63a.old//source/blender/blenkernel/intern/writeffmpeg.c blender-2.63a.new//source/blender/blenkernel/intern/writeffmpeg.c
+--- blender-2.63a.old//source/blender/blenkernel/intern/writeffmpeg.c 2012-05-10 16:50:20.000000000 +0200
++++ blender-2.63a.new//source/blender/blenkernel/intern/writeffmpeg.c 2012-07-13 22:54:42.429197382 +0200
+@@ -37,7 +37,6 @@
+ #include <libavcodec/avcodec.h>
+ #include <libavutil/rational.h>
+ #include <libswscale/swscale.h>
+-#include <libavcodec/opt.h>
+
+ #include "MEM_guardedalloc.h"
+
+@@ -449,7 +448,7 @@
+ AVStream* st;
+ AVCodecContext* c;
+ AVCodec* codec;
+- st = av_new_stream(of, 0);
++ st = avformat_new_stream(of, NULL);
+ if (!st) return NULL;
+
+ /* Set up the codec context */
+@@ -515,24 +514,11 @@
+ }
+
+ // Keep lossless encodes in the RGB domain.
+- if (codec_id == CODEC_ID_HUFFYUV) {
++ if (codec_id == CODEC_ID_HUFFYUV || codec_id == CODEC_ID_FFV1) {
+ /* HUFFYUV was PIX_FMT_YUV422P before */
+ c->pix_fmt = PIX_FMT_RGB32;
+ }
+
+- if (codec_id == CODEC_ID_FFV1) {
+-#ifdef FFMPEG_FFV1_ALPHA_SUPPORTED
+- if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
+- c->pix_fmt = PIX_FMT_RGB32;
+- }
+- else {
+- c->pix_fmt = PIX_FMT_BGR0;
+- }
+-#else
+- c->pix_fmt = PIX_FMT_RGB32;
+-#endif
+- }
+-
+ if (codec_id == CODEC_ID_QTRLE ) {
+ if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
+ c->pix_fmt = PIX_FMT_ARGB;
+@@ -562,7 +548,7 @@
+
+ set_ffmpeg_properties(rd, c, "video");
+
+- if (avcodec_open(c, codec) < 0) {
++ if (avcodec_open2(c, codec, NULL) < 0) {
+ //
+ //XXX error("Couldn't initialize codec");
+ return NULL;
+@@ -603,7 +589,7 @@
+ AVCodecContext* c;
+ AVCodec* codec;
+
+- st = av_new_stream(of, 1);
++ st = avformat_new_stream(of, NULL);
+ if (!st) return NULL;
+
+ c = st->codec;
+@@ -612,7 +598,7 @@
+
+ c->sample_rate = rd->ffcodecdata.audio_mixrate;
+ c->bit_rate = ffmpeg_audio_bitrate*1000;
+- c->sample_fmt = SAMPLE_FMT_S16;
++ c->sample_fmt = AV_SAMPLE_FMT_S16;
+ c->channels = rd->ffcodecdata.audio_channels;
+ codec = avcodec_find_encoder(c->codec_id);
+ if (!codec) {
+@@ -622,7 +608,7 @@
+
+ set_ffmpeg_properties(rd, c, "audio");
+
+- if (avcodec_open(c, codec) < 0) {
++ if (avcodec_open2(c, codec, NULL) < 0) {
+ //XXX error("Couldn't initialize audio codec");
+ return NULL;
+ }
+@@ -704,13 +690,10 @@
+ of->oformat = fmt;
+ of->packet_size= rd->ffcodecdata.mux_packet_size;
+ if (ffmpeg_audio_codec != CODEC_ID_NONE) {
+- of->mux_rate = rd->ffcodecdata.mux_rate;
+- }
+- else {
+- of->mux_rate = 0;
++ av_opt_set_int(of, "muxrate", rd->ffcodecdata.mux_rate, 0);
+ }
+
+- of->preload = (int)(0.5*AV_TIME_BASE);
++ av_opt_set_int(of, "preload", (int)(0.5*AV_TIME_BASE), 0);
+ of->max_delay = (int)(0.7*AV_TIME_BASE);
+
+ fmt->audio_codec = ffmpeg_audio_codec;
+@@ -793,10 +776,6 @@
+ return 0;
+ }
+ }
+- if (av_set_parameters(of, NULL) < 0) {
+- BKE_report(reports, RPT_ERROR, "Error setting output parameters.");
+- return 0;
+- }
+ if (!(fmt->flags & AVFMT_NOFILE)) {
+ if (avio_open(&of->pb, name, AVIO_FLAG_WRITE) < 0) {
+ BKE_report(reports, RPT_ERROR, "Could not open file for writing.");
+@@ -804,7 +783,7 @@
+ }
+ }
+
+- if (av_write_header(of) < 0) {
++ if (avformat_write_header(of, NULL) < 0) {
+ BKE_report(reports, RPT_ERROR, "Could not initialize streams. Probably unsupported codec combination.");
+ return 0;
+ }
+@@ -1102,7 +1081,7 @@
+
+ val.i = 0;
+
+- avcodec_get_context_defaults(&c);
++ avcodec_get_context_defaults3(&c, NULL);
+
+ o = c.av_class->option + opt_index;
+ parent = c.av_class->option + parent_index;
+@@ -1190,7 +1169,7 @@
+ char * param;
+ IDProperty * prop;
+
+- avcodec_get_context_defaults(&c);
++ avcodec_get_context_defaults3(&c, NULL);
+
+ strncpy(name_, str, sizeof(name_));
+
+diff -urNb blender-2.63a.old//source/blender/imbuf/intern/anim_movie.c blender-2.63a.new//source/blender/imbuf/intern/anim_movie.c
+--- blender-2.63a.old//source/blender/imbuf/intern/anim_movie.c 2012-05-10 16:50:59.000000000 +0200
++++ blender-2.63a.new//source/blender/imbuf/intern/anim_movie.c 2012-07-14 00:12:49.157026789 +0200
+@@ -455,12 +455,12 @@
+
+ do_init_ffmpeg();
+
+- if (av_open_input_file(&pFormatCtx, anim->name, NULL, 0, NULL)!=0) {
++ if (avformat_open_input(&pFormatCtx, anim->name, NULL, NULL)!=0) {
+ return -1;
+ }
+
+- if (av_find_stream_info(pFormatCtx)<0) {
+- av_close_input_file(pFormatCtx);
++ if (avformat_find_stream_info(pFormatCtx, NULL)<0) {
++ avformat_close_input(&pFormatCtx);
+ return -1;
+ }
+
+@@ -482,7 +482,7 @@
+ }
+
+ if (videoStream==-1) {
+- av_close_input_file(pFormatCtx);
++ avformat_close_input(&pFormatCtx);
+ return -1;
+ }
+
+@@ -497,7 +497,7 @@
+
+ pCodecCtx->workaround_bugs = 1;
+
+- if (avcodec_open(pCodecCtx, pCodec) < 0) {
++ if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0) {
+ av_close_input_file(pFormatCtx);
+ return -1;
+ }
+@@ -990,7 +990,6 @@
+ ret = av_seek_frame(anim->pFormatCtx,
+ -1,
+ pos, AVSEEK_FLAG_BYTE);
+- av_update_cur_dts(anim->pFormatCtx, v_st, dts);
+ }
+ else {
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+diff -urNb blender-2.63a.old//source/blender/imbuf/intern/indexer.c blender-2.63a.new//source/blender/imbuf/intern/indexer.c
+--- blender-2.63a.old//source/blender/imbuf/intern/indexer.c 2012-05-10 16:50:59.000000000 +0200
++++ blender-2.63a.new//source/blender/imbuf/intern/indexer.c 2012-07-14 00:23:44.775002926 +0200
+@@ -491,7 +491,7 @@
+
+ fprintf(stderr, "Starting work on proxy: %s\n", rv->of->filename);
+
+- rv->st = av_new_stream(rv->of, 0);
++ rv->st = avformat_new_stream(rv->of, NULL);
+ rv->c = rv->st->codec;
+ rv->c->codec_type = AVMEDIA_TYPE_VIDEO;
+ rv->c->codec_id = CODEC_ID_MJPEG;
+@@ -533,13 +533,6 @@
+ rv->c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ }
+
+- if (av_set_parameters(rv->of, NULL) < 0) {
+- fprintf(stderr, "Couldn't set output parameters? "
+- "Proxy not built!\n");
+- av_free(rv->of);
+- return 0;
+- }
+-
+ if (avio_open(&rv->of->pb, fname, AVIO_FLAG_WRITE) < 0) {
+ fprintf(stderr, "Couldn't open outputfile! "
+ "Proxy not built!\n");
+@@ -547,7 +540,7 @@
+ return 0;
+ }
+
+- avcodec_open(rv->c, rv->codec);
++ avcodec_open2(rv->c, rv->codec, NULL);
+
+ rv->video_buffersize = 2000000;
+ rv->video_buffer = (uint8_t*)MEM_mallocN(
+@@ -576,7 +569,7 @@
+ NULL, NULL, NULL);
+ }
+
+- av_write_header(rv->of);
++ avformat_write_header(rv->of, NULL);
+
+ return rv;
+ }
+@@ -739,12 +732,12 @@
+ memset(context->proxy_ctx, 0, sizeof(context->proxy_ctx));
+ memset(context->indexer, 0, sizeof(context->indexer));
+
+- if (av_open_input_file(&context->iFormatCtx, anim->name, NULL, 0, NULL) != 0) {
++ if (avformat_open_input(&context->iFormatCtx, anim->name, NULL, NULL) != 0) {
+ MEM_freeN(context);
+ return NULL;
+ }
+
+- if (av_find_stream_info(context->iFormatCtx) < 0) {
++ if (avformat_find_stream_info(context->iFormatCtx, NULL) < 0) {
+ av_close_input_file(context->iFormatCtx);
+ MEM_freeN(context);
+ return NULL;
+@@ -784,7 +777,7 @@
+
+ context->iCodecCtx->workaround_bugs = 1;
+
+- if (avcodec_open(context->iCodecCtx, context->iCodec) < 0) {
++ if (avcodec_open2(context->iCodecCtx, context->iCodec, NULL) < 0) {
+ av_close_input_file(context->iFormatCtx);
+ MEM_freeN(context);
+ return NULL;
+diff -urNb blender-2.63a.old//source/blender/imbuf/intern/util.c blender-2.63a.new//source/blender/imbuf/intern/util.c
+--- blender-2.63a.old//source/blender/imbuf/intern/util.c 2012-05-10 16:50:59.000000000 +0200
++++ blender-2.63a.new//source/blender/imbuf/intern/util.c 2012-07-14 01:07:31.213907334 +0200
+@@ -261,14 +261,14 @@
+ BLI_testextensie(filename, ".cin") ||
+ BLI_testextensie(filename, ".wav")) return 0;
+
+- if (av_open_input_file(&pFormatCtx, filename, NULL, 0, NULL)!=0) {
++ if (avformat_open_input(&pFormatCtx, filename, NULL, NULL)!=0) {
+ if (UTIL_DEBUG) fprintf(stderr, "isffmpeg: av_open_input_file failed\n");
+ return 0;
+ }
+
+- if (av_find_stream_info(pFormatCtx)<0) {
++ if (avformat_find_stream_info(pFormatCtx, NULL)<0) {
+ if (UTIL_DEBUG) fprintf(stderr, "isffmpeg: av_find_stream_info failed\n");
+- av_close_input_file(pFormatCtx);
++ avformat_close_input(&pFormatCtx);
+ return 0;
+ }
+
+@@ -300,7 +300,7 @@
+ return 0;
+ }
+
+- if (avcodec_open(pCodecCtx, pCodec)<0) {
++ if (avcodec_open2(pCodecCtx, pCodec, NULL)<0) {
+ av_close_input_file(pFormatCtx);
+ return 0;
+ }
+diff -urNb blender-2.63a.old//source/gameengine/VideoTexture/VideoFFmpeg.cpp blender-2.63a.new//source/gameengine/VideoTexture/VideoFFmpeg.cpp
+--- blender-2.63a.old//source/gameengine/VideoTexture/VideoFFmpeg.cpp 2012-05-10 16:48:50.000000000 +0200
++++ blender-2.63a.new//source/gameengine/VideoTexture/VideoFFmpeg.cpp 2012-07-13 21:22:36.464398523 +0200
+@@ -162,19 +162,19 @@
+ }
+
+
+-int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AVFormatParameters *formatParams)
++int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AVDictionary *opts)
+ {
+ AVFormatContext *formatCtx;
+ int i, videoStream;
+ AVCodec *codec;
+ AVCodecContext *codecCtx;
+
+- if (av_open_input_file(&formatCtx, filename, inputFormat, 0, formatParams)!=0)
++ if (avformat_open_input(&formatCtx, filename, inputFormat, &opts)!=0)
+ return -1;
+
+- if (av_find_stream_info(formatCtx)<0)
++ if (avformat_find_stream_info(formatCtx, &opts)<0)
+ {
+- av_close_input_file(formatCtx);
++ avformat_close_input(&formatCtx);
+ return -1;
+ }
+
+@@ -203,13 +203,13 @@
+ codec=avcodec_find_decoder(codecCtx->codec_id);
+ if (codec==NULL)
+ {
+- av_close_input_file(formatCtx);
++ avformat_close_input(&formatCtx);
+ return -1;
+ }
+ codecCtx->workaround_bugs = 1;
+- if (avcodec_open(codecCtx, codec)<0)
++ if (avcodec_open2(codecCtx, codec, &opts)<0)
+ {
+- av_close_input_file(formatCtx);
++ avformat_close_input(&formatCtx);
+ return -1;
+ }
+
+@@ -546,7 +546,7 @@
+ // It would be good to find this information from the context but there are no simple indication
+ !strncmp(filename, "http://", 7) ||
+ #ifdef FFMPEG_PB_IS_POINTER
+- (m_formatCtx->pb && m_formatCtx->pb->is_streamed)
++ (m_formatCtx->pb && m_formatCtx->pb->seekable)
+ #else
+ m_formatCtx->pb.is_streamed
+ #endif
+@@ -586,13 +586,12 @@
+ {
+ // open camera source
+ AVInputFormat *inputFormat;
+- AVFormatParameters formatParams;
++ AVDictionary *opts = NULL;
+ AVRational frameRate;
+- char *p, filename[28], rateStr[20];
++ char *p, filename[28], videoStr[20], rateStr[20];
+
+ do_init_ffmpeg();
+
+- memset(&formatParams, 0, sizeof(formatParams));
+ #ifdef WIN32
+ // video capture on windows only through Video For Windows driver
+ inputFormat = av_find_input_format("vfwcap");
+@@ -637,21 +636,18 @@
+ *p = 0;
+ }
+ if (file && (p = strchr(file, ':')) != NULL)
+- formatParams.standard = p+1;
++ av_dict_set(&opts, "standard", p+1, 0);
+ #endif
+ //frame rate
+ if (m_captRate <= 0.f)
+ m_captRate = defFrameRate;
+ sprintf(rateStr, "%f", m_captRate);
+- av_parse_video_rate(&frameRate, rateStr);
+- // populate format parameters
+- // need to specify the time base = inverse of rate
+- formatParams.time_base.num = frameRate.den;
+- formatParams.time_base.den = frameRate.num;
+- formatParams.width = m_captWidth;
+- formatParams.height = m_captHeight;
++ av_dict_set(&opts, "framerate", rateStr, 0);
++
++ sprintf(videoStr, "%dx%d", m_captWidth, m_captHeight);
++ av_dict_set(&opts, "video_size", videoStr, 0);
+
+- if (openStream(filename, inputFormat, &formatParams) != 0)
++ if (openStream(filename, inputFormat, opts) != 0)
+ return;
+
+ // for video capture it is important to do non blocking read
+diff -urNb blender-2.63a.old//source/gameengine/VideoTexture/VideoFFmpeg.h blender-2.63a.new//source/gameengine/VideoTexture/VideoFFmpeg.h
+--- blender-2.63a.old//source/gameengine/VideoTexture/VideoFFmpeg.h 2012-05-10 16:48:50.000000000 +0200
++++ blender-2.63a.new//source/gameengine/VideoTexture/VideoFFmpeg.h 2012-07-13 21:22:36.463398523 +0200
+@@ -172,7 +172,7 @@
+ double actFrameRate (void) { return m_frameRate * m_baseFrameRate; }
+
+ /// common function to video file and capture
+- int openStream(const char *filename, AVInputFormat *inputFormat, AVFormatParameters *formatParams);
++ int openStream(const char *filename, AVInputFormat *inputFormat, AVDictionary *opts);
+
+ /// check if a frame is available and load it in pFrame, return true if a frame could be retrieved
+ AVFrame* grabFrame(long frame);
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index c280fa81a972..9f421ef9f4cd 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -31,6 +31,9 @@
<flag name='collada'>
Add support for Collada interchange format through <pkg>media-libs/opencollada</pkg>.
</flag>
+ <flag name='cycles'>
+ Build cycles renderer.
+ </flag>
<flag name='verse'>
Adds verse clustering features to Blender.
</flag>