From 5806e3942610f2e538e513b1e8966197bf08e89b Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Thu, 20 May 2004 09:13:39 +0000 Subject: [PATCH] Rene Rebe: updated blender (0.33), adapted the ROCK Linux build, worked around Makefile oddities and fixed compilation with gcc-3.4 (...) [2004051523040419106] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@3045 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/rene/blender/blender.conf | 36 ++++- package/rene/blender/blender.desc | 6 +- package/rene/blender/compile.patch | 60 ++++++++ package/rene/blender/gcc34.patch | 235 +++++++++++++++++++++++++++++ 4 files changed, 331 insertions(+), 6 deletions(-) create mode 100644 package/rene/blender/compile.patch create mode 100644 package/rene/blender/gcc34.patch diff --git a/package/rene/blender/blender.conf b/package/rene/blender/blender.conf index 6ce610c59..77e874ead 100644 --- a/package/rene/blender/blender.conf +++ b/package/rene/blender/blender.conf @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/rene/blender/blender.conf -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,6 +20,36 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- -# I guess s.th. is really wrong with our python setup ... :-( -var_append makeopt " " "\"LDFLAGS=-ltk8.4 -ltcl8.4 -lpng -lz\"" +# This .conf is full of hacks - do not copy it to an other .conf file! +# Those blender builds get messier with every release. Sorry Tom. + +PYVER="`python -V 2>&1 | sed 's/Python \([0-9]\.[0-9]\).*/\1/'`" + +blender_pc() { + echo "Building extern/solid ..." + cd extern/solid + ./configure ; eval $MAKE $makeopt + cd ../.. + + echo "Building extern/qhull ..." + cd extern/qhull/src + eval $MAKE $makeopt -f Makefile.txt + cd ../../.. +} + +blender_pm() { + # enter the builf output dir - the 2nd part is a mangled target name + cd obj/*/ + cp -vfa bin/blender* $bindir/ +} + + +var_append makeopt " " " \"LDFLAGS=-ltk8.4 -ltcl8.4 -lpng -lz\"" +var_append makeopt " " "NAN_PYTHON_VERSION=$PYVER" +makeinstopt="" + +var_append GCC_WRAPPER_INSERT " " "-I$PWD/extern/solid -I/usr/include/python$PYVER" + +hook_add premake 3 "blender_pc" +hook_add postmake 5 "blender_pm" diff --git a/package/rene/blender/blender.desc b/package/rene/blender/blender.desc index f7af50680..2ff2641a4 100644 --- a/package/rene/blender/blender.desc +++ b/package/rene/blender/blender.desc @@ -7,7 +7,7 @@ [COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! [COPY] [COPY] ROCK Linux: rock-src/package/rene/blender/blender.desc -[COPY] ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +[COPY] ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf [COPY] [COPY] This program is free software; you can redistribute it and/or modify [COPY] it under the terms of the GNU General Public License as published by @@ -36,8 +36,8 @@ [L] GPL [S] Stable -[V] 2.32 +[V] 2.33 [P] X -----5---9 626.000 -[D] 1059482471 blender-2.32.tar.bz2 http://download.blender.org/source/ +[D] 957428750 blender-2.33.tar.bz2 http://download.blender.org/source/ diff --git a/package/rene/blender/compile.patch b/package/rene/blender/compile.patch new file mode 100644 index 000000000..60177a213 --- /dev/null +++ b/package/rene/blender/compile.patch @@ -0,0 +1,60 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/rene/blender/compile.patch +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +diff -ur blender-2.33-orig/source/Makefile blender-2.33/source/Makefile +--- blender-2.33-orig/source/Makefile 2004-04-16 17:55:12.000000000 +0200 ++++ blender-2.33/source/Makefile 2004-05-13 13:24:46.189355464 +0200 +@@ -107,10 +107,10 @@ + COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a + COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a + COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a +- COMLIB += $(NAN_SOLID)/lib/libsolid.a ++ COMLIB += $(SRCHOME)/../extern/solid/src/.libs/libsolid.a + COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a + COMLIB += $(OCGDIR)/gameengine/blphys/fuzzics/$(DEBUG_DIR)libfuzzics.a +- COMLIB += $(NAN_QHULL)/lib/libqhull.a ++ COMLIB += $(SRCHOME)/../extern/qhull/src/libqhull.a + COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a + COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a + # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a +@@ -316,11 +316,10 @@ + BINTARGETS += xplink + BINTARGETS += blenderdynamic + BINTARGETS += blenderplayer +- BINTARGETS += blenderstatic + endif + ifeq ($(CPU),powerpc) + BINTARGETS = blenderdynamic +- BINTARGETS += blenderstatic ++ BINTARGETS += blenderplayer + endif + PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a + PYLIB += $(NAN_MXTEXTTOOLS) +diff -ur blender-2.33-orig/source/nan_definitions.mk blender-2.33/source/nan_definitions.mk +--- blender-2.33-orig/source/nan_definitions.mk 2004-05-01 20:07:58.000000000 +0200 ++++ blender-2.33/source/nan_definitions.mk 2004-05-13 13:20:58.566959328 +0200 +@@ -276,7 +276,7 @@ + export NAN_FREETYPE ?= /usr + export NAN_GETTEXT ?= /usr + export NAN_SDL ?= $(shell sdl-config --prefix) +- export NAN_SDLLIBS ?= $(shell sdl-config --libs) ++ export NAN_SDLLIBS ?= $(shell sdl-config --libs) -lsmpeg + export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags) + + # Uncomment the following line to use Mozilla inplace of netscape diff --git a/package/rene/blender/gcc34.patch b/package/rene/blender/gcc34.patch new file mode 100644 index 000000000..53d0a3177 --- /dev/null +++ b/package/rene/blender/gcc34.patch @@ -0,0 +1,235 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/rene/blender/gcc34.patch +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +diff -ur blender-2.33-orig/extern/solid/include/MT/Interval.h blender-2.33/extern/solid/include/MT/Interval.h +--- blender-2.33-orig/extern/solid/include/MT/Interval.h 2004-02-16 16:59:03.000000000 +0100 ++++ blender-2.33/extern/solid/include/MT/Interval.h 2004-05-13 11:39:04.073503624 +0200 +@@ -111,7 +111,7 @@ + inline std::ostream& + operator<<(std::ostream& os, const Interval& z) + { +- return os << '[' << x.lower() << ", " << x.upper() << ']'; ++ return os << '[' << z.lower() << ", " << z.upper() << ']'; + } + + template +diff -ur blender-2.33-orig/extern/solid/include/MT/Quaternion.h blender-2.33/extern/solid/include/MT/Quaternion.h +--- blender-2.33-orig/extern/solid/include/MT/Quaternion.h 2004-02-16 16:59:03.000000000 +0100 ++++ blender-2.33/extern/solid/include/MT/Quaternion.h 2004-05-13 11:39:25.245285024 +0200 +@@ -84,19 +84,19 @@ + + Quaternion& operator+=(const Quaternion& q) + { +- m_co[0] += q[0]; m_co[1] += q[1]; m_co[2] += q[2]; m_co[3] += q[3]; ++ this->m_co[0] += q[0]; this->m_co[1] += q[1]; this->m_co[2] += q[2]; this->m_co[3] += q[3]; + return *this; + } + + Quaternion& operator-=(const Quaternion& q) + { +- m_co[0] -= q[0]; m_co[1] -= q[1]; m_co[2] -= q[2]; m_co[3] -= q[3]; ++ this->m_co[0] -= q[0]; this->m_co[1] -= q[1]; this->m_co[2] -= q[2]; this->m_co[3] -= q[3]; + return *this; + } + + Quaternion& operator*=(const Scalar& s) + { +- m_co[0] *= s; m_co[1] *= s; m_co[2] *= s; m_co[3] *= s; ++ this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s; this->m_co[3] *= s; + return *this; + } + +@@ -108,16 +108,16 @@ + + Quaternion& operator*=(const Quaternion& q) + { +- setValue(m_co[3] * q[0] + m_co[0] * q[3] + m_co[1] * q[2] - m_co[2] * q[1], +- m_co[3] * q[1] + m_co[1] * q[3] + m_co[2] * q[0] - m_co[0] * q[2], +- m_co[3] * q[2] + m_co[2] * q[3] + m_co[0] * q[1] - m_co[1] * q[0], +- m_co[3] * q[3] - m_co[0] * q[0] - m_co[1] * q[1] - m_co[2] * q[2]); ++ setValue(this->m_co[3] * q[0] + this->m_co[0] * q[3] + this->m_co[1] * q[2] - this->m_co[2] * q[1], ++ this->m_co[3] * q[1] + this->m_co[1] * q[3] + this->m_co[2] * q[0] - this->m_co[0] * q[2], ++ this->m_co[3] * q[2] + this->m_co[2] * q[3] + this->m_co[0] * q[1] - this->m_co[1] * q[0], ++ this->m_co[3] * q[3] - this->m_co[0] * q[0] - this->m_co[1] * q[1] - this->m_co[2] * q[2]); + return *this; + } + + Scalar dot(const Quaternion& q) const + { +- return m_co[0] * q[0] + m_co[1] * q[1] + m_co[2] * q[2] + m_co[3] * q[3]; ++ return this->m_co[0] * q[0] + this->m_co[1] * q[1] + this->m_co[2] * q[2] + this->m_co[3] * q[3]; + } + + Scalar length2() const +@@ -149,7 +149,7 @@ + + Quaternion conjugate() const + { +- return Quaternion(-m_co[0], -m_co[1], -m_co[2], m_co[3]); ++ return Quaternion(- this->m_co[0], - this->m_co[1], - this->m_co[2], this->m_co[3]); + } + + Quaternion inverse() const +@@ -165,10 +165,10 @@ + Scalar d = Scalar(1.0) / Scalar_traits::sin(theta); + Scalar s0 = Scalar_traits::sin((Scalar(1.0) - t) * theta); + Scalar s1 = Scalar_traits::sin(t * theta); +- return Quaternion((m_co[0] * s0 + q[0] * s1) * d, +- (m_co[1] * s0 + q[1] * s1) * d, +- (m_co[2] * s0 + q[2] * s1) * d, +- (m_co[3] * s0 + q[3] * s1) * d); ++ return Quaternion((this->m_co[0] * s0 + q[0] * s1) * d, ++ (this->m_co[1] * s0 + q[1] * s1) * d, ++ (this->m_co[2] * s0 + q[2] * s1) * d, ++ (this->m_co[3] * s0 + q[3] * s1) * d); + } + else + { +diff -ur blender-2.33-orig/extern/solid/include/MT/Vector3.h blender-2.33/extern/solid/include/MT/Vector3.h +--- blender-2.33-orig/extern/solid/include/MT/Vector3.h 2004-02-16 16:59:03.000000000 +0100 ++++ blender-2.33/extern/solid/include/MT/Vector3.h 2004-05-13 11:49:17.590234904 +0200 +@@ -45,19 +45,19 @@ + + Vector3& operator+=(const Vector3& v) + { +- m_co[0] += v[0]; m_co[1] += v[1]; m_co[2] += v[2]; ++ this->m_co[0] += v[0]; this->m_co[1] += v[1]; this->m_co[2] += v[2]; + return *this; + } + + Vector3& operator-=(const Vector3& v) + { +- m_co[0] -= v[0]; m_co[1] -= v[1]; m_co[2] -= v[2]; ++ this->m_co[0] -= v[0]; this->m_co[1] -= v[1]; this->m_co[2] -= v[2]; + return *this; + } + + Vector3& operator*=(const Scalar& s) + { +- m_co[0] *= s; m_co[1] *= s; m_co[2] *= s; ++ this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s; + return *this; + } + +@@ -69,7 +69,7 @@ + + Scalar dot(const Vector3& v) const + { +- return m_co[0] * v[0] + m_co[1] * v[1] + m_co[2] * v[2]; ++ return this->m_co[0] * v[0] + this->m_co[1] * v[1] + this->m_co[2] * v[2]; + } + + Scalar length2() const +@@ -111,33 +111,33 @@ + + Vector3 absolute() const + { +- return Vector3(Scalar_traits::abs(m_co[0]), +- Scalar_traits::abs(m_co[1]), +- Scalar_traits::abs(m_co[2])); ++ return Vector3(Scalar_traits::abs(this->m_co[0]), ++ Scalar_traits::abs(this->m_co[1]), ++ Scalar_traits::abs(this->m_co[2])); + } + + Vector3 cross(const Vector3& v) const + { +- return Vector3(m_co[1] * v[2] - m_co[2] * v[1], +- m_co[2] * v[0] - m_co[0] * v[2], +- m_co[0] * v[1] - m_co[1] * v[0]); ++ return Vector3(this->m_co[1] * v[2] - this->m_co[2] * v[1], ++ this->m_co[2] * v[0] - this->m_co[0] * v[2], ++ this->m_co[0] * v[1] - this->m_co[1] * v[0]); + } + + Scalar triple(const Vector3& v1, const Vector3& v2) const + { +- return m_co[0] * (v1[1] * v2[2] - v1[2] * v2[1]) + +- m_co[1] * (v1[2] * v2[0] - v1[0] * v2[2]) + +- m_co[2] * (v1[0] * v2[1] - v1[1] * v2[0]); ++ return this->m_co[0] * (v1[1] * v2[2] - v1[2] * v2[1]) + ++ this->m_co[1] * (v1[2] * v2[0] - v1[0] * v2[2]) + ++ this->m_co[2] * (v1[0] * v2[1] - v1[1] * v2[0]); + } + + int minAxis() const + { +- return m_co[0] < m_co[1] ? (m_co[0] < m_co[2] ? 0 : 2) : (m_co[1] < m_co[2] ? 1 : 2); ++ return this->m_co[0] < this->m_co[1] ? (this->m_co[0] < this->m_co[2] ? 0 : 2) : (this->m_co[1] < this->m_co[2] ? 1 : 2); + } + + int maxAxis() const + { +- return m_co[0] < m_co[1] ? (m_co[1] < m_co[2] ? 2 : 1) : (m_co[0] < m_co[2] ? 2 : 0); ++ return this->m_co[0] < this->m_co[1] ? (this->m_co[1] < this->m_co[2] ? 2 : 1) : (this->m_co[0] < this->m_co[2] ? 2 : 0); + } + + int furthestAxis() const +@@ -152,9 +152,9 @@ + + Vector3 lerp(const Vector3& v, const Scalar& t) const + { +- return Vector3(m_co[0] + (v[0] - m_co[0]) * t, +- m_co[1] + (v[1] - m_co[1]) * t, +- m_co[2] + (v[2] - m_co[2]) * t); ++ return Vector3(this->m_co[0] + (v[0] - this->m_co[0]) * t, ++ this->m_co[1] + (v[1] - this->m_co[1]) * t, ++ this->m_co[2] + (v[2] - this->m_co[2]) * t); + } + + static Vector3 random() +diff -ur blender-2.33-orig/extern/solid/src/complex/DT_BBoxTree.h blender-2.33/extern/solid/src/complex/DT_BBoxTree.h +--- blender-2.33-orig/extern/solid/src/complex/DT_BBoxTree.h 2004-02-16 16:59:05.000000000 +0100 ++++ blender-2.33/extern/solid/src/complex/DT_BBoxTree.h 2004-05-13 11:54:17.481644480 +0200 +@@ -136,7 +136,7 @@ + : DT_Pack(a, b), + m_margin(margin) + { +- m_b_cbox += computeCBox(margin, m_a.m_inv_xform); ++ this->m_b_cbox += computeCBox(margin, this->m_a.m_inv_xform); + } + + MT_Scalar m_margin; +@@ -185,7 +185,7 @@ + + if (a.m_type == DT_BBoxTree::LEAF) + { +- return ::ray_cast(rd, a.m_index, source, target, lambda, normal); ++ return ray_cast(rd, a.m_index, source, target, lambda, normal); + } + else + { +diff -ur blender-2.33-orig/intern/iksolver/intern/TNT/vec.h blender-2.33/intern/iksolver/intern/TNT/vec.h +--- blender-2.33-orig/intern/iksolver/intern/TNT/vec.h 2002-11-20 15:43:09.000000000 +0100 ++++ blender-2.33/intern/iksolver/intern/TNT/vec.h 2004-05-13 11:17:34.770507472 +0200 +@@ -296,11 +296,11 @@ + { + Subscript N=A.dim(); + +- s << N << endl; ++ s << N << std::endl; + + for (Subscript i=0; i