diff options
7 files changed, 452 insertions, 1 deletions
diff --git a/media-gfx/blender/blender-2.26.ebuild b/media-gfx/blender/blender-2.26.ebuild index 7604da4..1e7f097 100644 --- a/media-gfx/blender/blender-2.26.ebuild +++ b/media-gfx/blender/blender-2.26.ebuild @@ -4,7 +4,7 @@ EAPI="5" -inherit flag-o-matic +inherit autotools eutils flag-o-matic replace-flags -march=pentium4 -march=pentium3 IUSE="" @@ -24,4 +24,7 @@ DEPEND="virtual/x11 >=media-libs/libvorbis-1.0 >=dev-libs/openssl-0.9.6" +src_prepare() { + epatch "${FILESDIR}"/${P}-compile-*.patch + eautoreconf } diff --git a/media-gfx/blender/files/blender-2.26-compile-1-fix-configure.ac.patch b/media-gfx/blender/files/blender-2.26-compile-1-fix-configure.ac.patch new file mode 100644 index 0000000..d4b4e0a --- /dev/null +++ b/media-gfx/blender/files/blender-2.26-compile-1-fix-configure.ac.patch @@ -0,0 +1,33 @@ +From c2c4a755a94af37774d31cf96ce92b19b59278bc Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Thu, 28 Apr 2011 19:49:52 +0200 +Subject: [PATCH 1/6] Fix configure.ac + +--- + configure.ac | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 04b90c3..84366f3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -11,7 +11,7 @@ dnl -------------------- + + AC_INIT(blender-creator, 2.26, ) + AC_CANONICAL_SYSTEM +- AM_INIT_AUTOMAKE([blender-creator], [2.26]) ++ AM_INIT_AUTOMAKE([foreign]) + + dnl check for the platform make + AC_PATH_PROGS(U_MAKE, gmake gnumake, make) +@@ -26,7 +26,6 @@ dnl ------------------- + AC_PROG_CC + AC_PROG_LN_S + AC_PROG_LIBTOOL +- AC_PROG_RANLIB + AC_CHECK_TOOL([STRIP],[strip]) + AC_PROG_AWK + AC_FIND_X +-- +2.2.1 + diff --git a/media-gfx/blender/files/blender-2.26-compile-2-include-and-namespace-fixes.patch b/media-gfx/blender/files/blender-2.26-compile-2-include-and-namespace-fixes.patch new file mode 100644 index 0000000..50f841a --- /dev/null +++ b/media-gfx/blender/files/blender-2.26-compile-2-include-and-namespace-fixes.patch @@ -0,0 +1,115 @@ +From 3d1dafd74440221d356b0a67ace6a40ce2969f1e Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Thu, 28 Apr 2011 18:36:14 +0200 +Subject: [PATCH 2/6] C++: Include and namespace fixes + +--- + intern/bsp/intern/BSP_CSGUserData.cpp | 2 +- + intern/iksolver/intern/IK_QSegment.cpp | 2 +- + intern/iksolver/intern/IK_Solver.cpp | 2 +- + intern/iksolver/intern/TNT/vec.h | 6 +++--- + intern/string/STR_String.h | 2 ++ + intern/string/intern/STR_String.cpp | 2 ++ + source/blender/render/intern/include/RE_ShadowBuffer.h | 2 +- + 7 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/intern/bsp/intern/BSP_CSGUserData.cpp b/intern/bsp/intern/BSP_CSGUserData.cpp +index 030202a..1d808ca 100755 +--- a/intern/bsp/intern/BSP_CSGUserData.cpp ++++ b/intern/bsp/intern/BSP_CSGUserData.cpp +@@ -34,7 +34,7 @@ + #endif + + #include "BSP_CSGUserData.h" +- ++#include <string.h> + + + BSP_CSGUserData:: +diff --git a/intern/iksolver/intern/IK_QSegment.cpp b/intern/iksolver/intern/IK_QSegment.cpp +index 5460c79..70eb8b7 100644 +--- a/intern/iksolver/intern/IK_QSegment.cpp ++++ b/intern/iksolver/intern/IK_QSegment.cpp +@@ -42,7 +42,7 @@ + #endif + + #include "IK_QSegment.h" +-#include <iostream.h> ++#include <iostream> + + IK_QSegment:: + IK_QSegment ( +diff --git a/intern/iksolver/intern/IK_Solver.cpp b/intern/iksolver/intern/IK_Solver.cpp +index c029f8b..190c66e 100644 +--- a/intern/iksolver/intern/IK_Solver.cpp ++++ b/intern/iksolver/intern/IK_Solver.cpp +@@ -44,7 +44,7 @@ + #endif + #include "../extern/IK_solver.h" + +-#include <iostream.h> ++#include <iostream> + + IK_Chain_ExternPtr + IK_CreateChain( +diff --git a/intern/iksolver/intern/TNT/vec.h b/intern/iksolver/intern/TNT/vec.h +index 3c104f2..cfca1b0 100644 +--- a/intern/iksolver/intern/TNT/vec.h ++++ b/intern/iksolver/intern/TNT/vec.h +@@ -296,11 +296,11 @@ std::ostream& operator<<(std::ostream &s, const Vector<T> &A) + { + Subscript N=A.dim(); + +- s << N << endl; ++ s << N << std::endl; + + for (Subscript i=0; i<N; i++) +- s << A[i] << " " << endl; +- s << endl; ++ s << A[i] << " " << std::endl; ++ s << std::endl; + + return s; + } +diff --git a/intern/string/STR_String.h b/intern/string/STR_String.h +index c711c4b..67c5ea3 100644 +--- a/intern/string/STR_String.h ++++ b/intern/string/STR_String.h +@@ -47,6 +47,8 @@ + + #include <vector> + #include <limits.h> ++#include <string.h> ++#include <stdlib.h> + using namespace std; + + +diff --git a/intern/string/intern/STR_String.cpp b/intern/string/intern/STR_String.cpp +index 66f1fb3..98fac84 100644 +--- a/intern/string/intern/STR_String.cpp ++++ b/intern/string/intern/STR_String.cpp +@@ -46,6 +46,8 @@ + #include <config.h> + #endif + ++#include <string.h> ++ + /*------------------------------------------------------------------------------------------------- + Construction / destruction + -------------------------------------------------------------------------------------------------*/ +diff --git a/source/blender/render/intern/include/RE_ShadowBuffer.h b/source/blender/render/intern/include/RE_ShadowBuffer.h +index 0eac797..c9ff56f 100644 +--- a/source/blender/render/intern/include/RE_ShadowBuffer.h ++++ b/source/blender/render/intern/include/RE_ShadowBuffer.h +@@ -33,7 +33,7 @@ + #ifndef RE_SHADOWBUFFER_H + #define RE_SHADOWBUFFER_H + +-#include <iostream.h> ++#include <iostream> + + struct ShadBuf; + struct LampRen; +-- +2.2.1 + diff --git a/media-gfx/blender/files/blender-2.26-compile-3-silence-precision-loss.patch b/media-gfx/blender/files/blender-2.26-compile-3-silence-precision-loss.patch new file mode 100644 index 0000000..10a1815 --- /dev/null +++ b/media-gfx/blender/files/blender-2.26-compile-3-silence-precision-loss.patch @@ -0,0 +1,48 @@ +From 08782e5a72b684d336fffbf58ace57ff7b40d19f Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Thu, 28 Apr 2011 19:20:14 +0200 +Subject: [PATCH 3/6] C++: Silence precision loss, may need better fix + +--- + source/blender/render/intern/source/RE_basicShadowBuffer.cpp | 4 ++-- + source/kernel/gen_system/GEN_HashedPtr.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/source/blender/render/intern/source/RE_basicShadowBuffer.cpp b/source/blender/render/intern/source/RE_basicShadowBuffer.cpp +index 221c31d..e672f04 100644 +--- a/source/blender/render/intern/source/RE_basicShadowBuffer.cpp ++++ b/source/blender/render/intern/source/RE_basicShadowBuffer.cpp +@@ -378,7 +378,7 @@ float RE_BasicShadowBuffer::readshadowbuf(struct ShadBuf *shb, + else { + /* got warning on this from alpha .... */ + /* but it's working code! (ton) */ +- zsamp= (int) rz; ++ zsamp= (int)(long) rz; + } + + /* if(zsamp >= 0x7FFFFE00) return 1.0; */ /* geen schaduw als op oneindig wordt gesampeld*/ +@@ -565,7 +565,7 @@ float RE_BasicShadowBuffer::readshadowbuf_halo(struct ShadBuf *shb, int xs, int + else { + /* same as before */ + /* still working code! (ton) */ +- zsamp= (int) rz; ++ zsamp= (int) (long) rz; + } + + /* geen schaduw als op oneindig wordt gesampeld*/ +diff --git a/source/kernel/gen_system/GEN_HashedPtr.h b/source/kernel/gen_system/GEN_HashedPtr.h +index 39662ce..8ce30f0 100644 +--- a/source/kernel/gen_system/GEN_HashedPtr.h ++++ b/source/kernel/gen_system/GEN_HashedPtr.h +@@ -40,7 +40,7 @@ class GEN_HashedPtr + void* m_valptr; + public: + GEN_HashedPtr(void* val) : m_valptr(val) {}; +- unsigned int hash() const { return GEN_Hash((unsigned int) m_valptr);}; ++ unsigned int hash() const { return GEN_Hash((unsigned int)(unsigned long) m_valptr);}; + inline friend bool operator ==(const GEN_HashedPtr & rhs, const GEN_HashedPtr & lhs) { return rhs.m_valptr == lhs.m_valptr;}; + }; + +-- +2.2.1 + diff --git a/media-gfx/blender/files/blender-2.26-compile-4-regex-to-re.patch b/media-gfx/blender/files/blender-2.26-compile-4-regex-to-re.patch new file mode 100644 index 0000000..969fcf4 --- /dev/null +++ b/media-gfx/blender/files/blender-2.26-compile-4-regex-to-re.patch @@ -0,0 +1,92 @@ +From 8aaccad904fcfd0329f45c999128dc7c2ba2a3c0 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Thu, 28 Apr 2011 18:38:15 +0200 +Subject: [PATCH 4/6] Python: Migrate from module regex to module re + +--- + intern/python/freeze/makeconfig.py | 6 +++--- + intern/python/freeze/parsesetup.py | 21 ++++++++++----------- + 2 files changed, 13 insertions(+), 14 deletions(-) + +diff --git a/intern/python/freeze/makeconfig.py b/intern/python/freeze/makeconfig.py +index 5d1ba2c..11c97d8 100644 +--- a/intern/python/freeze/makeconfig.py ++++ b/intern/python/freeze/makeconfig.py +@@ -1,4 +1,4 @@ +-import regex ++import re + + + # Write the config.c file +@@ -6,8 +6,8 @@ import regex + never = ['marshal', '__main__', '__builtin__', 'sys', 'exceptions'] + + def makeconfig(infp, outfp, modules, with_ifdef=0): +- m1 = regex.compile('-- ADDMODULE MARKER 1 --') +- m2 = regex.compile('-- ADDMODULE MARKER 2 --') ++ m1 = re.compile('-- ADDMODULE MARKER 1 --') ++ m2 = re.compile('-- ADDMODULE MARKER 2 --') + while 1: + line = infp.readline() + if not line: break +diff --git a/intern/python/freeze/parsesetup.py b/intern/python/freeze/parsesetup.py +index 1795671..7cbb84e 100644 +--- a/intern/python/freeze/parsesetup.py ++++ b/intern/python/freeze/parsesetup.py +@@ -1,6 +1,6 @@ + # Parse Makefiles and Python Setup(.in) files. + +-import regex ++import re + import string + + +@@ -8,19 +8,17 @@ import string + # Return a dictionary mapping names to values. + # May raise IOError. + +-makevardef = regex.compile('^\([a-zA-Z0-9_]+\)[ \t]*=\(.*\)') ++makevardef = re.compile('^([a-zA-Z0-9_]+)[ \t]*=(.*)') + + def getmakevars(filename): + variables = {} + fp = open(filename) + try: +- while 1: +- line = fp.readline() +- if not line: +- break +- if makevardef.match(line) < 0: ++ for line in fp: ++ m = makevardef.match(line) ++ if m is None: + continue +- name, value = makevardef.group(1, 2) ++ name, value = m.group(1, 2) + # Strip trailing comment + i = string.find(value, '#') + if i >= 0: +@@ -37,7 +35,7 @@ def getmakevars(filename): + # definitions, the second mapping variable names to their values. + # May raise IOError. + +-setupvardef = regex.compile('^\([a-zA-Z0-9_]+\)=\(.*\)') ++setupvardef = re.compile('^([a-zA-Z0-9_]+)=(.*)') + + def getsetupinfo(filename): + modules = {} +@@ -52,8 +50,9 @@ def getsetupinfo(filename): + i = string.find(line, '#') + if i >= 0: + line = line[:i] +- if setupvardef.match(line) >= 0: +- name, value = setupvardef.group(1, 2) ++ m = setupvardef.match(line) ++ if m is not None: ++ name, value = m.group(1, 2) + variables[name] = string.strip(value) + else: + words = string.split(line) +-- +2.2.1 + diff --git a/media-gfx/blender/files/blender-2.26-compile-5-reserved-keyword-with.patch b/media-gfx/blender/files/blender-2.26-compile-5-reserved-keyword-with.patch new file mode 100644 index 0000000..a879c0d --- /dev/null +++ b/media-gfx/blender/files/blender-2.26-compile-5-reserved-keyword-with.patch @@ -0,0 +1,136 @@ +From 1c0917966080ef313924a76fe4bb399b667b2979 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Thu, 28 Apr 2011 18:40:05 +0200 +Subject: [PATCH 5/6] Python: Replace with to _with (reserved keyword by now) + +--- + intern/python/modules/TextTools/TextTools.py | 32 ++++++++++++++-------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/intern/python/modules/TextTools/TextTools.py b/intern/python/modules/TextTools/TextTools.py +index 7eae2bc..d3a8262 100644 +--- a/intern/python/modules/TextTools/TextTools.py ++++ b/intern/python/modules/TextTools/TextTools.py +@@ -166,7 +166,7 @@ def word_in_list(l): + # Extra stuff useful in combination with the C functions + # + +-def replace(text,what,with,start=0,stop=None, ++def replace(text,what,_with,start=0,stop=None, + + SearchObject=BMS,join=join,joinlist=joinlist,tag=tag, + string_replace=string.replace,type=type, +@@ -187,11 +187,11 @@ def replace(text,what,with,start=0,stop=None, + what = so.match + if stop is None: + if start == 0 and len(what) < 2: +- return string_replace(text,what,with) ++ return string_replace(text,what,_with) + stop = len(text) + t = ((text,sWordStart,so,+2), + # Found something, replace and continue searching +- (with,Skip+AppendTagobj,len(what),-1,-1), ++ (_with,Skip+AppendTagobj,len(what),-1,-1), + # Rest of text + (text,Move,ToEOF) + ) +@@ -202,7 +202,7 @@ def replace(text,what,with,start=0,stop=None, + + # Alternative (usually slower) versions using different techniques: + +-def _replace2(text,what,with,start=0,stop=None, ++def _replace2(text,what,_with,start=0,stop=None, + + join=join,joinlist=joinlist,tag=tag, + StringType=types.StringType,BMS=BMS): +@@ -221,13 +221,13 @@ def _replace2(text,what,with,start=0,stop=None, + stop = len(text) + if type(what) == StringType: + what=BMS(what) +- t = ((with,sFindWord,what,+1,+0),) ++ t = ((_with,sFindWord,what,+1,+0),) + found,taglist,last = tag(text,t,start,stop) + if not found: + return text + return join(joinlist(text,taglist)) + +-def _replace3(text,what,with, ++def _replace3(text,what,_with, + + join=string.join,FS=FS, + StringType=types.StringType): +@@ -240,12 +240,12 @@ def _replace3(text,what,with, + l = [] + x = 0 + for left,right in slices: +- l.append(text[x:left] + with) ++ l.append(text[x:left] + _with) + x = right + l.append(text[x:]) + return join(l,'') + +-def _replace4(text,what,with, ++def _replace4(text,what,_with, + + join=join,joinlist=joinlist,tag=tag,FS=FS, + StringType=types.StringType): +@@ -257,7 +257,7 @@ def _replace4(text,what,with, + return text + repl = [None]*len(slices) + for i in range(len(slices)): +- repl[i] = (with,)+slices[i] ++ repl[i] = (_with,)+slices[i] + return join(joinlist(text,repl)) + + +@@ -529,16 +529,16 @@ def _bench(file='mxTextTools/mxTextTools.c'): + print 'Replacing strings' + print '-'*72 + print +- for what,with in (('m','M'),('mx','MX'),('mxText','MXTEXT'), ++ for what,_with in (('m','M'),('mx','MX'),('mxText','MXTEXT'), + ('hmm','HMM'),('hmmm','HMM'),('hmhmm','HMM')): +- print 'Replace "%s" with "%s"' % (what,with) ++ print 'Replace "%s" with "%s"' % (what,_with) + t.start() + for i in range(100): +- rtext = string.replace(text,what,with) ++ rtext = string.replace(text,what,_with) + print 'with string.replace:',t.stop(),'sec.' + t.start() + for i in range(100): +- ttext = replace(text,what,with) ++ ttext = replace(text,what,_with) + print 'with tag.replace:',t.stop(),'sec.' + if ttext != rtext: + print 'results are NOT ok !' +@@ -546,7 +546,7 @@ def _bench(file='mxTextTools/mxTextTools.c'): + mismatch(rtext,ttext) + t.start() + for i in range(100): +- ttext = _replace2(text,what,with) ++ ttext = _replace2(text,what,_with) + print 'with tag._replace2:',t.stop(),'sec.' + if ttext != rtext: + print 'results are NOT ok !' +@@ -554,7 +554,7 @@ def _bench(file='mxTextTools/mxTextTools.c'): + print rtext + t.start() + for i in range(100): +- ttext = _replace3(text,what,with) ++ ttext = _replace3(text,what,_with) + print 'with tag._replace3:',t.stop(),'sec.' + if ttext != rtext: + print 'results are NOT ok !' +@@ -562,7 +562,7 @@ def _bench(file='mxTextTools/mxTextTools.c'): + print rtext + t.start() + for i in range(100): +- ttext = _replace4(text,what,with) ++ ttext = _replace4(text,what,_with) + print 'with tag._replace4:',t.stop(),'sec.' + if ttext != rtext: + print 'results are NOT ok !' +-- +2.2.1 + diff --git a/media-gfx/blender/files/blender-2.26-compile-6-fpic.patch b/media-gfx/blender/files/blender-2.26-compile-6-fpic.patch new file mode 100644 index 0000000..a5143da --- /dev/null +++ b/media-gfx/blender/files/blender-2.26-compile-6-fpic.patch @@ -0,0 +1,24 @@ +From 146b1b36f040ed6b68c30a7697b12627d8542c8b Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Thu, 28 Apr 2011 19:50:30 +0200 +Subject: [PATCH 6/6] Add -fPIC + +--- + source/blender/bpython/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/source/blender/bpython/Makefile.am b/source/blender/bpython/Makefile.am +index 081ee5a..e86d4ad 100644 +--- a/source/blender/bpython/Makefile.am ++++ b/source/blender/bpython/Makefile.am +@@ -1,6 +1,6 @@ + noinst_LTLIBRARIES = libblender_bpython.la + +-libblender_bpython_la_CFLAGS = -DFUTURE_PYTHON_API ++libblender_bpython_la_CFLAGS = -fPIC -DFUTURE_PYTHON_API + + libblender_bpython_la_LDFLAGS = -static \ + -L@PYTHONSYSPREFIX@/lib/python@PYTHON_VERSION@/config \ +-- +2.2.1 + |