[GRASS-SVN] r37428 - in grass/branches/develbranch_6/gui/wxpython: . nviz vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 24 11:19:06 EDT 2009


Author: kyngchaos
Date: 2009-05-24 11:19:06 -0400 (Sun, 24 May 2009)
New Revision: 37428

Modified:
   grass/branches/develbranch_6/gui/wxpython/build_ext.py
   grass/branches/develbranch_6/gui/wxpython/nviz/setup.py
   grass/branches/develbranch_6/gui/wxpython/vdigit/setup.py
Log:
handle OSX framework flags

Modified: grass/branches/develbranch_6/gui/wxpython/build_ext.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/build_ext.py	2009-05-24 15:10:06 UTC (rev 37427)
+++ grass/branches/develbranch_6/gui/wxpython/build_ext.py	2009-05-24 15:19:06 UTC (rev 37428)
@@ -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/develbranch_6/gui/wxpython/nviz/setup.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/nviz/setup.py	2009-05-24 15:10:06 UTC (rev 37427)
+++ grass/branches/develbranch_6/gui/wxpython/nviz/setup.py	2009-05-24 15:19:06 UTC (rev 37428)
@@ -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/develbranch_6/gui/wxpython/vdigit/setup.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/setup.py	2009-05-24 15:10:06 UTC (rev 37427)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/setup.py	2009-05-24 15:19:06 UTC (rev 37428)
@@ -23,12 +23,14 @@
         'grass_vect',
         'grass_gis',
         'grass_vedit']
+extras = []
 
 for flag in ('GDALCFLAGS',
              'GDALLIBS',
+             'GEOSCFLAGS',
              '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 +54,7 @@
             include_dirs = inc_dirs,
             library_dirs = lib_dirs,
             libraries = libs,
+            extra_link_args = extras,
             )
 	]
     )



More information about the grass-commit mailing list