[GRASS-SVN] r37430 - in grass/branches/releasebranch_6_4/gui/wxpython: . nviz vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 24 11:25:23 EDT 2009


Author: kyngchaos
Date: 2009-05-24 11:25:23 -0400 (Sun, 24 May 2009)
New Revision: 37430

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/build_ext.py
   grass/branches/releasebranch_6_4/gui/wxpython/nviz/setup.py
   grass/branches/releasebranch_6_4/gui/wxpython/vdigit/setup.py
Log:
handle OSX framework flags (from dev6 r37428)

Modified: grass/branches/releasebranch_6_4/gui/wxpython/build_ext.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/build_ext.py	2009-05-24 15:23:23 UTC (rev 37429)
+++ grass/branches/releasebranch_6_4/gui/wxpython/build_ext.py	2009-05-24 15:25:23 UTC (rev 37430)
@@ -21,13 +21,17 @@
         
         dict[var.strip()] = val.strip()
         
-def update_opts(flag, macros, inc_dirs, lib_dirs, libs):
+def update_opts(flag, macros, inc_dirs, lib_dirs, libs, extras):
     """Update Extension options"""
     global variables
     line = variables[flag]
+    fw_next = False
     for val in line.split(' '):
         key = val[:2]
-        if key == '-I': # includes
+        if fw_next:
+            extras.append(val)
+            fw_next = False
+        elif key == '-I': # includes
             inc_dirs.append(val[2:])
         elif key == '-D': # macros
             if '=' in val[2:]:
@@ -38,6 +42,11 @@
             lib_dirs.append(val[2:])
         elif key == '-l':
             libs.append(val[2:])
+        elif key == '-F': # frameworks dir
+            extras.append(val)
+        elif val == '-framework':
+            extras.append(val)
+            fw_next = True
 
 try:
     Platform_make = open(os.path.join('..', '..', '..',

Modified: grass/branches/releasebranch_6_4/gui/wxpython/nviz/setup.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/nviz/setup.py	2009-05-24 15:23:23 UTC (rev 37429)
+++ grass/branches/releasebranch_6_4/gui/wxpython/nviz/setup.py	2009-05-24 15:25:23 UTC (rev 37430)
@@ -18,12 +18,11 @@
 lib_dirs = [os.path.join(variables['GRASS_HOME'],
                          'dist.' + variables['ARCH'],
                          'lib')]
-
-
 libs = ['grass_gis',
         'grass_nviz',
         'grass_ogsf',
         'grass_g3d']
+extras = []
 
 for flag in ('GDALCFLAGS',
              'GDALLIBS',
@@ -33,7 +32,7 @@
              'XMINC',
              'OPENGLLIB',
              'OPENGLULIB'):
-    update_opts(flag, macros, inc_dirs, lib_dirs, libs)
+    update_opts(flag, macros, inc_dirs, lib_dirs, libs, extras)
 
 setup(
     ext_modules= [
@@ -54,6 +53,7 @@
             include_dirs = inc_dirs,
             library_dirs = lib_dirs,
             libraries = libs,
+            extra_link_args = extras,
             )
 	]
     )

Modified: grass/branches/releasebranch_6_4/gui/wxpython/vdigit/setup.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/vdigit/setup.py	2009-05-24 15:23:23 UTC (rev 37429)
+++ grass/branches/releasebranch_6_4/gui/wxpython/vdigit/setup.py	2009-05-24 15:25:23 UTC (rev 37430)
@@ -23,12 +23,13 @@
         'grass_vect',
         'grass_gis',
         'grass_vedit']
+extras = []
 
 for flag in ('GDALCFLAGS',
              'GDALLIBS',
              'WXWIDGETSCXXFLAGS',
              'WXWIDGETSLIB'):
-    update_opts(flag, macros, inc_dirs, lib_dirs, libs)
+    update_opts(flag, macros, inc_dirs, lib_dirs, libs, extras)
 
 setup(
     ext_modules= [
@@ -52,6 +53,7 @@
             include_dirs = inc_dirs,
             library_dirs = lib_dirs,
             libraries = libs,
+            extra_link_args = extras,
             )
 	]
     )



More information about the grass-commit mailing list