[SM-Commit] GIT changes to master grimoire by Florian Franzmann (35101304a2e3a473c26ccbdc75a8ed763e0627ee)

Florian Franzmann scm at sourcemage.org
Fri Sep 21 11:57:27 EDT 2007


GIT changes to master grimoire by Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>:

 graphics/blender/BUILD                         |   14 +++
 graphics/blender/CONFIGURE                     |    5 -
 graphics/blender/DEPENDS                       |    4 +
 graphics/blender/HISTORY                       |    8 ++
 graphics/blender/INSTALL                       |   19 ++++-
 graphics/blender/PRE_BUILD                     |    3 
 graphics/blender/blender-2.44-scriptsdir.patch |   91 +++++++++++++++++++++++++
 7 files changed, 138 insertions(+), 6 deletions(-)

New commits:
commit 880badbe2885625e88bb9c054acaa08a28058010
Author: Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>

    graphics/blender: fixed install process so scripts can actually be used,
    added optional dependency on ffmpeg

commit 111b06e5b68b614180ee546dbfcdca413d53b749
Author: Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>

    collab/subversion: updated to 1.4.5

diff --git a/graphics/blender/BUILD b/graphics/blender/BUILD
index 545506f..474ae2c 100755
--- a/graphics/blender/BUILD
+++ b/graphics/blender/BUILD
@@ -9,13 +9,25 @@ if [ $OPENEXR == y ]; then
 else
 	USE_OPENEXR="WITH_BF_OPENEXR=0"
 fi  &&
+if [ $FFMPEG == y ]; then
+	USE_FFMPEG="WITH_BF_FFMPEG=1"
+else
+	USE_FFMPEG="WITH_BF_FFMPEG=0"
+fi  &&
 
 scons \
 	$USE_OPENAL                        \
 	$USE_OPENEXR                       \
+	$USE_FFMPEG                        \
 	WITH_BF_INTERNATIONAL=1            \
 	WITH_BF_PLAYER=1                   \
 	WITH_BF_GAMEENGINE=1               \
-	BF_INSTALLDIR=$SOURCE_DIRECTORY/install 
+	BF_INSTALLDIR=$SOURCE_DIRECTORY/install  &&
 # Do not build outside the default tree because of a bug in makesdna compiling 
 #        BF_BUILDDIR=$SOURCE_DIRECTORY/build
