[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14708] branches/soc-2008-mxcurioni: soc-2008-mxcurioni: swig compiles as independent library

Maxime Curioni maxime.curioni at gmail.com
Tue May 6 19:23:28 CEST 2008


Revision: 14708
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14708
Author:   mxcurioni
Date:     2008-05-06 19:23:27 +0200 (Tue, 06 May 2008)

Log Message:
-----------
soc-2008-mxcurioni: swig compiles as independent library

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/SConstruct
    branches/soc-2008-mxcurioni/config/darwin-config.py
    branches/soc-2008-mxcurioni/config/linux2-config.py
    branches/soc-2008-mxcurioni/config/linuxcross-config.py
    branches/soc-2008-mxcurioni/config/openbsd3-config.py
    branches/soc-2008-mxcurioni/config/sunos5-config.py
    branches/soc-2008-mxcurioni/config/win32-mingw-config.py
    branches/soc-2008-mxcurioni/config/win32-vc-config.py
    branches/soc-2008-mxcurioni/extern/SConscript
    branches/soc-2008-mxcurioni/extern/freestyle/lib3ds/SConscript
    branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript
    branches/soc-2008-mxcurioni/tools/btools.py

Added Paths:
-----------
    branches/soc-2008-mxcurioni/extern/freestyle/swig/SConscript

Modified: branches/soc-2008-mxcurioni/SConstruct
===================================================================
--- branches/soc-2008-mxcurioni/SConstruct	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/SConstruct	2008-05-06 17:23:27 UTC (rev 14708)
@@ -269,7 +269,7 @@
                 print "clean dir %s"%(B.root_build_dir+dir)
                 shutil.rmtree(B.root_build_dir+dir)
         for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
-                'extern/xvidcore/build/generic/platform.inc','extern/freestyle/lib3ds/Makefile']:
+                'extern/xvidcore/build/generic/platform.inc','extern/freestyle/lib3ds/Makefile','extern/freestyle/swig/Makefile']:
             if os.path.exists(confile):
                 print "clean file %s"%confile
                 os.remove(confile)
@@ -340,12 +340,15 @@
     playerlist = B.create_blender_liblist(env, 'player')
     env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
 
+
+
 ##### Now define some targets
 
 
 #------------ INSTALL
 
 #-- binaries
+
 blenderinstall = []
 if  env['OURPLATFORM']=='darwin':
     for prg in B.program_list:

Modified: branches/soc-2008-mxcurioni/config/darwin-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/darwin-config.py	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/config/darwin-config.py	2008-05-06 17:23:27 UTC (rev 14708)
@@ -164,6 +164,7 @@
 BF_FREESTYLE = '#extern/freestyle'
 BF_FREESTYLE_SRC = '#source/blender/freestyle/src'
 BF_SWIG = '${BF_FREESTYLE}/swig'
+BF_SWIG_LIB = 'extern_swig'
 BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
 BF_LIB3DS_LIB = 'extern_lib3ds'
 BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'

Modified: branches/soc-2008-mxcurioni/config/linux2-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/linux2-config.py	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/config/linux2-config.py	2008-05-06 17:23:27 UTC (rev 14708)
@@ -86,6 +86,16 @@
 
 WITH_BF_YAFRAY = 'true'
 
+WITH_BF_FREESTYLE = 'true'
+BF_FREESTYLE = '#extern/freestyle'
+BF_FREESTYLE_SRC = '#source/blender/freestyle/src'
+BF_SWIG = '${BF_FREESTYLE}/swig'
+BF_SWIG_LIB = 'extern_swig'
+BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
+BF_LIB3DS_LIB = 'extern_lib3ds'
+BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
+BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr
 #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr

Modified: branches/soc-2008-mxcurioni/config/linuxcross-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/linuxcross-config.py	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/config/linuxcross-config.py	2008-05-06 17:23:27 UTC (rev 14708)
@@ -6,6 +6,18 @@
 
 WITH_BF_YAFRAY = 'true'
 
+WITH_BF_FREESTYLE = 'true'
+BF_FREESTYLE = '#extern/freestyle'
+BF_FREESTYLE_SRC = '#source/blender/freestyle/src'
+BF_SWIG = '${BF_FREESTYLE}/swig'
+BF_SWIG_LIB = 'extern_swig'
+BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
+BF_LIB3DS_LIB = 'extern_lib3ds'
+BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
+BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+
+###########################
+
 BF_PYTHON = LIBDIR + '/python'
 BF_PYTHON_VERSION = '2.5'
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'

Modified: branches/soc-2008-mxcurioni/config/openbsd3-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/openbsd3-config.py	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/config/openbsd3-config.py	2008-05-06 17:23:27 UTC (rev 14708)
@@ -80,6 +80,16 @@
 
 WITH_BF_YAFRAY = 'true'
 
+WITH_BF_FREESTYLE = 'true'
+BF_FREESTYLE = '#extern/freestyle'
+BF_FREESTYLE_SRC = '#source/blender/freestyle/src'
+BF_SWIG = '${BF_FREESTYLE}/swig'
+BF_SWIG_LIB = 'extern_swig'
+BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
+BF_LIB3DS_LIB = 'extern_lib3ds'
+BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
+BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr
 #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr

Modified: branches/soc-2008-mxcurioni/config/sunos5-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/sunos5-config.py	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/config/sunos5-config.py	2008-05-06 17:23:27 UTC (rev 14708)
@@ -82,6 +82,16 @@
 
 WITH_BF_YAFRAY = 'true'
 
