-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #685 from mapbox/postgis
Add latest postgis version
- Loading branch information
Showing
11 changed files
with
782 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
language: generic | ||
|
||
matrix: | ||
include: | ||
- os: osx | ||
osx_image: xcode8.2 | ||
compiler: clang | ||
- os: linux | ||
sudo: false | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- libstdc++-4.9-dev | ||
|
||
|
||
script: | ||
- ./mason build ${MASON_NAME} ${MASON_VERSION} | ||
- ./mason publish ${MASON_NAME} ${MASON_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
## Packaging GDAL | ||
|
||
### Background | ||
|
||
GDAL is one of the harder software libraries to package because it has so many required and potential dependencies. | ||
|
||
Also, mason prefers packaging libraries at static archives, which complicates things because this complicates dependency handling: when linking to static libraries you need all of the libraries (passed to the linker) that static archive depends on. For GDAL that is both the C standard library, the C++ standard library, and potentially a lot of libraries other libraries, both with C and C++ dependencies. This is the main reason that the script.sh is so narly. The upside is that then the libraries are standalone at runtime. So, hard to build, easy to run. It's a tradeoff | ||
|
||
### Steps to package | ||
|
||
This document intends to guide you to the basic steps to package a new version of GDAL in mason. | ||
|
||
#### Step 1: Copy a previous GDAL package. | ||
|
||
Find the last successful package gdal mason. Perhaps use the highest incremented version: | ||
|
||
``` | ||
ls scripts/gdal/ | ||
1.11.1 1.11.1-big-pants 1.11.2 2.0.2 2.1.1 2.1.3 2.2.1 2.2.2 2.2.3 2.2.3-1 2.4.1 dev | ||
``` | ||
|
||
It is `2.2.3-1` at the time of this writing. | ||
|
||
Then find most recent release at http://download.osgeo.org/gdal/ | ||
|
||
Create new package: | ||
|
||
``` | ||
cd mason | ||
cp -r scripts/gdal/2.2.3-1 scripts/gdal/2.4.1 | ||
``` | ||
|
||
Open up `scripts/gdal/2.4.1/script.sh` and edit the `MASON_VERSION` variable to be `2.4.1` | ||
|
||
#### Step 2: Now try building | ||
|
||
This will fail with an error, but just do it anyway: | ||
|
||
``` | ||
./mason build gdal 2.4.1 | ||
``` | ||
|
||
The error is because the hash changed for the upstream download, because you changed the `MASON_VERSION`. | ||
|
||
You will see an error like: | ||
|
||
> Hash 38758d9fa5083e8d8e4333c38e132e154da9f25f of file /Users/danespringmeyer/projects/mason/mason_packages/.cache/gdal-2.4.1 doesn't match f4ac4fb76e20cc149d169163914d76d51173ce82 | ||
To fix this, edit `scripts/gdal/2.4.1/script.sh` and add the first hash reported on `line 12`. | ||
|
||
Now try building again: | ||
|
||
``` | ||
./mason build gdal 2.4.1 | ||
``` | ||
|
||
If it succeeded locally then you are good to continue to the next step. | ||
|
||
|
||
#### Step 3: push to github and build on travis | ||
|
||
First create a new mason branch and push all the new scripts: | ||
|
||
``` | ||
git checkout -b gdal-2.4.1 | ||
git add scripts/gdal | ||
git commit scripts/gdal -m "adding GDAL 2.4.1" | ||
``` | ||
|
||
Then try triggering a build on travis. To do this do: | ||
|
||
``` | ||
./mason trigger gdal 2.4.1 | ||
``` | ||
|
||
And you watch for the build job to appear at https://travis-ci.org/mapbox/mason/builds. It wll have a "lego" icon and a title like "Building gdal 2.4.1", which denotes a triggered build. |
Oops, something went wrong.