osx: libpng and universal tweaks

This commit is contained in:
Dane Springmeyer 2011-08-23 15:21:25 +00:00
parent 56783afe08
commit 8315703e74

View file

@ -15,6 +15,10 @@ export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
export CFLAGS="-O3 -arch i386 -arch x86_64"
export CXXFLAGS="-O3 -arch i386 -arch x86_64"
export LDFLAGS="-arch i386 -arch x86_64 -headerpad_max_install_names"
# universal flags
export CFLAGS="-O3 -arch i386 -arch x86_64"
export CXXFLAGS="-O3 -arch i386 -arch x86_64"
export LDFLAGS="-arch i386 -arch x86_64 -headerpad_max_install_names"
# make a directory to hold icu and boost
@ -104,7 +108,7 @@ cd cairo-1.10.2
export LDFLAGS="-L/Library/Frameworks/UnixImageIO.framework/unix/lib "$LDFLAGS
export CFLAGS="-I/Library/Frameworks/UnixImageIO.framework/unix/include "$CFLAGS
export png_CFLAGS="-I/Library/Frameworks/UnixImageIO.framework/unix/include"
export png_LIBS="-I/Library/Frameworks/UnixImageIO.framework/unix/lib -lpng14"
export png_LIBS="-I/Library/Frameworks/UnixImageIO.framework/unix/lib -lpng15"
./configure \
--disable-valgrind \
--enable-gobject=no \
@ -124,21 +128,22 @@ install_name_tool -id $INSTALL/libcairo.2.dylib ../../sources/lib/libcairo.2.dyl
cd ../
# since linking to libpng framework (which does not provide a pkg-config) fake it:
# match to /Library/Frameworks/UnixImageIO.framework/unix/
# vim ../sources/lib/pkgconfig/libpng.pc
prefix=/Library/Frameworks/UnixImageIO.framework/unix
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/libpng14
includedir=${prefix}/include/libpng15
Name: libpng
Description: Loads and saves PNG files
Version: 1.4
Libs: -L${libdir} -lpng14
Version: 1.5
Libs: -L${libdir} -lpng15
Libs.private: -lz
Cflags: -I${includedir}
# libsigcxx
wget http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.10.tar.bz2
tar xvf libsigc++-2.2.10.tar.bz2
@ -166,6 +171,9 @@ install_name_tool -id $INSTALL/libcairomm-1.0.1.dylib ../../sources/lib/libcairo
# also make sure cairo and friends did not link against anything in /opt/local or /usr/local
otool -L ../../sources/lib/*dylib | grep local
# ensure we're linking to the right image libs
otool -L ../../sources/lib/*dylib | grep UnixImageIO
# pycairo
# >= python 3.1
#wget http://cairographics.org/releases/pycairo-1.8.10.tar.bz2
@ -361,6 +369,8 @@ scons -j2 install
cp bindings/python/mapnik/_mapnik2.so osx/python/_mapnik2_32.so
# build a ton of versions of node (just to be safe about ABI)
cd ../../deps