[blender] Rework on cmake build

Jochen Schmitt s4504kr at fedoraproject.org
Thu Jun 30 17:11:30 UTC 2011


commit 36bce416b3ed86e5ed19feb834a40367ce0841b9
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date:   Thu Jun 30 19:11:15 2011 +0200

    Rework on cmake build

 blender-2.58-syspath.patch |   58 ++++++++++++++++++++++++++++++++++++++++++++
 blender.spec               |   22 ++++++++++++----
 2 files changed, 74 insertions(+), 6 deletions(-)
---
diff --git a/blender-2.58-syspath.patch b/blender-2.58-syspath.patch
index d42a3dd..3acac6a 100644
--- a/blender-2.58-syspath.patch
+++ b/blender-2.58-syspath.patch
@@ -20,3 +20,61 @@ diff -up blender-2.57/source/blender/blenfont/intern/blf_lang.c.syspath blender-
  }
  
  /* XXX WARNING!!! IN osx somehow the previous function call jumps in this one??? (ton, ppc) */
+diff -up blender-2.58/intern/ghost/intern/GHOST_SystemPathsX11.cpp.sp blender-2.58/intern/ghost/intern/GHOST_SystemPathsX11.cpp
+--- blender-2.58/intern/ghost/intern/GHOST_SystemPathsX11.cpp.sp	2011-06-30 17:58:48.955000009 +0200
++++ blender-2.58/intern/ghost/intern/GHOST_SystemPathsX11.cpp	2011-06-30 17:59:59.334000028 +0200
+@@ -56,6 +56,7 @@ GHOST_SystemPathsX11::~GHOST_SystemPaths
+ const GHOST_TUns8* GHOST_SystemPathsX11::getSystemDir() const
+ {
+ 	/* no prefix assumes a portable build which only uses bundled scripts */
++  printf("##1: PREFIX: %s\n", PREFIX);
+ #ifdef PREFIX
+ 	return (GHOST_TUns8*) PREFIX "/share";
+ #else
+diff -up blender-2.58/source/blender/blenlib/intern/path_util.c.sp blender-2.58/source/blender/blenlib/intern/path_util.c
+--- blender-2.58/source/blender/blenlib/intern/path_util.c.sp	2011-06-22 17:24:58.000000000 +0200
++++ blender-2.58/source/blender/blenlib/intern/path_util.c	2011-06-30 17:47:50.532000005 +0200
+@@ -955,42 +955,7 @@ static int get_path_user(char *targetpat
+ static int get_path_system(char *targetpath, const char *folder_name, const char *subfolder_name, const char *envvar, const int ver)
+ {
+ 	char system_path[FILE_MAX];
+-	const char *system_base_path;
+-
+-
+-	/* first allow developer only overrides to the system path
+-	 * these are only used when running blender from source */
+-	char cwd[FILE_MAX];
+-	char relfolder[FILE_MAX];
+-	char bprogdir[FILE_MAX];
+-
+-	/* use argv[0] (bprogname) to get the path to the executable */
+-	BLI_split_dirfile(bprogname, bprogdir, NULL);
+-
+-	if(folder_name) {
+-		if (subfolder_name) {
+-			BLI_join_dirfile(relfolder, sizeof(relfolder), folder_name, subfolder_name);
+-		} else {
+-			BLI_strncpy(relfolder, folder_name, sizeof(relfolder));
+-		}
+-	}
+-	else {
+-		relfolder[0]= '\0';
+-	}
+-
+-	/* try CWD/release/folder_name */
+-	if(BLI_getwdN(cwd, sizeof(cwd))) {
+-		if(test_path(targetpath, cwd, "release", relfolder)) {
+-			return 1;
+-		}
+-	}
+-
+-	/* try EXECUTABLE_DIR/release/folder_name */
+-	if(test_path(targetpath, bprogdir, "release", relfolder))
+-		return 1;
+-	/* end developer overrides */
+-
+-
++	const char *system_base_path; 
+ 
+ 	system_path[0] = '\0';
+ 
\ No newline at end of file
diff --git a/blender.spec b/blender.spec
index ecef04f..9016a49 100644
--- a/blender.spec
+++ b/blender.spec
@@ -1,7 +1,7 @@
 %global blender_api 2.58
 
 %global blenderlib  %{_datadir}/blender/%{blender_api}
-%global blenderarch %{_libdir}/blender/%{belnder_api}
+%global blenderarch %{_libdir}/blender/%{blender_api}
 %global __python %{__python3}
 
 %global fontname blender
@@ -9,7 +9,7 @@
 Name:           blender
 Epoch:		1
 Version:        2.58
-Release: 	3%{?dist}
+Release: 	4%{?dist}
 
 Summary:        3D modeling, animation, rendering and post-production
 
@@ -25,7 +25,7 @@ Source8:	blender-2.56.config
 Source10:	macros.blender
 
 Patch1:		blender-2.44-bid.patch
-Patch3:		blender-2.58-syspath.patch
+Patch2:		blender-2.58-syspath.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -109,18 +109,25 @@ addon packages to extend blender.
 %prep
 %setup -q 
 %patch1 -p1 -b .bid
-%patch3 -p1 -b .syspath
+%patch2 -p1 -b .syspath
 
 find -name '.svn' -print | xargs rm -rf
 
 %build
 mkdir cmake-make
 cd cmake-make
-cmake .. -DWITH_BUILTIN_GLEW=OFF \
+export CFLAGS="$RPM_OPT_FLAGS -fPIC -funsigned-char -fno-strict-aliasing"
+export CXXFLAGS="$CFLAGS"
+cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
 %ifnarch %{ix86} x86_64
   -DWITH_RAYOPTIMIZATION=OFF \
 %endif
-  -DWITH_PLAYER=ON
+ -DCMAKE_SKIP_RPATH=ON \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DWITH_BUILTIN_GLEW=OFF \
+ -DWITH_INSTALL_PORTABLE=OFF \
+ -DWITH_PYTHON_SAFETY=ON \
+ -DWITH_PLAYER=ON
 
 make
 cd ..
@@ -243,6 +250,9 @@ fi || :
 %{_sysconfdir}/rpm/macros.blender
 
 %changelog
+* Thu Jun 30 2011 Jochen Schmitt <Jochen herr schmitt.de>  1:2.58-4
+- Rework on cmake build
+
 * Mon Jun 27 2011 Jochen Schmitt <Jochen herr-schmitt de> 1:2.58-3
 - Migrating to the cmake build system
 


More information about the scm-commits mailing list