Skip to content

Instantly share code, notes, and snippets.

@jalessio
Forked from sgillies/build.sh
Created March 7, 2017 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalessio/8d7c925f29944285c561e6bf0c487b83 to your computer and use it in GitHub Desktop.
Save jalessio/8d7c925f29944285c561e6bf0c487b83 to your computer and use it in GitHub Desktop.
Building GDAL and friends for inclusion in Rasterio binary wheels
#!/bin/bash
export MACOSX_DEPLOYMENT_TARGET=10.6
export ARCHFLAGS="-arch i386 -arch x86_64"
# GEOS from source.
cd ~/work/geos-3.4.2
./configure CFLAGS="-Os -arch i386 -arch x86_64" CXXFLAGS="-Os -arch i386 -arch x86_64" LDFLAGS="-arch i386 -arch x86_64"
make clean
make
make install
# I'm building PROJ.4 from source.
cd ~/work/proj-4.8.0
./configure CFLAGS="-Os -arch i386 -arch x86_64" CXXFLAGS="-Os -arch i386 -arch x86_64" LDFLAGS="-arch i386 -arch x86_64"
make clean
make
make install
cd ~/work/jasper-1.900.1.uuid
./configure CFLAGS="-Os -arch i386 -arch x86_64" CXXFLAGS="-Os -arch i386 -arch x86_64" LDFLAGS="-arch i386 -arch x86_64"
make clean
make
make install
# GDAL.
cd ~/work/gdal-1.11.1
./configure --with-threads --disable-static --without-grass --with-jasper=/usr/local \
--with-libtiff=internal --with-jpeg --with-gif --with-png \
--with-geotiff=internal --with-sqlite3=/usr --with-pcraster=internal \
--with-geos=/usr/local/bin/geos-config --with-static-proj4=/usr/local --with-expat=/usr \
--with-curl=/usr CFLAGS="-Os -arch i386 -arch x86_64" \
CXXFLAGS="-Os -arch i386 -arch x86_64" \
LDFLAGS="-arch i386 -arch x86_64"
make clean
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment