summaryrefslogtreecommitdiff
path: root/graphics/blender/patches
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/blender/patches')
-rw-r--r--graphics/blender/patches/patch-SConstruct26
-rw-r--r--graphics/blender/patches/patch-ab44
-rw-r--r--graphics/blender/patches/patch-ac21
-rw-r--r--graphics/blender/patches/patch-ad13
-rw-r--r--graphics/blender/patches/patch-ah22
-rw-r--r--graphics/blender/patches/patch-ai43
-rw-r--r--graphics/blender/patches/patch-aj12
-rw-r--r--graphics/blender/patches/patch-ak13
-rw-r--r--graphics/blender/patches/patch-al13
-rw-r--r--graphics/blender/patches/patch-am16
-rw-r--r--graphics/blender/patches/patch-build__files_scons_config_netbsd6-config.py233
-rw-r--r--graphics/blender/patches/patch-build__files_scons_tools_btools.py16
-rw-r--r--graphics/blender/patches/patch-doc_python__api_sphinx__doc__gen.sh15
-rw-r--r--graphics/blender/patches/patch-extern_bullet2_src_BulletSoftBody_btSoftBodyInternals.h16
-rw-r--r--graphics/blender/patches/patch-extern_libmv_libmv_numeric_numeric.h13
-rw-r--r--graphics/blender/patches/patch-extern_libmv_libmv_tracking_brute__region__tracker.cc22
-rw-r--r--graphics/blender/patches/patch-extern_libmv_third__party_glog_src_config.h15
-rw-r--r--graphics/blender/patches/patch-extern_libmv_third__party_glog_src_config__netbsd.h178
-rw-r--r--graphics/blender/patches/patch-extern_libmv_third__party_glog_src_utilities.h15
-rw-r--r--graphics/blender/patches/patch-extern_solid_include_MT_Quaternion.h13
-rw-r--r--graphics/blender/patches/patch-extern_solid_src_complex_DT__BBoxTree.h20
-rw-r--r--graphics/blender/patches/patch-extern_solid_src_complex_DT__Complex.cpp20
-rw-r--r--graphics/blender/patches/patch-intern_elbeem_intern_ntl__vector3dim.h17
-rw-r--r--graphics/blender/patches/patch-intern_elbeem_intern_utilities.h17
-rw-r--r--graphics/blender/patches/patch-intern_ghost_SConscript15
-rw-r--r--graphics/blender/patches/patch-intern_guardedalloc_MEM__sys__types.h13
-rw-r--r--graphics/blender/patches/patch-intern_opennl_superlu_superlu__sys__types.h13
-rw-r--r--graphics/blender/patches/patch-source_blender_python_BPY__interface.c21
-rw-r--r--graphics/blender/patches/patch-user-config.py9
29 files changed, 606 insertions, 298 deletions
diff --git a/graphics/blender/patches/patch-SConstruct b/graphics/blender/patches/patch-SConstruct
new file mode 100644
index 00000000000..54b97cb6235
--- /dev/null
+++ b/graphics/blender/patches/patch-SConstruct
@@ -0,0 +1,26 @@
+$NetBSD: patch-SConstruct,v 1.1 2012/12/03 13:15:50 ryoon Exp $
+
+--- SConstruct.orig 2012-10-09 18:43:46.000000000 +0000
++++ SConstruct
+@@ -140,20 +140,7 @@ else:
+ B.quickie=[]
+
+ toolset = B.arguments.get('BF_TOOLSET', None)
+-if toolset:
+- print "Using " + toolset
+- if toolset=='mstoolkit':
+- env = BlenderEnvironment(ENV = os.environ)
+- env.Tool('mstoolkit', [toolpath])
+- else:
+- env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
+- if env:
+- btools.SetupSpawn(env)
+-else:
+- if bitness==64 and platform=='win32':
+- env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64')
+- else:
+- env = BlenderEnvironment(ENV = os.environ)
++env = BlenderEnvironment(ENV = os.environ)
+
+ if not env:
+ print "Could not create a build environment"
diff --git a/graphics/blender/patches/patch-ab b/graphics/blender/patches/patch-ab
index 3497a8784c9..020eeb0ba78 100644
--- a/graphics/blender/patches/patch-ab
+++ b/graphics/blender/patches/patch-ab
@@ -1,45 +1,31 @@
-$NetBSD: patch-ab,v 1.8 2009/11/03 19:06:51 markd Exp $
+$NetBSD: patch-ab,v 1.9 2012/12/03 13:15:50 ryoon Exp $
---- source/blender/blenlib/intern/storage.c.orig 2009-05-25 19:46:22 +0300
-+++ source/blender/blenlib/intern/storage.c 2009-08-28 21:32:31 +0300
-@@ -47,7 +47,7 @@
+--- source/blender/blenlib/intern/storage.c.orig 2012-10-09 18:40:29.000000000 +0000
++++ source/blender/blenlib/intern/storage.c
+@@ -43,7 +43,7 @@
#include <time.h>
#include <sys/stat.h>
--#if defined (__sun__) || defined (__sun) || defined (__sgi)
-+#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined(__DragonFly__) || defined (__NetBSD__)
+-#if defined(__sun__) || defined(__sun) || defined(__NetBSD__)
++#if defined(__sun__) || defined(__sun) || defined(__NetBSD__) || defined(__DragonFly__)
#include <sys/statvfs.h> /* Other modern unix os's should probably use this also */
#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__))
#include <sys/statfs.h>
-@@ -88,10 +88,6 @@ struct statfs {
- #include <pwd.h>
- #endif
-
--#if !defined(__FreeBSD__) && !defined(__APPLE__)
--#include <malloc.h>
--#endif
--
- /* lib includes */
- #include "MEM_guardedalloc.h"
-
-@@ -179,7 +175,7 @@ double BLI_diskfree(char *dir)
- return (double) (freec*bytesps*sectorspc);
+@@ -163,7 +163,7 @@ double BLI_dir_free_space(const char *di
+ return (double) (freec * bytesps * sectorspc);
#else
--#if defined (__sun__) || defined (__sun) || defined (__sgi)
-+#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined(__DragonFly__) || defined (__NetBSD__)
+-#if defined(__sun__) || defined(__sun) || defined(__NetBSD__)
++#if defined(__sun__) || defined(__sun) || defined(__NetBSD__) || defined(__DragonFly__)
struct statvfs disk;
#else
struct statfs disk;
-@@ -204,9 +200,9 @@ double BLI_diskfree(char *dir)
- return -1;
+@@ -186,7 +186,7 @@ double BLI_dir_free_space(const char *di
+ if (statfs(name, &disk)) return(-1);
#endif
--#if defined (__sun__) || defined (__sun) || defined (__sgi)
-+#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined(__DragonFly__) || defined (__NetBSD__)
+-#if defined(__sun__) || defined(__sun) || defined(__NetBSD__)
++#if defined(__sun__) || defined(__sun) || defined(__NetBSD__) || defined(__DragonFly__)
if (statvfs(name, &disk)) return(-1);
--#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__))
-+#elif !defined(__FreeBSD__) && !defined(linux) && !defined (__OpenBSD__) && !defined (__NetBSD__) && (defined(__sparc) || defined(__sparc__))
+ #elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__))
/* WARNING - This may not be supported by geeneric unix os's - Campbell */
- if (statfs(name, &disk, sizeof(struct statfs), 0)) return(-1);
- #endif
diff --git a/graphics/blender/patches/patch-ac b/graphics/blender/patches/patch-ac
deleted file mode 100644
index 6e2b5723870..00000000000
--- a/graphics/blender/patches/patch-ac
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2005/02/26 20:34:43 reinoud Exp $
-
---- source/nan_warn.mk.orig 2004-09-01 14:09:22.000000000 +0200
-+++ source/nan_warn.mk
-@@ -35,11 +35,11 @@
- #
-
- # Force the correct redefinition
--LEVEL_1_C_WARNINGS = -FIX_NAN_WARN
--LEVEL_1_CPP_WARNINGS = -FIX_NAN_WARN
--LEVEL_2_C_WARNINGS = -FIX_NAN_WARN
--LEVEL_2_CPP_WARNINGS = -FIX_NAN_WARN
--FIX_STUBS_WARNINGS = -FIX_NAN_WARN
-+LEVEL_1_C_WARNINGS = -DFIX_NAN_WARN
-+LEVEL_1_CPP_WARNINGS = -DFIX_NAN_WARN
-+LEVEL_2_C_WARNINGS = -DFIX_NAN_WARN
-+LEVEL_2_CPP_WARNINGS = -DFIX_NAN_WARN
-+FIX_STUBS_WARNINGS = -DFIX_NAN_WARN
-
- ########################################################################
- # Level 1: basic C warnings.
diff --git a/graphics/blender/patches/patch-ad b/graphics/blender/patches/patch-ad
deleted file mode 100644
index d30cfaaa999..00000000000
--- a/graphics/blender/patches/patch-ad
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ad,v 1.5 2009/08/28 20:46:19 hasso Exp $
-
---- extern/bFTGL/src/FTVectoriser.cpp.orig 2007-11-05 15:05:58 +0200
-+++ extern/bFTGL/src/FTVectoriser.cpp 2009-08-28 21:34:45 +0300
-@@ -11,7 +11,7 @@
- #else
- typedef GLvoid (*GLUTesselatorFunction)(...);
- #endif
--#elif defined( __mips ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __sun ) || defined (__CYGWIN__)
-+#elif defined( __mips ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __sun ) || defined (__CYGWIN__) || defined( __NetBSD__ ) || defined(__DragonFly__)
- typedef GLvoid (*GLUTesselatorFunction)();
- #elif defined ( WIN32)
- typedef GLvoid (CALLBACK *GLUTesselatorFunction)( );
diff --git a/graphics/blender/patches/patch-ah b/graphics/blender/patches/patch-ah
deleted file mode 100644
index 615bb2b5542..00000000000
--- a/graphics/blender/patches/patch-ah
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2007/08/08 17:39:09 joerg Exp $
-
---- intern/SoundSystem/intern/SND_WaveCache.cpp.orig 2007-08-08 17:01:35.000000000 +0000
-+++ intern/SoundSystem/intern/SND_WaveCache.cpp
-@@ -44,16 +44,7 @@
-
- #include "SND_WaveCache.h"
- #include <stdio.h>
--
--#ifdef __APPLE__
--# include <sys/malloc.h>
--#else
--# ifdef __FreeBSD__
--# include <stdlib.h>
--# else
--# include <malloc.h>
--# endif
--#endif
-+#include <stdlib.h>
-
- SND_WaveCache::SND_WaveCache()
- {
diff --git a/graphics/blender/patches/patch-ai b/graphics/blender/patches/patch-ai
deleted file mode 100644
index 91618403c43..00000000000
--- a/graphics/blender/patches/patch-ai
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-ai,v 1.2 2009/08/28 20:46:19 hasso Exp $
-
---- CMakeLists.txt.orig 2009-05-18 22:14:15 +0300
-+++ CMakeLists.txt 2009-08-28 22:04:18 +0300
-@@ -102,6 +102,7 @@ IF(UNIX)
- FIND_LIBRARY(INTL_LIBRARY
- NAMES intl
- PATHS
-+ "${_CMAKE_INSTALL_DIR}/lib"
- /usr/local/lib
- /usr/lib
- /sw/lib
-@@ -112,6 +113,7 @@ IF(UNIX)
- FIND_LIBRARY(ICONV_LIBRARY
- NAMES iconv
- PATHS
-+ "${_CMAKE_INSTALL_DIR}/lib"
- /usr/local/lib
- /usr/lib
- /sw/lib
-@@ -121,11 +123,14 @@ IF(UNIX)
- )
- IF(INTL_LIBRARY AND ICONV_LIBRARY)
- SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
-+ ELSEIF(INTL_LIBRARY)
-+ SET(GETTEXT_LIB ${INTL_LIBRARY})
- ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
-
- FIND_PATH(FREETYPE_INC
- freetype
- PATHS
-+ "${_CMAKE_INSTALL_DIR}/include/freetype2"
- /usr/local/include/freetype2
- /usr/include/freetype2
- /sw/include/freetype2
-@@ -150,6 +155,7 @@ IF(UNIX)
- FIND_PATH(OPENEXR_INC
- ImfXdr.h
- PATHS
-+ "${_CMAKE_INSTALL_DIR}/include/OpenEXR"
- /usr/local/include/OpenEXR
- /usr/include/OpenEXR
- /sw/include/OpenEXR
diff --git a/graphics/blender/patches/patch-aj b/graphics/blender/patches/patch-aj
deleted file mode 100644
index 03afa1f73c3..00000000000
--- a/graphics/blender/patches/patch-aj
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2008/06/21 21:14:48 joerg Exp $
-
---- source/creator/CMakeLists.txt.orig 2008-06-21 14:38:11.000000000 +0000
-+++ source/creator/CMakeLists.txt
-@@ -269,6 +269,7 @@ IF(UNIX)
- ENDIF(REMLIB)
- ENDFOREACH(SORTLIB)
- TARGET_LINK_LIBRARIES(blender ${BLENDER_SORTED_LIBS})
-+ SET_TARGET_PROPERTIES(blender PROPERTIES SKIP_BUILD_RPATH ON )
- ELSE(UNIX)
- TARGET_LINK_LIBRARIES(blender ${BLENDER_LINK_LIBS})
- ENDIF(UNIX)
diff --git a/graphics/blender/patches/patch-ak b/graphics/blender/patches/patch-ak
deleted file mode 100644
index c056c557226..00000000000
--- a/graphics/blender/patches/patch-ak
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ak,v 1.1 2009/11/03 19:06:51 markd Exp $
-
---- intern/guardedalloc/BLO_sys_types.h.orig 2009-09-02 03:20:29.000000000 +1200
-+++ intern/guardedalloc/BLO_sys_types.h
-@@ -109,7 +109,7 @@ typedef unsigned long uintptr_t;
- #ifndef ntohl
- #define ntohl(x) correctByteOrder(x)
- #endif
--#elif defined (__FreeBSD__) || defined (__OpenBSD__)
-+#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
- #include <sys/param.h>
- #elif defined (__APPLE__)
- #include <sys/types.h>
diff --git a/graphics/blender/patches/patch-al b/graphics/blender/patches/patch-al
deleted file mode 100644
index 21feddf9b0a..00000000000
--- a/graphics/blender/patches/patch-al
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-al,v 1.1 2009/11/03 19:06:51 markd Exp $
-
---- intern/opennl/superlu/BLO_sys_types.h.orig 2009-09-02 03:20:33.000000000 +1200
-+++ intern/opennl/superlu/BLO_sys_types.h
-@@ -111,7 +111,7 @@ typedef unsigned long uintptr_t;
- #ifndef ntohl
- #define ntohl(x) correctByteOrder(x)
- #endif
--#elif defined (__FreeBSD__) || defined (__OpenBSD__)
-+#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
- #include <sys/param.h>
- #elif defined (__APPLE__)
- #include <sys/types.h>
diff --git a/graphics/blender/patches/patch-am b/graphics/blender/patches/patch-am
index c9977dcd4cc..5734ada947b 100644
--- a/graphics/blender/patches/patch-am
+++ b/graphics/blender/patches/patch-am
@@ -1,13 +1,13 @@
-$NetBSD: patch-am,v 1.1 2009/11/03 19:06:51 markd Exp $
+$NetBSD: patch-am,v 1.2 2012/12/03 13:15:51 ryoon Exp $
---- source/blender/blenloader/BLO_sys_types.h.orig 2009-09-02 03:21:51.000000000 +1200
+--- source/blender/blenloader/BLO_sys_types.h.orig 2012-10-09 18:40:21.000000000 +0000
+++ source/blender/blenloader/BLO_sys_types.h
-@@ -102,7 +102,7 @@ typedef unsigned long uintptr_t;
- #ifdef _WIN32
- #define htonl(x) correctByteOrder(x)
+@@ -123,7 +123,7 @@ unsigned long __attribute__((__stdcall__
#define ntohl(x) correctByteOrder(x)
--#elif defined (__FreeBSD__) || defined (__OpenBSD__)
-+#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
+ #endif
+ #endif
+-#elif defined(__FreeBSD__) || defined(__OpenBSD__)
++#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined (__NetBSD__)
#include <sys/param.h>
- #elif defined (__APPLE__)
+ #elif defined(__APPLE__)
#include <sys/types.h>
diff --git a/graphics/blender/patches/patch-build__files_scons_config_netbsd6-config.py b/graphics/blender/patches/patch-build__files_scons_config_netbsd6-config.py
new file mode 100644
index 00000000000..2ea15152640
--- /dev/null
+++ b/graphics/blender/patches/patch-build__files_scons_config_netbsd6-config.py
@@ -0,0 +1,233 @@
+$NetBSD: patch-build__files_scons_config_netbsd6-config.py,v 1.1 2012/12/03 13:15:51 ryoon Exp $
+
+* config file for NetBSD 6
+
+--- build_files/scons/config/netbsd6-config.py.orig 2012-12-03 06:03:04.000000000 +0000
++++ build_files/scons/config/netbsd6-config.py
+@@ -0,0 +1,226 @@
++CC = 'gcc'
++CXX = 'g++'
++
++LCGDIR = '../lib/netbsd6'
++LIBDIR = "${LCGDIR}"
++
++BF_PYTHON_ABI_FLAGS = ''
++BF_PYTHON = '/usr/local'
++BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
++BF_PYTHON_VERSION = '3.2'
++WITH_BF_STATICPYTHON = False
++BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
++BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
++BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
++BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
++
++WITH_BF_OPENAL = True
++WITH_BF_STATICOPENAL = False
++BF_OPENAL = '/usr/local'
++BF_OPENAL_INC = '${BF_OPENAL}/include'
++BF_OPENAL_LIB = 'openal'
++BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
++
++BF_CXX = '/usr/local'
++WITH_BF_STATICCXX = False
++BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
++
++WITH_BF_JACK = True
++BF_JACK = '/usr/local'
++BF_JACK_INC = '${BF_JACK}/include/jack'
++BF_JACK_LIB = 'jack'
++BF_JACK_LIBPATH = '${BF_JACK}/lib'
++
++WITH_BF_SNDFILE = True
++BF_SNDFILE = '/usr/local'
++BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
++BF_SNDFILE_LIB = 'sndfile'
++BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
++
++WITH_BF_SDL = True
++BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
++BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
++BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
++
++WITH_BF_OPENEXR = True
++WITH_BF_STATICOPENEXR = False
++BF_OPENEXR = '/usr/local'
++# when compiling with your own openexr lib you might need to set...
++# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
++
++BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
++BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
++BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
++# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
++
++WITH_BF_DDS = True
++
++WITH_BF_JPEG = True
++BF_JPEG = '/usr/local'
++BF_JPEG_INC = '${BF_JPEG}/include'
++BF_JPEG_LIB = 'jpeg'
++
++WITH_BF_PNG = True
++BF_PNG = '/usr/local'
++BF_PNG_INC = '${BF_PNG}/include'
++BF_PNG_LIB = 'png'
++
++WITH_BF_TIFF = True
++BF_TIFF = '/usr/local'
++BF_TIFF_INC = '${BF_TIFF}/include'
++BF_TIFF_LIB = 'tiff'
++
++WITH_BF_ZLIB = True
++BF_ZLIB = '/usr'
++BF_ZLIB_INC = '${BF_ZLIB}/include'
++BF_ZLIB_LIB = 'z'
++
++WITH_BF_INTERNATIONAL = True
++
++BF_GETTEXT = '/usr/local'
++BF_GETTEXT_INC = '${BF_GETTEXT}/include'
++BF_GETTEXT_LIB = 'gettextlib'
++BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
++
++WITH_BF_GAMEENGINE = False
++WITH_BF_PLAYER = True
++WITH_BF_OCEANSIM = True
++
++WITH_BF_BULLET = True
++BF_BULLET = '#extern/bullet2/src'
++BF_BULLET_INC = '${BF_BULLET}'
++BF_BULLET_LIB = 'extern_bullet'
++
++BF_FREETYPE = '/usr/local'
++BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
++BF_FREETYPE_LIB = 'freetype'
++
++### XXX Find what this actually wants; it doesn't want libquicktime.
++WITH_BF_QUICKTIME = False
++BF_QUICKTIME = '/usr/local'
++BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
++
++WITH_BF_ICONV = True
++BF_ICONV = LIBDIR + "/iconv"
++BF_ICONV_INC = '${BF_ICONV}/include'
++BF_ICONV_LIB = 'iconv'
++BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
++
++WITH_BF_BINRELOC = True
++
++# enable ffmpeg support
++WITH_BF_FFMPEG = True
++BF_FFMPEG = '/usr/local'
++BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
++BF_FFMPEG_INC = '${BF_FFMPEG}/include'
++BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
++
++# enable ogg, vorbis and theora in ffmpeg
++WITH_BF_OGG = True
++BF_OGG = '/usr/local'
++BF_OGG_INC = '${BF_OGG}/include'
++BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
++
++WITH_BF_OPENJPEG = True
++BF_OPENJPEG = '#extern/libopenjpeg'
++BF_OPENJPEG_LIB = ''
++BF_OPENJPEG_INC = '${BF_OPENJPEG}'
++BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
++
++WITH_BF_FFTW3 = True
++BF_FFTW3 = LIBDIR + '/usr/local'
++BF_FFTW3_INC = '${BF_FFTW3}/include'
++BF_FFTW3_LIB = 'fftw3'
++BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
++
++WITH_BF_REDCODE = False
++BF_REDCODE = '#extern/libredcode'
++BF_REDCODE_LIB = ''
++# BF_REDCODE_INC = '${BF_REDCODE}/include'
++BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
++BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
++
++# Mesa Libs should go here if your using them as well....
++WITH_BF_STATICOPENGL = False
++BF_OPENGL = '/usr/local'
++BF_OPENGL_INC = '${BF_OPENGL}/include'
++BF_OPENGL_LIB = 'GL GLU X11 Xi'
++BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
++BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
++
++WITH_BF_COLLADA = False
++BF_COLLADA = '#source/blender/collada'
++BF_COLLADA_INC = '${BF_COLLADA}'
++BF_COLLADA_LIB = 'bf_collada'
++BF_OPENCOLLADA = '/usr'
++BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}'
++BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
++BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
++BF_PCRE = '/usr/local'
++BF_PCRE_LIB = 'pcre'
++BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
++BF_EXPAT = '/usr/local'
++BF_EXPAT_LIB = 'expat'
++BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
++
++WITH_BF_OIIO = True
++WITH_BF_STATICOIIO = False
++BF_OIIO = LIBDIR + '/oiio'
++BF_OIIO_INC = BF_OIIO + '/include'
++BF_OIIO_LIB = 'OpenImageIO'
++BF_OIIO_LIBPATH = BF_OIIO + '/lib'
++
++WITH_BF_BOOST = True
++WITH_BF_STATICBOOST = False
++BF_BOOST = LIBDIR + '/boost'
++BF_BOOST_INC = BF_BOOST + '/include'
++BF_BOOST_LIB = 'boost_date_time boost_filesystem boost_regex boost_system boost_thread'
++BF_BOOST_LIBPATH = BF_BOOST + '/lib'
++
++WITH_BF_OPENMP = True
++
++WITH_GHOST_XDND = False
++
++#Ray trace optimization
++WITH_BF_RAYOPTIMIZATION = True
++BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
++
++CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
++CXXFLAGS = []
++
++CPPFLAGS = []
++if WITH_BF_FFMPEG:
++ # libavutil needs UINT64_C()
++ CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
++REL_CFLAGS = []
++REL_CXXFLAGS = []
++REL_CCFLAGS = ['-DNDEBUG', '-O2']
++##BF_DEPEND = True
++##
++##AR = ar
++##ARFLAGS = ruv
++##ARFLAGSQUIET = ru
++##
++C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
++CC_WARN = ['-Wall']
++CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
++
++
++##FIX_STUBS_WARNINGS = -Wno-unused
++
++LLIBS = ['util', 'c', 'm', 'pthread', 'stdc++']
++##LOPTS = --dynamic
++##DYNLDFLAGS = -shared $(LDFLAGS)
++
++BF_PROFILE = False
++BF_PROFILE_CCFLAGS = ['-pg','-g']
++BF_PROFILE_LINKFLAGS = ['-pg']
++
++BF_DEBUG = False
++BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
++
++BF_BUILDDIR = '../build/netbsd6'
++BF_INSTALLDIR='../install/netbsd6'
++
++#Link against pthread
++PLATFORM_LINKFLAGS = ['-pthread']
diff --git a/graphics/blender/patches/patch-build__files_scons_tools_btools.py b/graphics/blender/patches/patch-build__files_scons_tools_btools.py
new file mode 100644
index 00000000000..09dc9d7f21a
--- /dev/null
+++ b/graphics/blender/patches/patch-build__files_scons_tools_btools.py
@@ -0,0 +1,16 @@
+$NetBSD: patch-build__files_scons_tools_btools.py,v 1.1 2012/12/03 13:15:51 ryoon Exp $
+
+From Gentoo's 2.64a/0300-scons-failure.patch
+
+--- build_files/scons/tools/btools.py.orig 2012-10-09 18:41:53.000000000 +0000
++++ build_files/scons/tools/btools.py
+@@ -482,7 +482,9 @@ def read_opts(env, cfg, args):
+ ('BF_3DMOUSE_LIB', '3d mouse library', ''),
+ ('BF_3DMOUSE_LIBPATH', '3d mouse library path', ''),
+ ('BF_3DMOUSE_LIB_STATIC', '3d mouse static library', ''),
++ ) # end of opts.AddOptions()
+
++ localopts.AddVariables(
+ ('CFLAGS', 'C only flags', []),
+ ('CCFLAGS', 'Generic C and C++ flags', []),
+ ('CXXFLAGS', 'C++ only flags', []),
diff --git a/graphics/blender/patches/patch-doc_python__api_sphinx__doc__gen.sh b/graphics/blender/patches/patch-doc_python__api_sphinx__doc__gen.sh
new file mode 100644
index 00000000000..3c0cf91449f
--- /dev/null
+++ b/graphics/blender/patches/patch-doc_python__api_sphinx__doc__gen.sh
@@ -0,0 +1,15 @@
+$NetBSD: patch-doc_python__api_sphinx__doc__gen.sh,v 1.1 2012/12/03 13:15:51 ryoon Exp $
+
+* Improve portability
+
+--- doc/python_api/sphinx_doc_gen.sh.orig 2012-10-09 18:42:01.000000000 +0000
++++ doc/python_api/sphinx_doc_gen.sh
+@@ -32,7 +32,7 @@ blender_version_char=$(grep BLENDER_VERS
+ blender_version_cycle=$(grep BLENDER_VERSION_CYCLE $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
+ blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
+
+-if [ "$blender_version_cycle" == "release" ]
++if [ "$blender_version_cycle" = "release" ]
+ then
+ BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)$blender_version_char"_release"
+ else
diff --git a/graphics/blender/patches/patch-extern_bullet2_src_BulletSoftBody_btSoftBodyInternals.h b/graphics/blender/patches/patch-extern_bullet2_src_BulletSoftBody_btSoftBodyInternals.h
deleted file mode 100644
index 7ffcf16df73..00000000000
--- a/graphics/blender/patches/patch-extern_bullet2_src_BulletSoftBody_btSoftBodyInternals.h
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-extern_bullet2_src_BulletSoftBody_btSoftBodyInternals.h,v 1.1 2012/10/20 22:10:18 joerg Exp $
-
-Some instanciations don't have a user-defined default constructor,
-so make sure to use plain initialisation.
-
---- extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h.orig 2012-10-20 10:52:46.000000000 +0000
-+++ extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h
-@@ -171,7 +171,7 @@ public:
- template <typename T>
- static inline void ZeroInitialize(T& value)
- {
-- static const T zerodummy;
-+ static T zerodummy;
- value=zerodummy;
- }
- //
diff --git a/graphics/blender/patches/patch-extern_libmv_libmv_numeric_numeric.h b/graphics/blender/patches/patch-extern_libmv_libmv_numeric_numeric.h
new file mode 100644
index 00000000000..f79907f7197
--- /dev/null
+++ b/graphics/blender/patches/patch-extern_libmv_libmv_numeric_numeric.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-extern_libmv_libmv_numeric_numeric.h,v 1.1 2012/12/03 13:15:51 ryoon Exp $
+
+--- extern/libmv/libmv/numeric/numeric.h.orig 2012-10-09 18:42:49.000000000 +0000
++++ extern/libmv/libmv/numeric/numeric.h
+@@ -33,7 +33,7 @@
+ #include <Eigen/QR>
+ #include <Eigen/SVD>
+
+-#if (defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)) && !defined(__MINGW64__)
++#if (defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)) && !defined(__MINGW64__)
+ void static sincos (double x, double *sinx, double *cosx) {
+ *sinx = sin(x);
+ *cosx = cos(x);
diff --git a/graphics/blender/patches/patch-extern_libmv_libmv_tracking_brute__region__tracker.cc b/graphics/blender/patches/patch-extern_libmv_libmv_tracking_brute__region__tracker.cc
new file mode 100644
index 00000000000..0cdac25a66c
--- /dev/null
+++ b/graphics/blender/patches/patch-extern_libmv_libmv_tracking_brute__region__tracker.cc
@@ -0,0 +1,22 @@
+$NetBSD: patch-extern_libmv_libmv_tracking_brute__region__tracker.cc,v 1.1 2012/12/03 13:15:51 ryoon Exp $
+
+--- extern/libmv/libmv/tracking/brute_region_tracker.cc.orig 2012-10-09 18:42:52.000000000 +0000
++++ extern/libmv/libmv/tracking/brute_region_tracker.cc
+@@ -24,7 +24,7 @@
+ #include <emmintrin.h>
+ #endif
+
+-#if !defined(__APPLE__) && !defined(__FreeBSD__)
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ // Needed for memalign on Linux and _aligned_alloc on Windows.
+ #ifdef FREE_WINDOWS
+ /* make sure _aligned_malloc is included */
+@@ -60,7 +60,7 @@ void *aligned_malloc(int size, int align
+ // they work natively with SSE types with no further work.
+ CHECK_EQ(alignment, 16);
+ return malloc(size);
+-#elif __FreeBSD__
++#elif defined(__FreeBSD__) || defined(__NetBSD__)
+ void *result;
+
+ if(posix_memalign(&result, alignment, size)) {
diff --git a/graphics/blender/patches/patch-extern_libmv_third__party_glog_src_config.h b/graphics/blender/patches/patch-extern_libmv_third__party_glog_src_config.h
new file mode 100644
index 00000000000..34ffd540a6e
--- /dev/null
+++ b/graphics/blender/patches/patch-extern_libmv_third__party_glog_src_config.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-extern_libmv_third__party_glog_src_config.h,v 1.1 2012/12/03 13:15:51 ryoon Exp $
+
+* Load NetBSD config file
+
+--- extern/libmv/third_party/glog/src/config.h.orig 2012-10-09 18:43:15.000000000 +0000
++++ extern/libmv/third_party/glog/src/config.h
+@@ -6,6 +6,8 @@
+ #include "config_mac.h"
+ #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ #include "config_freebsd.h"
++#elif defined(__NetBSD__)
++ #include "config_netbsd.h"
+ #elif defined(__MINGW32__)
+ #include "windows/config.h"
+ #elif defined(__linux__)
diff --git a/graphics/blender/patches/patch-extern_libmv_third__party_glog_src_config__netbsd.h b/graphics/blender/patches/patch-extern_libmv_third__party_glog_src_config__netbsd.h
new file mode 100644
index 00000000000..fa29c5d5dd2
--- /dev/null
+++ b/graphics/blender/patches/patch-extern_libmv_third__party_glog_src_config__netbsd.h
@@ -0,0 +1,178 @@
+$NetBSD: patch-extern_libmv_third__party_glog_src_config__netbsd.h,v 1.1 2012/12/03 13:15:51 ryoon Exp $
+
+* config file for NetBSD
+
+--- extern/libmv/third_party/glog/src/config_netbsd.h.orig 2012-12-03 06:03:04.000000000 +0000
++++ extern/libmv/third_party/glog/src/config_netbsd.h
+@@ -0,0 +1,171 @@
++/* src/config.h. Generated from config.h.in by configure. */
++/* src/config.h.in. Generated from configure.ac by autoheader. */
++
++/* Namespace for Google classes */
++#define GOOGLE_NAMESPACE google
++
++/* Define if you have the `dladdr' function */
++/* #undef HAVE_DLADDR */
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define HAVE_DLFCN_H 1
++
++#include <sys/param.h>
++/* Define to 1 if you have the <execinfo.h> header file. */
++#if __NetBSD_Version__ < 699001500
++#define HAVE_EXECINFO_H 1
++#else
++#undef HAVE_EXECINFO_H
++#endif
++
++/* Define if you have the `fcntl' function */
++#define HAVE_FCNTL 1
++
++/* Define to 1 if you have the <glob.h> header file. */
++#define HAVE_GLOB_H 1
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#define HAVE_INTTYPES_H 1
++
++/* Define to 1 if you have the `pthread' library (-lpthread). */
++#define HAVE_LIBPTHREAD 1
++
++/* Define to 1 if you have the <libunwind.h> header file. */
++/* #undef HAVE_LIBUNWIND_H */
++
++/* define if you have google gflags library */
++#define HAVE_LIB_GFLAGS 1
++
++/* define if you have google gmock library */
++/* #undef HAVE_LIB_GMOCK */
++
++/* define if you have google gtest library */
++/* #undef HAVE_LIB_GTEST */
++
++/* define if you have libunwind */
++/* #undef HAVE_LIB_UNWIND */
++
++/* Define to 1 if you have the <memory.h> header file. */
++#define HAVE_MEMORY_H 1
++
++/* define if the compiler implements namespaces */
++#define HAVE_NAMESPACES 1
++
++/* Define if you have POSIX threads libraries and header files. */
++#define HAVE_PTHREAD 1
++
++/* Define to 1 if you have the <pwd.h> header file. */
++#define HAVE_PWD_H 1
++
++/* define if the compiler implements pthread_rwlock_* */
++#define HAVE_RWLOCK 1
++
++/* Define if you have the `sigaltstack' function */
++#define HAVE_SIGALTSTACK 1
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#define HAVE_STDINT_H 1
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#define HAVE_STDLIB_H 1
++
++/* Define to 1 if you have the <strings.h> header file. */
++#define HAVE_STRINGS_H 1
++
++/* Define to 1 if you have the <string.h> header file. */
++#define HAVE_STRING_H 1
++
++/* Define to 1 if you have the <syscall.h> header file. */
++/* #undef HAVE_SYSCALL_H */
++
++/* Define to 1 if you have the <syslog.h> header file. */
++#define HAVE_SYSLOG_H 1
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define HAVE_SYS_STAT_H 1
++
++/* Define to 1 if you have the <sys/syscall.h> header file. */
++#define HAVE_SYS_SYSCALL_H 1
++
++/* Define to 1 if you have the <sys/time.h> header file. */
++#define HAVE_SYS_TIME_H 1
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#define HAVE_SYS_TYPES_H 1
++
++/* Define to 1 if you have the <sys/ucontext.h> header file. */
++#define HAVE_SYS_UCONTEXT_H 1
++
++/* Define to 1 if you have the <sys/utsname.h> header file. */
++#define HAVE_SYS_UTSNAME_H 1
++
++/* Define to 1 if you have the <ucontext.h> header file. */
++#define HAVE_UCONTEXT_H 1
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#define HAVE_UNISTD_H 1
++
++/* define if the compiler supports using expression for operator */
++#define HAVE_USING_OPERATOR 1
++
++/* define if your compiler has __attribute__ */
++#define HAVE___ATTRIBUTE__ 1
++
++/* define if your compiler has __builtin_expect */
++#define HAVE___BUILTIN_EXPECT 1
++
++/* define if your compiler has __sync_val_compare_and_swap */
++/* #undef HAVE___SYNC_VAL_COMPARE_AND_SWAP */
++
++/* Name of package */
++#define PACKAGE "glog"
++
++/* Define to the address where bug reports for this package should be sent. */
++#define PACKAGE_BUGREPORT "opensource@google.com"
++
++/* Define to the full name of this package. */
++#define PACKAGE_NAME "glog"
++
++/* Define to the full name and version of this package. */
++#define PACKAGE_STRING "glog 0.3.2"
++
++/* Define to the one symbol short name of this package. */
++#define PACKAGE_TARNAME "glog"
++
++/* Define to the version of this package. */
++#define PACKAGE_VERSION "0.3.2"
++
++/* How to access the PC from a struct ucontext */
++/* #define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_RIP] */
++
++/* Define to necessary symbol if this constant uses a non-standard name on
++ your system. */
++/* #undef PTHREAD_CREATE_JOINABLE */
++
++/* The size of `void *', as computed by sizeof. */
++#define SIZEOF_VOID_P 8
++
++/* Define to 1 if you have the ANSI C header files. */
++/* #undef STDC_HEADERS */
++
++#define STDC_HEADERS 1
++/* the namespace where STL code like vector<> is defined */
++#define STL_NAMESPACE std
++
++/* location of source code */
++#define TEST_SRC_DIR "."
++
++/* Version number of package */
++#define VERSION "0.3.2"
++
++/* Stops putting the code inside the Google namespace */
++#define _END_GOOGLE_NAMESPACE_ }
++
++/* Puts following code inside the Google namespace */
++#define _START_GOOGLE_NAMESPACE_ namespace google {
++
++/* isn't getting defined by configure script when clang compilers are used
++ and cuases compilation errors in stactrace/unwind modules */
++#ifdef __clang__
++# define NO_FRAME_POINTER
++#endif
diff --git a/graphics/blender/patches/patch-extern_libmv_third__party_glog_src_utilities.h b/graphics/blender/patches/patch-extern_libmv_third__party_glog_src_utilities.h
new file mode 100644
index 00000000000..52d18a4f5e4
--- /dev/null
+++ b/graphics/blender/patches/patch-extern_libmv_third__party_glog_src_utilities.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-extern_libmv_third__party_glog_src_utilities.h,v 1.1 2012/12/03 13:15:51 ryoon Exp $
+
+* NetBSD has no unwind
+
+--- extern/libmv/third_party/glog/src/utilities.h.orig 2012-10-09 18:43:15.000000000 +0000
++++ extern/libmv/third_party/glog/src/utilities.h
+@@ -101,7 +101,7 @@
+ // correctly when GetStackTrace() is called with max_depth == 0.
+ // Some code may do that.
+
+-#if defined(__MINGW32__) || defined(__FreeBSD__)
++#if defined(__MINGW32__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ # undef STACKTRACE_H
+ #elif defined(HAVE_LIB_UNWIND)
+ # define STACKTRACE_H "stacktrace_libunwind-inl.h"
diff --git a/graphics/blender/patches/patch-extern_solid_include_MT_Quaternion.h b/graphics/blender/patches/patch-extern_solid_include_MT_Quaternion.h
deleted file mode 100644
index 52ddfb45889..00000000000
--- a/graphics/blender/patches/patch-extern_solid_include_MT_Quaternion.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-extern_solid_include_MT_Quaternion.h,v 1.1 2012/07/03 18:10:03 joerg Exp $
-
---- extern/solid/include/MT/Quaternion.h.orig 2012-07-03 13:16:43.000000000 +0000
-+++ extern/solid/include/MT/Quaternion.h
-@@ -158,7 +158,7 @@ namespace MT {
-
- Quaternion<Scalar> inverse() const
- {
-- return conjugate / length2();
-+ return conjugate() / length2();
- }
-
- Quaternion<Scalar> slerp(const Quaternion<Scalar>& q, const Scalar& t) const
diff --git a/graphics/blender/patches/patch-extern_solid_src_complex_DT__BBoxTree.h b/graphics/blender/patches/patch-extern_solid_src_complex_DT__BBoxTree.h
deleted file mode 100644
index d29bce9aaae..00000000000
--- a/graphics/blender/patches/patch-extern_solid_src_complex_DT__BBoxTree.h
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-extern_solid_src_complex_DT__BBoxTree.h,v 1.1 2012/10/20 22:10:18 joerg Exp $
-
---- extern/solid/src/complex/DT_BBoxTree.h.orig 2012-10-20 10:46:59.000000000 +0000
-+++ extern/solid/src/complex/DT_BBoxTree.h
-@@ -95,6 +95,15 @@ public:
- const Shape *m_leaves;
- };
-
-+inline DT_CBox computeCBox(MT_Scalar margin, const MT_Transform& xform)
-+{
-+ const MT_Matrix3x3& basis = xform.getBasis();
-+ return DT_CBox(MT_Point3(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)),
-+ MT_Vector3(basis[0].length() * margin,
-+ basis[1].length() * margin,
-+ basis[2].length() * margin));
-+}
-+
- template <typename Shape1, typename Shape2>
- class DT_ObjectData : public DT_RootData<Shape1> {
- public:
diff --git a/graphics/blender/patches/patch-extern_solid_src_complex_DT__Complex.cpp b/graphics/blender/patches/patch-extern_solid_src_complex_DT__Complex.cpp
deleted file mode 100644
index 72ef076af26..00000000000
--- a/graphics/blender/patches/patch-extern_solid_src_complex_DT__Complex.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-extern_solid_src_complex_DT__Complex.cpp,v 1.1 2012/10/20 22:10:18 joerg Exp $
-
---- extern/solid/src/complex/DT_Complex.cpp.orig 2012-10-20 10:47:02.000000000 +0000
-+++ extern/solid/src/complex/DT_Complex.cpp
-@@ -123,15 +123,6 @@ inline DT_CBox computeCBox(const DT_Conv
- return DT_CBox(p->bbox());
- }
-
--inline DT_CBox computeCBox(MT_Scalar margin, const MT_Transform& xform)
--{
-- const MT_Matrix3x3& basis = xform.getBasis();
-- return DT_CBox(MT_Point3(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)),
-- MT_Vector3(basis[0].length() * margin,
-- basis[1].length() * margin,
-- basis[2].length() * margin));
--}
--
- void DT_Complex::refit()
- {
- DT_RootData<const DT_Convex *> rd(m_nodes, m_leaves);
diff --git a/graphics/blender/patches/patch-intern_elbeem_intern_ntl__vector3dim.h b/graphics/blender/patches/patch-intern_elbeem_intern_ntl__vector3dim.h
deleted file mode 100644
index 1c237de998d..00000000000
--- a/graphics/blender/patches/patch-intern_elbeem_intern_ntl__vector3dim.h
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-intern_elbeem_intern_ntl__vector3dim.h,v 1.1 2012/07/03 18:10:03 joerg Exp $
-
---- intern/elbeem/intern/ntl_vector3dim.h.orig 2012-07-03 13:12:36.000000000 +0000
-+++ intern/elbeem/intern/ntl_vector3dim.h
-@@ -24,6 +24,12 @@
- #include <stdio.h>
- #include <stdlib.h>
-
-+/* absolute value */
-+template < class T >
-+inline T
-+ABS( T a )
-+{ return (0 < a) ? a : -a ; }
-+
- // hack for MSVC6.0 compiler
- #ifdef _MSC_VER
- #if _MSC_VER < 1300
diff --git a/graphics/blender/patches/patch-intern_elbeem_intern_utilities.h b/graphics/blender/patches/patch-intern_elbeem_intern_utilities.h
deleted file mode 100644
index 720d6239eee..00000000000
--- a/graphics/blender/patches/patch-intern_elbeem_intern_utilities.h
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-intern_elbeem_intern_utilities.h,v 1.1 2012/07/03 18:10:03 joerg Exp $
-
---- intern/elbeem/intern/utilities.h.orig 2012-07-03 13:09:45.000000000 +0000
-+++ intern/elbeem/intern/utilities.h
-@@ -171,12 +171,6 @@ inline T
- MAX( T a, T b )
- { return (a < b) ? b : a ; }
-
--/* absolute value */
--template < class T >
--inline T
--ABS( T a )
--{ return (0 < a) ? a : -a ; }
--
- /* sign of the value */
- template < class T >
- inline T
diff --git a/graphics/blender/patches/patch-intern_ghost_SConscript b/graphics/blender/patches/patch-intern_ghost_SConscript
new file mode 100644
index 00000000000..00c67b2cc44
--- /dev/null
+++ b/graphics/blender/patches/patch-intern_ghost_SConscript
@@ -0,0 +1,15 @@
+$NetBSD: patch-intern_ghost_SConscript,v 1.1 2012/12/03 13:15:51 ryoon Exp $
+
+* Add window system support on NetBSD
+
+--- intern/ghost/SConscript.orig 2012-10-09 18:33:16.000000000 +0000
++++ intern/ghost/SConscript
+@@ -26,7 +26,7 @@ if env['WITH_GHOST_SDL']:
+ pass
+ incs += ' ' + env['BF_SDL_INC']
+ defs += ['WITH_GHOST_SDL']
+-elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'aix4', 'aix5'):
++elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'aix4', 'aix5', 'netbsd6'):
+ for f in pf:
+ try:
+ sources.remove('intern' + os.sep + f + 'Win32.cpp')
diff --git a/graphics/blender/patches/patch-intern_guardedalloc_MEM__sys__types.h b/graphics/blender/patches/patch-intern_guardedalloc_MEM__sys__types.h
new file mode 100644
index 00000000000..79e8637a460
--- /dev/null
+++ b/graphics/blender/patches/patch-intern_guardedalloc_MEM__sys__types.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-intern_guardedalloc_MEM__sys__types.h,v 1.1 2012/12/03 13:15:52 ryoon Exp $
+
+--- intern/guardedalloc/MEM_sys_types.h.orig 2012-10-09 18:34:13.000000000 +0000
++++ intern/guardedalloc/MEM_sys_types.h
+@@ -131,7 +131,7 @@ unsigned long __attribute__((__stdcall__
+ #define ntohl(x) correctByteOrder(x)
+ #endif
+ #endif
+-#elif defined (__FreeBSD__) || defined (__OpenBSD__)
++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
+ #include <sys/param.h>
+ #elif defined (__APPLE__)
+ #include <sys/types.h>
diff --git a/graphics/blender/patches/patch-intern_opennl_superlu_superlu__sys__types.h b/graphics/blender/patches/patch-intern_opennl_superlu_superlu__sys__types.h
new file mode 100644
index 00000000000..74b79082d35
--- /dev/null
+++ b/graphics/blender/patches/patch-intern_opennl_superlu_superlu__sys__types.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-intern_opennl_superlu_superlu__sys__types.h,v 1.1 2012/12/03 13:15:52 ryoon Exp $
+
+--- intern/opennl/superlu/superlu_sys_types.h.orig 2012-10-09 18:34:26.000000000 +0000
++++ intern/opennl/superlu/superlu_sys_types.h
+@@ -119,7 +119,7 @@ unsigned long __attribute__((__stdcall__
+ #define ntohl(x) correctByteOrder(x)
+ #endif
+ #endif
+-#elif defined (__FreeBSD__) || defined (__OpenBSD__)
++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
+ #include <sys/param.h>
+ #elif defined (__APPLE__)
+ #include <sys/types.h>
diff --git a/graphics/blender/patches/patch-source_blender_python_BPY__interface.c b/graphics/blender/patches/patch-source_blender_python_BPY__interface.c
deleted file mode 100644
index be05a7c993a..00000000000
--- a/graphics/blender/patches/patch-source_blender_python_BPY__interface.c
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-source_blender_python_BPY__interface.c,v 1.1 2011/04/01 11:31:56 wiz Exp $
-
-Fix http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4863
-using patch from James Vega via
-http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503632
-
---- source/blender/python/BPY_interface.c.orig 2009-09-01 15:21:12.000000000 +0000
-+++ source/blender/python/BPY_interface.c
-@@ -236,6 +236,12 @@ 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/graphics/blender/patches/patch-user-config.py b/graphics/blender/patches/patch-user-config.py
new file mode 100644
index 00000000000..7d93f4fb0e5
--- /dev/null
+++ b/graphics/blender/patches/patch-user-config.py
@@ -0,0 +1,9 @@
+$NetBSD: patch-user-config.py,v 1.1 2012/12/03 13:15:52 ryoon Exp $
+
+From Gentoo's ebuild
+
+--- user-config.py.orig 2012-12-03 06:03:04.000000000 +0000
++++ user-config.py
+@@ -0,0 +1,2 @@
++LINKFLAGS=[@MYLDFLAGS@]
++PLATFORM_LINKFLAGS=[@MYLDFLAGS@]