summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/blender/files')
-rw-r--r--media-gfx/blender/files/blender-2.37-dirs.patch16
-rw-r--r--media-gfx/blender/files/blender-2.44-scriptsdir.patch91
-rw-r--r--media-gfx/blender/files/blender-2.46-cve-2008-1103-1.patch12
-rw-r--r--media-gfx/blender/files/blender-2.46-ffmpeg.patch100
-rw-r--r--media-gfx/blender/files/blender-2.48-ffmpeg-20081014.patch25
-rw-r--r--media-gfx/blender/files/blender-2.48a-CVE-2008-4863.patch15
-rw-r--r--media-gfx/blender/files/blender-2.49a-bake.patch13
-rw-r--r--media-gfx/blender/files/blender-2.49a-sys-openjpeg.patch11
-rw-r--r--media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v3.patch105
-rw-r--r--media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v4.patch139
-rw-r--r--media-gfx/blender/files/blender-2.49b-insecure.desktop9
-rw-r--r--media-gfx/blender/files/blender-2.49b-libav-0.7.patch425
-rw-r--r--media-gfx/blender/files/blender-2.49b-subversion-1.7.patch14
-rw-r--r--media-gfx/blender/files/blender-2.57-CVE-2009-3850-v1.patch105
-rw-r--r--media-gfx/blender/files/blender-2.57-CVE-2009-3850-v2.patch172
15 files changed, 0 insertions, 1252 deletions
diff --git a/media-gfx/blender/files/blender-2.37-dirs.patch b/media-gfx/blender/files/blender-2.37-dirs.patch
deleted file mode 100644
index 1b6837f..0000000
--- a/media-gfx/blender/files/blender-2.37-dirs.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-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
deleted file mode 100644
index 398ccc5..0000000
--- a/media-gfx/blender/files/blender-2.44-scriptsdir.patch
+++ /dev/null
@@ -1,91 +0,0 @@
---- 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
deleted file mode 100644
index c45a811..0000000
--- a/media-gfx/blender/files/blender-2.46-cve-2008-1103-1.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-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
deleted file mode 100644
index b06854c..0000000
--- a/media-gfx/blender/files/blender-2.46-ffmpeg.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-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
deleted file mode 100644
index 93ae633..0000000
--- a/media-gfx/blender/files/blender-2.48-ffmpeg-20081014.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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
deleted file mode 100644
index 3162a0d..0000000
--- a/media-gfx/blender/files/blender-2.48a-CVE-2008-4863.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-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
deleted file mode 100644
index 53674da..0000000
--- a/media-gfx/blender/files/blender-2.49a-bake.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644
index a9e46ea..0000000
--- a/media-gfx/blender/files/blender-2.49a-sys-openjpeg.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index 9cf17a5..0000000
--- a/media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v3.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-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
deleted file mode 100644
index 9349879..0000000
--- a/media-gfx/blender/files/blender-2.49b-CVE-2009-3850-v4.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-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
deleted file mode 100644
index 6b36a0a..0000000
--- a/media-gfx/blender/files/blender-2.49b-insecure.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[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
deleted file mode 100644
index d0661ad..0000000
--- a/media-gfx/blender/files/blender-2.49b-libav-0.7.patch
+++ /dev/null
@@ -1,425 +0,0 @@
-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
deleted file mode 100644
index 34b4b8a..0000000
--- a/media-gfx/blender/files/blender-2.49b-subversion-1.7.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- 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
deleted file mode 100644
index 9c0f39f..0000000
--- a/media-gfx/blender/files/blender-2.57-CVE-2009-3850-v1.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-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
deleted file mode 100644
index 526e0f7..0000000
--- a/media-gfx/blender/files/blender-2.57-CVE-2009-3850-v2.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-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
-