Skip to content

Commit

Permalink
Merge pull request #487 from mapbox/postgis-updates
Browse files Browse the repository at this point in the history
Update to postgis 2.4.0, gdal 2.2.2, and supporting deps
  • Loading branch information
springmeyer authored Oct 24, 2017
2 parents 0849834 + 042b9f6 commit 411083d
Show file tree
Hide file tree
Showing 25 changed files with 1,270 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/expat/2.2.4/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: generic

matrix:
include:
- os: osx
osx_image: xcode8
compiler: clang
- os: linux
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-5-dev

script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
50 changes: 50 additions & 0 deletions scripts/expat/2.2.4/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash

MASON_NAME=expat
MASON_VERSION=2.2.4
MASON_VERSION2="R_${MASON_VERSION//./_}"
MASON_LIB_FILE=lib/libexpat.a
MASON_PKGCONFIG_FILE=lib/pkgconfig/expat.pc

. ${MASON_DIR}/mason.sh

function mason_load_source {
mason_download \
https://github.com/libexpat/libexpat/archive/${MASON_VERSION2}.tar.gz \
b1a5faaad5f4801d550df43baeba127ddc6233d4

mason_extract_tar_gz

export MASON_BUILD_PATH=${MASON_ROOT}/.build/libexpat-${MASON_VERSION2}
}

function mason_compile {
cd expat
./buildconf.sh
# Add optimization flags since CFLAGS overrides the default (-g -O2)
export CFLAGS="${CFLAGS} -O3 -DNDEBUG"
./configure \
--prefix=${MASON_PREFIX} \
${MASON_HOST_ARG} \
--without-xmlwf \
--enable-static \
--disable-shared \
--disable-dependency-tracking

make install -j${MASON_CONCURRENCY}
}

function mason_cflags {
echo -I${MASON_PREFIX}/include
}

function mason_ldflags {
echo -L${MASON_PREFIX}/lib -lexpat
}


function mason_clean {
make clean
}

mason_run "$@"
13 changes: 13 additions & 0 deletions scripts/gdal/2.2.2/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: generic

matrix:
include:
- os: osx
osx_image: xcode8.2
compiler: clang
- os: linux
sudo: false

script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
141 changes: 141 additions & 0 deletions scripts/gdal/2.2.2/patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
diff --git a/apps/GNUmakefile b/apps/GNUmakefile
index a87cd0f..931a988 100644
--- a/apps/GNUmakefile
+++ b/apps/GNUmakefile
@@ -79,103 +79,103 @@ gdalbuildvrt_lib.$(OBJ_EXT): gdalbuildvrt_lib.cpp
$(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@

gdalinfo$(EXE): gdalinfo_bin.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) $(CONFIG_LIB_UTILS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) $(CONFIG_LIB_UTILS) -o $@ $(LNK_FLAGS)

gdalserver$(EXE): gdalserver.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdal_translate$(EXE): gdal_translate_bin.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdaladdo$(EXE): gdaladdo.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdalwarp$(EXE): gdalwarp_bin.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdal_contour$(EXE): gdal_contour.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

nearblack$(EXE): nearblack_bin.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdalmanage$(EXE): gdalmanage.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdal_rasterize$(EXE): gdal_rasterize_bin.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdaltindex$(EXE): gdaltindex.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdalbuildvrt$(EXE): gdalbuildvrt_bin.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

multireadtest$(EXE): multireadtest.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

dumpoverviews$(EXE): dumpoverviews.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdalenhance$(EXE): gdalenhance.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdaldem$(EXE): gdaldem_bin.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdal_grid$(EXE): gdal_grid_bin.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdalwarpsimple$(EXE): gdalwarpsimple.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdaltransform$(EXE): gdaltransform.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdallocationinfo$(EXE): gdallocationinfo.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdalsrsinfo$(EXE): gdalsrsinfo.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdalflattenmask$(EXE): gdalflattenmask.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdaltorture$(EXE): gdaltorture.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdal2ogr$(EXE): gdal2ogr.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

ogrinfo$(EXE): ogrinfo.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

ogrlineref$(EXE): ogrlineref.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

ogr2ogr$(EXE): ogr2ogr_bin.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

testepsg$(EXE): testepsg.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

ogrtindex$(EXE): ogrtindex.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

test_ogrsf$(EXE): test_ogrsf.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gdalasyncread$(EXE): gdalasyncread.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

testreprojmulti$(EXE): testreprojmulti.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gnmmanage$(EXE): gnmmanage.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

gnmanalyse$(EXE): gnmanalyse.$(OBJ_EXT) $(DEP_LIBS)
- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@
+ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS)

clean:
$(RM) *.o $(BIN_LIST) core gdal-config gdal-config-inst
Loading

0 comments on commit 411083d

Please sign in to comment.