diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2015-02-23 19:15:16 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2015-02-23 21:35:36 +0100 |
commit | 3116b3b650bc2f8c1daa386308eb7f6049adbf1c (patch) | |
tree | 7ff5647db225d422d6e70d3f008de9fc058bbb12 /media-gfx | |
parent | media-gfx/blender: Fix ebuild errors that portage complains about (diff) | |
download | blender-gentoo-logo-3116b3b650bc2f8c1daa386308eb7f6049adbf1c.tar.gz blender-gentoo-logo-3116b3b650bc2f8c1daa386308eb7f6049adbf1c.tar.bz2 blender-gentoo-logo-3116b3b650bc2f8c1daa386308eb7f6049adbf1c.zip |
media-gfx/blender: Integrate 2.31a compilation patches
Diffstat (limited to 'media-gfx')
8 files changed, 356 insertions, 7 deletions
diff --git a/media-gfx/blender/blender-2.31a.ebuild b/media-gfx/blender/blender-2.31a.ebuild index 86b7f63..d31e1dd 100644 --- a/media-gfx/blender/blender-2.31a.ebuild +++ b/media-gfx/blender/blender-2.31a.ebuild @@ -2,7 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/Attic/blender-2.31a.ebuild,v 1.9 2005/01/03 12:41:13 lu_zero dead $ -inherit flag-o-matic eutils +EAPI="5" + +inherit autotools flag-o-matic eutils replace-flags -march=pentium4 -march=pentium3 IUSE="blender-game fmod sdl jpeg png mozilla truetype static" @@ -30,16 +32,18 @@ DEPEND="virtual/x11 >=media-libs/libvorbis-1.0 >=dev-libs/openssl-0.9.6" -src_unpack() { - unpack ${A} +src_prepare() { epatch ${FILESDIR}/configure-fix-${PV}.patch epatch ${FILESDIR}/${P}-plugins.patch + epatch ${FILESDIR}/${P}-compile-*.patch + eautoreconf + cd ${S}/release/plugins chmod 755 bmake } -src_compile() { +src_configure() { local myconf="" # SDL Support @@ -69,10 +73,11 @@ src_compile() { # use blender-plugin && myconf="${myconf} --enable-blenderplugin" econf ${myconf} || die - emake || die - cd ${S}/release/plugins - emake || die +} +src_compile() { + emake || die + emake -C release/plugins || die } src_install() { diff --git a/media-gfx/blender/files/blender-2.31a-compile-1-fix-configure.ac.patch b/media-gfx/blender/files/blender-2.31a-compile-1-fix-configure.ac.patch new file mode 100644 index 0000000..b474761 --- /dev/null +++ b/media-gfx/blender/files/blender-2.31a-compile-1-fix-configure.ac.patch @@ -0,0 +1,36 @@ +From 7b4e88b556f1246a8e78ba74a88efb513742ed1c 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 + +Conflicts: + + configure.ac +--- + configure.ac | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 6d5ebf8..4cdb83f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -12,7 +12,7 @@ dnl -------------------- + AC_PREREQ(2.12) + AC_INIT(blender, 2.29, ) + AC_CANONICAL_SYSTEM +-AM_INIT_AUTOMAKE([$PACKAGE_NAME], [$PACKAGE_VERSION]) ++AM_INIT_AUTOMAKE([foreign]) + AC_DISABLE_SHARED + + dnl check for the platform make +@@ -61,7 +61,6 @@ dnl ------------------- + AC_PROG_CC + AC_PROG_LN_S + AC_PROG_LIBTOOL +- AC_PROG_RANLIB + AC_CHECK_TOOL([STRIP],[strip]) + AC_PROG_AWK + +-- +2.2.1 + diff --git a/media-gfx/blender/files/blender-2.31a-compile-2-c-include-and-namespace-fixes.patch b/media-gfx/blender/files/blender-2.31a-compile-2-c-include-and-namespace-fixes.patch new file mode 100644 index 0000000..3e02d54 --- /dev/null +++ b/media-gfx/blender/files/blender-2.31a-compile-2-c-include-and-namespace-fixes.patch @@ -0,0 +1,87 @@ +From b466269bd802aeada805ec1fae7c55c5e4a02b74 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/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 +- + 5 files changed, 9 insertions(+), 5 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/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.31a-compile-3-silence-precision-loss.patch b/media-gfx/blender/files/blender-2.31a-compile-3-silence-precision-loss.patch new file mode 100644 index 0000000..51001d0 --- /dev/null +++ b/media-gfx/blender/files/blender-2.31a-compile-3-silence-precision-loss.patch @@ -0,0 +1,48 @@ +From 7d6c0bb6e17c34806d9dd5d558eb25c7cc7de0fa 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 b5b37e1..f6e181f 100644 +--- a/source/blender/render/intern/source/RE_basicShadowBuffer.cpp ++++ b/source/blender/render/intern/source/RE_basicShadowBuffer.cpp +@@ -364,7 +364,7 @@ float RE_BasicShadowBuffer::readshadowbuf(struct ShadBuf *shb, + else { + /* got warning on this from DEC alpha (64 bits).... */ + /* but it's working code! (ton) */ +- zsamp= (int) rz; ++ zsamp= (int)(long) rz; + } + + if(zsamp > zs) return 1.0; /* absolute no shadow */ +@@ -547,7 +547,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; + } + + /* NO schadow when sampled at 'eternal' distance */ +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.31a-compile-4-casts.patch b/media-gfx/blender/files/blender-2.31a-compile-4-casts.patch new file mode 100644 index 0000000..287db9d --- /dev/null +++ b/media-gfx/blender/files/blender-2.31a-compile-4-casts.patch @@ -0,0 +1,34 @@ +From 6c7c5018b532a95b66bacdef323590ba56cdad3d Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Thu, 5 May 2011 06:17:27 +0200 +Subject: [PATCH 4/6] C++: Casts + +--- + intern/SoundSystem/openal/SND_OpenALDevice.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp +index 9367301..5d7d7ba 100644 +--- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp ++++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp +@@ -224,7 +224,7 @@ SND_OpenALDevice::SND_OpenALDevice() + m_context = alcCreateContext(dev, NULL); + + if (m_context) { +- alcMakeContextCurrent(m_context); ++ alcMakeContextCurrent(static_cast<ALCcontext*>(m_context)); + m_audio = true; + } + } +@@ -291,7 +291,7 @@ void SND_OpenALDevice::MakeCurrent() const + SND_OpenALDevice::~SND_OpenALDevice() + { + if (m_context) { +- alcMakeContextCurrent(m_context); ++ alcMakeContextCurrent(static_cast<ALCcontext*>(m_context)); + + if (m_buffersinitialized) + alDeleteBuffers(NUM_BUFFERS, m_buffers); +-- +2.2.1 + diff --git a/media-gfx/blender/files/blender-2.31a-compile-5-alut-api.patch b/media-gfx/blender/files/blender-2.31a-compile-5-alut-api.patch new file mode 100644 index 0000000..49723cc --- /dev/null +++ b/media-gfx/blender/files/blender-2.31a-compile-5-alut-api.patch @@ -0,0 +1,30 @@ +From 597a14c62a3987af81fd91b9fc4331345319b9d2 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Thu, 5 May 2011 06:17:39 +0200 +Subject: [PATCH 5/6] Alut API fix + +--- + intern/SoundSystem/openal/SND_OpenALDevice.cpp | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp +index 5d7d7ba..5c44d2b 100644 +--- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp ++++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp +@@ -357,13 +357,7 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name, + /* or from file? */ + else + { +-#ifdef WIN32 + alutLoadWAVFile((signed char*)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate, &loop); +-#else +- alutLoadWAV((char*)samplename.Ptr(), &data, +- &sampleformat, &numberofsamples, +- &samplerate, &frequency); +-#endif + /* put it in the buffer */ + alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate); + } +-- +2.2.1 + diff --git a/media-gfx/blender/files/blender-2.31a-compile-6-move-effect-type.patch b/media-gfx/blender/files/blender-2.31a-compile-6-move-effect-type.patch new file mode 100644 index 0000000..ef12825 --- /dev/null +++ b/media-gfx/blender/files/blender-2.31a-compile-6-move-effect-type.patch @@ -0,0 +1,84 @@ +From 26f42e427d1f603b3dc6b15040519037cff95ad2 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Thu, 5 May 2011 06:28:58 +0200 +Subject: [PATCH 6/6] Move variable Effect_Type from .h to .c file + +--- + source/blender/python/api2_2x/Effect.c | 25 +++++++++++++++++++++++++ + source/blender/python/api2_2x/Effect.h | 25 +------------------------ + 2 files changed, 26 insertions(+), 24 deletions(-) + +diff --git a/source/blender/python/api2_2x/Effect.c b/source/blender/python/api2_2x/Effect.c +index 13afa2a..6c38a96 100644 +--- a/source/blender/python/api2_2x/Effect.c ++++ b/source/blender/python/api2_2x/Effect.c +@@ -33,6 +33,31 @@ + #include "Particle.h" + #include "Wave.h" + ++PyTypeObject Effect_Type = ++{ ++ PyObject_HEAD_INIT(NULL) ++ 0, /* ob_size */ ++ "Effect", /* tp_name */ ++ sizeof (BPy_Effect), /* tp_basicsize */ ++ 0, /* tp_itemsize */ ++ /* methods */ ++ (destructor)EffectDeAlloc, /* tp_dealloc */ ++ 0, /* tp_print */ ++ (getattrfunc)EffectGetAttr, /* tp_getattr */ ++ (setattrfunc)EffectSetAttr, /* tp_setattr */ ++ 0, /* tp_compare */ ++ (reprfunc)EffectRepr, /* tp_repr */ ++ 0, /* tp_as_number */ ++ 0, /* tp_as_sequence */ ++ 0, /* tp_as_mapping */ ++ 0, /* tp_as_hash */ ++ 0,0,0,0,0,0, ++ 0, /* tp_doc */ ++ 0,0,0,0,0,0, ++ BPy_Effect_methods, /* tp_methods */ ++ 0, /* tp_members */ ++}; ++ + + /*****************************************************************************/ + /* Python method structure definition for Blender.Effect module: */ +diff --git a/source/blender/python/api2_2x/Effect.h b/source/blender/python/api2_2x/Effect.h +index 711afad..01d2b58 100644 +--- a/source/blender/python/api2_2x/Effect.h ++++ b/source/blender/python/api2_2x/Effect.h +@@ -82,29 +82,6 @@ struct Effect* EffectFromPyObject (PyObject *py_obj); + /*****************************************************************************/ + /* Python Effect_Type structure definition: */ + /*****************************************************************************/ +-static PyTypeObject Effect_Type = +-{ +- PyObject_HEAD_INIT(NULL) +- 0, /* ob_size */ +- "Effect", /* tp_name */ +- sizeof (BPy_Effect), /* tp_basicsize */ +- 0, /* tp_itemsize */ +- /* methods */ +- (destructor)EffectDeAlloc, /* tp_dealloc */ +- 0, /* tp_print */ +- (getattrfunc)EffectGetAttr, /* tp_getattr */ +- (setattrfunc)EffectSetAttr, /* tp_setattr */ +- 0, /* tp_compare */ +- (reprfunc)EffectRepr, /* tp_repr */ +- 0, /* tp_as_number */ +- 0, /* tp_as_sequence */ +- 0, /* tp_as_mapping */ +- 0, /* tp_as_hash */ +- 0,0,0,0,0,0, +- 0, /* tp_doc */ +- 0,0,0,0,0,0, +- BPy_Effect_methods, /* tp_methods */ +- 0, /* tp_members */ +-}; ++extern PyTypeObject Effect_Type; + + #endif /* EXPP_EFFECT_H */ +-- +2.2.1 + diff --git a/media-gfx/blender/files/blender-2.31a-compile-7-fpic.patch b/media-gfx/blender/files/blender-2.31a-compile-7-fpic.patch new file mode 100644 index 0000000..069bfd5 --- /dev/null +++ b/media-gfx/blender/files/blender-2.31a-compile-7-fpic.patch @@ -0,0 +1,25 @@ +From 999d4faefa2a1a09eb6d99cdb7b213c0dd62f0a6 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Mon, 23 Feb 2015 19:48:56 +0100 +Subject: [PATCH] Address "recompile with -fPIC" linking error + +--- + release/plugins/bmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/release/plugins/bmake b/release/plugins/bmake +index 0023475..c83c51e 100755 +--- a/release/plugins/bmake ++++ b/release/plugins/bmake +@@ -60,7 +60,7 @@ elif ( test $UNAME = "OpenBSD" ) then + LDFLAGS="-Bshareable"; + elif ( test $UNAME = "Linux" ) then + CC="gcc"; +-# CFLAGS="-fPIC -funsigned-char -O2"; ++ CFLAGS="-fPIC -O2"; + + LD="ld"; + LDFLAGS="-Bshareable"; +-- +2.2.1 + |