Hi, Luk already unblocked blender 2.46+dfsg-5 (RC bug, security issue) but it FTBFS'd on alpha, hppa, mips*, and sparc, as reported in <20081027073216.GN19244@ikibiki.org>; I've added a patch to support python's sys.platform's now being linux2-$arch on those architectures, with the first attached patch. Since it then became quite easy to enable GNU/kFreeBSD support, I also did so, see second patch. I also added a bit of documentation, so that I don't forget how I came to those patches. Changelog entry: ,-- | blender (2.46+dfsg-6) unstable; urgency=high | | * Add patch to fix FTBFS now that python's sys.platform reports | linux2-$arch on various architectures (alpha, hppa, mips*, sparc), see | #499132. At toplevel, the SConstruct script sets ENV['OURPLATFORM'] to | sys.platform, and with this patch, makes it become 'linux2' when the | platform string starts with 'linux2', and since userland is the same, | ditto when the platform string starts with 'gnukfreebsd'. That patch | also adds a check for sys.platform starting with those variables in | various parts (which are not using ENV['OURPLATFORM]'), mostly in | SConscript scripts, and in Python scripts shipped under the | release/scripts directory (Closes: #503639): | - debian/patches/70_portability_platform_detection | * Keep urgency to “high” since the previous upload couldn't migrate to | testing because of this FTBFS. | * Enable GNU/kFreeBSD support again. The previous patch was obsolete, | and this new one benefits from the aforementioned one, since there's | no need to add a specific check for tests on ENV['OURPLATFORM']. Don't | delete the (already disabled) 10_gnukfreebsd_support patch to keep the | release team happy: | - debian/patches/80_gnukfreebsd_support | * Add documentation on how to upgrade to a new upstream release, which | will mostly be useful to keep those patches uptodate: | - debian/README.source | | -- Cyril Brulebois <kibi@debian.org> Mon, 03 Nov 2008 00:52:01 +0100 `-- Finally, I noticed a WTF-like FTBFS on hppa, and asked for a give-back, but didn't get any answer yet, so could you please try and have it retried? That might have been a transient issue, the whole 2.46* series (up to -5 obviously) built without any issues, so I don't really see why it would FTBFS now, and in such a way. IIRC that would be something like: gb blender . hppa Thanks for your time! Mraw, KiBi.
--- a/extern/bullet2/src/SConscript
+++ b/extern/bullet2/src/SConscript
@@ -14,7 +14,7 @@
elif env['OURPLATFORM']=='win32-mingw':
defs += ' NDEBUG'
cflags += ['-O2']
-elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5':
+elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5' or sys.platform.startswith('linux2') or sys.platform.startswith('gnukfreebsd'):
defs += ' NDEBUG'
cflags += ['-O2']
elif sys.platform=='darwin':
--- a/extern/qhull/SConscript
+++ b/extern/qhull/SConscript
@@ -5,7 +5,7 @@
Import('env')
defs = ''
cflags = []
-if sys.platform=='linux2' or sys.platform=='linux-i386':
+if sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform.startswith('linux2') or sys.platform.startswith('gnukfreebsd'):
cflags += ['-O2','-ansi']
elif env['OURPLATFORM']=='win32-vc':
cflags += ['/O2']
--- a/extern/solid/SConscript
+++ b/extern/solid/SConscript
@@ -12,7 +12,7 @@
elif env['OURPLATFORM']=='win32-mingw':
defs += ' NDEBUG'
cflags += ['-O2']
-elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5' or sys.platform=='openbsd3' or sys.platform=='sunos5':
+elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5' or sys.platform=='openbsd3' or sys.platform=='sunos5' or sys.platform.startswith('linux2') or sys.platform.startswith('gnukfreebsd'):
defs += ' NDEBUG'
cflags += ['-O2']
elif sys.platform=='darwin' :
--- a/config/linux2-config.py
+++ b/config/linux2-config.py
@@ -137,8 +137,11 @@
BF_FFMPEG_LIB = commands.getoutput('pkg-config --libs libavformat vorbisenc libswscale') + ' -lgsm'
+# Note: While linux2* and gnukfreebsd* share a lot, that particular case is
+# really Linux-specific, which is why there's not test on sys.platform starting
+# with 'gnukfreebsd' here.
import sys
-if sys.platform == 'linux2':
+if sys.platform == 'linux2' or sys.platform.startswith('linux2'):
BF_FFMPEG_LIB += ' ' + commands.getoutput('pkg-config --libs libdc1394-2')
# Mesa Libs should go here if your using them as well....
--- a/SConstruct
+++ b/SConstruct
@@ -143,6 +143,13 @@
env['OURPLATFORM'] = platform
+# Fake being on a linux2 platform when on linux2-* (see arch-specific
+# modifications in just-before-lenny python uploads), as well as when
+# on gnukfreebsd* (which, for a blender point of view, has the same
+# userland as linux2*).
+if platform.startswith('linux2') or platform.startswith('gnukfreebsd'):
+ env['OURPLATFORM']='linux2'
+
configfile = 'config'+os.sep+platform+'-config.py'
if os.path.exists(configfile):
@@ -215,7 +222,7 @@
"""
def CheckFreeAlut(context,env):
- context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC )
+ context.Message( B.bc.OKGREEN + "Linux(-like) platform detected:\n checking for FreeAlut... " + B.bc.ENDC )
env['LIBS'] = 'alut'
result = context.TryLink(mylib_test_source_file, '.c')
context.Result(result)
--- a/release/scripts/bpymodules/colladaImEx/cutils.py
+++ b/release/scripts/bpymodules/colladaImEx/cutils.py
@@ -244,7 +244,7 @@
# Clear the console
def ClearConsole():
- if sys.platform == 'linux-i386' or sys.platform == 'linux2':
+ if sys.platform == 'linux-i386' or sys.platform == 'linux2' or sys.platform.startswith('linux2'):
sysCommand = 'clear'
elif sys.platform == 'win32' or sys.platform == 'dos' or sys.platform[0:5] == 'ms-dos' :
sysCommand = 'cls'
--- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -58,7 +58,7 @@ #include <sys/mount.h> #endif -#if defined(linux) || defined(__CYGWIN32__) || defined(__hpux) +#if defined(linux) || defined(__CYGWIN32__) || defined(__hpux) || defined(__GLIBC__) #include <sys/vfs.h> #endif @@ -197,7 +197,7 @@ if (slash) slash[1] = 0; } else strcpy(name,"/"); -#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__) +#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__) || defined(__GLIBC__) if (statfs(name, &disk)) return(-1); #endif #ifdef __BeOS --- a/release/plugins/bmake +++ b/release/plugins/bmake @@ -55,7 +55,7 @@ LD="ld"; LDFLAGS="-Bshareable"; -elif ( test $UNAME = "Linux" ) then +elif ( test $UNAME = "Linux" -o $UNAME = "GNU/kFreeBSD" ) then CC="gcc"; CFLAGS="-fPIC -funsigned-char -O2";
Attachment:
signature.asc
Description: Digital signature