diff options
Diffstat (limited to 'media-gfx/blender')
40 files changed, 2988 insertions, 0 deletions
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest new file mode 100644 index 0000000..70770e6 --- /dev/null +++ b/media-gfx/blender/Manifest @@ -0,0 +1,40 @@ +AUX blender-2.37-dirs.patch 727 RMD160 ddf5c951182f809374c43f1a1cce47f4397a868c SHA1 9b3cb06a8bd23b1a5041bd3193018c2e5e28dcfd SHA256 beb5e5835cde71a00712ddf600278ca0bbdb6020123faeb6ea7a53e8f6812e5e +AUX blender-2.44-scriptsdir.patch 2586 RMD160 8e80859edf1fae2f401b326be4cb939108879999 SHA1 50143946828d3f2b2568e71fae5ed28f6adf7449 SHA256 a7afac10ce2431cd94d10dc3f4cae33423b5a59d0c6918199006f623cd6d68e4 +AUX blender-2.46-cve-2008-1103-1.patch 636 RMD160 11d0b7dbff6e186334a80b7f6932ace4a1bd6628 SHA1 979fa1c2f0836b46dfd26c197798625a72e0a28b SHA256 a0dd64fb749a9577d84e22896872dc2956a8530700308d0aadad588191356b96 +AUX blender-2.46-ffmpeg.patch 3823 RMD160 33f41651b1a6bc6d497ba01ab710ca3d7a1559c0 SHA1 82ce585db15a3c88625b0c04e649bd08b3c35b41 SHA256 ad75babcc08ae41f2a7c71bc457bd56a0ef39b5ae1e92ede2cdb0a34d7cbcc85 +AUX blender-2.48-ffmpeg-20081014.patch 839 RMD160 b1fbad04a890dcc1698d02f5351d6d79cae42d91 SHA1 e931f1a85c5c01918b960936d4da5888eacfd64c SHA256 d6114d2647758e39608fcfdb05da00811f062ea3fc4c41cef3a6e2977bc5b0c4 +AUX blender-2.48a-CVE-2008-4863.patch 696 RMD160 b61dc085d0154be3850fa4b53985f670cd177adf SHA1 805f18290965c2e74778628c4e2a1888ea77d8ab SHA256 fee1896c791a623181ebf681f4ad67c610677e82575a95a46e896b747f980418 +AUX blender-2.49a-bake.patch 669 RMD160 19e167e2d3c8fcd573f9755dee8c6cb59984829e SHA1 5ae418e697c90418cf65652134b08ba6da3f93c1 SHA256 dcaaaba19ad57b6d054df830dfa303c4656303622e1e7ef15817d304958d8f3c +AUX blender-2.49a-sys-openjpeg.patch 452 RMD160 7029b3d257839d4ca8ce58a9f8e46503651b1765 SHA1 85551623c4293d9dff4dc8d26584a753b3ccd581 SHA256 437f016b9f7c48281015838a22203c4db9ef6b62dac01aa86faa1c9793bff182 +AUX blender-2.49b-CVE-2009-3850-v3.patch 3891 RMD160 9a51681f426f1f87cc418b6316ce678025a93bbb SHA1 dc7baef8f0434e067f863e0a2c6ef0d8d9acc70b SHA256 5dc289f00ab59b13b7f1d3e8b4a77b8c9930460f8ee575b38a60da3577e2b1ba +AUX blender-2.49b-CVE-2009-3850-v4.patch 5222 RMD160 1757323e4aa0ffa0e1b3ab14dcaa78188a39ae36 SHA1 5d432fbe575b1869a7e68e753e593edcc3478b35 SHA256 0707904cd3b627cfeac19d4d775ee4a019ba395251c9318dbb356e3b8de19124 +AUX blender-2.49b-insecure.desktop 223 RMD160 70719305e80334e805c73ccbd831243202ac65b6 SHA1 1633779552c5409f20f161e21b60a59417dad3cf SHA256 dfd0a438ebf792071fc9f12036f07b0f14277b2bf34050bf4d57ffceeff55555 +AUX blender-2.49b-libav-0.7.patch 15251 RMD160 c04ec7fc4fff2665c9b55f793e8995c0c0d64932 SHA1 9924e51d1ffee6af3ffe7aed5131f98f298e7b32 SHA256 636244001abc882887b7c72f665c751a86a96f355ec196a49390b8d13180cec5 +AUX blender-2.49b-subversion-1.7.patch 477 RMD160 0528267fd3f2d92f000855023b0fc8ed1e1e4ef7 SHA1 a02f988c8aaee76fc7586ca82c8f9d8329cdbb77 SHA256 744c7af5f0fdc24c84262748991c397b171c33246bb319ba5d3a54a4eda5da2a +AUX blender-2.57-CVE-2009-3850-v1.patch 4894 RMD160 6680a3e54d8d65c050886d1601bfb8e022633425 SHA1 91ecd5bdfa69bb46b6688e1200aae0f90bc04b52 SHA256 d64afd9ddef2fc3796c0e0398bf8fecc96a18176945642b2ae3445da2de69a26 +AUX blender-2.57-CVE-2009-3850-v2.patch 8435 RMD160 07cbf22a258a31e6a1d050a6d13763f52ba50d66 SHA1 a1f969ba2ae85d1461f991043b66c372fc4d44c2 SHA256 a3d6d884d487604bdf9fc3ee78c8cf1fb10921ac0ec12ebd9d6e590093d9e98c +AUX blender-2.57-bmake.patch 422 RMD160 b0270fbc11d9afce5989fcdb21234ec734ef946a SHA1 094d739127960386013677ea638397485422121f SHA256 a9282a6746062824ccdc12f5a6055aa4c71feba269fafebb8e83916fc2e61245 +AUX blender-2.57-desktop.patch 640 RMD160 86091d314085d31c4c00bab3996e1b313f4e6cf6 SHA1 7306596987f0c6ad2ac4aef9556adc31b2596c0f SHA256 0ddb29736fae671c5ce2b6ab719fb7c15d39f0f2ba2bf513674c6ea9711497fb +AUX blender-2.57-doxygen.patch 1316 RMD160 6e9538481aa0aa4225ace5cc272fe37214499f39 SHA1 f40661daba59ee6efa449c644dba9da634f8eaf1 SHA256 6c5ad9e44bfe768efe69e208fdfd22a4ac87af8b1bdce816ac07a81eb4df6848 +AUX blender-2.57-eigen.patch 940 RMD160 9acf7cd0fadb1fac515a16535d82569d2adb110b SHA1 8f2ba202d10abb32bda7c220465f7db0d616b8c5 SHA256 a5bb17c7bd2f68dd44d439c0a72302654b204a8d3da9a4a6365a85396c4bc3ea +AUX blender-2.57-enable_site_module.patch 939 RMD160 66b521662bdde9ae520348d970e66b7750c6ea99 SHA1 a2cf1a535e3c3165c19bff770a259295498a8747 SHA256 9e74736321ef56ee23432cb47a0f85bd2c4891c5682ed0858a2d2e776ee36b40 +AUX blender-2.57-glew.patch 443 RMD160 bc2606d216bd9231a96fc7bd891deaf13f710c93 SHA1 3cb12219dcfa6045b96325dcbc4192a4c065c5bf SHA256 002e144e516d7532f450565a176af736146d74d7de1ab18b1ad4796c12f26a0f +AUX blender-2.57-insecure.desktop 595 RMD160 e0040e5f3d0048361cf2d203ff2e6b551d077f86 SHA1 45a2ad8542840fa4f773ec51134c29638dd456d2 SHA256 2b09e8898d4b2280967224a3c3592dbc74170726f56d269a6df0b0985a3691be +AUX blender-2.57-libav-0.7.patch 10964 RMD160 c3b5629b1ae2832dde8748028f51473070ed4796 SHA1 42c125050f1a374ee646f6951fca3de14ab7ccb0 SHA256 5b8da8d015d8e3ca63e1842ff5e1326b4d6788dfb9d024dfa9ab3f15898925df +AUX blender-2.57-linux-3.patch 414 RMD160 cb1cfc00e363e00c67a3c6d3567768418be78f39 SHA1 71f4701aa2e88de35843661cf5eecfe411ccd99b SHA256 4f1f8960e1b5706b426e272c17b70682b1eaa5903fa325e4d4db21efd540d732 +AUX blender-2.60-bmake.patch 3429 RMD160 585fe2729d0756fbb80d62b35da96d7c7d07b78d SHA1 7832d676e4625ec139bfc9fe113604f4c810a614 SHA256 3432df1f780503ad34a96c83d3faea9fabe2fa58f1bcdf6a52a2d7ae33874f16 +AUX blender-2.60-doxyfile.patch 595 RMD160 f4890f0ead6943f323bc61e7f6766c2133e8591b SHA1 0fd7c202f044224cf9944596cf36cfcd56b39067 SHA256 d267e0fab4ecb9be78b9238a9c2af60ac9d5ddb7b42f73f479b9266704605883 +AUX blender-2.60-eigen.patch 13804 RMD160 67b2d444f35ac5b9f2e2fc1ee93a105feadc83db SHA1 943ba7ebd2f37102b62d790d7ad4795695fba268 SHA256 b973b07db667ab84eebae24c47805772f6f2694bb77cb8846431d502c56b54d8 +AUX blender-2.60-glew.patch 1128 RMD160 392907190c8c970a1b2f0b20067d9f1bf108edbc SHA1 e9890bc4c420b16ce4f9c9c6cfc71c13852e4de3 SHA256 a43f0a0ac2a0cc5096e8488c926e7a32933a5910300440590a1cac5e1bb73f20 +AUX blender-2.60-openjpeg.patch 1731 RMD160 898318cfdc0c5daafd39d1f0f116531c6a2fd69f SHA1 5870c4f7b50f9edc4d12b68a684b8bb32548ad20 SHA256 3a684711e40ba365152593a6c90bbf38b190c84132e288c3dd3c7409dc6f9a62 +AUX blender-2.60a-CVE-2009-3850-v3.patch 7787 RMD160 02afc6ef3bcdf314c693c44be0cfc649ffd4ebf3 SHA1 031b42d09021b027dde631f08bc8e973299edab9 SHA256 1aebbdd475ccdb1d4e77c4c1ae4c3205e76a1a06f7dcd5e70624c141f42d204b +AUX blender-2.60a-collada.patch 1402 RMD160 89c91ad636614f06ab8b007c5064c06171943ebf SHA1 a2e444d6c25f07d07a9b77eee2a364015a57c28d SHA256 0b5d31b31e113053a998a8c16244b2d5801a8dac0f63fbd5905a51308981b4af +AUX blender-2.60a-desktop.patch 643 RMD160 43b8eaaef300fac4ebf463eb024356f65f76b7f5 SHA1 1b77d5a0c5ffe791117cfe140a7b3626bd3ba21b SHA256 8f2a7619d82a7ea64ade59aa067f2e6469129fe682b88f7c3ac6975650947ec1 +AUX blender-2.60a-enable_site_module.patch 974 RMD160 e93ddcd1372751951b6e56f72c764e2043747574 SHA1 84aed7ab30f5de1989ee63b4584db7acd6747b54 SHA256 dfafc00a08504c0c3259083d01e535e00f9a952db4a551dbacf0a62ad1a5c768 +AUX blender-2.60a-insecure.desktop 594 RMD160 48d7b683f4ae057a1766dabb267e5048e92114f6 SHA1 1d6d2c61a0c79b6c78842ad354746ffe5a2d7ffa SHA256 2b7920c517c93d4f1430dc7ee70a414d32c1b17648a0e8395bbd900d1be8dd84 +AUX blender-2.60a-libav-0.7.patch 1181 RMD160 66dc84d6ca37a97bb43886ed86b72499383636b6 SHA1 be60d7fd39821fb28b3e23a659df8f7eb51d1f60 SHA256 d8e7a08b042ce8311bd71e2edec7457ddf8fe8b64243f30f179d391ea170ab50 +AUX blender-2.60a-linux-3.patch 414 RMD160 cb1cfc00e363e00c67a3c6d3567768418be78f39 SHA1 71f4701aa2e88de35843661cf5eecfe411ccd99b SHA256 4f1f8960e1b5706b426e272c17b70682b1eaa5903fa325e4d4db21efd540d732 +AUX blender.desktop 199 RMD160 a55286923d1422f620dff35226a42fcbaf8c60a9 SHA1 c5ad8c540571a254756ac541c64933e80406aa16 SHA256 3fbab5be3f52ce56f285e422c856aecd15627cffeadcb07af313e0d64c4803ad +AUX blender.png 2119 RMD160 e06574002001f41198dc9408ef1bba45493fcc27 SHA1 9a0d713235ce99f8e4fde4f062209ab989e48c0f SHA256 bef633319c81323bb82db274004d89082ca05cab6650eb4c4bf43f830ccb5cad +DIST blender-2.61.tar.gz 25087312 RMD160 fb3b368144d31cd850a0602b7b5e746fca17d7fc SHA1 1b0d008e8022cb29efc9b4a337379eeb93bdcbb7 SHA256 58563583c8775fa0f746a7f4899b1619fec3df69accfa536544fdcbf372685f1 +EBUILD blender-2.61.ebuild 14089 RMD160 6d4fc28b664a454eb8b9f3940881c16f70a71c0b SHA1 b676b31bf9263087938e773dc5b469de5edb47e8 SHA256 0fad2e263cbd85fc3a4b346f7aa43762da4415a4565319b3436a8651794aa721 diff --git a/media-gfx/blender/blender-2.61.ebuild b/media-gfx/blender/blender-2.61.ebuild new file mode 100644 index 0000000..7bc9899 --- /dev/null +++ b/media-gfx/blender/blender-2.61.ebuild @@ -0,0 +1,448 @@ +# 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.60a.ebuild,v 1.6 2012/01/23 18:34:59 ssuominen Exp $ + +PYTHON_DEPEND="3:3.2" +EAPI=4 + +if [[ ${PV} == *9999 ]] ; then +SCM="subversion" +ESVN_REPO_URI="https://svn.blender.org/svnroot/bf-blender/trunk/blender" +fi + +inherit multilib scons-utils eutils python versionator flag-o-matic toolchain-funcs ${SCM} + +IUSE="+game-engine player +elbeem +openexr ffmpeg jpeg2k openal openmp \ + +dds debug doc fftw jack apidoc sndfile lcms tweak-mode sdl sse \ + redcode +zlib iconv contrib collada verse" + +LANGS="en ar bg ca cs de el es fi fr hr it ja ko nl pl pt_BR ro ru sr sv uk zh_CN" +for X in ${LANGS} ; do + IUSE="${IUSE} linguas_${X}" +done + +DESCRIPTION="3D Creation/Animation/Publishing System" +HOMEPAGE="http://www.blender.org" +if [[ ${PV} == *9999 ]] ; then + SRC_URI="" +elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot + SRC_URI="mirror://gentoo/${P}.tar.xz" +else # Official release + SRC_URI="http://download.blender.org/source/${P}.tar.gz" +fi + +#SLOT="$(get_version_component_range 1-2)" +SLOT="2.61" +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 + dev-cpp/eigen:2 + >=sci-physics/bullet-2.76 + iconv? ( virtual/libiconv ) + zlib? ( sys-libs/zlib ) + sdl? ( media-libs/libsdl[audio,joystick] ) + openexr? ( media-libs/openexr ) + ffmpeg? ( + >=virtual/ffmpeg-0.6.90[x264,mp3,encode,theora] + jpeg2k? ( >=virtual/ffmpeg-0.6.90[x264,mp3,encode,theora,jpeg2k] ) + ) + openal? ( >=media-libs/openal-1.6.372 ) + fftw? ( sci-libs/fftw:3.0 ) + jack? ( media-sound/jack-audio-connection-kit ) + sndfile? ( media-libs/libsndfile ) + lcms? ( media-libs/lcms:0 ) + collada? ( media-libs/opencollada )" + +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}"/${P}-collada.patch + epatch "${FILESDIR}"/${PN}-${SLOT}-doxyfile.patch + + # TODO: write a proper Makefile to replace the borked bmake script + epatch "${FILESDIR}"/${PN}-${SLOT}-bmake.patch + chmod 755 "${WORKDIR}"/${P}/release/plugins/bmake + + # OpenJPEG + einfo "Removing bundled OpenJPEG ..." + rm -r extern/libopenjpeg + epatch "${FILESDIR}"/${PN}-${SLOT}-openjpeg.patch + + # Glew + einfo "Removing bundled Glew ..." + rm -r extern/glew + epatch "${FILESDIR}"/${PN}-${SLOT}-glew.patch + + # Eigen2 + einfo "Removing bundled Eigen2 ..." + rm -r extern/Eigen2 + epatch "${FILESDIR}"/${PN}-${SLOT}-eigen.patch + + # Linux 3.x (bug #381099) + epatch "${FILESDIR}"/${P}-linux-3.patch + + epatch "${FILESDIR}"/${P}-libav-0.7.patch + epatch "${FILESDIR}"/${P}-CVE-2009-3850-v3.patch + epatch "${FILESDIR}"/${P}-enable_site_module.patch +} + +src_configure() { + # add system openjpeg into Scons build options. + cat <<- EOF >> "${S}"/user-config.py + BF_OPENJPEG="/usr" + BF_OPENJPEG_INC="/usr/include" + BF_OPENJPEG_LIB="openjpeg" + EOF + + # FIX: littlecms includes path aren't specified + if use lcms; then + cat <<- EOF >> "${S}"/user-config.py + BF_LCMS_INC="/usr/include/" + BF_LCMS_LIB="lcms" + BF_LCMS_LIBPATH="/usr/lib/" + EOF + fi + + # add system sci-physic/bullet into Scons build options. +# cat <<- EOF >> "${S}"/user-config.py +# WITH_BF_BULLET=1 +# BF_BULLET="/usr/include" +# BF_BULLET_INC="/usr/include /usr/include/BulletCollision /usr/include/BulletDynamics /usr/include/LinearMath /usr/include/BulletSoftBody" +# BF_BULLET_LIB="BulletSoftBody BulletDynamics BulletCollision LinearMath" +# EOF + + #add iconv into Scons build options. + if use !elibc_glibc && use !elibc_uclibc && use iconv; then + cat <<- EOF >> "${S}"/user-config.py + WITH_BF_ICONV=1 + BF_ICONV="/usr" + EOF + fi + + # configure internationalization only if LINGUAS have more + # languages than 'en', otherwise must be disabled + [[ -z ${LINGUAS} ]] || [[ ${LINGUAS} == "en" ]] && echo "WITH_BF_INTERNATIONAL=0" >> "${S}"/user-config.py + + # configure Elbeem fluid system + use elbeem || echo "BF_NO_ELBEEM=1" >> "${S}"/user-config.py + + # configure Tweak Mode + use tweak-mode && echo "BF_TWEAK_MODE=1" >> "${S}"/user-config.py + + # FIX: Game Engine module needs to be active to build the Blender Player + if ! use game-engine && use player; then + elog "Forcing Game Engine [+game-engine] as required by Blender Player [+player]" + echo "WITH_BF_GAMEENGINE=1" >> "${S}"/user-config.py + else + blend_with game-engine gameengine + fi + + # set CFLAGS used in /etc/make.conf correctly + echo "CFLAGS=[`for i in ${CFLAGS[@]}; do printf "%s \'$i"\',; done`] " \ + | sed -e "s:,]: ]:" >> "${S}"/user-config.py + + # set CXXFLAGS used in /etc/make.conf correctly + local FILTERED_CXXFLAGS="`for i in ${CXXFLAGS[@]}; do printf "%s \'$i"\',; done`" + echo "CXXFLAGS=[${FILTERED_CXXFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py + echo "BGE_CXXFLAGS=[${FILTERED_CXXFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py + + # reset general options passed to the C/C++ compilers (useless hardcoded flags) + # FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu + # shadows, see bug #276338 for reference + echo "CCFLAGS= ['-funsigned-char', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']" >> "${S}"/user-config.py + + # set LDFLAGS used in /etc/make.conf correctly + local FILTERED_LDFLAGS="`for i in ${LDFLAGS[@]}; do printf "%s \'$i"\',; done`" + echo "LINKFLAGS=[${FILTERED_LDFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py + echo "PLATFORM_LINKFLAGS=[${FILTERED_LDFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py + + # reset REL_* variables (useless hardcoded flags) + cat <<- EOF >> "${S}"/user-config.py + REL_CFLAGS=[] + REL_CXXFLAGS=[] + REL_CCFLAGS=[] + EOF + + # reset warning flags (useless for NON blender developers) + cat <<- EOF >> "${S}"/user-config.py + C_WARN =[ '-w', '-g0' ] + CC_WARN =[ '-w', '-g0' ] + CXX_WARN=[ '-w', '-g0' ] + EOF + + # detecting -j value from MAKEOPTS + local NUMJOBS="$( echo "${MAKEOPTS}" | sed -ne 's,.*-j\([[:digit:]]\+\).*,\1,p' )" + [[ -z "${NUMJOBS}" ]] && NUMJOBS=1 # resetting to -j1 for empty MAKEOPTS + + # generic settings which differ from the defaults from linux2-config.py + cat <<- EOF >> "${S}"/user-config.py + BF_OPENGL_LIB='GL GLU X11 Xi GLEW' + BF_INSTALLDIR="../install" + WITH_PYTHON_SECURITY=1 + WITHOUT_BF_PYTHON_INSTALL=1 + BF_PYTHON="/usr" + BF_PYTHON_VERSION="3.2" + BF_PYTHON_ABI_FLAGS="" + BF_BUILDINFO=0 + BF_QUIET=1 + BF_NUMJOBS=${NUMJOBS} + BF_LINE_OVERWRITE=0 + WITH_BF_FHS=1 + WITH_BF_BINRELOC=0 + WITH_BF_STATICOPENGL=0 + WITH_BF_OPENMP=${enable_openmp} + EOF + + # configure WITH_BF* Scons build options + for arg in \ + 'sdl' \ + 'apidoc docs' \ + 'lcms' \ + 'jack' \ + 'sndfile' \ + 'openexr' \ + 'dds' \ + 'fftw fftw3' \ + 'jpeg2k openjpeg' \ + 'openal'\ + 'ffmpeg' \ + 'ffmpeg ogg' \ + 'player' \ + 'sse rayoptimization' \ + 'redcode' \ + 'zlib' \ + 'collada' \ + 'verse' ; do + blend_with ${arg} + done + + echo 'BF_OPENCOLLADA_INC="/usr/include/opencollada/"' >> "${S}"/user-config.py + echo 'BF_OPENCOLLADA_LIBPATH="/usr/'$(get_libdir)'/opencollada/"' >> "${S}"/user-config.py + + # libspnav not yet packaged (bug #390427) + echo 'WITH_BF_3DMOUSE=0' >> "${S}"/user-config.py + + # enable debugging/testing support + use debug && echo "BF_DEBUG=1" >> "${S}"/user-config.py + use test && echo "BF_UNIT_TEST=1" >> "${S}"/user-config.py +} + +src_compile() { + escons || die \ + '!!! Please add "${S}/scons.config" when filing bugs reports \ + to bugs.gentoo.org' + + einfo "Building plugins ..." + # FIX: plugins are built without respecting user's LDFLAGS + emake \ + CFLAGS="${CFLAGS} -fPIC" \ + LDFLAGS="$(raw-ldflags) -Bshareable" \ + -C release/plugins +} + +src_install() { + # creating binary wrapper + cat <<- EOF >> "${WORKDIR}/install/blender-${SLOT}" + #!/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/${SLOT}/scripts" + export BLENDER_SYSTEM_DATAFILES="/usr/share/blender/${SLOT}/datafiles" + export BLENDER_SYSTEM_PLUGINS="/usr/lib/blender/${SLOT}/plugins" + exec /usr/bin/blender-bin-${SLOT} \$* + EOF + + # install binaries + exeinto /usr/bin/ + cp "${WORKDIR}/install/blender" "${WORKDIR}/install/blender-bin-${SLOT}" + doexe "${WORKDIR}/install/blender-bin-${SLOT}" + doexe "${WORKDIR}/install/blender-${SLOT}" + if use player; then + cp "${WORKDIR}/install/blenderplayer" \ + "${WORKDIR}/install/blenderplayer-${SLOT}" + doexe "${WORKDIR}/install/blenderplayer-${SLOT}" + fi +# if use verse; then +# cp "${WORKDIR}"/install/bin/verse_server \ +# "${WORKDIR}/install/bin/verse_server-${SLOT}" +# doexe "${WORKDIR}"/install/bin/verse_server-${SLOT} +# fi + + # install plugins + exeinto /usr/$(get_libdir)/${PN}/${SLOT}/plugins/texture + doexe "${WORKDIR}"/${P}/release/plugins/texture/*.so + exeinto /usr/$(get_libdir)/${PN}/${SLOT}/plugins/sequences + doexe "${WORKDIR}"/${P}/release/plugins/sequence/*.so + insinto /usr/include/${PN}/${SLOT} + doins "${WORKDIR}"/${P}/source/blender/blenpluginapi/*.h +# rm -r "${WORKDIR}"/${P}/release/plugins +# insinto /usr/share/${PN}/${SLOT} +# doins "${WORKDIR}"/${P}/release/datafiles +# doins "${WORKDIR}"/${P}/release/scripts + + # install desktop file + insinto /usr/share/pixmaps + cp release/freedesktop/icons/scalable/apps/blender.svg \ + release/freedesktop/icons/scalable/apps/blender-${SLOT}.svg + doins release/freedesktop/icons/scalable/apps/blender-${SLOT}.svg + insinto /usr/share/applications + cp release/freedesktop/blender.desktop \ + release/freedesktop/blender-${SLOT}.desktop + doins release/freedesktop/blender-${SLOT}.desktop + newins "${FILESDIR}"/${P}-insecure.desktop ${PN}-${SLOT}-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-2.60 --background --python doc/python_api/sphinx_doc_gen.py || die "blender failed." + pushd doc/python_api > /dev/null + sphinx-build sphinx-in BPY_API || die "sphinx failed." + popd > /dev/null + docinto "API/python" + dohtml -r doc/python_api/BPY_API/* + + einfo "Generating Blender C/C++ API docs ..." + pushd "${WORKDIR}"/${P}/doc/doxygen > /dev/null + doxygen -u Doxyfile + doxygen || die "doxygen failed to build API docs." + docinto "API/blender" + dohtml -r html/* + popd > /dev/null + fi + + # final cleanup + rm -r "${WORKDIR}"/install/{Python-license.txt,icons,GPL-license.txt,copyright.txt} + + # installing blender + insinto /usr/share/${PN}/${SLOT} + doins -r "${WORKDIR}"/install/${SLOT}/* + + # 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_preinst() { +# if [ -h "${ROOT}/usr/$(get_libdir)/blender/plugins/include" ]; +# then +# rm -r "${ROOT}"/usr/$(get_libdir)/blender/plugins/include +# fi +#} + +pkg_postinst() { + echo + elog "Blender uses python integration. As such, may have some" + elog "inherit risks with running unknown python scripting." + elog + elog "It is recommended to change your blender temp directory" + elog "from /tmp to /home/user/tmp or another tmp file under your" + elog "home directory. This can be done by starting blender, then" + elog "dragging the main menu down do display all paths." + elog + elog "Blender has its own internal rendering engine but you" + elog "can export to external renderers for image computation" + elog "like: YafRay[1], sunflow[2], PovRay[3] and luxrender[4]" + elog + elog "If you need one of them just emerge it:" + elog " [1] emerge -av media-gfx/yafray" + elog " [2] emerge -av media-gfx/sunflow" + elog " [3] emerge -av media-gfx/povray" + elog " [4] emerge -av media-gfx/luxrender" + elog + elog "When setting the Blender paths with the User Preferences" + elog "dialog box, remember to NOT declare your home's paths as:" + elog "~/.blender, but as: /home/user/.blender; in other words," + elog "DO NOT USE the tilde inside the paths, as Blender is not" + elog "able to handle it, ignoring your customizations." +} diff --git a/media-gfx/blender/files/blender-2.37-dirs.patch b/media-gfx/blender/files/blender-2.37-dirs.patch new file mode 100644 index 0000000..1b6837f --- /dev/null +++ b/media-gfx/blender/files/blender-2.37-dirs.patch @@ -0,0 +1,16 @@ +diff -ruN blender.orig/source/blender/src/language.c blender/source/blender/src/language.c +--- blender.orig/source/blender/src/language.c 2005-06-01 10:59:36.000000000 +0200 ++++ blender/source/blender/src/language.c 2005-06-01 11:07:15.000000000 +0200 +@@ -358,9 +358,9 @@ + strcpy(name, bundlePath); + strcat(name, "/Contents/Resources/.Blanguages"); + #else +- /* Check the CWD. Takes care of the case where users +- * unpack blender tarball; cd blender-dir; ./blender */ +- strcpy(name, ".blender/.Blanguages"); ++ /* Check the standar location. Takes care of the case ++ * in which the distribution installs blender */ ++ strcpy(name, "/usr/share/blender/.Blanguages"); + #endif + lines= BLI_read_file_as_lines(name); + diff --git a/media-gfx/blender/files/blender-2.44-scriptsdir.patch b/media-gfx/blender/files/blender-2.44-scriptsdir.patch new file mode 100644 index 0000000..398ccc5 --- /dev/null +++ b/media-gfx/blender/files/blender-2.44-scriptsdir.patch @@ -0,0 +1,91 @@ +--- blender-2.44/source/blender/python/api2_2x/EXPP_interface.c.orig 2006-05-01 14:24:56.000000000 +0200 ++++ blender-2.44/source/blender/python/api2_2x/EXPP_interface.c 2007-06-21 22:25:39.000000000 +0200 +@@ -52,85 +52,13 @@ + */ + char *bpy_gethome(int append_scriptsdir) + { +- static char homedir[FILE_MAXDIR]; +- static char scriptsdir[FILE_MAXDIR]; +- char tmpdir[FILE_MAXDIR]; +- char bprogdir[FILE_MAXDIR]; +- char *s; +- int i; ++ static char homedir[FILE_MAXDIR]="/usr/share/blender"; ++ static char scriptsdir[FILE_MAXDIR]="/usr/share/blender/scripts"; + + if (append_scriptsdir) { +- if (scriptsdir[0] != '\0') + return scriptsdir; + } +- else if (homedir[0] != '\0') +- return homedir; +- +- /* BLI_gethome() can return NULL if env vars are not set */ +- s = BLI_gethome(); +- +- if( !s ) /* bail if no $HOME */ +- { +- printf("$HOME is NOT set\n"); +- return NULL; +- } +- +- if( strstr( s, ".blender" ) ) +- PyOS_snprintf( homedir, FILE_MAXDIR, s ); +- else +- BLI_make_file_string( "/", homedir, s, ".blender" ); +- +- /* if userhome/.blender/ exists, return it */ +- if( BLI_exists( homedir ) ) { +- if (append_scriptsdir) { +- BLI_make_file_string("/", scriptsdir, homedir, "scripts"); +- if (BLI_exists (scriptsdir)) return scriptsdir; +- } +- else return homedir; +- } +- else homedir[0] = '\0'; +- +- /* if either: +- * no homedir was found or +- * append_scriptsdir = 1 but there's no scripts/ inside homedir, +- * use argv[0] (bprogname) to get .blender/ in +- * Blender's installation dir */ +- s = BLI_last_slash( bprogname ); +- +- i = s - bprogname + 1; +- +- PyOS_snprintf( bprogdir, i, "%s", bprogname ); +- +- /* using tmpdir to preserve homedir (if) found above: +- * the ideal is to have a home dir with scripts dir inside +- * it, but if that isn't available, it's possible to +- * have a 'broken' home dir somewhere and a scripts dir in the +- * cvs sources */ +- BLI_make_file_string( "/", tmpdir, bprogdir, ".blender" ); +- +- if (BLI_exists(tmpdir)) { +- if (append_scriptsdir) { +- BLI_make_file_string("/", scriptsdir, tmpdir, "scripts"); +- if (BLI_exists(scriptsdir)) { +- PyOS_snprintf(homedir, FILE_MAXDIR, "%s", tmpdir); +- return scriptsdir; +- } +- else { +- homedir[0] = '\0'; +- scriptsdir[0] = '\0'; +- } +- } +- else return homedir; +- } +- +- /* last try for scripts dir: blender in cvs dir, scripts/ inside release/: */ +- if (append_scriptsdir) { +- BLI_make_file_string("/", scriptsdir, bprogdir, "release/scripts"); +- if (BLI_exists(scriptsdir)) return scriptsdir; +- else scriptsdir[0] = '\0'; +- } +- +- return NULL; ++ return homedir; + } + + /* PyDrivers */ diff --git a/media-gfx/blender/files/blender-2.46-cve-2008-1103-1.patch b/media-gfx/blender/files/blender-2.46-cve-2008-1103-1.patch new file mode 100644 index 0000000..c45a811 --- /dev/null +++ b/media-gfx/blender/files/blender-2.46-cve-2008-1103-1.patch @@ -0,0 +1,12 @@ +diff -up blender/source/blender/blenkernel/intern/blender.c.cve blender/source/blender/blenkernel/intern/blender.c +--- blender/source/blender/blenkernel/intern/blender.c.cve 2008-05-07 17:37:52.000000000 +0200 ++++ blender/source/blender/blenkernel/intern/blender.c 2008-05-07 17:38:22.000000000 +0200 +@@ -716,7 +716,7 @@ void BKE_undo_save_quit(void) + + BLI_make_file_string("/", str, btempdir, "quit.blend"); + +- file = open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666); ++ file = open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC+O_EXCL, 0666); + if(file == -1) { + error("Unable to save %s, check you have permissions", str); + return; diff --git a/media-gfx/blender/files/blender-2.46-ffmpeg.patch b/media-gfx/blender/files/blender-2.46-ffmpeg.patch new file mode 100644 index 0000000..b06854c --- /dev/null +++ b/media-gfx/blender/files/blender-2.46-ffmpeg.patch @@ -0,0 +1,100 @@ +diff -urN blender-2.46/source/blender/blenkernel/intern/writeffmpeg.c blender-2.46.orig/source/blender/blenkernel/intern/writeffmpeg.c +--- blender-2.46/source/blender/blenkernel/intern/writeffmpeg.c 2008-05-20 12:02:12.000000000 +0200 ++++ blender-2.46.orig/source/blender/blenkernel/intern/writeffmpeg.c 2008-05-19 16:38:16.000000000 +0200 +@@ -29,11 +29,11 @@ + + #include <stdlib.h> + ++#include <libavformat/avformat.h> ++#include <libavcodec/avcodec.h> ++#include <libavutil/rational.h> ++#include <libswscale/swscale.h> ++#include <libavcodec/opt.h> +-#include <ffmpeg/avformat.h> +-#include <ffmpeg/avcodec.h> +-#include <ffmpeg/rational.h> +-#include <ffmpeg/swscale.h> +-#include <ffmpeg/opt.h> + + #if LIBAVFORMAT_VERSION_INT < (49 << 16) + #define FFMPEG_OLD_FRAME_RATE 1 +diff -urN blender-2.46/source/blender/imbuf/intern/anim.c blender-2.46.orig/source/blender/imbuf/intern/anim.c +--- blender-2.46/source/blender/imbuf/intern/anim.c 2008-05-20 12:05:41.000000000 +0200 ++++ blender-2.46.orig/source/blender/imbuf/intern/anim.c 2008-05-19 16:38:41.000000000 +0200 +@@ -83,10 +83,10 @@ + #include "IMB_anim5.h" + + #ifdef WITH_FFMPEG ++#include <libavformat/avformat.h> ++#include <libavcodec/avcodec.h> ++#include <libavutil/rational.h> ++#include <libswscale/swscale.h> +-#include <ffmpeg/avformat.h> +-#include <ffmpeg/avcodec.h> +-#include <ffmpeg/rational.h> +-#include <ffmpeg/swscale.h> + + #if LIBAVFORMAT_VERSION_INT < (49 << 16) + #define FFMPEG_OLD_FRAME_RATE 1 +diff -urN blender-2.46/source/blender/imbuf/intern/IMB_anim.h blender-2.46.orig/source/blender/imbuf/intern/IMB_anim.h +--- blender-2.46/source/blender/imbuf/intern/IMB_anim.h 2008-05-20 12:04:33.000000000 +0200 ++++ blender-2.46.orig/source/blender/imbuf/intern/IMB_anim.h 2008-05-19 16:38:41.000000000 +0200 +@@ -76,9 +76,9 @@ + #endif /* WITH_QUICKTIME */ + + #ifdef WITH_FFMPEG ++#include <libavformat/avformat.h> ++#include <libavcodec/avcodec.h> ++#include <libswscale/swscale.h> +-#include <ffmpeg/avformat.h> +-#include <ffmpeg/avcodec.h> +-#include <ffmpeg/swscale.h> + #endif + + #include "IMB_imbuf_types.h" +diff -urN blender-2.46/source/blender/imbuf/intern/util.c blender-2.46.orig/source/blender/imbuf/intern/util.c +--- blender-2.46/source/blender/imbuf/intern/util.c 2008-05-20 12:05:04.000000000 +0200 ++++ blender-2.46.orig/source/blender/imbuf/intern/util.c 2008-05-19 16:38:41.000000000 +0200 +@@ -62,8 +62,8 @@ + #endif + + #ifdef WITH_FFMPEG ++#include <libavcodec/avcodec.h> ++#include <libavformat/avformat.h> +-#include <ffmpeg/avcodec.h> +-#include <ffmpeg/avformat.h> + + #if LIBAVFORMAT_VERSION_INT < (49 << 16) + #define FFMPEG_OLD_FRAME_RATE 1 +diff -urN blender-2.46/source/blender/src/buttons_scene.c blender-2.46.orig/source/blender/src/buttons_scene.c +--- blender-2.46/source/blender/src/buttons_scene.c 2008-05-20 12:03:50.000000000 +0200 ++++ blender-2.46.orig/source/blender/src/buttons_scene.c 2008-05-19 16:38:39.000000000 +0200 +@@ -108,9 +108,9 @@ + + #ifdef WITH_FFMPEG + ++#include <libavcodec/avcodec.h> /* for PIX_FMT_* and CODEC_ID_* */ ++#include <libavformat/avformat.h> ++#include <libavcodec/opt.h> +-#include <ffmpeg/avcodec.h> /* for PIX_FMT_* and CODEC_ID_* */ +-#include <ffmpeg/avformat.h> +-#include <ffmpeg/opt.h> + + static int ffmpeg_preset_sel = 0; + +diff -urN blender-2.46/source/blender/src/hddaudio.c blender-2.46.orig/source/blender/src/hddaudio.c +--- blender-2.46/source/blender/src/hddaudio.c 2008-05-20 12:02:42.000000000 +0200 ++++ blender-2.46.orig/source/blender/src/hddaudio.c 2008-05-19 16:38:39.000000000 +0200 +@@ -33,9 +33,9 @@ + #endif + + #ifdef WITH_FFMPEG ++#include <libavformat/avformat.h> ++#include <libavcodec/avcodec.h> ++#include <libavutil/rational.h> +-#include <ffmpeg/avformat.h> +-#include <ffmpeg/avcodec.h> +-#include <ffmpeg/rational.h> + #if LIBAVFORMAT_VERSION_INT < (49 << 16) + #define FFMPEG_OLD_FRAME_RATE 1 + #else diff --git a/media-gfx/blender/files/blender-2.48-ffmpeg-20081014.patch b/media-gfx/blender/files/blender-2.48-ffmpeg-20081014.patch new file mode 100644 index 0000000..93ae633 --- /dev/null +++ b/media-gfx/blender/files/blender-2.48-ffmpeg-20081014.patch @@ -0,0 +1,25 @@ +Index: blender-2.47/source/blender/src/hddaudio.c +=================================================================== +--- blender-2.47.orig/source/blender/src/hddaudio.c ++++ blender-2.47/source/blender/src/hddaudio.c +@@ -302,7 +302,8 @@ static void sound_hdaudio_extract_small_ + audio_pkt_size = packet.size; + + while (audio_pkt_size > 0) { +- len = avcodec_decode_audio( ++ data_size= AVCODEC_MAX_AUDIO_FRAME_SIZE; ++ len = avcodec_decode_audio2( + hdaudio->pCodecCtx, + hdaudio->decode_cache + + decode_pos, +@@ -469,7 +470,8 @@ static void sound_hdaudio_extract_small_ + } + + while (audio_pkt_size > 0) { +- len = avcodec_decode_audio( ++ data_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; ++ len = avcodec_decode_audio2( + hdaudio->pCodecCtx, + hdaudio->decode_cache + + decode_pos, + diff --git a/media-gfx/blender/files/blender-2.48a-CVE-2008-4863.patch b/media-gfx/blender/files/blender-2.48a-CVE-2008-4863.patch new file mode 100644 index 0000000..3162a0d --- /dev/null +++ b/media-gfx/blender/files/blender-2.48a-CVE-2008-4863.patch @@ -0,0 +1,15 @@ +diff -up blender-2.48a/source/blender/python/BPY_interface.c.cve blender-2.48a/source/blender/python/BPY_interface.c +--- blender-2.48a/source/blender/python/BPY_interface.c.cve 2008-11-03 17:31:19.000000000 +0100 ++++ blender-2.48a/source/blender/python/BPY_interface.c 2008-11-03 17:35:01.000000000 +0100 +@@ -225,6 +225,11 @@ void BPY_start_python( int argc, char ** + Py_Initialize( ); + + PySys_SetArgv( argc_copy, argv_copy ); ++ ++ /* Sanitize sys.path to prevent relative imports loading modules in ++ the current working directory */ ++ PyRun_SimpleString("import sys; sys.path = filter(None, sys.path)"); ++ + /* Initialize thread support (also acquires lock) */ + PyEval_InitThreads(); + diff --git a/media-gfx/blender/files/blender-2.49a-bake.patch b/media-gfx/blender/files/blender-2.49a-bake.patch new file mode 100644 index 0000000..53674da --- /dev/null +++ b/media-gfx/blender/files/blender-2.49a-bake.patch @@ -0,0 +1,13 @@ +Index: source/blender/render/intern/source/rendercore.c +=================================================================== +--- source/blender/render/intern/source/rendercore.c (revision 21781) ++++ source/blender/render/intern/source/rendercore.c (working copy) +@@ -2241,7 +2241,7 @@ + /* no direction checking for now, doesn't always improve the result + * (INPR(shi->facenor, bs->dir) > 0.0f); */ + +- return (R.objectinstance[ob].obr->ob != bs->actob); ++ return (R.objectinstance[ob & ~RE_RAY_TRANSFORM_OFFS].obr->ob != bs->actob); + } + + static int bake_intersect_tree(RayTree* raytree, Isect* isect, float *start, float *dir, float sign, float *hitco, float *dist) diff --git a/media-gfx/blender/files/blender-2.49a-sys-openjpeg.patch b/media-gfx/blender/files/blender-2.49a-sys-openjpeg.patch new file mode 100644 index 0000000..a9e46ea --- /dev/null +++ b/media-gfx/blender/files/blender-2.49a-sys-openjpeg.patch @@ -0,0 +1,11 @@ +--- blender/tools/Blender.py.orig 2009-06-16 14:57:16.000000000 +0200 ++++ blender/tools/Blender.py 2009-07-02 15:53:49.000000000 +0200 +@@ -170,6 +170,8 @@ + if lenv['WITH_BF_OPENAL']: + if not lenv['WITH_BF_STATICOPENAL']: + syslibs += Split(lenv['BF_OPENAL_LIB']) ++ if lenv['WITH_BF_OPENJPEG']: ++ syslibs += Split(lenv['BF_OPENJPEG_LIB']) + if lenv['WITH_BF_OPENMP'] and lenv['CC'] != 'icc': + if lenv['CC'] == 'cl.exe': + syslibs += ['vcomp'] diff --git a/media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v3.patch b/media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v3.patch new file mode 100644 index 0000000..9cf17a5 --- /dev/null +++ b/media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v3.patch @@ -0,0 +1,105 @@ +From 072e11130a2f96642972b0d4ac7ad2a9cd19fbf2 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Wed, 20 Apr 2011 16:42:17 +0200 +Subject: [PATCH] Flip default of "Auto Run Python Scripts" to disabled + (CVE-2009-3850) + +Manual overriding through new parameter -666 is supported +--- + source/blender/blenkernel/intern/blender.c | 11 ++++++++++- + source/blender/python/api2_2x/sceneRender.c | 3 ++- + source/creator/creator.c | 14 ++++++++++---- + 3 files changed, 22 insertions(+), 6 deletions(-) + +diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c +index bf208c8..029b7cf 100644 +--- a/source/blender/blenkernel/intern/blender.c ++++ b/source/blender/blenkernel/intern/blender.c +@@ -388,7 +388,16 @@ static void setup_app_data(BlendFileData *bfd, char *filename) + if (G.f & G_DEBUG) bfd->globalf |= G_DEBUG; + else bfd->globalf &= ~G_DEBUG; + +- if ((U.flag & USER_DONT_DOSCRIPTLINKS)) bfd->globalf &= ~G_DOSCRIPTLINKS; ++ if (G.f & G_DOSCRIPTLINKS) { ++ /* Blender running in -666 mode */ ++ /* NOTE: In background mode U.flag has not been initialized from ~/.B.blend */ ++ if (! G.background && (U.flag & USER_DONT_DOSCRIPTLINKS)) ++ /* Prefer disabled "Auto Run Python Scripts" over -666 */ ++ bfd->globalf &= ~G_DOSCRIPTLINKS; ++ } else { ++ /* Blender NOT running in -666 mode, deny pulling G_DOSCRIPTLINKS in */ ++ bfd->globalf &= ~G_DOSCRIPTLINKS; ++ } + + G.f= bfd->globalf; + +diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c +index 1bf2b75..e34a361 100644 +--- a/source/blender/python/api2_2x/sceneRender.c ++++ b/source/blender/python/api2_2x/sceneRender.c +@@ -498,7 +498,8 @@ static PyObject *RenderData_Render( BPy_RenderData * self ) + + RE_BlenderFrame(re, G.scene, G.scene->r.cfra); + +- BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); ++ if (G.f & G_DOSCRIPTLINKS) ++ BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); + + set_scene_bg( oldsce ); + } +diff --git a/source/creator/creator.c b/source/creator/creator.c +index a562fc3..994180d 100644 +--- a/source/creator/creator.c ++++ b/source/creator/creator.c +@@ -232,7 +232,8 @@ static void print_help(void) + printf (" -nojoystick\tDisable joystick support\n"); + printf (" -noglsl\tDisable GLSL shading\n"); + printf (" -h\t\tPrint this help text\n"); +- printf (" -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n"); ++ printf (" -666\t\tEnables automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n"); ++ printf (" -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes) (default)\n"); + printf (" -P <filename>\tRun the given Python script (filename or Blender Text)\n"); + #ifdef WIN32 + printf (" -R\t\tRegister .blend extension\n"); +@@ -366,7 +367,7 @@ int main(int argc, char **argv) + + /* first test for background */ + +- G.f |= G_DOSCRIPTLINKS; /* script links enabled by default */ ++ G.f &= ~G_DOSCRIPTLINKS; /* script links disabled by default */ + + for(a=1; a<argc; a++) { + +@@ -388,6 +389,10 @@ int main(int argc, char **argv) + exit(0); + } + ++ if (!strcmp(argv[a], "-666")){ ++ G.f |= G_DOSCRIPTLINKS; ++ } ++ + /* Handle -* switches */ + else if(argv[a][0] == '-') { + switch(argv[a][1]) { +@@ -405,7 +410,7 @@ int main(int argc, char **argv) + a= argc; + break; + +- case 'y': ++ case 'y': /* NOTE: -y works the exact opposite way in version 2.57! */ + G.f &= ~G_DOSCRIPTLINKS; + break; + +@@ -680,7 +685,8 @@ int main(int argc, char **argv) + #endif + RE_BlenderAnim(re, G.scene, frame, frame, G.scene->frame_step); + #ifndef DISABLE_PYTHON +- BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); ++ if (G.f & G_DOSCRIPTLINKS) ++ BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); + #endif + } + } else { +-- +1.7.5.rc1 + diff --git a/media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v4.patch b/media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v4.patch new file mode 100644 index 0000000..9349879 --- /dev/null +++ b/media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v4.patch @@ -0,0 +1,139 @@ +From f3a8d00d03cc8bdf1739936998a784c9e4e64bb9 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Sun, 24 Apr 2011 00:00:36 +0200 +Subject: [PATCH] Disable execution of embedded Python code unless run with + -666 (CVE-2009-3850) + +--- + source/blender/blenkernel/intern/blender.c | 11 ++++++++++- + source/blender/python/api2_2x/sceneRender.c | 3 ++- + source/blender/src/buttons_script.c | 4 +++- + source/creator/creator.c | 18 ++++++++++++++---- + 4 files changed, 29 insertions(+), 7 deletions(-) + +diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c +index bf208c8..029b7cf 100644 +--- a/source/blender/blenkernel/intern/blender.c ++++ b/source/blender/blenkernel/intern/blender.c +@@ -388,7 +388,16 @@ static void setup_app_data(BlendFileData *bfd, char *filename) + if (G.f & G_DEBUG) bfd->globalf |= G_DEBUG; + else bfd->globalf &= ~G_DEBUG; + +- if ((U.flag & USER_DONT_DOSCRIPTLINKS)) bfd->globalf &= ~G_DOSCRIPTLINKS; ++ if (G.f & G_DOSCRIPTLINKS) { ++ /* Blender running in -666 mode */ ++ /* NOTE: In background mode U.flag has not been initialized from ~/.B.blend */ ++ if (! G.background && (U.flag & USER_DONT_DOSCRIPTLINKS)) ++ /* Prefer disabled "Auto Run Python Scripts" over -666 */ ++ bfd->globalf &= ~G_DOSCRIPTLINKS; ++ } else { ++ /* Blender NOT running in -666 mode, deny pulling G_DOSCRIPTLINKS in */ ++ bfd->globalf &= ~G_DOSCRIPTLINKS; ++ } + + G.f= bfd->globalf; + +diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c +index 1bf2b75..e34a361 100644 +--- a/source/blender/python/api2_2x/sceneRender.c ++++ b/source/blender/python/api2_2x/sceneRender.c +@@ -498,7 +498,8 @@ static PyObject *RenderData_Render( BPy_RenderData * self ) + + RE_BlenderFrame(re, G.scene, G.scene->r.cfra); + +- BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); ++ if (G.f & G_DOSCRIPTLINKS) ++ BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); + + set_scene_bg( oldsce ); + } +diff --git a/source/blender/src/buttons_script.c b/source/blender/src/buttons_script.c +index 647fc66..6166133 100644 +--- a/source/blender/src/buttons_script.c ++++ b/source/blender/src/buttons_script.c +@@ -107,6 +107,8 @@ + #include "blendef.h" + #include "butspace.h" + ++extern int button_enable_script_links_enabled; ++ + /* ************************ function prototypes ********************** */ + void draw_scriptlink(uiBlock *, ScriptLink *, int , int , int ) ; + +@@ -323,7 +325,7 @@ static void script_panel_scriptlink(void) + block= uiNewBlock(&curarea->uiblocks, "script_panel_scriptlink", UI_EMBOSS, UI_HELV, curarea->win); + if(uiNewPanel(curarea, block, "Scriptlinks", "Script", 0, 0, 318, 204)==0) return; + +- uiDefButBitI(block, TOG, G_DOSCRIPTLINKS, REDRAWBUTSSCRIPT, ++ uiDefButBitI(block, button_enable_script_links_enabled ? TOG : BUT, G_DOSCRIPTLINKS, REDRAWBUTSSCRIPT, + "Enable Script Links", xco, 200, 150, 20, &G.f, 0, 0, 0, 0, + "Enable execution of all assigned Script links and Space Handelers"); + /* for proper alignment: */ +diff --git a/source/creator/creator.c b/source/creator/creator.c +index a562fc3..ccea569 100644 +--- a/source/creator/creator.c ++++ b/source/creator/creator.c +@@ -108,6 +108,8 @@ + #include "binreloc.h" + #endif + ++int button_enable_script_links_enabled = 0; ++ + // from buildinfo.c + #ifdef BUILD_DATE + extern char * build_date; +@@ -232,7 +234,8 @@ static void print_help(void) + printf (" -nojoystick\tDisable joystick support\n"); + printf (" -noglsl\tDisable GLSL shading\n"); + printf (" -h\t\tPrint this help text\n"); +- printf (" -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n"); ++ printf (" -666\t\tEnables automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n"); ++ printf (" -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes) (default)\n"); + printf (" -P <filename>\tRun the given Python script (filename or Blender Text)\n"); + #ifdef WIN32 + printf (" -R\t\tRegister .blend extension\n"); +@@ -366,7 +369,7 @@ int main(int argc, char **argv) + + /* first test for background */ + +- G.f |= G_DOSCRIPTLINKS; /* script links enabled by default */ ++ G.f &= ~G_DOSCRIPTLINKS; /* script links disabled by default */ + + for(a=1; a<argc; a++) { + +@@ -388,6 +391,11 @@ int main(int argc, char **argv) + exit(0); + } + ++ if (!strcmp(argv[a], "-666")){ ++ G.f |= G_DOSCRIPTLINKS; ++ button_enable_script_links_enabled = 1; ++ } ++ + /* Handle -* switches */ + else if(argv[a][0] == '-') { + switch(argv[a][1]) { +@@ -405,8 +413,9 @@ int main(int argc, char **argv) + a= argc; + break; + +- case 'y': ++ case 'y': /* NOTE: -y works the exact opposite way in version 2.57! */ + G.f &= ~G_DOSCRIPTLINKS; ++ button_enable_script_links_enabled = 0; + break; + + case 'Y': +@@ -680,7 +689,8 @@ int main(int argc, char **argv) + #endif + RE_BlenderAnim(re, G.scene, frame, frame, G.scene->frame_step); + #ifndef DISABLE_PYTHON +- BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); ++ if (G.f & G_DOSCRIPTLINKS) ++ BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); + #endif + } + } else { +-- +1.7.5.rc1 + diff --git a/media-gfx/blender/files/blender-2.49b-insecure.desktop b/media-gfx/blender/files/blender-2.49b-insecure.desktop new file mode 100644 index 0000000..6b36a0a --- /dev/null +++ b/media-gfx/blender/files/blender-2.49b-insecure.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Blender 2.4x (reduced security) +Comment=3D modeling, animation, rendering and post-production. +Exec=blender -666 +Icon=blender +Terminal=0 +Type=Application +Categories=Graphics;Application; diff --git a/media-gfx/blender/files/blender-2.49b-libav-0.7.patch b/media-gfx/blender/files/blender-2.49b-libav-0.7.patch new file mode 100644 index 0000000..d0661ad --- /dev/null +++ b/media-gfx/blender/files/blender-2.49b-libav-0.7.patch @@ -0,0 +1,425 @@ +diff -urN blender-2.49b.orig//source/blender/blenkernel/intern/writeffmpeg.c blender-2.49b/source/blender/blenkernel/intern/writeffmpeg.c +--- blender-2.49b.orig//source/blender/blenkernel/intern/writeffmpeg.c 2009-09-01 17:21:17.000000000 +0200 ++++ blender-2.49b/source/blender/blenkernel/intern/writeffmpeg.c 2011-11-13 05:36:23.000000000 +0100 +@@ -32,6 +32,7 @@ + #include <libavformat/avformat.h> + #include <libavcodec/avcodec.h> + #include <libavutil/rational.h> ++#include <libavutil/mathematics.h> + #include <libswscale/swscale.h> + #include <libavcodec/opt.h> + +@@ -149,10 +150,9 @@ + #else + pkt.pts = c->coded_frame->pts; + #endif +- fprintf(stderr, "Audio Frame PTS: %lld\n", pkt.pts); + + pkt.stream_index = audio_stream->index; +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + if (av_interleaved_write_frame(outfile, &pkt) != 0) { + error("Error writing audio packet"); + return -1; +@@ -271,7 +271,7 @@ + fprintf(stderr, "Video Frame PTS: not set\n"); + } + if (c->coded_frame->key_frame) +- packet.flags |= PKT_FLAG_KEY; ++ packet.flags |= AV_PKT_FLAG_KEY; + packet.stream_index = video_stream->index; + packet.data = video_buffer; + packet.size = outsize; +@@ -373,7 +373,7 @@ + switch(prop->type) { + case IDP_STRING: + fprintf(stderr, "%s.\n", IDP_String(prop)); +- rv = av_set_string(c, prop->name, IDP_String(prop)); ++ av_set_string3(c, prop->name, IDP_String(prop), 0, &rv); + break; + case IDP_FLOAT: + fprintf(stderr, "%g.\n", IDP_Float(prop)); +@@ -384,12 +384,12 @@ + + if (param) { + if (IDP_Int(prop)) { +- rv = av_set_string(c, name, param); ++ av_set_string3(c, name, param, 0, &rv); + } else { + return; + } + } else { +- rv = av_set_int(c, prop->name, IDP_Int(prop)); ++ av_set_int(c, prop->name, IDP_Int(prop)); + } + break; + } +@@ -438,7 +438,7 @@ + + c = get_codec_from_stream(st); + c->codec_id = codec_id; +- c->codec_type = CODEC_TYPE_VIDEO; ++ c->codec_type = AVMEDIA_TYPE_VIDEO; + + + /* Get some values from the current render settings */ +@@ -496,7 +496,7 @@ + c->pix_fmt = PIX_FMT_YUV422P; + } + +- if (codec_id == CODEC_ID_XVID) { ++ if (codec_id == CODEC_ID_MPEG4) { + /* arghhhh ... */ + c->pix_fmt = PIX_FMT_YUV420P; + } +@@ -557,7 +557,7 @@ + + c = get_codec_from_stream(st); + c->codec_id = codec_id; +- c->codec_type = CODEC_TYPE_AUDIO; ++ c->codec_type = AVMEDIA_TYPE_AUDIO; + + c->sample_rate = G.scene->audio.mixrate; + c->bit_rate = ffmpeg_audio_bitrate*1000; +@@ -652,14 +652,14 @@ + error("No valid formats found"); + return; + } +- fmt = guess_format(NULL, exts[0], NULL); ++ fmt = av_guess_format(NULL, exts[0], NULL); + if (!fmt) { + G.afbreek = 1; /* Abort render */ + error("No valid formats found"); + return; + } + +- of = av_alloc_format_context(); ++ of = avformat_alloc_context(); + if (!of) { + G.afbreek = 1; + error("Error opening output file"); +@@ -699,7 +699,7 @@ + fmt->video_codec = CODEC_ID_H264; + break; + case FFMPEG_XVID: +- fmt->video_codec = CODEC_ID_XVID; ++ fmt->video_codec = CODEC_ID_MPEG4; + break; + case FFMPEG_FLV: + fmt->video_codec = CODEC_ID_FLV1; +diff -urN blender-2.49b.orig//source/blender/imbuf/intern/anim.c blender-2.49b/source/blender/imbuf/intern/anim.c +--- blender-2.49b.orig//source/blender/imbuf/intern/anim.c 2009-09-01 17:21:50.000000000 +0200 ++++ blender-2.49b/source/blender/imbuf/intern/anim.c 2011-11-13 06:21:37.000000000 +0100 +@@ -550,7 +550,7 @@ + videoStream=-1; + for(i=0; i<pFormatCtx->nb_streams; i++) + if(get_codec_from_stream(pFormatCtx->streams[i])->codec_type +- == CODEC_TYPE_VIDEO) { ++ == AVMEDIA_TYPE_VIDEO) { + videoStream=i; + break; + } +@@ -683,10 +683,10 @@ + && position - (anim->curposition + 1) < anim->preseek) { + while(av_read_frame(anim->pFormatCtx, &packet)>=0) { + if (packet.stream_index == anim->videoStream) { +- avcodec_decode_video( ++ avcodec_decode_video2( + anim->pCodecCtx, + anim->pFrame, &frameFinished, +- packet.data, packet.size); ++ &packet); + + if (frameFinished) { + anim->curposition++; +@@ -741,9 +741,9 @@ + + while(av_read_frame(anim->pFormatCtx, &packet)>=0) { + if(packet.stream_index == anim->videoStream) { +- avcodec_decode_video(anim->pCodecCtx, ++ avcodec_decode_video2(anim->pCodecCtx, + anim->pFrame, &frameFinished, +- packet.data, packet.size); ++ &packet); + + if (frameFinished && !pos_found) { + if (packet.dts >= pts_to_search) { +diff -urN blender-2.49b.orig//source/blender/imbuf/intern/util.c blender-2.49b/source/blender/imbuf/intern/util.c +--- blender-2.49b.orig//source/blender/imbuf/intern/util.c 2009-09-01 17:21:50.000000000 +0200 ++++ blender-2.49b/source/blender/imbuf/intern/util.c 2011-11-13 04:37:27.000000000 +0100 +@@ -324,7 +324,7 @@ + return 0; + } + +- if(UTIL_DEBUG) dump_format(pFormatCtx, 0, filename, 0); ++ if(UTIL_DEBUG) av_dump_format(pFormatCtx, 0, filename, 0); + + + /* Find the first video stream */ +@@ -332,7 +332,7 @@ + for(i=0; i<pFormatCtx->nb_streams; i++) + if(pFormatCtx->streams[i] && + get_codec_from_stream(pFormatCtx->streams[i]) && +- (get_codec_from_stream(pFormatCtx->streams[i])->codec_type==CODEC_TYPE_VIDEO)) ++ (get_codec_from_stream(pFormatCtx->streams[i])->codec_type==AVMEDIA_TYPE_VIDEO)) + { + videoStream=i; + break; +Binary files blender-2.49b.orig//source/blender/python/api2_2x/BGL.o and blender-2.49b/source/blender/python/api2_2x/BGL.o differ +Binary files blender-2.49b.orig//source/blender/python/api2_2x/bpy_internal_import.o and blender-2.49b/source/blender/python/api2_2x/bpy_internal_import.o differ +Binary files blender-2.49b.orig//source/blender/python/api2_2x/constant.o and blender-2.49b/source/blender/python/api2_2x/constant.o differ +Binary files blender-2.49b.orig//source/blender/python/api2_2x/euler.o and blender-2.49b/source/blender/python/api2_2x/euler.o differ +Binary files blender-2.49b.orig//source/blender/python/api2_2x/Geometry.o and blender-2.49b/source/blender/python/api2_2x/Geometry.o differ +Binary files blender-2.49b.orig//source/blender/python/api2_2x/Mathutils.o and blender-2.49b/source/blender/python/api2_2x/Mathutils.o differ +Binary files blender-2.49b.orig//source/blender/python/api2_2x/matrix.o and blender-2.49b/source/blender/python/api2_2x/matrix.o differ +Binary files blender-2.49b.orig//source/blender/python/api2_2x/quat.o and blender-2.49b/source/blender/python/api2_2x/quat.o differ +Binary files blender-2.49b.orig//source/blender/python/api2_2x/vector.o and blender-2.49b/source/blender/python/api2_2x/vector.o differ +diff -urN blender-2.49b.orig//source/blender/src/buttons_scene.c blender-2.49b/source/blender/src/buttons_scene.c +--- blender-2.49b.orig//source/blender/src/buttons_scene.c 2009-09-01 17:21:46.000000000 +0200 ++++ blender-2.49b/source/blender/src/buttons_scene.c 2011-11-13 05:38:04.000000000 +0100 +@@ -2169,7 +2169,7 @@ + "Quicktime", FFMPEG_MOV, + "DV", FFMPEG_DV, + "H264", FFMPEG_H264, +- "XVid", FFMPEG_XVID, ++ "XVID", FFMPEG_XVID, + #if 0 + /* ifdef WITH_OGG, disabled, since broken within ffmpeg bundled with blender */ + "OGG", FFMPEG_OGG, +@@ -2212,7 +2212,7 @@ + "HuffYUV", CODEC_ID_HUFFYUV, + "DV", CODEC_ID_DVVIDEO, + "H264", CODEC_ID_H264, +- "XVid", CODEC_ID_XVID, ++ "XVid", CODEC_ID_MPEG4, + #ifdef WITH_OGG + "Theora", CODEC_ID_THEORA, + #endif +@@ -2723,12 +2723,12 @@ + switch (o->type) { + case FF_OPT_TYPE_INT: + case FF_OPT_TYPE_INT64: +- val.i = o->default_val; ++ val.i = o->default_val.dbl; + idp_type = IDP_INT; + break; + case FF_OPT_TYPE_DOUBLE: + case FF_OPT_TYPE_FLOAT: +- val.f = o->default_val; ++ val.f = o->default_val.dbl; + idp_type = IDP_FLOAT; + break; + case FF_OPT_TYPE_STRING: +diff -urN blender-2.49b.orig//source/blender/src/hddaudio.c blender-2.49b/source/blender/src/hddaudio.c +--- blender-2.49b.orig//source/blender/src/hddaudio.c 2009-09-01 17:21:45.000000000 +0200 ++++ blender-2.49b/source/blender/src/hddaudio.c 2011-11-13 06:27:23.000000000 +0100 +@@ -126,7 +126,7 @@ + audioStream=-1; + for(i=0; i<pFormatCtx->nb_streams; i++) + if(get_codec_from_stream(pFormatCtx->streams[i]) +- ->codec_type == CODEC_TYPE_AUDIO) ++ ->codec_type == AVMEDIA_TYPE_AUDIO) + { + audioStream=i; + break; +@@ -382,39 +382,30 @@ + continue; + } + +- audio_pkt_data = packet.data; +- audio_pkt_size = packet.size; +- +- while (audio_pkt_size > 0) { +- data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE; +- len = avcodec_decode_audio2( +- hdaudio->pCodecCtx, +- hdaudio->decode_cache +- + decode_pos +- * hdaudio->decode_sample_format_size, +- &data_size, +- audio_pkt_data, +- audio_pkt_size); +- if (len <= 0) { +- audio_pkt_size = 0; +- break; +- } +- +- audio_pkt_size -= len; +- audio_pkt_data += len; +- +- if (data_size <= 0) { +- continue; +- } +- +- decode_pos += data_size +- / hdaudio->decode_sample_format_size; +- if (decode_pos + data_size +- / hdaudio->decode_sample_format_size +- > hdaudio->decode_cache_size) { +- break; +- } +- } ++ data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE; ++ len = avcodec_decode_audio3( ++ hdaudio->pCodecCtx, ++ hdaudio->decode_cache ++ + decode_pos ++ * hdaudio->decode_sample_format_size, ++ &data_size, ++ &packet); ++ if (len <= 0) { ++ audio_pkt_size = 0; ++ break; ++ } ++ ++ if (data_size <= 0) { ++ continue; ++ } ++ ++ decode_pos += data_size ++ / hdaudio->decode_sample_format_size; ++ if (decode_pos + data_size ++ / hdaudio->decode_sample_format_size ++ > hdaudio->decode_cache_size) { ++ break; ++ } + av_free_packet(&packet); + + if (decode_pos + data_size / hdaudio->decode_sample_format_size +@@ -534,36 +525,29 @@ + decode_cache_zero_init = 1; + } + +- while (audio_pkt_size > 0) { +- data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE; +- len = avcodec_decode_audio2( +- hdaudio->pCodecCtx, +- hdaudio->decode_cache +- + decode_pos +- * hdaudio->decode_sample_format_size, +- &data_size, +- audio_pkt_data, +- audio_pkt_size); +- if (len <= 0) { +- audio_pkt_size = 0; +- break; +- } +- +- audio_pkt_size -= len; +- audio_pkt_data += len; +- +- if (data_size <= 0) { +- continue; +- } +- +- decode_pos += data_size +- / hdaudio->decode_sample_format_size; +- if (decode_pos + data_size +- / hdaudio->decode_sample_format_size +- > hdaudio->decode_cache_size) { +- break; +- } +- } ++ data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE; ++ len = avcodec_decode_audio3( ++ hdaudio->pCodecCtx, ++ hdaudio->decode_cache ++ + decode_pos ++ * hdaudio->decode_sample_format_size, ++ &data_size, ++ &packet); ++ if (len <= 0) { ++ break; ++ } ++ ++ if (data_size <= 0) { ++ continue; ++ } ++ ++ decode_pos += data_size ++ / hdaudio->decode_sample_format_size; ++ if (decode_pos + data_size ++ / hdaudio->decode_sample_format_size ++ > hdaudio->decode_cache_size) { ++ break; ++ } + + av_free_packet(&packet); + +diff -urN blender-2.49b.orig//source/gameengine/VideoTexture/VideoFFmpeg.cpp blender-2.49b/source/gameengine/VideoTexture/VideoFFmpeg.cpp +--- blender-2.49b.orig//source/gameengine/VideoTexture/VideoFFmpeg.cpp 2009-09-01 17:20:53.000000000 +0200 ++++ blender-2.49b/source/gameengine/VideoTexture/VideoFFmpeg.cpp 2011-11-13 07:56:56.000000000 +0100 +@@ -26,7 +26,6 @@ + #define __STDC_CONSTANT_MACROS + #include <stdint.h> + +- + #include "MEM_guardedalloc.h" + #include "PIL_time.h" + +@@ -177,7 +176,7 @@ + { + if(formatCtx->streams[i] && + get_codec_from_stream(formatCtx->streams[i]) && +- (get_codec_from_stream(formatCtx->streams[i])->codec_type==CODEC_TYPE_VIDEO)) ++ (get_codec_from_stream(formatCtx->streams[i])->codec_type==AVMEDIA_TYPE_VIDEO)) + { + videoStream=i; + break; +@@ -358,9 +357,9 @@ + BLI_remlink(&video->m_packetCacheBase, cachePacket); + // use m_frame because when caching, it is not used in main thread + // we can't use currentFrame directly because we need to convert to RGB first +- avcodec_decode_video(video->m_codecCtx, ++ avcodec_decode_video2(video->m_codecCtx, + video->m_frame, &frameFinished, +- cachePacket->packet.data, cachePacket->packet.size); ++ &cachePacket->packet); + if(frameFinished) + { + AVFrame * input = video->m_frame; +@@ -628,7 +627,7 @@ + if (m_captRate <= 0.f) + m_captRate = defFrameRate; + sprintf(rateStr, "%f", m_captRate); +- av_parse_video_frame_rate(&frameRate, rateStr); ++ av_parse_video_rate(&frameRate, rateStr); + // populate format parameters + // need to specify the time base = inverse of rate + formatParams.time_base.num = frameRate.den; +@@ -887,10 +886,10 @@ + { + if (packet.stream_index == m_videoStream) + { +- avcodec_decode_video( ++ avcodec_decode_video2( + m_codecCtx, + m_frame, &frameFinished, +- packet.data, packet.size); ++ &packet); + if (frameFinished) + m_curPosition++; + } +@@ -966,9 +965,9 @@ + { + if(packet.stream_index == m_videoStream) + { +- avcodec_decode_video(m_codecCtx, ++ avcodec_decode_video2(m_codecCtx, + m_frame, &frameFinished, +- packet.data, packet.size); ++ &packet); + + if (frameFinished && !posFound) + { +diff -urN blender-2.49b.orig//source/gameengine/VideoTexture/VideoFFmpeg.h blender-2.49b/source/gameengine/VideoTexture/VideoFFmpeg.h +--- blender-2.49b.orig//source/gameengine/VideoTexture/VideoFFmpeg.h 2009-09-01 17:20:53.000000000 +0200 ++++ blender-2.49b/source/gameengine/VideoTexture/VideoFFmpeg.h 2011-11-13 08:03:51.000000000 +0100 +@@ -28,6 +28,7 @@ + #include <libavformat/avformat.h> + #include <libavcodec/avcodec.h> + #include <libavutil/rational.h> ++#include <libavutil/parseutils.h> + #include <libswscale/swscale.h> + #include "DNA_listBase.h" + #include "BLI_threads.h" diff --git a/media-gfx/blender/files/blender-2.49b-subversion-1.7.patch b/media-gfx/blender/files/blender-2.49b-subversion-1.7.patch new file mode 100644 index 0000000..34b4b8a --- /dev/null +++ b/media-gfx/blender/files/blender-2.49b-subversion-1.7.patch @@ -0,0 +1,14 @@ +--- tools/Blender.py 2011-10-29 06:32:11.706449854 +0200 ++++ tools/Blender.py 2011-10-29 06:32:15.923397138 +0200 +@@ -219,7 +219,10 @@ + """ + build_date = time.strftime ("%Y-%m-%d") + build_time = time.strftime ("%H:%M:%S") +- build_rev = os.popen('svnversion').read()[:-1] # remove \n ++ # svn 1.6 says "exported" ++ # svn 1.7 says "Unversioned directory" ++ # Latter breaks the build somewhere, former doesn't. ++ build_rev = 'exported' + + obj = [] + if lenv['BF_BUILDINFO']: diff --git a/media-gfx/blender/files/blender-2.57-CVE-2009-3850-v1.patch b/media-gfx/blender/files/blender-2.57-CVE-2009-3850-v1.patch new file mode 100644 index 0000000..9c0f39f --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-CVE-2009-3850-v1.patch @@ -0,0 +1,105 @@ +From dfb6ecd9a4a129b976b7a8d2002e32146125340f Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Sun, 24 Apr 2011 18:26:47 +0200 +Subject: [PATCH] Disable execution of embedded Python code unless run with + --enable-autoexec|-y|-666 (CVE-2009-3850) + +--- + source/blender/blenkernel/intern/blender.c | 3 ++- + source/blender/makesrna/intern/rna_userdef.c | 9 ++++++--- + source/blender/windowmanager/intern/wm_files.c | 3 ++- + source/creator/creator.c | 10 ++++++---- + 4 files changed, 16 insertions(+), 9 deletions(-) + +diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c +index 5f08505..9c27ac7 100644 +--- a/source/blender/blenkernel/intern/blender.c ++++ b/source/blender/blenkernel/intern/blender.c +@@ -141,7 +141,8 @@ void initglobals(void) + G.charmin = 0x0000; + G.charmax = 0xffff; + +- G.f |= G_SCRIPT_AUTOEXEC; ++ G.f &= ~G_SCRIPT_AUTOEXEC; ++ G.f |= G_SCRIPT_OVERRIDE_PREF; /* Disables turning G_SCRIPT_AUTOEXEC on from user prefs */ + } + + /***/ +diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c +index e9a9ddc..a120857 100644 +--- a/source/blender/makesrna/intern/rna_userdef.c ++++ b/source/blender/makesrna/intern/rna_userdef.c +@@ -99,9 +99,12 @@ static void rna_userdef_show_manipulator_update(Main *bmain, Scene *scene, Point + + static void rna_userdef_script_autoexec_update(Main *bmain, Scene *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 void rna_userdef_mipmap_update(Main *bmain, Scene *scene, PointerRNA *ptr) +diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c +index f4f7af0..c1bacc6 100644 +--- a/source/blender/windowmanager/intern/wm_files.c ++++ b/source/blender/windowmanager/intern/wm_files.c +@@ -270,7 +270,8 @@ 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; + } +diff --git a/source/creator/creator.c b/source/creator/creator.c +index c687cc2..1da282f 100644 +--- a/source/creator/creator.c ++++ b/source/creator/creator.c +@@ -278,6 +278,7 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) + + printf("\n"); + ++ BLI_argsPrintArgDoc(ba, "-666"); + BLI_argsPrintArgDoc(ba, "--enable-autoexec"); + BLI_argsPrintArgDoc(ba, "--disable-autoexec"); + +@@ -359,14 +360,14 @@ static int end_arguments(int UNUSED(argc), const char **UNUSED(argv), void *UNUS + 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; + } + +@@ -1075,8 +1076,9 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) + + BLI_argsAdd(ba, 1, "-v", "--version", "\n\tPrint Blender version and exit", print_version, NULL); + +- BLI_argsAdd(ba, 1, "-y", "--enable-autoexec", "\n\tEnable automatic python script execution (default)", enable_python, NULL); +- BLI_argsAdd(ba, 1, "-Y", "--disable-autoexec", "\n\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes)", disable_python, NULL); ++ BLI_argsAdd(ba, 1, NULL, "-666", "\n\tEnable automatic python script execution (port from CVE-2009-3850 patch to Blender 2.49b)", enable_python, NULL); ++ BLI_argsAdd(ba, 1, "-y", "--enable-autoexec", "\n\tEnable automatic python script execution", enable_python, NULL); ++ BLI_argsAdd(ba, 1, "-Y", "--disable-autoexec", "\n\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes) (default)", disable_python, NULL); + + BLI_argsAdd(ba, 1, "-b", "--background", "<file>\n\tLoad <file> in background (often used for UI-less rendering)", background_mode, NULL); + +-- +1.7.5.rc1 + diff --git a/media-gfx/blender/files/blender-2.57-CVE-2009-3850-v2.patch b/media-gfx/blender/files/blender-2.57-CVE-2009-3850-v2.patch new file mode 100644 index 0000000..526e0f7 --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-CVE-2009-3850-v2.patch @@ -0,0 +1,172 @@ +From c4181c5639da5c6a6df31b434498a44d0d680487 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Tue, 17 May 2011 17:37:11 +0200 +Subject: [PATCH] Disable execution of embedded Python code unless run with + --enable-autoexec|-y|-666 (CVE-2009-3850) + +--- + source/blender/blenkernel/intern/blender.c | 3 ++- + source/blender/makesrna/intern/rna_userdef.c | 16 +++++++++++++--- + source/blender/windowmanager/intern/wm_files.c | 7 ++++++- + source/blender/windowmanager/intern/wm_operators.c | 16 ++++++++++++---- + source/creator/creator.c | 10 ++++++---- + 5 files changed, 39 insertions(+), 13 deletions(-) + +diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c +index 5f08505..9c27ac7 100644 +--- a/source/blender/blenkernel/intern/blender.c ++++ b/source/blender/blenkernel/intern/blender.c +@@ -141,7 +141,8 @@ void initglobals(void) + G.charmin = 0x0000; + G.charmax = 0xffff; + +- G.f |= G_SCRIPT_AUTOEXEC; ++ G.f &= ~G_SCRIPT_AUTOEXEC; ++ G.f |= G_SCRIPT_OVERRIDE_PREF; /* Disables turning G_SCRIPT_AUTOEXEC on from user prefs */ + } + + /***/ +diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c +index e9a9ddc..218b50a 100644 +--- a/source/blender/makesrna/intern/rna_userdef.c ++++ b/source/blender/makesrna/intern/rna_userdef.c +@@ -99,9 +99,17 @@ static void rna_userdef_show_manipulator_update(Main *bmain, Scene *scene, Point + + static void rna_userdef_script_autoexec_update(Main *bmain, Scene *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) +@@ -2505,6 +2513,8 @@ static void rna_def_userdef_system(BlenderRNA *brna) + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_SCRIPT_AUTOEXEC_DISABLE); + RNA_def_property_ui_text(prop, "Auto Run Python Scripts", "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 --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c +index f4f7af0..37a9664 100644 +--- a/source/blender/windowmanager/intern/wm_files.c ++++ b/source/blender/windowmanager/intern/wm_files.c +@@ -270,11 +270,16 @@ 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; + } + if(U.tempdir[0]) BLI_where_is_temp(btempdir, FILE_MAX, 1); ++ ++ /* 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; + } + + void WM_read_file(bContext *C, const char *name, ReportList *reports) +diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c +index 28df023..a2142a5 100644 +--- a/source/blender/windowmanager/intern/wm_operators.c ++++ b/source/blender/windowmanager/intern/wm_operators.c +@@ -1471,12 +1471,13 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op) + 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); +@@ -1488,6 +1489,8 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op) + + 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"; +@@ -1499,7 +1502,12 @@ static void WM_OT_open_mainfile(wmOperatorType *ot) + WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH); + + RNA_def_boolean(ot->srna, "load_ui", 1, "Load UI", "Load user interface setup in the .blend file"); +- RNA_def_boolean(ot->srna, "use_scripts", 1, "Trusted Source", "Allow blend file execute scripts automatically, default available from system preferences"); ++ use_scripts_checkbox = RNA_def_boolean(ot->srna, "use_scripts", ++ !!(G.f & G_SCRIPT_AUTOEXEC), "Trusted Source", ++ "Allow blend file execute scripts automatically, default available from system preferences"); ++ /* Disable "Trusted Source" checkbox unless Blender run with --enable-autoexec */ ++ if (use_scripts_checkbox && (G.f & G_SCRIPT_OVERRIDE_PREF)) ++ RNA_def_property_clear_flag(use_scripts_checkbox, PROP_EDITABLE); + } + + /* **************** link/append *************** */ +diff --git a/source/creator/creator.c b/source/creator/creator.c +index c687cc2..1da282f 100644 +--- a/source/creator/creator.c ++++ b/source/creator/creator.c +@@ -278,6 +278,7 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) + + printf("\n"); + ++ BLI_argsPrintArgDoc(ba, "-666"); + BLI_argsPrintArgDoc(ba, "--enable-autoexec"); + BLI_argsPrintArgDoc(ba, "--disable-autoexec"); + +@@ -359,14 +360,14 @@ static int end_arguments(int UNUSED(argc), const char **UNUSED(argv), void *UNUS + 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; + } + +@@ -1075,8 +1076,9 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) + + BLI_argsAdd(ba, 1, "-v", "--version", "\n\tPrint Blender version and exit", print_version, NULL); + +- BLI_argsAdd(ba, 1, "-y", "--enable-autoexec", "\n\tEnable automatic python script execution (default)", enable_python, NULL); +- BLI_argsAdd(ba, 1, "-Y", "--disable-autoexec", "\n\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes)", disable_python, NULL); ++ BLI_argsAdd(ba, 1, NULL, "-666", "\n\tEnable automatic python script execution (port from CVE-2009-3850 patch to Blender 2.49b)", enable_python, NULL); ++ BLI_argsAdd(ba, 1, "-y", "--enable-autoexec", "\n\tEnable automatic python script execution", enable_python, NULL); ++ BLI_argsAdd(ba, 1, "-Y", "--disable-autoexec", "\n\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes) (default)", disable_python, NULL); + + BLI_argsAdd(ba, 1, "-b", "--background", "<file>\n\tLoad <file> in background (often used for UI-less rendering)", background_mode, NULL); + +-- +1.7.5.rc3 + diff --git a/media-gfx/blender/files/blender-2.57-bmake.patch b/media-gfx/blender/files/blender-2.57-bmake.patch new file mode 100644 index 0000000..b78d5a4 --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-bmake.patch @@ -0,0 +1,15 @@ +--- release/plugins/bmake 2010-03-21 17:44:20.500741049 +0100 ++++ release/plugins/bmake 2010-03-21 17:44:33.659740173 +0100 +@@ -57,10 +57,10 @@ + LDFLAGS="-Bshareable"; + elif ( test $UNAME = "Linux" ) then + CC="gcc"; +- CFLAGS="-fPIC -funsigned-char -O2"; ++# CFLAGS="-fPIC -funsigned-char -O2"; + + LD="ld"; +- LDFLAGS="-Bshareable"; ++# LDFLAGS="-Bshareable"; + elif ( test $UNAME = "SunOS" ) then + CC="cc"; + CFLAGS="-O"; diff --git a/media-gfx/blender/files/blender-2.57-desktop.patch b/media-gfx/blender/files/blender-2.57-desktop.patch new file mode 100644 index 0000000..6a40e3b --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-desktop.patch @@ -0,0 +1,20 @@ +--- release/freedesktop/blender.desktop 2010-09-12 00:05:51.000000000 -0700 ++++ release/freedesktop/blender.desktop 2010-09-12 00:07:32.000000000 -0700 +@@ -1,5 +1,5 @@ + [Desktop Entry] +-Name=Blender ++Name=Blender 2.5x + GenericName=3D modeller + GenericName[es]=modelador 3D + GenericName[de]=3D Modellierer +@@ -7,8 +7,8 @@ + GenericName[ru]=Редактор 3D-моделей + Comment=3D modeling, animation, rendering and post-production + Comment[es]=modelado 3D, animación, renderizado y post-producción +-Exec=blender +-Icon=blender ++Exec=blender-2.5 ++Icon=blender-2.5.svg + Terminal=false + Type=Application + Categories=Graphics;3DGraphics; diff --git a/media-gfx/blender/files/blender-2.57-doxygen.patch b/media-gfx/blender/files/blender-2.57-doxygen.patch new file mode 100644 index 0000000..335b289 --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-doxygen.patch @@ -0,0 +1,33 @@ +--- doc/doxygen/Doxyfile 2011-02-19 18:51:40.216999981 +0100 ++++ doc/doxygen/Doxyfile 2011-02-19 18:57:46.628999965 +0100 +@@ -559,26 +559,26 @@ + # The QUIET tag can be used to turn on/off the messages that are generated + # by doxygen. Possible values are YES and NO. If left blank NO is used. + +-QUIET = NO ++QUIET = YES + + # The WARNINGS tag can be used to turn on/off the warning messages that are + # generated by doxygen. Possible values are YES and NO. If left blank + # NO is used. + +-WARNINGS = YES ++WARNINGS = NO + + # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings + # for undocumented members. If EXTRACT_ALL is set to YES then this flag will + # automatically be disabled. + +-WARN_IF_UNDOCUMENTED = YES ++WARN_IF_UNDOCUMENTED = NO + + # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for + # potential errors in the documentation, such as not documenting some + # parameters in a documented function, or documenting parameters that + # don't exist or using markup commands wrongly. + +-WARN_IF_DOC_ERROR = YES ++WARN_IF_DOC_ERROR = NO + + # The WARN_NO_PARAMDOC option can be enabled to get warnings for + # functions that are documented, but have no documentation for their parameters diff --git a/media-gfx/blender/files/blender-2.57-eigen.patch b/media-gfx/blender/files/blender-2.57-eigen.patch new file mode 100644 index 0000000..91d8af4 --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-eigen.patch @@ -0,0 +1,22 @@ +--- intern/itasc/SConscript 2009-09-26 09:14:02.000000000 +0200 ++++ intern/itasc/SConscript 2009-09-26 09:14:54.000000000 +0200 +@@ -5,7 +5,8 @@ + sources += env.Glob('kdl/*.cpp') + sources += env.Glob('kdl/utilities/*.cpp') + +-incs = '. ../../extern/Eigen2' ++#incs = '. ../../extern/Eigen2' ++incs = '. /usr/include/eigen2' + + env.BlenderLib ('bf_ITASC', sources, Split(incs), [], libtype=['intern','player'], priority=[20,100] ) + +--- source/blender/ikplugin/SConscript ++++ source/blender/ikplugin/SConscript +@@ -4,6 +4,6 @@ + sources = env.Glob('intern/*.c') + env.Glob('intern/*.cpp') + + incs = '#/intern/guardedalloc #/intern/iksolver/extern ../makesdna ../blenlib' +-incs += ' ../blenkernel ../include ../ikplugin #/intern/itasc #/extern/Eigen2' ++incs += ' ../blenkernel ../include ../ikplugin #/intern/itasc /usr/include/eigen2' + + env.BlenderLib ( 'bf_ikplugin', sources, Split(incs), [], libtype=['core','player'], priority=[180, 190] ) diff --git a/media-gfx/blender/files/blender-2.57-enable_site_module.patch b/media-gfx/blender/files/blender-2.57-enable_site_module.patch new file mode 100644 index 0000000..c38be79 --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-enable_site_module.patch @@ -0,0 +1,32 @@ +--- source/blender/python/intern/bpy_interface.c ++++ source/blender/python/intern/bpy_interface.c +@@ -244,11 +244,6 @@ + + bpy_python_start_path(); /* allow to use our own included python */ + +- /* Python 3.2 now looks for '2.57/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 +--- source/gameengine/Ketsji/KX_PythonInit.cpp ++++ source/gameengine/Ketsji/KX_PythonInit.cpp +@@ -1773,7 +1773,6 @@ + STR_String pname = progname; + Py_SetProgramName(pname.Ptr()); + #endif +- Py_NoSiteFlag=1; + Py_FrozenFlag=1; + + /* must run before python initializes */ +@@ -1843,7 +1842,6 @@ + STR_String pname = progname; + Py_SetProgramName(pname.Ptr()); + #endif +- Py_NoSiteFlag=1; + Py_FrozenFlag=1; + + initPyTypes(); diff --git a/media-gfx/blender/files/blender-2.57-glew.patch b/media-gfx/blender/files/blender-2.57-glew.patch new file mode 100644 index 0000000..5e63c7c --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-glew.patch @@ -0,0 +1,22 @@ +--- extern/SConscript ++++ extern/SConscript +@@ -2,8 +2,6 @@ + + Import('env') + +-SConscript(['glew/SConscript']) +- + if env['WITH_BF_BULLET']: + SConscript(['bullet2/src/SConscript']) + +--- source/blender/editors/include/BIF_gl.h ++++ source/blender/editors/include/BIF_gl.h +@@ -31,7 +31,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.57-insecure.desktop b/media-gfx/blender/files/blender-2.57-insecure.desktop new file mode 100644 index 0000000..e427957 --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-insecure.desktop @@ -0,0 +1,15 @@ +[Desktop Entry] +Name=Blender 2.5x (reduced security) +GenericName=3D modeller (reduced security) +GenericName[es]=modelador 3D (reduced security) +GenericName[de]=3D Modellierer (weniger Sicherheit) +GenericName[fr]=modeleur 3D (reduced security) +GenericName[ru]=Редактор 3D-моделей (reduced security) +Comment=3D modeling, animation, rendering and post-production +Comment[es]=modelado 3D, animación, renderizado y post-producción +Exec=blender-2.5 --enable-autoexec +Icon=blender-2.5.svg +Terminal=false +Type=Application +Categories=Graphics;3DGraphics; +MimeType=application/x-blender; diff --git a/media-gfx/blender/files/blender-2.57-libav-0.7.patch b/media-gfx/blender/files/blender-2.57-libav-0.7.patch new file mode 100644 index 0000000..7b4ca47 --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-libav-0.7.patch @@ -0,0 +1,296 @@ +diff -burN blender-2.57.orig//intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp blender-2.57/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp +--- blender-2.57.orig//intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2011-04-14 17:06:35.000000000 +0200 ++++ blender-2.57/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2011-05-04 01:44:30.184004582 +0200 +@@ -64,15 +64,10 @@ + + // read samples from the packet + data_size = buf_size - buf_pos; +- /*read_length = avcodec_decode_audio3(m_codecCtx, ++ read_length = avcodec_decode_audio3(m_codecCtx, + (int16_t*)(((data_t*)buffer.getBuffer())+buf_pos), + &data_size, +- packet);*/ +- read_length = avcodec_decode_audio2(m_codecCtx, +- (int16_t*)(((data_t*)buffer.getBuffer()) + buf_pos), +- &data_size, +- audio_pkg_data, +- audio_pkg_size); ++ packet); + + // read error, next packet! + if(read_length < 0) +@@ -112,7 +107,7 @@ + + for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++) + { +- if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) ++ if((m_formatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) + && (m_stream < 0)) + { + m_stream=i; +diff -burN blender-2.57.orig//source/blender/blenkernel/intern/writeffmpeg.c blender-2.57/source/blender/blenkernel/intern/writeffmpeg.c +--- blender-2.57.orig//source/blender/blenkernel/intern/writeffmpeg.c 2011-04-14 17:17:03.000000000 +0200 ++++ blender-2.57/source/blender/blenkernel/intern/writeffmpeg.c 2011-05-04 03:36:08.365219076 +0200 +@@ -163,7 +163,7 @@ + } + + pkt.stream_index = audio_stream->index; +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + if (av_interleaved_write_frame(outfile, &pkt) != 0) { + fprintf(stderr, "Error writing audio packet!\n"); + return -1; +@@ -290,7 +290,7 @@ + fprintf(stderr, "Video Frame PTS: not set\n"); + } + if (c->coded_frame->key_frame) +- packet.flags |= PKT_FLAG_KEY; ++ packet.flags |= AV_PKT_FLAG_KEY; + packet.stream_index = video_stream->index; + packet.data = video_buffer; + packet.size = outsize; +@@ -396,7 +396,7 @@ + switch(prop->type) { + case IDP_STRING: + fprintf(stderr, "%s.\n", IDP_String(prop)); +- rv = av_set_string(c, prop->name, IDP_String(prop)); ++ av_set_string3(c, prop->name, IDP_String(prop), 0, &rv); + break; + case IDP_FLOAT: + fprintf(stderr, "%g.\n", IDP_Float(prop)); +@@ -407,7 +407,7 @@ + + if (param) { + if (IDP_Int(prop)) { +- rv = av_set_string(c, name, param); ++ av_set_string3(c, name, param, 0, &rv); + } else { + return; + } +@@ -461,7 +461,7 @@ + + c = get_codec_from_stream(st); + c->codec_id = codec_id; +- c->codec_type = CODEC_TYPE_VIDEO; ++ c->codec_type = AVMEDIA_TYPE_VIDEO; + + + /* Get some values from the current render settings */ +@@ -519,7 +519,7 @@ + c->pix_fmt = PIX_FMT_YUV422P; + } + +- if (codec_id == CODEC_ID_XVID) { ++ if (codec_id == CODEC_ID_MPEG4) { + /* arghhhh ... */ + c->pix_fmt = PIX_FMT_YUV420P; + c->codec_tag = (('D'<<24) + ('I'<<16) + ('V'<<8) + 'X'); +@@ -588,7 +588,7 @@ + + c = get_codec_from_stream(st); + c->codec_id = codec_id; +- c->codec_type = CODEC_TYPE_AUDIO; ++ c->codec_type = AVMEDIA_TYPE_AUDIO; + + c->sample_rate = rd->ffcodecdata.audio_mixrate; + c->bit_rate = ffmpeg_audio_bitrate*1000; +@@ -666,13 +666,13 @@ + BKE_report(reports, RPT_ERROR, "No valid formats found."); + return 0; + } +- fmt = guess_format(NULL, exts[0], NULL); ++ fmt = av_guess_format(NULL, exts[0], NULL); + if (!fmt) { + BKE_report(reports, RPT_ERROR, "No valid formats found."); + return 0; + } + +- of = av_alloc_format_context(); ++ of = avformat_alloc_context(); + if (!of) { + BKE_report(reports, RPT_ERROR, "Error opening output file"); + return 0; +@@ -713,7 +713,7 @@ + fmt->video_codec = CODEC_ID_H264; + break; + case FFMPEG_XVID: +- fmt->video_codec = CODEC_ID_XVID; ++ fmt->video_codec = CODEC_ID_MPEG4; + break; + case FFMPEG_FLV: + fmt->video_codec = CODEC_ID_FLV1; +@@ -834,7 +834,7 @@ + fprintf(stderr, "Video Frame PTS: not set\n"); + } + if (c->coded_frame->key_frame) { +- packet.flags |= PKT_FLAG_KEY; ++ packet.flags |= AV_PKT_FLAG_KEY; + } + packet.stream_index = video_stream->index; + packet.data = video_buffer; +@@ -1314,7 +1314,7 @@ + case FFMPEG_PRESET_XVID: + if(preset == FFMPEG_PRESET_XVID) { + rd->ffcodecdata.type = FFMPEG_AVI; +- rd->ffcodecdata.codec = CODEC_ID_XVID; ++ rd->ffcodecdata.codec = CODEC_ID_MPEG4; + } + else if(preset == FFMPEG_PRESET_THEORA) { + rd->ffcodecdata.type = FFMPEG_OGG; // XXX broken +@@ -1357,7 +1357,7 @@ + } + } + else if(rd->imtype == R_XVID) { +- if(rd->ffcodecdata.codec != CODEC_ID_XVID) { ++ if(rd->ffcodecdata.codec != CODEC_ID_MPEG4) { + ffmpeg_set_preset(rd, FFMPEG_PRESET_XVID); + audio= 1; + } +diff -burN blender-2.57.orig//source/blender/imbuf/intern/anim_movie.c blender-2.57/source/blender/imbuf/intern/anim_movie.c +--- blender-2.57.orig//source/blender/imbuf/intern/anim_movie.c 2011-04-14 17:19:18.000000000 +0200 ++++ blender-2.57/source/blender/imbuf/intern/anim_movie.c 2011-05-04 03:33:56.724566283 +0200 +@@ -566,7 +566,7 @@ + videoStream=-1; + for(i=0; i<pFormatCtx->nb_streams; i++) + if(get_codec_from_stream(pFormatCtx->streams[i])->codec_type +- == CODEC_TYPE_VIDEO) { ++ == AVMEDIA_TYPE_VIDEO) { + videoStream=i; + break; + } +@@ -830,10 +830,10 @@ + && position - (anim->curposition + 1) < anim->preseek) { + while(av_read_frame(anim->pFormatCtx, &packet)>=0) { + if (packet.stream_index == anim->videoStream) { +- avcodec_decode_video( ++ avcodec_decode_video2( + anim->pCodecCtx, + anim->pFrame, &frameFinished, +- packet.data, packet.size); ++ &packet); + + if (frameFinished) { + anim->curposition++; +@@ -915,9 +915,9 @@ + + while(av_read_frame(anim->pFormatCtx, &packet)>=0) { + if(packet.stream_index == anim->videoStream) { +- avcodec_decode_video(anim->pCodecCtx, ++ avcodec_decode_video2(anim->pCodecCtx, + anim->pFrame, &frameFinished, +- packet.data, packet.size); ++ &packet); + + if (seek_by_bytes && preseek_count > 0) { + preseek_count--; +diff -burN blender-2.57.orig//source/blender/imbuf/intern/util.c blender-2.57/source/blender/imbuf/intern/util.c +--- blender-2.57.orig//source/blender/imbuf/intern/util.c 2011-04-14 17:19:18.000000000 +0200 ++++ blender-2.57/source/blender/imbuf/intern/util.c 2011-05-04 02:15:26.369208909 +0200 +@@ -292,7 +292,7 @@ + for(i=0; i<pFormatCtx->nb_streams; i++) + if(pFormatCtx->streams[i] && + get_codec_from_stream(pFormatCtx->streams[i]) && +- (get_codec_from_stream(pFormatCtx->streams[i])->codec_type==CODEC_TYPE_VIDEO)) ++ (get_codec_from_stream(pFormatCtx->streams[i])->codec_type==AVMEDIA_TYPE_VIDEO)) + { + videoStream=i; + break; +diff -burN blender-2.57.orig//source/blender/makesrna/intern/rna_scene.c blender-2.57/source/blender/makesrna/intern/rna_scene.c +--- blender-2.57.orig//source/blender/makesrna/intern/rna_scene.c 2011-04-14 17:18:53.000000000 +0200 ++++ blender-2.57/source/blender/makesrna/intern/rna_scene.c 2011-05-04 02:19:10.326319453 +0200 +@@ -2135,7 +2135,7 @@ + {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""}, + {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""}, + {CODEC_ID_H264, "H264", 0, "H.264", ""}, +- {CODEC_ID_XVID, "XVID", 0, "Xvid", ""}, ++ {CODEC_ID_MPEG4, "XVID", 0, "Xvid", ""}, + {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""}, + {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""}, + {CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""}, +diff -burN blender-2.57.orig//source/gameengine/VideoTexture/VideoFFmpeg.cpp blender-2.57/source/gameengine/VideoTexture/VideoFFmpeg.cpp +--- blender-2.57.orig//source/gameengine/VideoTexture/VideoFFmpeg.cpp 2011-04-14 17:13:34.000000000 +0200 ++++ blender-2.57/source/gameengine/VideoTexture/VideoFFmpeg.cpp 2011-05-04 02:49:31.147348425 +0200 +@@ -182,7 +182,7 @@ + { + if(formatCtx->streams[i] && + get_codec_from_stream(formatCtx->streams[i]) && +- (get_codec_from_stream(formatCtx->streams[i])->codec_type==CODEC_TYPE_VIDEO)) ++ (get_codec_from_stream(formatCtx->streams[i])->codec_type==AVMEDIA_TYPE_VIDEO)) + { + videoStream=i; + break; +@@ -368,9 +368,9 @@ + BLI_remlink(&video->m_packetCacheBase, cachePacket); + // use m_frame because when caching, it is not used in main thread + // we can't use currentFrame directly because we need to convert to RGB first +- avcodec_decode_video(video->m_codecCtx, ++ avcodec_decode_video2(video->m_codecCtx, + video->m_frame, &frameFinished, +- cachePacket->packet.data, cachePacket->packet.size); ++ &cachePacket->packet); + if(frameFinished) + { + AVFrame * input = video->m_frame; +@@ -641,7 +641,7 @@ + if (m_captRate <= 0.f) + m_captRate = defFrameRate; + sprintf(rateStr, "%f", m_captRate); +- av_parse_video_frame_rate(&frameRate, rateStr); ++ av_parse_video_rate(&frameRate, rateStr); + // populate format parameters + // need to specify the time base = inverse of rate + formatParams.time_base.num = frameRate.den; +@@ -924,10 +924,10 @@ + { + if (packet.stream_index == m_videoStream) + { +- avcodec_decode_video( ++ avcodec_decode_video2( + m_codecCtx, + m_frame, &frameFinished, +- packet.data, packet.size); ++ &packet); + if (frameFinished) + { + m_curPosition = (long)((packet.dts-startTs) * (m_baseFrameRate*timeBase) + 0.5); +@@ -999,9 +999,9 @@ + { + if(packet.stream_index == m_videoStream) + { +- avcodec_decode_video(m_codecCtx, ++ avcodec_decode_video2(m_codecCtx, + m_frame, &frameFinished, +- packet.data, packet.size); ++ &packet); + // remember dts to compute exact frame number + dts = packet.dts; + if (frameFinished && !posFound) +diff -burN blender-2.57.orig//source/gameengine/VideoTexture/VideoFFmpeg.h blender-2.57/source/gameengine/VideoTexture/VideoFFmpeg.h +--- blender-2.57.orig//source/gameengine/VideoTexture/VideoFFmpeg.h 2011-04-14 17:13:34.000000000 +0200 ++++ blender-2.57/source/gameengine/VideoTexture/VideoFFmpeg.h 2011-05-04 03:11:53.106002831 +0200 +@@ -34,6 +34,7 @@ + #include <libavformat/avformat.h> + #include <libavcodec/avcodec.h> + #include <libavutil/rational.h> ++#include <libavutil/parseutils.h> + #include <libswscale/swscale.h> + #include "DNA_listBase.h" + #include "BLI_threads.h" +diff -burN blender-2.57.orig/source/blender/blenkernel/intern/writeffmpeg.c /var/tmp/portage/media-gfx/blender-2.57-r1/work/blender-2.57/source/blender/blenkernel/intern/writeffmpeg.c +--- blender-2.57.orig/source/blender/blenkernel/intern/writeffmpeg.c 2011-11-07 13:17:59.001736099 -0800 ++++ blender-2.57/source/blender/blenkernel/intern/writeffmpeg.c 2011-11-07 13:18:35.726734562 -0800 +@@ -1101,12 +1101,12 @@ + switch (o->type) { + case FF_OPT_TYPE_INT: + case FF_OPT_TYPE_INT64: +- val.i = o->default_val; ++ val.i = o->default_val.dbl; + idp_type = IDP_INT; + break; + case FF_OPT_TYPE_DOUBLE: + case FF_OPT_TYPE_FLOAT: +- val.f = o->default_val; ++ val.f = o->default_val.dbl; + idp_type = IDP_FLOAT; + break; + case FF_OPT_TYPE_STRING: diff --git a/media-gfx/blender/files/blender-2.57-linux-3.patch b/media-gfx/blender/files/blender-2.57-linux-3.patch new file mode 100644 index 0000000..6a96b49 --- /dev/null +++ b/media-gfx/blender/files/blender-2.57-linux-3.patch @@ -0,0 +1,12 @@ +--- SConstruct 2011-10-29 05:18:43.149564401 +0200 ++++ SConstruct 2011-10-29 05:19:37.332887017 +0200 +@@ -165,6 +165,9 @@ + if crossbuild and platform not in ('win32-vc', 'win64-vc'): + platform = 'linuxcross' + ++if platform == 'linux3': ++ platform = 'linux2' # Workaround for Linux 3.x ++ + env['OURPLATFORM'] = platform + + configfile = os.path.join("build_files", "scons", "config", platform + "-config.py") diff --git a/media-gfx/blender/files/blender-2.60-bmake.patch b/media-gfx/blender/files/blender-2.60-bmake.patch new file mode 100644 index 0000000..0ce8fa7 --- /dev/null +++ b/media-gfx/blender/files/blender-2.60-bmake.patch @@ -0,0 +1,114 @@ +diff -Npur release/plugins.orig/bmake release/plugins/bmake +--- release/plugins.orig/bmake 2011-11-11 15:00:26.339924887 +0100 ++++ release/plugins/bmake 2011-11-11 15:01:40.637923565 +0100 +@@ -57,10 +57,10 @@ + LDFLAGS="-Bshareable"; + elif ( test $UNAME = "Linux" ) then + CC="gcc"; +- CFLAGS="-fPIC -funsigned-char -O2"; ++# CFLAGS="-fPIC -funsigned-char -O2"; + + LD="ld"; +- LDFLAGS="-Bshareable"; ++# LDFLAGS="-Bshareable"; + elif ( test $UNAME = "SunOS" ) then + CC="cc"; + CFLAGS="-O"; +@@ -109,22 +109,20 @@ elif ( test -f "../plugin.h" ) then + INCLUDES=-I..; + elif ( test -f "../include/plugin.h" ) then + INCLUDES=-I../include ++elif ( test -f "../../../source/blender/blenpluginapi/plugin.h" ) then ++ INCLUDES=-I../../../source/blender/blenpluginapi + else + echo "Couldn't find plugin.h"; + exit; + fi + + LIBM=`fgrep "#include <math.h>" $CFILE` +-LIBC=`fgrep "#include <std" $CFILE` + +-LIBS= ++LIBS="-lc" + + if ( test -n "$LIBM" ) then + LIBS="$LIBS -lm"; + fi +-if ( test -n "$LIBC" ) then +- LIBS="$LIBS -lc"; +-fi + + echo "$CC $CFLAGS -c $CFILE $INCLUDES" + $CC $CFLAGS -c $CFILE $INCLUDES +diff -Npur release/plugins.orig/sequence/color-correction-hsv.c release/plugins/sequence/color-correction-hsv.c +--- release/plugins.orig/sequence/color-correction-hsv.c 2011-11-11 15:00:26.339924887 +0100 ++++ release/plugins/sequence/color-correction-hsv.c 2011-11-11 15:03:47.233921332 +0100 +@@ -15,7 +15,7 @@ + * + */ + +-#include "math.h" ++#include <math.h> + #include "plugin.h" + #include <stdio.h> + +diff -Npur release/plugins.orig/sequence/color-correction-yuv.c release/plugins/sequence/color-correction-yuv.c +--- release/plugins.orig/sequence/color-correction-yuv.c 2011-11-11 15:00:26.339924887 +0100 ++++ release/plugins/sequence/color-correction-yuv.c 2011-11-11 15:02:10.446923031 +0100 +@@ -15,7 +15,7 @@ + * + */ + +-#include "math.h" ++#include <math.h> + #include "plugin.h" + #include <stdio.h> + +diff -Npur release/plugins.orig/sequence/dnr.c release/plugins/sequence/dnr.c +--- release/plugins.orig/sequence/dnr.c 2011-11-11 15:00:26.339924887 +0100 ++++ release/plugins/sequence/dnr.c 2011-11-11 15:03:30.049921648 +0100 +@@ -15,7 +15,7 @@ + * + */ + +-#include "math.h" ++#include <math.h> + #include "plugin.h" + #include <stdio.h> + +diff -Npur release/plugins.orig/sequence/gamma.c release/plugins/sequence/gamma.c +--- release/plugins.orig/sequence/gamma.c 2011-11-11 15:00:26.339924887 +0100 ++++ release/plugins/sequence/gamma.c 2011-11-11 15:01:58.982923268 +0100 +@@ -15,7 +15,7 @@ + * + */ + +-#include "math.h" ++#include <math.h> + #include "plugin.h" + #include "util.h" + #include <stdio.h> +diff -Npur release/plugins.orig/texture/clouds2.c release/plugins/texture/clouds2.c +--- release/plugins.orig/texture/clouds2.c 2011-11-11 15:00:26.339924887 +0100 ++++ release/plugins/texture/clouds2.c 2011-11-11 15:02:23.104922789 +0100 +@@ -27,7 +27,7 @@ + * ***** END GPL LICENSE BLOCK ***** + */ + +-#include "math.h" ++#include <math.h> + #include "plugin.h" + + /* ******************** GLOBAL VARIABLES ***************** */ +diff -Npur release/plugins.orig/texture/tiles.c release/plugins/texture/tiles.c +--- release/plugins.orig/texture/tiles.c 2011-11-11 15:00:26.339924887 +0100 ++++ release/plugins/texture/tiles.c 2011-11-11 15:04:05.749921038 +0100 +@@ -27,7 +27,7 @@ + * ***** END GPL LICENSE BLOCK ***** + */ + +-#include "math.h" ++#include <math.h> + #include "plugin.h" + + /* ******************** GLOBAL VARIABLES ***************** */ diff --git a/media-gfx/blender/files/blender-2.60-doxyfile.patch b/media-gfx/blender/files/blender-2.60-doxyfile.patch new file mode 100644 index 0000000..aa61c55 --- /dev/null +++ b/media-gfx/blender/files/blender-2.60-doxyfile.patch @@ -0,0 +1,11 @@ +--- blender-2.58a/doc/doxygen/Doxyfile 2011-07-11 23:27:33.975642545 -0300 ++++ blender-2.58a/doc/doxygen/Doxyfile 2011-07-11 23:28:54.913642574 -0300 +@@ -42,7 +42,7 @@ + # exceed 55 pixels and the maximum width should not exceed 200 pixels. + # Doxygen will copy the logo to the output directory. + +-PROJECT_LOGO = ../../release/freedesktop/icons/48x48/blender.png ++PROJECT_LOGO = ../../release/freedesktop/icons/48x48/apps/blender.png + + # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) + # base path where the generated documentation will be put. diff --git a/media-gfx/blender/files/blender-2.60-eigen.patch b/media-gfx/blender/files/blender-2.60-eigen.patch new file mode 100644 index 0000000..6955ee1 --- /dev/null +++ b/media-gfx/blender/files/blender-2.60-eigen.patch @@ -0,0 +1,293 @@ +--- intern/itasc/SConscript 2009-09-26 09:14:02.000000000 +0200 ++++ intern/itasc/SConscript 2009-09-26 09:14:54.000000000 +0200 +@@ -5,7 +5,8 @@ + sources += env.Glob('kdl/*.cpp') + sources += env.Glob('kdl/utilities/*.cpp') + +-incs = '. ../../extern/Eigen2' ++#incs = '. ../../extern/Eigen2' ++incs = '. /usr/include/eigen2' + + env.BlenderLib ('bf_intern_itasc', sources, Split(incs), [], libtype=['intern','player'], priority=[20,100] ) + +--- source/blender/ikplugin/SConscript ++++ source/blender/ikplugin/SConscript +@@ -4,6 +4,6 @@ + sources = env.Glob('intern/*.c') + env.Glob('intern/*.cpp') + + incs = '#/intern/guardedalloc #/intern/iksolver/extern ../makesdna ../blenlib' +-incs += ' ../blenkernel ../include ../ikplugin #/intern/itasc #/extern/Eigen2' ++incs += ' ../blenkernel ../include ../ikplugin #/intern/itasc /usr/include/eigen2' + + env.BlenderLib ( 'bf_ikplugin', sources, Split(incs), [], libtype=['core','player'], priority=[180, 190] ) +--- source/gameengine/Converter/SConscript 2009-09-26 09:14:02.000000000 +0200 ++++ source/gameengine/Converter/SConscript 2009-09-26 09:14:54.000000000 +0200 +@@ -21,7 +21,8 @@ + incs += ' #source/blender/makesrna' + incs += ' #source/blender/ikplugin' + incs += ' #extern/recastnavigation/Detour/Include' +-incs += ' #extern/Eigen2' ++#incs += ' #extern/Eigen2' ++incs += ' /usr/include/eigen2' + + incs += ' ' + env['BF_BULLET_INC'] + +--- intern/itasc/CMakeLists.txt 2011-11-10 23:34:31.391907001 +0100 ++++ intern/itasc/CMakeLists.txt 2011-11-10 23:35:17.588906231 +0100 +@@ -25,11 +25,11 @@ + # ***** END GPL LICENSE BLOCK ***** + + set(INC +- ../../extern/Eigen2 ++ /usr/include/eigen2 + ) + + set(INC_SYS +- ++ /usr/include/eigen2 + ) + + set(SRC +@@ -117,113 +117,113 @@ set(SRC + ublas_types.hpp + + # until we have another user... +- ../../extern/Eigen2/Eigen/src/Array/BooleanRedux.h +- ../../extern/Eigen2/Eigen/src/Array/CwiseOperators.h +- ../../extern/Eigen2/Eigen/src/Array/Functors.h +- ../../extern/Eigen2/Eigen/src/Array/Norms.h +- ../../extern/Eigen2/Eigen/src/Array/PartialRedux.h +- ../../extern/Eigen2/Eigen/src/Array/Random.h +- ../../extern/Eigen2/Eigen/src/Array/Select.h +- ../../extern/Eigen2/Eigen/src/Cholesky/LDLT.h +- ../../extern/Eigen2/Eigen/src/Cholesky/LLT.h +- ../../extern/Eigen2/Eigen/src/Core/Assign.h +- ../../extern/Eigen2/Eigen/src/Core/Block.h +- ../../extern/Eigen2/Eigen/src/Core/CacheFriendlyProduct.h +- ../../extern/Eigen2/Eigen/src/Core/Coeffs.h +- ../../extern/Eigen2/Eigen/src/Core/CommaInitializer.h +- ../../extern/Eigen2/Eigen/src/Core/Cwise.h +- ../../extern/Eigen2/Eigen/src/Core/CwiseBinaryOp.h +- ../../extern/Eigen2/Eigen/src/Core/CwiseNullaryOp.h +- ../../extern/Eigen2/Eigen/src/Core/CwiseUnaryOp.h +- ../../extern/Eigen2/Eigen/src/Core/DiagonalCoeffs.h +- ../../extern/Eigen2/Eigen/src/Core/DiagonalMatrix.h +- ../../extern/Eigen2/Eigen/src/Core/DiagonalProduct.h +- ../../extern/Eigen2/Eigen/src/Core/Dot.h +- ../../extern/Eigen2/Eigen/src/Core/Flagged.h +- ../../extern/Eigen2/Eigen/src/Core/Functors.h +- ../../extern/Eigen2/Eigen/src/Core/Fuzzy.h +- ../../extern/Eigen2/Eigen/src/Core/GenericPacketMath.h +- ../../extern/Eigen2/Eigen/src/Core/IO.h +- ../../extern/Eigen2/Eigen/src/Core/Map.h +- ../../extern/Eigen2/Eigen/src/Core/MapBase.h +- ../../extern/Eigen2/Eigen/src/Core/MathFunctions.h +- ../../extern/Eigen2/Eigen/src/Core/Matrix.h +- ../../extern/Eigen2/Eigen/src/Core/MatrixBase.h +- ../../extern/Eigen2/Eigen/src/Core/MatrixStorage.h +- ../../extern/Eigen2/Eigen/src/Core/Minor.h +- ../../extern/Eigen2/Eigen/src/Core/NestByValue.h +- ../../extern/Eigen2/Eigen/src/Core/NumTraits.h +- ../../extern/Eigen2/Eigen/src/Core/Part.h +- ../../extern/Eigen2/Eigen/src/Core/Product.h +- ../../extern/Eigen2/Eigen/src/Core/Redux.h +- ../../extern/Eigen2/Eigen/src/Core/SolveTriangular.h +- ../../extern/Eigen2/Eigen/src/Core/Sum.h +- ../../extern/Eigen2/Eigen/src/Core/Swap.h +- ../../extern/Eigen2/Eigen/src/Core/Transpose.h +- ../../extern/Eigen2/Eigen/src/Core/Visitor.h +- ../../extern/Eigen2/Eigen/src/Core/arch/AltiVec/PacketMath.h +- ../../extern/Eigen2/Eigen/src/Core/arch/SSE/PacketMath.h +- ../../extern/Eigen2/Eigen/src/Core/util/Constants.h +- ../../extern/Eigen2/Eigen/src/Core/util/DisableMSVCWarnings.h +- ../../extern/Eigen2/Eigen/src/Core/util/EnableMSVCWarnings.h +- ../../extern/Eigen2/Eigen/src/Core/util/ForwardDeclarations.h +- ../../extern/Eigen2/Eigen/src/Core/util/Macros.h +- ../../extern/Eigen2/Eigen/src/Core/util/Memory.h +- ../../extern/Eigen2/Eigen/src/Core/util/Meta.h +- ../../extern/Eigen2/Eigen/src/Core/util/StaticAssert.h +- ../../extern/Eigen2/Eigen/src/Core/util/XprHelper.h +- ../../extern/Eigen2/Eigen/src/Geometry/AlignedBox.h +- ../../extern/Eigen2/Eigen/src/Geometry/AngleAxis.h +- ../../extern/Eigen2/Eigen/src/Geometry/EulerAngles.h +- ../../extern/Eigen2/Eigen/src/Geometry/Hyperplane.h +- ../../extern/Eigen2/Eigen/src/Geometry/OrthoMethods.h +- ../../extern/Eigen2/Eigen/src/Geometry/ParametrizedLine.h +- ../../extern/Eigen2/Eigen/src/Geometry/Quaternion.h +- ../../extern/Eigen2/Eigen/src/Geometry/Rotation2D.h +- ../../extern/Eigen2/Eigen/src/Geometry/RotationBase.h +- ../../extern/Eigen2/Eigen/src/Geometry/Scaling.h +- ../../extern/Eigen2/Eigen/src/Geometry/Transform.h +- ../../extern/Eigen2/Eigen/src/Geometry/Translation.h +- ../../extern/Eigen2/Eigen/src/LU/Determinant.h +- ../../extern/Eigen2/Eigen/src/LU/Inverse.h +- ../../extern/Eigen2/Eigen/src/LU/LU.h +- ../../extern/Eigen2/Eigen/src/LeastSquares/LeastSquares.h +- ../../extern/Eigen2/Eigen/src/QR/EigenSolver.h +- ../../extern/Eigen2/Eigen/src/QR/HessenbergDecomposition.h +- ../../extern/Eigen2/Eigen/src/QR/QR.h +- ../../extern/Eigen2/Eigen/src/QR/SelfAdjointEigenSolver.h +- ../../extern/Eigen2/Eigen/src/QR/Tridiagonalization.h +- ../../extern/Eigen2/Eigen/src/SVD/SVD.h +- ../../extern/Eigen2/Eigen/src/Sparse/AmbiVector.h +- ../../extern/Eigen2/Eigen/src/Sparse/CholmodSupport.h +- ../../extern/Eigen2/Eigen/src/Sparse/CompressedStorage.h +- ../../extern/Eigen2/Eigen/src/Sparse/CoreIterators.h +- ../../extern/Eigen2/Eigen/src/Sparse/DynamicSparseMatrix.h +- ../../extern/Eigen2/Eigen/src/Sparse/MappedSparseMatrix.h +- ../../extern/Eigen2/Eigen/src/Sparse/RandomSetter.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseAssign.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseBlock.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseCwise.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseCwiseBinaryOp.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseCwiseUnaryOp.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseDiagonalProduct.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseDot.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseFlagged.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseFuzzy.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseLDLT.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseLLT.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseLU.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseMatrixBase.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseProduct.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseRedux.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseTranspose.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseUtil.h +- ../../extern/Eigen2/Eigen/src/Sparse/SparseVector.h +- ../../extern/Eigen2/Eigen/src/Sparse/SuperLUSupport.h +- ../../extern/Eigen2/Eigen/src/Sparse/TaucsSupport.h +- ../../extern/Eigen2/Eigen/src/Sparse/TriangularSolver.h +- ../../extern/Eigen2/Eigen/src/Sparse/UmfPackSupport.h ++ /usr/include/eigen2/Eigen/src/Array/BooleanRedux.h ++ /usr/include/eigen2/Eigen/src/Array/CwiseOperators.h ++ /usr/include/eigen2/Eigen/src/Array/Functors.h ++ /usr/include/eigen2/Eigen/src/Array/Norms.h ++ /usr/include/eigen2/Eigen/src/Array/PartialRedux.h ++ /usr/include/eigen2/Eigen/src/Array/Random.h ++ /usr/include/eigen2/Eigen/src/Array/Select.h ++ /usr/include/eigen2/Eigen/src/Cholesky/LDLT.h ++ /usr/include/eigen2/Eigen/src/Cholesky/LLT.h ++ /usr/include/eigen2/Eigen/src/Core/Assign.h ++ /usr/include/eigen2/Eigen/src/Core/Block.h ++ /usr/include/eigen2/Eigen/src/Core/CacheFriendlyProduct.h ++ /usr/include/eigen2/Eigen/src/Core/Coeffs.h ++ /usr/include/eigen2/Eigen/src/Core/CommaInitializer.h ++ /usr/include/eigen2/Eigen/src/Core/Cwise.h ++ /usr/include/eigen2/Eigen/src/Core/CwiseBinaryOp.h ++ /usr/include/eigen2/Eigen/src/Core/CwiseNullaryOp.h ++ /usr/include/eigen2/Eigen/src/Core/CwiseUnaryOp.h ++ /usr/include/eigen2/Eigen/src/Core/DiagonalCoeffs.h ++ /usr/include/eigen2/Eigen/src/Core/DiagonalMatrix.h ++ /usr/include/eigen2/Eigen/src/Core/DiagonalProduct.h ++ /usr/include/eigen2/Eigen/src/Core/Dot.h ++ /usr/include/eigen2/Eigen/src/Core/Flagged.h ++ /usr/include/eigen2/Eigen/src/Core/Functors.h ++ /usr/include/eigen2/Eigen/src/Core/Fuzzy.h ++ /usr/include/eigen2/Eigen/src/Core/GenericPacketMath.h ++ /usr/include/eigen2/Eigen/src/Core/IO.h ++ /usr/include/eigen2/Eigen/src/Core/Map.h ++ /usr/include/eigen2/Eigen/src/Core/MapBase.h ++ /usr/include/eigen2/Eigen/src/Core/MathFunctions.h ++ /usr/include/eigen2/Eigen/src/Core/Matrix.h ++ /usr/include/eigen2/Eigen/src/Core/MatrixBase.h ++ /usr/include/eigen2/Eigen/src/Core/MatrixStorage.h ++ /usr/include/eigen2/Eigen/src/Core/Minor.h ++ /usr/include/eigen2/Eigen/src/Core/NestByValue.h ++ /usr/include/eigen2/Eigen/src/Core/NumTraits.h ++ /usr/include/eigen2/Eigen/src/Core/Part.h ++ /usr/include/eigen2/Eigen/src/Core/Product.h ++ /usr/include/eigen2/Eigen/src/Core/Redux.h ++ /usr/include/eigen2/Eigen/src/Core/SolveTriangular.h ++ /usr/include/eigen2/Eigen/src/Core/Sum.h ++ /usr/include/eigen2/Eigen/src/Core/Swap.h ++ /usr/include/eigen2/Eigen/src/Core/Transpose.h ++ /usr/include/eigen2/Eigen/src/Core/Visitor.h ++ /usr/include/eigen2/Eigen/src/Core/arch/AltiVec/PacketMath.h ++ /usr/include/eigen2/Eigen/src/Core/arch/SSE/PacketMath.h ++ /usr/include/eigen2/Eigen/src/Core/util/Constants.h ++ /usr/include/eigen2/Eigen/src/Core/util/DisableMSVCWarnings.h ++ /usr/include/eigen2/Eigen/src/Core/util/EnableMSVCWarnings.h ++ /usr/include/eigen2/Eigen/src/Core/util/ForwardDeclarations.h ++ /usr/include/eigen2/Eigen/src/Core/util/Macros.h ++ /usr/include/eigen2/Eigen/src/Core/util/Memory.h ++ /usr/include/eigen2/Eigen/src/Core/util/Meta.h ++ /usr/include/eigen2/Eigen/src/Core/util/StaticAssert.h ++ /usr/include/eigen2/Eigen/src/Core/util/XprHelper.h ++ /usr/include/eigen2/Eigen/src/Geometry/AlignedBox.h ++ /usr/include/eigen2/Eigen/src/Geometry/AngleAxis.h ++ /usr/include/eigen2/Eigen/src/Geometry/EulerAngles.h ++ /usr/include/eigen2/Eigen/src/Geometry/Hyperplane.h ++ /usr/include/eigen2/Eigen/src/Geometry/OrthoMethods.h ++ /usr/include/eigen2/Eigen/src/Geometry/ParametrizedLine.h ++ /usr/include/eigen2/Eigen/src/Geometry/Quaternion.h ++ /usr/include/eigen2/Eigen/src/Geometry/Rotation2D.h ++ /usr/include/eigen2/Eigen/src/Geometry/RotationBase.h ++ /usr/include/eigen2/Eigen/src/Geometry/Scaling.h ++ /usr/include/eigen2/Eigen/src/Geometry/Transform.h ++ /usr/include/eigen2/Eigen/src/Geometry/Translation.h ++ /usr/include/eigen2/Eigen/src/LU/Determinant.h ++ /usr/include/eigen2/Eigen/src/LU/Inverse.h ++ /usr/include/eigen2/Eigen/src/LU/LU.h ++ /usr/include/eigen2/Eigen/src/LeastSquares/LeastSquares.h ++ /usr/include/eigen2/Eigen/src/QR/EigenSolver.h ++ /usr/include/eigen2/Eigen/src/QR/HessenbergDecomposition.h ++ /usr/include/eigen2/Eigen/src/QR/QR.h ++ /usr/include/eigen2/Eigen/src/QR/SelfAdjointEigenSolver.h ++ /usr/include/eigen2/Eigen/src/QR/Tridiagonalization.h ++ /usr/include/eigen2/Eigen/src/SVD/SVD.h ++ /usr/include/eigen2/Eigen/src/Sparse/AmbiVector.h ++ /usr/include/eigen2/Eigen/src/Sparse/CholmodSupport.h ++ /usr/include/eigen2/Eigen/src/Sparse/CompressedStorage.h ++ /usr/include/eigen2/Eigen/src/Sparse/CoreIterators.h ++ /usr/include/eigen2/Eigen/src/Sparse/DynamicSparseMatrix.h ++ /usr/include/eigen2/Eigen/src/Sparse/MappedSparseMatrix.h ++ /usr/include/eigen2/Eigen/src/Sparse/RandomSetter.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseAssign.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseBlock.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseCwise.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseCwiseBinaryOp.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseCwiseUnaryOp.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseDiagonalProduct.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseDot.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseFlagged.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseFuzzy.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseLDLT.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseLLT.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseLU.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseMatrix.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseMatrixBase.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseProduct.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseRedux.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseTranspose.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseUtil.h ++ /usr/include/eigen2/Eigen/src/Sparse/SparseVector.h ++ /usr/include/eigen2/Eigen/src/Sparse/SuperLUSupport.h ++ /usr/include/eigen2/Eigen/src/Sparse/TaucsSupport.h ++ /usr/include/eigen2/Eigen/src/Sparse/TriangularSolver.h ++ /usr/include/eigen2/Eigen/src/Sparse/UmfPackSupport.h + ) + + blender_add_lib(bf_intern_itasc "${SRC}" "${INC}" "${INC_SYS}") +--- source/blender/ikplugin/CMakeLists.txt 2011-11-10 23:34:31.391907001 +0100 ++++ source/blender/ikplugin/CMakeLists.txt 2011-11-10 23:35:17.588906231 +0100 +@@ -50,7 +50,7 @@ + if(WITH_IK_ITASC) + add_definitions(-DWITH_IK_ITASC) + list(APPEND INC +- ../../../extern/Eigen2 ++ /usr/include/eigen2 + ../../../intern/itasc + ) + list(APPEND SRC +--- source/gameengine/Converter/CMakeLists.txt 2011-11-10 23:34:31.391907001 +0100 ++++ source/gameengine/Converter/CMakeLists.txt 2011-11-10 23:35:17.588906231 +0100 +@@ -51,7 +51,7 @@ + ../../blender/makesrna + ../../blender/windowmanager + ../../../extern/bullet2/src +- ../../../extern/Eigen2 ++ /usr/include/eigen2 + ../../../intern/container + ../../../intern/guardedalloc + ../../../intern/moto/include diff --git a/media-gfx/blender/files/blender-2.60-glew.patch b/media-gfx/blender/files/blender-2.60-glew.patch new file mode 100644 index 0000000..edc0c9b --- /dev/null +++ b/media-gfx/blender/files/blender-2.60-glew.patch @@ -0,0 +1,48 @@ +--- extern/SConscript ++++ extern/SConscript +@@ -2,8 +2,6 @@ + + Import('env') + +-SConscript(['glew/SConscript']) +- + if env['WITH_BF_GAMEENGINE']: + SConscript(['recastnavigation/SConscript']) + + if env['WITH_BF_ELTOPO']: + SConscript(['eltopo/SConscript']) + +--- source/blender/editors/include/BIF_gl.h ++++ source/blender/editors/include/BIF_gl.h +@@ -35,7 +35,7 @@ + #ifndef BIF_GL_H + #define BIF_GL_H + +-#include "GL/glew.h" ++#include <GL/glew.h> + + /* + * these should be phased out. cpack should be replaced in +--- extern/CMakeLists.txt ++++ extern/CMakeLists.txt +@@ -39,9 +39,6 @@ + add_subdirectory(binreloc) + endif() + +-if(WITH_BUILTIN_GLEW) +- add_subdirectory(glew) +-endif() + + if(WITH_GAMEENGINE) + add_subdirectory(recastnavigation) +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -150,7 +150,7 @@ + + if(UNIX AND NOT APPLE) + option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support)" 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) + else() + # not an option for other OS's + set(WITH_BUILTIN_GLEW ON) diff --git a/media-gfx/blender/files/blender-2.60-openjpeg.patch b/media-gfx/blender/files/blender-2.60-openjpeg.patch new file mode 100644 index 0000000..74f6441 --- /dev/null +++ b/media-gfx/blender/files/blender-2.60-openjpeg.patch @@ -0,0 +1,37 @@ +diff -Npur blender-2.60a.orig/extern/libredcode/SConscript blender-2.60a/extern/libredcode/SConscript +--- blender-2.60a.orig/extern/libredcode/SConscript 2011-11-09 23:05:16.241465491 +0100 ++++ blender-2.60a/extern/libredcode/SConscript 2011-11-09 23:06:24.188464236 +0100 +@@ -7,7 +7,8 @@ + Import('env') + + sources = env.Glob('*.c') +-incs = '. ../libopenjpeg' ++#incs = '. ../libopenjpeg' ++incs = '. /usr/include' + + env.BlenderLib ( libname='extern_redcode', + sources=sources, includes=Split(incs), +diff -Npur blender-2.60a.orig/extern/SConscript blender-2.60a/extern/SConscript +--- blender-2.60a.orig/extern/SConscript 2011-11-09 23:05:16.241465491 +0100 ++++ blender-2.60a/extern/SConscript 2011-11-09 23:06:24.188464236 +0100 +@@ -11,8 +11,5 @@ + if env['WITH_BF_BULLET']: + SConscript(['bullet2/src/SConscript']) + +-if env['WITH_BF_OPENJPEG'] and env['BF_OPENJPEG_LIB'] == '': +- SConscript(['libopenjpeg/SConscript']) +- + if env['WITH_BF_REDCODE'] and env['BF_REDCODE_LIB'] == '': + SConscript(['libredcode/SConscript']) +diff -Npur blender-2.60a.orig/build_files/scons/tools/Blender.py blender-2.60a/build_files/scons/tools/Blender.py +--- blender-2.60a.orig/build_files/scons/tools/Blender.py 2011-11-09 23:05:16.241465491 +0100 ++++ blender-2.60a/build_files/scons/tools/Blender.py 2011-11-09 23:06:24.188464236 +0100 +@@ -246,6 +246,8 @@ + syslibs += Split(lenv['BF_FFMPEG_LIB']) + if lenv['WITH_BF_OGG']: + syslibs += Split(lenv['BF_OGG_LIB']) ++ if lenv['WITH_BF_OPENJPEG']: ++ syslibs += Split(lenv['BF_OPENJPEG_LIB']) + if lenv['WITH_BF_JACK']: + syslibs += Split(lenv['BF_JACK_LIB']) + if lenv['WITH_BF_SNDFILE'] and not lenv['WITH_BF_STATICSNDFILE']: diff --git a/media-gfx/blender/files/blender-2.60a-CVE-2009-3850-v3.patch b/media-gfx/blender/files/blender-2.60a-CVE-2009-3850-v3.patch new file mode 100644 index 0000000..fc0278d --- /dev/null +++ b/media-gfx/blender/files/blender-2.60a-CVE-2009-3850-v3.patch @@ -0,0 +1,149 @@ +diff -Npur blender-2.60a.orig/source/blender/blenkernel/intern/blender.c blender-2.60a/source/blender/blenkernel/intern/blender.c +--- blender-2.60a.orig/source/blender/blenkernel/intern/blender.c 2011-11-09 20:56:11.905602401 +0100 ++++ blender-2.60a/source/blender/blenkernel/intern/blender.c 2011-11-09 20:56:42.827601857 +0100 +@@ -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.60a.orig/source/blender/makesrna/intern/rna_userdef.c blender-2.60a/source/blender/makesrna/intern/rna_userdef.c +--- blender-2.60a.orig/source/blender/makesrna/intern/rna_userdef.c 2011-11-09 20:56:12.003602399 +0100 ++++ blender-2.60a/source/blender/makesrna/intern/rna_userdef.c 2011-11-09 21:02:43.204595484 +0100 +@@ -116,9 +116,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) +@@ -2630,6 +2638,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.60a.orig/source/blender/windowmanager/intern/wm_files.c blender-2.60a/source/blender/windowmanager/intern/wm_files.c +--- blender-2.60a.orig/source/blender/windowmanager/intern/wm_files.c 2011-11-09 20:56:12.458602413 +0100 ++++ blender-2.60a/source/blender/windowmanager/intern/wm_files.c 2011-11-09 21:05:16.768592770 +0100 +@@ -285,12 +285,17 @@ 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_where_is_temp(btempdir, FILE_MAX, 1); ++ ++ /* 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.60a.orig/source/blender/windowmanager/intern/wm_operators.c blender-2.60a/source/blender/windowmanager/intern/wm_operators.c +--- blender-2.60a.orig/source/blender/windowmanager/intern/wm_operators.c 2011-11-09 20:56:12.458602413 +0100 ++++ blender-2.60a/source/blender/windowmanager/intern/wm_operators.c 2011-11-09 21:07:09.746590772 +0100 +@@ -1583,12 +1583,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); +@@ -1600,6 +1601,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"; +@@ -1611,7 +1614,12 @@ static void WM_OT_open_mainfile(wmOperat + WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH); + + RNA_def_boolean(ot->srna, "load_ui", 1, "Load UI", "Load user interface setup in the .blend file"); +- RNA_def_boolean(ot->srna, "use_scripts", 1, "Trusted Source", "Allow blend file execute scripts automatically, default available from system preferences"); ++ use_scripts_checkbox = RNA_def_boolean(ot->srna, "use_scripts", ++ !!(G.f & G_SCRIPT_AUTOEXEC), "Trusted Source", ++ "Allow blend file execute scripts automatically, default available from system preferences"); ++ /* Disable "Trusted Source" checkbox unless Blender run with --enable-autoexec */ ++ if (use_scripts_checkbox && (G.f & G_SCRIPT_OVERRIDE_PREF)) ++ RNA_def_property_clear_flag(use_scripts_checkbox, PROP_EDITABLE); + } + + /* **************** link/append *************** */ +diff -Npur blender-2.60a.orig/source/creator/creator.c blender-2.60a/source/creator/creator.c +--- blender-2.60a.orig/source/creator/creator.c 2011-11-09 20:56:11.899602401 +0100 ++++ blender-2.60a/source/creator/creator.c 2011-11-09 21:17:22.278579932 +0100 +@@ -258,6 +258,7 @@ static int print_help(int UNUSED(argc), + + printf("\n"); + ++ BLI_argsPrintArgDoc(ba, "-666"); + BLI_argsPrintArgDoc(ba, "--enable-autoexec"); + BLI_argsPrintArgDoc(ba, "--disable-autoexec"); + +@@ -326,14 +327,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; + } + +@@ -1055,8 +1056,9 @@ static void setupArguments(bContext *C, + # define PY_DISABLE_AUTO ", (compiled as non-standard default)" + #endif + +- BLI_argsAdd(ba, 1, "-y", "--enable-autoexec", "\n\tEnable automatic python script execution" PY_ENABLE_AUTO, enable_python, NULL); +- BLI_argsAdd(ba, 1, "-Y", "--disable-autoexec", "\n\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes)" PY_DISABLE_AUTO, disable_python, NULL); ++ BLI_argsAdd(ba, 1, NULL, "-666", "\n\tEnable automatic python script execution (port from CVE-2009-3850 patch to Blender 2.60a)" PY_ENABLE_AUTO, enable_python, NULL); ++ BLI_argsAdd(ba, 1, "-y", "--enable-autoexec", "\n\tEnable automatic python script execution" PY_ENABLE_AUTO, enable_python, NULL); ++ BLI_argsAdd(ba, 1, "-Y", "--disable-autoexec", "\n\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes)" PY_DISABLE_AUTO, disable_python, NULL); + + #undef PY_ENABLE_AUTO + #undef PY_DISABLE_AUTO diff --git a/media-gfx/blender/files/blender-2.60a-collada.patch b/media-gfx/blender/files/blender-2.60a-collada.patch new file mode 100644 index 0000000..980b640 --- /dev/null +++ b/media-gfx/blender/files/blender-2.60a-collada.patch @@ -0,0 +1,11 @@ +--- source/blender/collada/SConscript 2012-01-16 19:04:02.438027832 +0100 ++++ source/blender/collada/SConscript 2012-01-16 19:03:59.787060970 +0100 +@@ -35,7 +35,7 @@ + if env['OURPLATFORM']=='darwin': + incs = '../blenlib ../blenkernel ../windowmanager ../blenloader ../makesdna ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter [OPENCOLLADA]/COLLADABaseUtils [OPENCOLLADA]/COLLADAFramework [OPENCOLLADA]/COLLADASaxFrameworkLoader [OPENCOLLADA]/GeneratedSaxParser '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) + else: +- incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../blenloader ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter/include [OPENCOLLADA]/COLLADABaseUtils/include [OPENCOLLADA]/COLLADAFramework/include [OPENCOLLADA]/COLLADASaxFrameworkLoader/include [OPENCOLLADA]/GeneratedSaxParser/include '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) ++ incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../blenloader ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter [OPENCOLLADA]/COLLADABaseUtils [OPENCOLLADA]/COLLADAFramework [OPENCOLLADA]/COLLADASaxFrameworkLoader [OPENCOLLADA]/GeneratedSaxParser '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) + + if env['BF_BUILDINFO']: + defs.append('WITH_BUILDINFO') diff --git a/media-gfx/blender/files/blender-2.60a-desktop.patch b/media-gfx/blender/files/blender-2.60a-desktop.patch new file mode 100644 index 0000000..c774cbe --- /dev/null +++ b/media-gfx/blender/files/blender-2.60a-desktop.patch @@ -0,0 +1,20 @@ +--- release/freedesktop/blender.desktop 2010-09-12 00:05:51.000000000 -0700 ++++ release/freedesktop/blender.desktop 2010-09-12 00:07:32.000000000 -0700 +@@ -1,5 +1,5 @@ + [Desktop Entry] +-Name=Blender ++Name=Blender-2.60a + GenericName=3D modeller + GenericName[es]=modelador 3D + GenericName[de]=3D Modellierer +@@ -7,8 +7,8 @@ + GenericName[ru]=Редактор 3D-моделей + Comment=3D modeling, animation, rendering and post-production + Comment[es]=modelado 3D, animación, renderizado y post-producción +-Exec=blender +-Icon=blender ++Exec=blender-2.60 ++Icon=blender-2.60 + Terminal=false + Type=Application + Categories=Graphics;3DGraphics; diff --git a/media-gfx/blender/files/blender-2.60a-enable_site_module.patch b/media-gfx/blender/files/blender-2.60a-enable_site_module.patch new file mode 100644 index 0000000..8a44c36 --- /dev/null +++ b/media-gfx/blender/files/blender-2.60a-enable_site_module.patch @@ -0,0 +1,32 @@ +--- source/blender/python/intern/bpy_interface.c ++++ source/blender/python/intern/bpy_interface.c +@@ -203,11 +203,6 @@ + /* allow to use our own included python */ + PyC_SetHomePath(BLI_get_folder(BLENDER_SYSTEM_PYTHON, NULL)); + +- /* Python 3.2 now looks for '2.58/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 +--- source/gameengine/Ketsji/KX_PythonInit.cpp ++++ source/gameengine/Ketsji/KX_PythonInit.cpp +@@ -1825,7 +1825,6 @@ + STR_String pname = progname; + Py_SetProgramName(pname.Ptr()); + #endif +- Py_NoSiteFlag=1; + Py_FrozenFlag=1; + + /* must run before python initializes */ +@@ -1898,7 +1897,6 @@ + STR_String pname = progname; + Py_SetProgramName(pname.Ptr()); + #endif +- Py_NoSiteFlag=1; + Py_FrozenFlag=1; + + initPyTypes(); diff --git a/media-gfx/blender/files/blender-2.60a-insecure.desktop b/media-gfx/blender/files/blender-2.60a-insecure.desktop new file mode 100644 index 0000000..d033ae9 --- /dev/null +++ b/media-gfx/blender/files/blender-2.60a-insecure.desktop @@ -0,0 +1,15 @@ +[Desktop Entry] +Name=Blender-2.60a (reduced security) +GenericName=3D modeller (reduced security) +GenericName[es]=modelador 3D (reduced security) +GenericName[de]=3D Modellierer (weniger Sicherheit) +GenericName[fr]=modeleur 3D (reduced security) +GenericName[ru]=Редактор 3D-моделей (reduced security) +Comment=3D modeling, animation, rendering and post-production +Comment[es]=modelado 3D, animación, renderizado y post-producción +Exec=blender-2.60 --enable-autoexec +Icon=blender-2.60 +Terminal=false +Type=Application +Categories=Graphics;3DGraphics; +MimeType=application/x-blender; diff --git a/media-gfx/blender/files/blender-2.60a-libav-0.7.patch b/media-gfx/blender/files/blender-2.60a-libav-0.7.patch new file mode 100644 index 0000000..3bae020 --- /dev/null +++ b/media-gfx/blender/files/blender-2.60a-libav-0.7.patch @@ -0,0 +1,30 @@ +--- blender-2.60a.orig/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp 2011-10-24 20:09:01.000000000 +0200 ++++ blender-2.60a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp 2011-11-13 12:34:01.000000000 +0100 +@@ -40,6 +40,8 @@ + #include <libavcodec/avcodec.h> + #include <libavformat/avformat.h> + #include <libavformat/avio.h> ++#include <libavutil/mathematics.h> ++#include <libavutil/avstring.h> + #include "ffmpeg_compat.h" + } + +@@ -57,10 +58,15 @@ + { + static const char* formats[] = { NULL, "ac3", "flac", "matroska", "mp2", "mp3", "ogg", "wav" }; + +- if(avformat_alloc_output_context2(&m_formatCtx, NULL, formats[format], filename.c_str())) +- AUD_THROW(AUD_ERROR_FFMPEG, context_error); ++ m_formatCtx = avformat_alloc_context(); ++ if (!m_formatCtx) AUD_THROW(AUD_ERROR_FFMPEG, context_error); + +- m_outputFmt = m_formatCtx->oformat; ++ av_strlcpy(m_formatCtx->filename, filename.c_str(), sizeof(m_formatCtx->filename)); ++ m_outputFmt = m_formatCtx->oformat = av_guess_format(formats[format], filename.c_str(), NULL); ++ if (!m_outputFmt) { ++ avformat_free_context(m_formatCtx); ++ AUD_THROW(AUD_ERROR_FFMPEG, context_error); ++ } + + switch(codec) + { diff --git a/media-gfx/blender/files/blender-2.60a-linux-3.patch b/media-gfx/blender/files/blender-2.60a-linux-3.patch new file mode 100644 index 0000000..6a96b49 --- /dev/null +++ b/media-gfx/blender/files/blender-2.60a-linux-3.patch @@ -0,0 +1,12 @@ +--- SConstruct 2011-10-29 05:18:43.149564401 +0200 ++++ SConstruct 2011-10-29 05:19:37.332887017 +0200 +@@ -165,6 +165,9 @@ + if crossbuild and platform not in ('win32-vc', 'win64-vc'): + platform = 'linuxcross' + ++if platform == 'linux3': ++ platform = 'linux2' # Workaround for Linux 3.x ++ + env['OURPLATFORM'] = platform + + configfile = os.path.join("build_files", "scons", "config", platform + "-config.py") diff --git a/media-gfx/blender/files/blender.desktop b/media-gfx/blender/files/blender.desktop new file mode 100644 index 0000000..14cef34 --- /dev/null +++ b/media-gfx/blender/files/blender.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Blender 2.4x +Comment=3D modeling, animation, rendering and post-production. +Exec=blender +Icon=blender +Terminal=0 +Type=Application +Categories=Graphics;Application; diff --git a/media-gfx/blender/files/blender.png b/media-gfx/blender/files/blender.png Binary files differnew file mode 100644 index 0000000..864a97a --- /dev/null +++ b/media-gfx/blender/files/blender.png |