Skip to content
Permalink
Browse files

handle more than 2 archs for OSX universal build

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11548 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
kyngchaos
kyngchaos committed Sep 5, 2009
1 parent 2afef44 commit d8a497f117b42374b5a09bd2d41b8dc84c6b890a
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# generate and run configure.py\n\nif [ ! -f \"$TARGET_TEMP_DIR/python/python/configure.py\" ] || [ ../../python/configure.py.in -nt \"$TARGET_TEMP_DIR/python/python/configure.py\" ] ; then\n\nif [ \"$ARCHS\" = \"ppc i386\" ] || [ \"$ARCHS\" = \"i386 ppc\" ] ; then\n\tARCHS_P=\"ppc;i386\"\nelse\n\tARCHS_P=\"$ARCHS\"\nfi\n\nif [ \"$GDAL_FORM\" = \"fw\" ] ; then\n\tGDALPATH=\"$GDAL_PREFIX/unix/lib\"\nelse\n\tGDALPATH=\"$GDAL_PREFIX/lib\"\nfi\n\nif [ \"$GEOS_FORM\" = \"fw\" ] ; then\n\tGEOSPATH=\"$GEOS_PREFIX/unix/lib\"\nelse\n\tGEOSPATH=\"$GEOS_PREFIX/lib\"\nfi\n\nsed -e \"s,@CMAKE_SOURCE_DIR@,$PROJECT_DIR/../..,\" \\\n\t-e \"s,@CMAKE_BINARY_DIR@,$TARGET_TEMP_DIR/python,\" \\\n\t-e \"s,@GDAL_INCLUDE_DIR@,$GDAL_INC,\" \\\n\t-e \"s,@GEOS_INCLUDE_DIR@,$GEOS_INC,\" \\\n\t-e \"s,@GEOS_LIB_NAME@,geos,\" \\\n\t-e \"s,@GEOS_LIB_PATH@,$GEOSPATH,\" \\\n\t-e \"s,@GDAL_LIB_NAME@,gdal,\" \\\n\t-e \"s,@GDAL_LIB_PATH@,$GDALPATH,\" \\\n\t-e \"s,@CMAKE_OSX_ARCHITECTURES@,$ARCHS_P,\" \\\n\t-e \"s,@CMAKE_OSX_SYSROOT@,$SDKROOT,\" \\\n\t-e \"s,@CMAKE_MODULE_LINKER_FLAGS@,,\" \\\n\t../../python/configure.py.in > \"$TARGET_TEMP_DIR/python/python/configure.py\"\n\nfi\n\ncd \"$TARGET_TEMP_DIR/python/python\"\nif [ ! -f core/Makefile ] || [ ! -f gui/Makefile ] || [ configure.py -nt core/Makefile ] || [ configure.py -nt gui/Makefile ] ; then\n\t$PYTHON configure.py .\nfi\n\nif [ -f core/Makefile ] && [ -f gui/Makefile ] ; then\n\texit 0\nelse\n\texit 1\nfi\n";
shellScript = "# generate and run configure.py\n\nif [ ! -f \"$TARGET_TEMP_DIR/python/python/configure.py\" ] || [ ../../python/configure.py.in -nt \"$TARGET_TEMP_DIR/python/python/configure.py\" ] ; then\n\nif [ \"$GDAL_FORM\" = \"fw\" ] ; then\n\tGDALPATH=\"$GDAL_PREFIX/unix/lib\"\nelse\n\tGDALPATH=\"$GDAL_PREFIX/lib\"\nfi\n\nif [ \"$GEOS_FORM\" = \"fw\" ] ; then\n\tGEOSPATH=\"$GEOS_PREFIX/unix/lib\"\nelse\n\tGEOSPATH=\"$GEOS_PREFIX/lib\"\nfi\n\nsed -e \"s,@CMAKE_SOURCE_DIR@,$PROJECT_DIR/../..,\" \\\n\t-e \"s,@CMAKE_BINARY_DIR@,$TARGET_TEMP_DIR/python,\" \\\n\t-e \"s,@GDAL_INCLUDE_DIR@,$GDAL_INC,\" \\\n\t-e \"s,@GEOS_INCLUDE_DIR@,$GEOS_INC,\" \\\n\t-e \"s,@GEOS_LIB_NAME@,geos,\" \\\n\t-e \"s,@GEOS_LIB_PATH@,$GEOSPATH,\" \\\n\t-e \"s,@GDAL_LIB_NAME@,gdal,\" \\\n\t-e \"s,@GDAL_LIB_PATH@,$GDALPATH,\" \\\n\t-e \"s,@CMAKE_OSX_ARCHITECTURES@,$ARCHS_P,\" \\\n\t-e \"s,@CMAKE_OSX_SYSROOT@,$SDKROOT,\" \\\n\t-e \"s,@CMAKE_MODULE_LINKER_FLAGS@,,\" \\\n\t../../python/configure.py.in > \"$TARGET_TEMP_DIR/python/python/configure.py\"\n\nfi\n\ncd \"$TARGET_TEMP_DIR/python/python\"\nif [ ! -f core/Makefile ] || [ ! -f gui/Makefile ] || [ configure.py -nt core/Makefile ] || [ configure.py -nt gui/Makefile ] ; then\n\t$PYTHON configure.py .\nfi\n\nif [ -f core/Makefile ] && [ -f gui/Makefile ] ; then\n\texit 0\nelse\n\texit 1\nfi\n";
showEnvVarsInLog = 0;
};
7256F23F0F41370A0022BE1F /* setup */ = {
@@ -5,9 +5,12 @@ CURRENT_PROJECT_VERSION = 2.2.0
// SDKSYS must be set to valid value
SDKSYS = leo // tig (Tiger), leo (Leopard), snow (Snow Leopard)

ARCHS = $(NATIVE_ARCH)
ARCHS = $(NATIVE_ARCH) // ppc i386 ppc64 x86_64
//ARCHS = ppc i386 // for universal

// python archs may be different
ARCHS_P = $(ARCH_P_$(SDKSYS)) // in the form arch1;arch2;...

//////////////////////////////////////////////////////////////////////
// QGIS version info & config
//////////////////////////////////////////////////////////////////////
@@ -308,6 +311,9 @@ PYTHON_VERSION_snow = 2.6
PYTHON_FORM_tig = fw
PYTHON_FORM_leo = system
PYTHON_FORM_snow = system
ARCHS_P_tig = ppc;i386
ARCHS_P_leo = ppc;i386
ARCHS_P_snow = i386;x86_64

PYTHON_PREFIX_fw = /Library/Frameworks/Python.framework
PYTHON_PREFIX_system = /System/Library/Frameworks/Python.framework
@@ -7,9 +7,12 @@
// there is no need to set *everything* here.

//SDKSYS = leo // tig (Tiger), leo (Leopard), snow (Snow Leopard)
//ARCHS = $(NATIVE_ARCH) // default
//ARCHS = $(NATIVE_ARCH) // ppc i386 ppc64 x86_64
//ARCHS = ppc i386 // for universal

// python archs may be different
//ARCHS_P = $(ARCH_P_$(SDKSYS)) // in the form arch1;arch2;...

//////////////////////////////////////////////////////////////////////
// Qt and other support
//////////////////////////////////////////////////////////////////////
@@ -13,9 +13,11 @@ geos_inc_dir = '@GEOS_INCLUDE_DIR@'
qt_libs = ["QtCore","QtGui","QtNetwork","QtSvg","QtXml"]
if sys.platform == 'darwin':
qt_libs.append("QtSql")
# possibility of universal build of bindings
# possibility of universal build of bindings, if more than 1 arch
osx_archs = '@CMAKE_OSX_ARCHITECTURES@'
if osx_archs == 'ppc;i386' or osx_archs == 'i386;ppc':
if osx_archs [-1] == ';' :
osx_archs = osx_archs [:-1]
if osx_archs.count(';') > 0:
osx_universal = '@CMAKE_OSX_SYSROOT@'
else:
osx_universal = ''

0 comments on commit d8a497f

Please sign in to comment.
You can’t perform that action at this time.