+WITH_BF_FREESTYLE = 'true'
+BF_FREESTYLE = '#extern/freestyle'
+BF_FREESTYLE_SRC = '#source/blender/freestyle/src'
+BF_SWIG = '${BF_FREESTYLE}/swig'
+BF_SWIG_LIB = 'extern_swig'
+BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
+BF_LIB3DS_LIB = 'extern_lib3ds'
+BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
+BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr
 #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr

Modified: branches/soc-2008-mxcurioni/config/win32-mingw-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/win32-mingw-config.py	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/config/win32-mingw-config.py	2008-05-06 17:23:27 UTC (rev 14708)
@@ -97,6 +97,16 @@
 
 WITH_BF_YAFRAY = 'true'
 
+WITH_BF_FREESTYLE = 'true'
+BF_FREESTYLE = '#extern/freestyle'
+BF_FREESTYLE_SRC = '#source/blender/freestyle/src'
+BF_SWIG = '${BF_FREESTYLE}/swig'
+BF_SWIG_LIB = 'extern_swig'
+BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
+BF_LIB3DS_LIB = 'extern_lib3ds'
+BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
+BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr
 #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr

Modified: branches/soc-2008-mxcurioni/config/win32-vc-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/win32-vc-config.py	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/config/win32-vc-config.py	2008-05-06 17:23:27 UTC (rev 14708)
@@ -108,6 +108,16 @@
 
 WITH_BF_BINRELOC = 'false'
 
+WITH_BF_FREESTYLE = 'true'
+BF_FREESTYLE = '#extern/freestyle'
+BF_FREESTYLE_SRC = '#source/blender/freestyle/src'
+BF_SWIG = '${BF_FREESTYLE}/swig'
+BF_SWIG_LIB = 'extern_swig'
+BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
+BF_LIB3DS_LIB = 'extern_lib3ds'
+BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
+BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr
 #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr

Modified: branches/soc-2008-mxcurioni/extern/SConscript
===================================================================
--- branches/soc-2008-mxcurioni/extern/SConscript	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/extern/SConscript	2008-05-06 17:23:27 UTC (rev 14708)
@@ -11,6 +11,7 @@
 
 if env['WITH_BF_FREESTYLE']:
     SConscript(['freestyle/lib3ds/SConscript'])
+    SConscript(['freestyle/swig/SConscript'])
 
 if env['WITH_BF_INTERNATIONAL']:
     SConscript(['bFTGL/SConscript'])

Modified: branches/soc-2008-mxcurioni/extern/freestyle/lib3ds/SConscript
===================================================================
--- branches/soc-2008-mxcurioni/extern/freestyle/lib3ds/SConscript	2008-05-06 16:01:31 UTC (rev 14707)
+++ branches/soc-2008-mxcurioni/extern/freestyle/lib3ds/SConscript	2008-05-06 17:23:27 UTC (rev 14708)
@@ -93,21 +93,19 @@
 # Makefile parsing
 vars = getmakevars(['lib3ds/Makefile'])
 srcs = vars['lib3ds_la_SOURCES']
-sources_temp = list(Set(srcs.split()))
+srcs = list(Set(srcs.split()))
 
 sources = []
-for source in sources_temp:
+for source in srcs:
 	sources.append("lib3ds/" + source)
 
 defs = ''
 cflags = ''
 
-print sources
-
 ##################
 lib3ds_env.BlenderLib (libname="extern_lib3ds", sources=sources,
                        includes=["."],
                        defines=Split(defs),
                        libtype=['blender'],
-                       priority = [1],
+                       priority = [15],
                        compileflags = Split(cflags))

Added: branches/soc-2008-mxcurioni/extern/freestyle/swig/SConscript
===================================================================
--- branches/soc-2008-mxcurioni/extern/freestyle/swig/SConscript	                        (rev 0)
+++ branches/soc-2008-mxcurioni/extern/freestyle/swig/SConscript	2008-05-06 17:23:27 UTC (rev 14708)
@@ -0,0 +1,214 @@
+#!/usr/bin/env python
+
+import os
+import os.path
+import sys
+import re
+import time
+import string
+from distutils import sysconfig
+
+from sets import Set
+
+Import('env')
+
+
+
+root = "extern/freestyle/swig"
+root_build_dir = env['BF_BUILDDIR']
+
+swig_env = env.Copy()
+
+defines = []
+cflags = []
+debug_flags = []
+extra_flags = []
+release_flags = []
+warn_flags = []
+platform_libs = []
+platform_libpath = []
+platform_linkflags = []
+
+#============================================
+#  Makefile Functions
+#============================================
+makevardef = re.compile('^([a-zA-Z0-9_-]+)[ \t]*(\+?)=(.*)')
+makevarsubst = re.compile('\$\(([^\)]+)\)')
+makeifeq = re.compile('if(n?)eq \(([^,]*),([^\)]*)\)')
+
+def makeparseblock(fp, variables):
+    pendingline = ''
+    while 1:
+        line = fp.readline()
+        if pendingline:
+            line = pendingline + line
+            pendingline = ''
+        if not line:
+            return
+        if line.endswith('\\\n'):
+            pendingline = line[:-2]
+            continue 
+
+        i = line.find('#')
+        if i >= 0:
+            line = line[:i]
+
+        iter = makevarsubst.finditer(line[:])
+        for obj in iter:
+            (name) = obj.group(1)
+            s = ""
+            if name in variables:
+                s = variables[name]
+            line = line.replace('$(' + name + ')', s)
+
+        matchobj = makevardef.match(line)
+        if matchobj:
+            (name, op, value) = matchobj.group(1, 2, 3)
+
+            value = value.rstrip()
+
+            if op == '+' and name in variables:
+                 variables[name] += value
+            else:
+                 variables[name] = value
+            continue
+        matchobj = makeifeq.match(line)

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list