diff --git a/osx/config.py b/osx/config.py index f82f30ffb..b98733162 100644 --- a/osx/config.py +++ b/osx/config.py @@ -1,15 +1,13 @@ -CXX = 'clang++' -CUSTOM_CXXFLAGS = '-arch i386 -arch x86_64 -Iosx/sources/include' +CUSTOM_CXXFLAGS = '-arch i386 -arch x86_64 -Iosx/sources/include -Iosx/sources/include/freetype2' CUSTOM_LDFLAGS = '-arch i386 -arch x86_64 -headerpad_max_install_names -Losx/sources/lib' OPTIMIZATION = '3' INPUT_PLUGINS = 'gdal,geos,kismet,occi,ogr,osm,postgis,raster,rasterlite,shape,sqlite' -FAST = True PREFIX = '/Library/Frameworks/Mapnik.framework/Versions/2.0/unix' PYTHON_PREFIX = '/Library/Frameworks/Mapnik.framework/Versions/2.0/unix' DESTDIR = '/Users/dane/projects/mapnik-dev/trunk-build/osx/' BOOST_INCLUDES = '/Users/dane/projects/mapnik-dev/trunk-build/osx/sources/include' BOOST_LIBS = '/Users/dane/projects/mapnik-dev/trunk-build/osx/sources/lib' -FREETYPE_CONFIG = '/Library/Frameworks/FreeType.framework/Programs/freetype-config' +FREETYPE_CONFIG = '/Users/dane/projects/mapnik-dev/trunk-build/osx/sources/bin/freetype-config' GEOS_CONFIG = '/Library/Frameworks/GEOS.framework/Programs/geos-config' PNG_INCLUDES = '/Library/Frameworks/UnixImageIO.framework/unix/include' PNG_LIBS = '/Library/Frameworks/UnixImageIO.framework/unix/lib' @@ -23,3 +21,4 @@ SQLITE_INCLUDES = '/Library/Frameworks/SQLite3.framework/unix/include' SQLITE_LIBS = '/Library/Frameworks/SQLite3.framework/unix/lib' PYTHON_DYNAMIC_LOOKUP = True BINDINGS = 'python' +PGSQL2SQLITE = True diff --git a/osx/patches/postgis_static.diff b/osx/patches/postgis_static.diff new file mode 100644 index 000000000..97e72a6fd --- /dev/null +++ b/osx/patches/postgis_static.diff @@ -0,0 +1,26 @@ +Index: plugins/input/postgis/SConscript +=================================================================== +--- plugins/input/postgis/SConscript (revision 2476) ++++ plugins/input/postgis/SConscript (working copy) +@@ -33,7 +33,11 @@ + """ + ) + +-libraries = ['pq'] ++static = '-lintl -liconv -lxml2 -lpam -lssl -lcrypto -lkrb5 -lldap -lreadline -lz' ++libraries = ['pq_s'] ++libraries.extend(static.split(' ')) ++ldflags = env['CUSTOM_LDFLAGS'] ++ldflags += ' -framework CoreFoundation' + + if env['PLATFORM'] == 'Darwin': + libraries.append('mapnik2') +@@ -41,7 +45,7 @@ + if env['THREADING'] == 'multi': + libraries.append('boost_thread%s' % env['BOOST_APPEND']) + +-input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) ++input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=ldflags) + + if env['PLATFORM'] == 'Darwin': + # if the plugin links to libmapnik2 ensure it is built first