link libpq statically so that postgres client is not needed, and compile and include freetype so that Freetype.framework is not needed

This commit is contained in:
Dane Springmeyer 2010-12-22 17:50:50 +00:00
parent e4f271510f
commit 890524b207
2 changed files with 29 additions and 4 deletions

View file

@ -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

View file

@ -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