+
+install -d ${SOURCE_DIRECTORY}/install/linux2/plugins/include &&
+install -m 644 ${SOURCE_DIRECTORY}/source/blender/blenpluginapi/*.h \
+    ${SOURCE_DIRECTORY}/install/linux2/plugins/include        &&
+cp -a ${SOURCE_DIRECTORY}/release/plugins/* ${SOURCE_DIRECTORY}/install/linux2/plugins &&
+make -C ${SOURCE_DIRECTORY}/install/linux2/plugins
diff --git a/graphics/blender/CONFIGURE b/graphics/blender/CONFIGURE
index 6ac1f01..b8a3c6c 100755
--- a/graphics/blender/CONFIGURE
+++ b/graphics/blender/CONFIGURE
@@ -1,2 +1,3 @@
-config_query OPENAL "Use blender audio ability (openal) ?" y  &&
-config_query OPENEXR "Enable High Dynamic Range graphics (openexr)" y
+config_query OPENAL "Use blender audio ability (openal) ?" y          &&
+config_query OPENEXR "Enable High Dynamic Range graphics (openexr)" y &&
+config_query FFMPEG "Use ffmpeg as a dependency?" y
diff --git a/graphics/blender/DEPENDS b/graphics/blender/DEPENDS
index dacd4aa..762088d 100755
--- a/graphics/blender/DEPENDS
+++ b/graphics/blender/DEPENDS
@@ -13,6 +13,10 @@ if [ "$OPENEXR" == "y" ]; then
    depends  openexr
 fi                                        &&
 
+if [ "$FFMPEG" == "y" ]; then
+   depends  LIBAVCODEC
+fi                                        &&
+
 optional_depends  libpng                  \
                   ""                      \
                   ""                      \
diff --git a/graphics/blender/HISTORY b/graphics/blender/HISTORY
index 4b77580..5a42a60 100644
--- a/graphics/blender/HISTORY
+++ b/graphics/blender/HISTORY
@@ -1,3 +1,11 @@
+2007-09-21 Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>
+	* BUILD, INSTALL: build and install libraries necessary to
+	  execute scripts
+	* INSTALL: cleaned up the installation process
+	* PRE_BUILD, blender-2.44-scriptsdir.patch: added patch from
+	  gentoo to correctly set the scriptsdir
+	* BUILD, DEPENDS, CONFIGURE: added optional support for ffmpeg
+
 2007-07-29 Martin Spitzbarth <m.spitzbarth at gmx.de>
 	* PRE_BUILD: fixed permissions and include files for the sample
 	  plugins
diff --git a/graphics/blender/INSTALL b/graphics/blender/INSTALL
index d208b17..a6da702 100755
--- a/graphics/blender/INSTALL
+++ b/graphics/blender/INSTALL
@@ -4,5 +4,20 @@ install -m 644 ${SCRIPT_DIRECTORY}/blender48x48.png           \
                ${INSTALL_ROOT}/usr/share/pixmaps              &&
 
 install -m 755 -d ${INSTALL_ROOT}/usr/share/blender           &&
-cp -R install/plugins ${INSTALL_ROOT}/usr/share/blender       &&
-cp -R install/.blender ${INSTALL_ROOT}/usr/share/blender
+install -m 755 -d ${INSTALL_ROOT}/usr/lib/blender/plugins/sequence    &&
+install -m 755 -d ${INSTALL_ROOT}/usr/lib/blender/plugins/texture     &&
+
+install -m 644 ${SOURCE_DIRECTORY}/install/linux2/plugins/sequence/*.so \
+    ${INSTALL_ROOT}/usr/lib/blender/plugins/sequence      &&
+install -m 644 ${SOURCE_DIRECTORY}/install/linux2/plugins/texture/*.so \
+    ${INSTALL_ROOT}/usr/lib/blender/plugins/texture       &&
+cp -R ${SOURCE_DIRECTORY}/install/.blender \
+    ${INSTALL_ROOT}/usr/share/blender                     &&
+cp -a ${SOURCE_DIRECTORY}/release/scripts/bpydata \
+    ${INSTALL_ROOT}/usr/share/blender                     &&
+cp -a ${SOURCE_DIRECTORY}/release/scripts \
+    ${INSTALL_ROOT}/usr/share/blender                     &&
+install -m 644 ${SOURCE_DIRECTORY}/release/VERSION \
+    ${INSTALL_ROOT}/usr/share/blender                     &&
+
+find ${INSTALL_ROOT}/usr/share/blender/scripts/ -name "*.py" -exec chmod -R 644 '{}' \;
diff --git a/graphics/blender/PRE_BUILD b/graphics/blender/PRE_BUILD
index 1c45575..d0431e1 100755
--- a/graphics/blender/PRE_BUILD
+++ b/graphics/blender/PRE_BUILD
@@ -6,4 +6,5 @@ sedit  "s:2.4:$(installed_version  python):"  \
 
 cd $SOURCE_DIRECTORY                              &&
 chmod 755 release/plugins/bmake                   &&
-cp -r source/blender/blenpluginapi release/plugins/include
+cp -r source/blender/blenpluginapi release/plugins/include &&
+patch -p1 < ${SCRIPT_DIRECTORY}/blender-2.44-scriptsdir.patch
diff --git a/graphics/blender/blender-2.44-scriptsdir.patch b/graphics/blender/blender-2.44-scriptsdir.patch
new file mode 100644
index 0000000..398ccc5
--- /dev/null
+++ b/graphics/blender/blender-2.44-scriptsdir.patch
@@ -0,0 +1,91 @@
+--- blender-2.44/source/blender/python/api2_2x/EXPP_interface.c.orig	2006-05-01 14:24:56.000000000 +0200
++++ blender-2.44/source/blender/python/api2_2x/EXPP_interface.c	2007-06-21 22:25:39.000000000 +0200
+@@ -52,85 +52,13 @@
+ */
+ char *bpy_gethome(int append_scriptsdir)
+ {
+-	static char homedir[FILE_MAXDIR];
+-	static char scriptsdir[FILE_MAXDIR];
+-	char tmpdir[FILE_MAXDIR];
+-	char bprogdir[FILE_MAXDIR];
+-	char *s;
+-	int i;
++	static char homedir[FILE_MAXDIR]="/usr/share/blender";
++	static char scriptsdir[FILE_MAXDIR]="/usr/share/blender/scripts";
+ 
+ 	if (append_scriptsdir) {
+-		if (scriptsdir[0] != '\0')
+ 			return scriptsdir;
+ 	}
+-	else if (homedir[0] != '\0')
+-		return homedir;
+-
+-	/* BLI_gethome() can return NULL if env vars are not set */
+-	s = BLI_gethome();
+-
+-	if( !s )  /* bail if no $HOME */
+-	{
+-		printf("$HOME is NOT set\n");
+-		return NULL;
+-	}
+-
+-	if( strstr( s, ".blender" ) )
+-		PyOS_snprintf( homedir, FILE_MAXDIR, s );
+-	else
+-		BLI_make_file_string( "/", homedir, s, ".blender" );
+-
+-	/* if userhome/.blender/ exists, return it */
+-	if( BLI_exists( homedir ) ) {
+-		if (append_scriptsdir) {
+-			BLI_make_file_string("/", scriptsdir, homedir, "scripts");
+-			if (BLI_exists (scriptsdir)) return scriptsdir;
+-		}
+-		else return homedir;
+-	}
+-	else homedir[0] = '\0';
+-
+-	/* if either:
+-	 * no homedir was found or
+-	 * append_scriptsdir = 1 but there's no scripts/ inside homedir,
+-	 * use argv[0] (bprogname) to get .blender/ in
+-	 * Blender's installation dir */
+-	s = BLI_last_slash( bprogname );
+-
+-	i = s - bprogname + 1;
+-
+-	PyOS_snprintf( bprogdir, i, "%s", bprogname );
+-
+-	/* using tmpdir to preserve homedir (if) found above:
+-	 * the ideal is to have a home dir with scripts dir inside
+-	 * it, but if that isn't available, it's possible to
+-	 * have a 'broken' home dir somewhere and a scripts dir in the
+-	 * cvs sources */
+-	BLI_make_file_string( "/", tmpdir, bprogdir, ".blender" );
+-
+-	if (BLI_exists(tmpdir)) {
+-		if (append_scriptsdir) {
+-			BLI_make_file_string("/", scriptsdir, tmpdir, "scripts");
+-			if (BLI_exists(scriptsdir)) {
+-				PyOS_snprintf(homedir, FILE_MAXDIR, "%s", tmpdir);
+-				return scriptsdir;
+-			}
+-			else {
+-				homedir[0] = '\0';
+-				scriptsdir[0] = '\0';
+-			}
+-		}
+-		else return homedir;
+-	}
+-
+-	/* last try for scripts dir: blender in cvs dir, scripts/ inside release/: */
+-	if (append_scriptsdir) {
+-		BLI_make_file_string("/", scriptsdir, bprogdir, "release/scripts");
+-		if (BLI_exists(scriptsdir)) return scriptsdir;
+-		else scriptsdir[0] = '\0';
+-	}
+-
+-	return NULL;
++	return homedir;
+ }
+ 
+ /* PyDrivers */



More information about the SM-Commit mailing list