summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-gfx/blender/ChangeLog6
-rw-r--r--media-gfx/blender/blender-2.44.ebuild3
-rw-r--r--media-gfx/blender/files/blender-2.44-scriptsdir.patch91
3 files changed, 98 insertions, 2 deletions
diff --git a/media-gfx/blender/ChangeLog b/media-gfx/blender/ChangeLog
index 5fffe9df26e3..81d1e5f87950 100644
--- a/media-gfx/blender/ChangeLog
+++ b/media-gfx/blender/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-gfx/blender
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.115 2007/05/17 06:58:54 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.116 2007/07/15 09:50:28 lu_zero Exp $
+
+ 15 Jul 2007; Luca Barbato <lu_zero@gentoo.org>
+ +files/blender-2.44-scriptsdir.patch, blender-2.44.ebuild:
+ make scriptsdir behaviour a little different
*blender-2.44 (17 May 2007)
diff --git a/media-gfx/blender/blender-2.44.ebuild b/media-gfx/blender/blender-2.44.ebuild
index cd71d70499cb..049e02a4c5bb 100644
--- a/media-gfx/blender/blender-2.44.ebuild
+++ b/media-gfx/blender/blender-2.44.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.44.ebuild,v 1.1 2007/05/17 06:58:54 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.44.ebuild,v 1.2 2007/07/15 09:50:28 lu_zero Exp $
inherit multilib flag-o-matic eutils python
@@ -59,6 +59,7 @@ src_unpack() {
cd ${S}
epatch ${FILESDIR}/blender-2.37-dirs.patch
+ epatch ${FILESDIR}/blender-2.44-scriptsdir.patch
if use ffmpeg ; then
cd ${S}/extern
diff --git a/media-gfx/blender/files/blender-2.44-scriptsdir.patch b/media-gfx/blender/files/blender-2.44-scriptsdir.patch
new file mode 100644
index 000000000000..398ccc5e9a91
--- /dev/null
+++ b/media-gfx/blender/files/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 */