diff --git a/blender-2.37-x86_64.patch b/blender-2.37-x86_64.patch deleted file mode 100644 index 73bd42b..0000000 --- a/blender-2.37-x86_64.patch +++ /dev/null @@ -1,120 +0,0 @@ ---- blender/source/gameengine/Expressions/KX_HashedPtr.cpp.x86_64 2004-03-22 17:01:28.000000000 -0500 -+++ blender/source/gameengine/Expressions/KX_HashedPtr.cpp 2005-06-05 10:09:48.000000000 -0400 -@@ -57,5 +57,5 @@ - - unsigned int CHashedPtr::hash() const - { -- return KX_Hash((unsigned int) m_valptr); -+ return KX_Hash((unsigned int)((unsigned long) m_valptr & 0x00000000FFFFFFFF)); - } ---- blender/source/gameengine/Ketsji/KX_WorldIpoController.cpp.x86_64 2005-03-09 14:45:59.000000000 -0500 -+++ blender/source/gameengine/Ketsji/KX_WorldIpoController.cpp 2005-06-05 10:09:48.000000000 -0400 -@@ -92,10 +92,10 @@ - iporeplica->AddInterpolator(copyipo); - - MT_Scalar* scaal = ((KX_ScalarInterpolator*)*i)->GetTarget(); -- int orgbase = (int)this; -- int orgloc = (int)scaal; -- int offset = orgloc-orgbase; -- int newaddrbase = (int)iporeplica + offset; -+ long orgbase = (long)this; -+ long orgloc = (long)scaal; -+ long offset = orgloc-orgbase; -+ long newaddrbase = (long)iporeplica + offset; - MT_Scalar* blaptr = (MT_Scalar*) newaddrbase; - copyipo->SetNewTarget((MT_Scalar*)blaptr); - } ---- blender/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp.x86_64 2004-03-22 17:01:52.000000000 -0500 -+++ blender/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp 2005-06-05 10:09:48.000000000 -0400 -@@ -87,10 +87,10 @@ - iporeplica->AddInterpolator(copyipo); - - MT_Scalar* scaal = ((KX_ScalarInterpolator*)*i)->GetTarget(); -- int orgbase = (int)this; -- int orgloc = (int)scaal; -- int offset = orgloc-orgbase; -- int newaddrbase = (int)iporeplica + offset; -+ long orgbase = (long)this; -+ long orgloc = (long)scaal; -+ long offset = orgloc-orgbase; -+ long newaddrbase = (long)iporeplica + offset; - MT_Scalar* blaptr = (MT_Scalar*) newaddrbase; - copyipo->SetNewTarget((MT_Scalar*)blaptr); - } ---- blender/source/gameengine/Ketsji/KX_LightIpoSGController.cpp.x86_64 2004-03-22 17:01:52.000000000 -0500 -+++ blender/source/gameengine/Ketsji/KX_LightIpoSGController.cpp 2005-06-05 10:09:48.000000000 -0400 -@@ -97,10 +97,10 @@ - iporeplica->AddInterpolator(copyipo); - - MT_Scalar* scaal = ((KX_ScalarInterpolator*)*i)->GetTarget(); -- int orgbase = (int)this; -- int orgloc = (int)scaal; -- int offset = orgloc-orgbase; -- int newaddrbase = (int)iporeplica + offset; -+ long orgbase = (long)this; -+ long orgloc = (long)scaal; -+ long offset = orgloc-orgbase; -+ long newaddrbase = (long)iporeplica + offset; - MT_Scalar* blaptr = (MT_Scalar*) newaddrbase; - copyipo->SetNewTarget((MT_Scalar*)blaptr); - } ---- blender/source/gameengine/Ketsji/KX_IPO_SGController.cpp.x86_64 2005-03-25 05:33:37.000000000 -0500 -+++ blender/source/gameengine/Ketsji/KX_IPO_SGController.cpp 2005-06-05 10:09:48.000000000 -0400 -@@ -168,10 +168,10 @@ - iporeplica->AddInterpolator(copyipo); - - MT_Scalar* scaal = ((KX_ScalarInterpolator*)*i)->GetTarget(); -- int orgbase = (int)&m_ipo_xform; -- int orgloc = (int)scaal; -- int offset = orgloc-orgbase; -- int newaddrbase = (int)&iporeplica->m_ipo_xform; -+ long orgbase = (long)&m_ipo_xform; -+ long orgloc = (long)scaal; -+ long offset = orgloc-orgbase; -+ long newaddrbase = (long)&iporeplica->m_ipo_xform; - newaddrbase += offset; - MT_Scalar* blaptr = (MT_Scalar*) newaddrbase; - copyipo->SetNewTarget((MT_Scalar*)blaptr); ---- blender/source/gameengine/Ketsji/KX_GameObject.cpp.x86_64 2005-04-18 07:44:21.000000000 -0400 -+++ blender/source/gameengine/Ketsji/KX_GameObject.cpp 2005-06-05 10:09:48.000000000 -0400 -@@ -1069,10 +1069,10 @@ - PyObject* kwds) - { - KX_IPhysicsController* ctrl = GetPhysicsController(); -- int physid=0; -+ long physid=0; - if (ctrl) - { -- physid= (int)ctrl->GetUserData(); -+ physid= (long)ctrl->GetUserData(); - } - return PyInt_FromLong(physid); - } ---- blender/source/gameengine/Ketsji/KX_CameraIpoSGController.cpp.x86_64 2004-07-21 20:26:34.000000000 -0400 -+++ blender/source/gameengine/Ketsji/KX_CameraIpoSGController.cpp 2005-06-05 10:09:48.000000000 -0400 -@@ -92,10 +92,10 @@ - iporeplica->AddInterpolator(copyipo); - - MT_Scalar* scaal = ((KX_ScalarInterpolator*)*i)->GetTarget(); -- int orgbase = (int)this; -- int orgloc = (int)scaal; -- int offset = orgloc-orgbase; -- int newaddrbase = (int)iporeplica + offset; -+ long orgbase = (long)this; -+ long orgloc = (long)scaal; -+ long offset = orgloc-orgbase; -+ long newaddrbase = (long)iporeplica + offset; - MT_Scalar* blaptr = (MT_Scalar*) newaddrbase; - copyipo->SetNewTarget((MT_Scalar*)blaptr); - } ---- blender/source/kernel/gen_system/GEN_HashedPtr.h.x86_64 2002-12-27 08:11:00.000000000 -0500 -+++ blender/source/kernel/gen_system/GEN_HashedPtr.h 2005-06-05 10:09:48.000000000 -0400 -@@ -40,7 +40,7 @@ - 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 & 0x00000000FFFFFFFF));}; - inline friend bool operator ==(const GEN_HashedPtr & rhs, const GEN_HashedPtr & lhs) { return rhs.m_valptr == lhs.m_valptr;}; - }; - diff --git a/blender-2.41-alut.patch b/blender-2.41-alut.patch deleted file mode 100644 index 560c8f7..0000000 --- a/blender-2.41-alut.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- blender/SConstruct.fa 2006-02-06 22:02:31.000000000 +0100 -+++ blender/SConstruct 2006-02-06 22:03:32.000000000 +0100 -@@ -146,7 +146,7 @@ - gettext_libpath = [] - gettext_include = [] - # OpenAL library information -- openal_lib = ['openal'] -+ openal_lib = ['openal', 'alut'] - openal_libpath = ['/usr/lib'] - openal_include = ['/usr/include'] - diff --git a/blender-2.42-scons.patch b/blender-2.42-scons.patch new file mode 100644 index 0000000..7e21e3e --- /dev/null +++ b/blender-2.42-scons.patch @@ -0,0 +1,20 @@ +--- blender2.42/SConstruct.org 2006-06-23 20:52:31.000000000 +0200 ++++ blender2.42/SConstruct 2006-07-17 19:09:52.000000000 +0200 +@@ -166,6 +166,8 @@ + + printdebug = B.arguments.get('BF_LISTDEBUG', 0) + ++env['CCFLAGS'] = env['CCFLAGS'].split() ++ + # see if this linux distro has libalut + + if env['OURPLATFORM'] == 'linux2' : +@@ -181,7 +183,7 @@ + + def CheckFreeAlut(context,env): + context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC ) +- env['LIBS'] = 'alut' ++ env['LIBS'] = ['alut', 'openal'] + result = context.TryLink(mylib_test_source_file, '.c') + context.Result(result) + return result diff --git a/blender-2.42.config b/blender-2.42.config new file mode 100644 index 0000000..18f3324 --- /dev/null +++ b/blender-2.42.config @@ -0,0 +1,153 @@ +LCGDIR = 'lib/linux2' +BF_PYTHON = '/usr' +BF_PYTHON_VERSION = '2.4' +BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' +BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}' +BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a' +BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic'] + +WITH_BF_OPENAL = 'true' +BF_OPENAL = '/usr' +BF_OPENAL_INC = '${BF_OPENAL}/include' +BF_OPENAL_LIB = 'openal' + +WITH_BF_SDL = 'true' +BF_SDL = '/usr' #$(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_FMOD = 'false' +BF_FMOD = LCGDIR + '/fmod' + +WITH_BF_OPENEXR = 'true' +BF_OPENEXR = '/usr' +BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR' +BF_OPENEXR_LIB = 'Half IlmImf Iex Imath ' + +WITH_BF_JPEG = 'true' +BF_JPEG = '/usr' +BF_JPEG_INC = '${BF_JPEG}/include' +BF_JPEG_LIB = 'jpeg' + +WITH_BF_PNG = 'true' +BF_PNG = '/usr' +BF_PNG_INC = '${BF_PNG}/include' +BF_PNG_LIB = 'png' + +BF_TIFF = '/usr' +BF_TIFF_INC = '${BF_TIFF}/include' + +WITH_BF_ZLIB = 'true' +BF_ZLIB = '/usr' +BF_ZLIB_INC = '${BF_ZLIB}/include' +BF_ZLIB_LIB = 'z' + +WITH_BF_INTERNATIONAL = 'true' + +BF_GETTEXT = '/usr' +BF_GETTEXT_INC = '${BF_GETTEXT}/include' +BF_GETTEXT_LIB = 'gettextlib' +BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' + +WITH_BF_FTGL = 'true' +BF_FTGL = '#extern/bFTGL' +BF_FTGL_INC = '${BF_FTGL}/include' +BF_FTGL_LIB = 'extern_ftgl' + +WITH_BF_GAMEENGINE='true' + +WITH_BF_ODE = 'false' +BF_ODE = LCGDIR + '/ode' +BF_ODE_INC = BF_ODE + '/include' +BF_ODE_LIB = BF_ODE + '/lib/libode.a' + +WITH_BF_BULLET = 'true' +BF_BULLET = '#extern/bullet' +BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet' +BF_BULLET_LIB = 'extern_bullet' + +BF_SOLID = '#extern/solid' +BF_SOLID_INC = '${BF_SOLID}' +BF_SOLID_LIB = 'extern_solid' + +#WITH_BF_NSPR = 'true' +#BF_NSPR = $(LCGDIR)/nspr +#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr +#BF_NSPR_LIB = + +# Uncomment the following line to use Mozilla inplace of netscape +#CPPFLAGS += -DMOZ_NOT_NET +# Location of MOZILLA/Netscape header files... +#BF_MOZILLA = $(LCGDIR)/mozilla +#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl +#BF_MOZILLA_LIB = +# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB +# if this is not set. +# +# Be paranoid regarding library creation (do not update archives) +#BF_PARANOID = 'true' + +# enable freetype2 support for text objects +BF_FREETYPE = '/usr' +BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2' +BF_FREETYPE_LIB = 'freetype' + +WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME +BF_QUICKTIME = '/usr/local' +BF_QUICKTIME_INC = '${BF_QUICKTIME}/include' + +# enable ffmpeg support +WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG +BF_FFMPEG = '/usr' +BF_FFMPEG_INC = '${BF_FFMPEG}/include' +BF_FFMPEG_LIBPATH='$(BF_FFMPEG)/lib' +BF_FFMPEG_LIB = 'avformat avcodec avutil' + +# Mesa Libs should go here if your using them as well.... +WITH_BF_STATICOPENGL = 'false' +BF_OPENGL = '/usr' +BF_OPENGL_INC = '${BF_OPENGL}/include' +BF_OPENGL_LIB = 'GL GLU X11 Xi' +BF_OPENGL_LIBPATH = '/usr/lib' +BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a' + +## +CC = 'gcc' +CXX = 'g++' +##ifeq ($CPU),alpha) +## CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee + +CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing'] + +CPPFLAGS = ['-DXP_UNIX'] +CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing'] +REL_CFLAGS = ['-O2'] +REL_CCFLAGS = ['-O2'] +##BF_DEPEND = 'true' +## +##AR = ar +##ARFLAGS = ruv +##ARFLAGSQUIET = ru +## +C_WARN = '-Wall -Wno-char-subscripts' + +CC_WARN = '-Wall' + +##FIX_STUBS_WARNINGS = -Wno-unused + +LLIBS = 'util c m dl pthread stdc++' +##LOPTS = --dynamic +##DYNLDFLAGS = -shared $(LDFLAGS) + +BF_PROFILE_FLAGS = ['-pg','-g'] +BF_PROFILE = 'false' + +BF_DEBUG = 'false' +BF_DEBUG_FLAGS = '' + +BF_BUILDDIR = 'build/linux2' +BF_INSTALLDIR='install/linux2' + + +#Link against pthread +PLATFORM_LINKFLAGS = ['-pthread'] diff --git a/blender-wrapper b/blender-wrapper new file mode 100644 index 0000000..13a1d3b --- /dev/null +++ b/blender-wrapper @@ -0,0 +1,46 @@ +#!/bin/sh +# +# A wrapper script for Blender +# + +# In case user's home directory doesn't contain ~/.blender, copy it +# from /usr/share/blender + +if [ ! -d ~/.blender ]; then + install -d ~/.blender + ln -sf /usr/share/blender/locale ~/.blender + ln -sf /usr/share/blender/.Blanguages ~/.blender + ln -sf /usr/share/blender/.bfont.ttf ~/.blender + cp -a /usr/share/blender/bpydata ~/.blender + cp -a /usr/share/blender/VERSION ~/.blender + + install -d ~/.blender/plugins/sequence + install -d ~/.blender/plugins/texture + + install -d ~/.blender/scripts + ln -sf /usr/share/blender/scripts/* ~/.blender/scripts/ +fi + +# +# In case the user's ~/.blender came from older versions, some files +# should be reinstalled. +# + +if [ $(cat ~/.blender/VERSION) != $(cat /usr/share/blender/VERSION) ]; then + cp -a /usr/share/blender/bpydata ~/.blender + ln -sf /usr/share/blender/scripts/* ~/.blender/scripts/ + cp -a /usr/share/blender/VERSION ~/.blender +fi + +# +# Fully update the plugins every time blender is launched. +# + +for s in /usr/share/blender/scripts/* ; do + s=`basename $s` + if [ ! -e ~/.blender/scripts/$s ] ; then + ln -sf /usr/share/blender/scripts/$s ~/.blender/scripts/ + fi +done + +/usr/bin/blender.bin $@ diff --git a/blender.spec b/blender.spec index f7da5c5..59de510 100644 --- a/blender.spec +++ b/blender.spec @@ -1,6 +1,9 @@ +%define blenderlib %{_datadir}/blender +%define plugins %{_libdir}/blender/plugins + Name: blender -Version: 2.41 -Release: 3%{?dist} +Version: 2.42 +Release: 1%{?dist} Summary: 3D modeling, animation, rendering and post-production @@ -13,9 +16,10 @@ Source2: http://bane.servebeer.com/programming/blender/export-3ds-0.71.py Source3: blender.png Source4: blender.desktop Source5: blender.xml +Source6: blender-wrapper +Source7: blender-2.42.config -# Patch0: blender-2.37-x86_64.patch -Patch1: blender-2.41-alut.patch +Patch1: blender-2.42-scons.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -54,24 +58,62 @@ secure, multi-platform content to the web, CD-ROMs, and other media. %prep -%setup -q -n blender -# %patch0 -p1 -b .x86_64 +%setup -q -n blender2.42 %patch1 -p1 %build -sed -i "s/use_openal =.*/use_openal = 'true'/g;" SConstruct -scons +cp %{SOURCE7} user-config.py +scons %{?_smp_mflags} BF_QUIET=0 CCFLAGS="$RPM_OPT_FLAGS" + +install -d release/plugins/include +install -m 644 source/blender/blenpluginapi/*.h release/plugins/include + +chmod +x release/plugins/bmake +make -C release/plugins/ %install rm -rf ${RPM_BUILD_ROOT} -install -D -m0755 blender ${RPM_BUILD_ROOT}/%{_bindir}/blender -mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/blender/scripts/ -install -p -D -m0644 release/scripts/*.py ${RPM_BUILD_ROOT}%{_datadir}/blender/scripts/ -install -p -D -m0644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/blender/scripts/import-3ds-0.7.py -install -p -D -m0644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_datadir}/blender/scripts/export-3ds-0.71.py -install -p -D -m0644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/blender.png -install -p -D -m0644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_datadir}/mime/packages/blender.xml + +install -D -m 755 build/linux2/bin/blender ${RPM_BUILD_ROOT}/%{_bindir}/blender.bin + +install -D -m 755 %{SOURCE6} ${RPM_BUILD_ROOT}/%{_bindir}/blender + +# install -D -m 755 blenderplayer ${RPM_BUILD_ROOT}/%{_bindir}/blenderplayer + +# +# Install miscellanous files to /usr/lib/blender +# + +mkdir -p ${RPM_BUILD_ROOT}/%{blenderlib} + +cp -a release/scripts/bpydata ${RPM_BUILD_ROOT}/%{blenderlib} +cp -a release/scripts ${RPM_BUILD_ROOT}/%{blenderlib} +cp -a bin/.blender/locale ${RPM_BUILD_ROOT}/%{blenderlib} + +install -p -D -m 644 release/scripts/*.py ${RPM_BUILD_ROOT}/%{blenderlib} + +install -m 644 release/VERSION ${RPM_BUILD_ROOT}/%{blenderlib} +install -m 644 bin/.blender/.Blanguages ${RPM_BUILD_ROOT}/%{blenderlib} +install -m 644 bin/.blender/.bfont.ttf ${RPM_BUILD_ROOT}/%{blenderlib} + +install -p -D -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{blenderlib}/import-3ds-0.7.py +install -p -D -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{blenderlib}/export-3ds-0.71.py + +install -p -D -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/blender.png + +install -p -D -m 644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_datadir}/mime/packages/blender.xml + +# +# Install plugins +# + +install -d ${RPM_BUILD_ROOT}/%{plugins}/sequence +install -d ${RPM_BUILD_ROOT}/%{plugins}/texture + +install -m 644 release/plugins/sequence/*.so ${RPM_BUILD_ROOT}/%{plugins}/sequence +install -m 655 release/plugins/texture/*.so ${RPM_BUILD_ROOT}/%{plugins}/texture + desktop-file-install --vendor fedora \ --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ --add-category X-Fedora \ @@ -98,13 +140,17 @@ update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || : %{_bindir}/* %{_datadir}/applications/fedora-blender.desktop %{_datadir}/pixmaps/*.png -%{_datadir}/blender/ +%{blenderlib}/ +%ghost %{blenderlib}/*.pyo +%{plugins}/ %{_datadir}/mime/packages/blender.xml - %changelog +* Sun Jul 16 2006 Jochen Schmitt 2.42-1 +- New upstream release. + * Sun Feb 19 2006 Jochen Schmitt 2.41-3 -- Rebuild for FC5 +- Rebuild for FC-5. * Mon Feb 6 2006 Jochen Schmitt 2.41-2 - Add freealut as dependancy. diff --git a/sources b/sources index b912f5a..b56beca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f6b54ff73c37aaca4d3f5babdd156fbf blender-2.41.tar.gz +232d714a64c3a2208f0ea999fe4a2440 blender-2.42.tar.gz