Skip to content

Instantly share code, notes, and snippets.

@fitnr
Last active March 12, 2018 19:37
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 fitnr/1be60978b792481e7dd1150c144dc944 to your computer and use it in GitHub Desktop.
Save fitnr/1be60978b792481e7dd1150c144dc944 to your computer and use it in GitHub Desktop.
patch for Homebrew postgis formula to rely on gdal2
[
{
"name": "gdal2",
"full_name": "osgeo/osgeo4mac/gdal2",
"desc": "GDAL: Geospatial Data Abstraction Library",
"homepage": "http://www.gdal.org/",
"oldname": null,
"aliases": [
"gdal-20"
],
"versions": {
"stable": "2.2.3",
"bottle": true,
"devel": null,
"head": "HEAD"
},
"revision": 0,
"version_scheme": 0,
"installed": [
{
"version": "2.2.3",
"used_options": [
"--with-sfcgal",
"--with-qhull",
"--with-postgresql",
"--with-mdb",
"--with-armadillo"
],
"built_as_bottle": false,
"poured_from_bottle": false,
"runtime_dependencies": [
{
"full_name": "libpng",
"version": "1.6.34"
},
{
"full_name": "jpeg",
"version": "9b"
},
{
"full_name": "giflib",
"version": "5.1.4"
},
{
"full_name": "libtiff",
"version": "4.0.9"
},
{
"full_name": "proj",
"version": "4.9.3"
},
{
"full_name": "libgeotiff",
"version": "1.4.2"
},
{
"full_name": "geos",
"version": "3.6.2"
},
{
"full_name": "sqlite",
"version": "3.21.0"
},
{
"full_name": "pcre",
"version": "8.41"
},
{
"full_name": "freexl",
"version": "1.0.4"
},
{
"full_name": "libspatialite",
"version": "4.3.0a"
},
{
"full_name": "openssl",
"version": "1.0.2n"
},
{
"full_name": "readline",
"version": "7.0.3"
},
{
"full_name": "postgresql",
"version": "10.1"
},
{
"full_name": "veclibfort",
"version": "0.4.2"
},
{
"full_name": "arpack",
"version": "3.5.0"
},
{
"full_name": "szip",
"version": "2.1.1"
},
{
"full_name": "hdf5",
"version": "1.10.1"
},
{
"full_name": "superlu",
"version": "5.2.1"
},
{
"full_name": "armadillo",
"version": "8.300.3"
},
{
"full_name": "boost",
"version": "1.66.0"
},
{
"full_name": "gmp",
"version": "6.1.2"
},
{
"full_name": "mpfr",
"version": "3.1.6"
},
{
"full_name": "cgal",
"version": "4.11"
},
{
"full_name": "sfcgal",
"version": "1.3.2"
},
{
"full_name": "gcc",
"version": "7.2.0"
}
],
"installed_as_dependency": false,
"installed_on_request": true
}
],
"linked_keg": null,
"pinned": false,
"outdated": false,
"keg_only": true,
"dependencies": [
"libpng",
"jpeg",
"giflib",
"libtiff",
"libgeotiff",
"proj",
"geos",
"sqlite",
"pcre",
"freexl",
"libspatialite",
"postgresql",
"mysql",
"ogdi",
"armadillo",
"sfcgal"
],
"recommended_dependencies": [],
"optional_dependencies": [
"postgresql",
"mysql",
"ogdi",
"armadillo",
"sfcgal"
],
"build_dependencies": [],
"conflicts_with": [],
"caveats": "Plugins for this version of GDAL/OGR, generated by other formulae, should\nbe symlinked to the following directory:\n\n /usr/local/lib/gdalplugins/2.2\n\nYou may need to set the following enviroment variable:\n\n export GDAL_DRIVER_PATH=/usr/local/lib/gdalplugins\n\nPYTHON BINDINGS are now built in a separate formula: gdal2-python\n",
"requirements": [
{
"name": "java",
"cask": "java",
"download": "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
}
],
"options": [
{
"option": "--with-complete",
"description": "Use additional Homebrew libraries to provide more drivers."
},
{
"option": "--with-qhull",
"description": "Build with internal qhull libary support"
},
{
"option": "--with-opencl",
"description": "Build with OpenCL acceleration."
},
{
"option": "--with-armadillo",
"description": "Build with Armadillo accelerated TPS transforms."
},
{
"option": "--with-unsupported",
"description": "Allow configure to drag in any library it can find. Invoke this at your own risk."
},
{
"option": "--with-mdb",
"description": "Build with Access MDB driver (requires Java 1.6+ JDK/JRE, from Apple or Oracle)."
},
{
"option": "--without-gnm",
"description": "Build without Geographic Network Model support"
},
{
"option": "--with-libkml",
"description": "Build with Google's libkml driver (requires libkml-dev >= 1.3)"
},
{
"option": "--with-swig-java",
"description": "Build the swig java bindings"
},
{
"option": "--with-sfcgal",
"description": "Build with CGAL C++ wrapper support"
},
{
"option": "--with-ogdi",
"description": "Build with OGDI support (consider gdal2-ogdi instead)"
},
{
"option": "--with-postgresql",
"description": "Build with postgresql support"
},
{
"option": "--with-mysql",
"description": "Build with mysql support"
},
{
"option": "--with-java",
"description": "Build with java support"
}
],
"bottle": {
"stable": {
"rebuild": 0,
"cellar": "/usr/local/Cellar",
"prefix": "/usr/local",
"root_url": "https://osgeo4mac.s3.amazonaws.com/bottles",
"files": {
"sierra": {
"url": "https://osgeo4mac.s3.amazonaws.com/bottles/gdal2-2.2.3.sierra.bottle.tar.gz",
"sha256": "4041b35db4dd7615cc8b90b2a7f3af0decfd4a9659af68673104d6c88f8326c9"
},
"high_sierra": {
"url": "https://osgeo4mac.s3.amazonaws.com/bottles/gdal2-2.2.3.high_sierra.bottle.tar.gz",
"sha256": "4041b35db4dd7615cc8b90b2a7f3af0decfd4a9659af68673104d6c88f8326c9"
}
}
}
}
}
]
diff --git Formula/postgis.rb Formula/postgis.rb
index 6b300747..bd9b9fb3 100644
--- Formula/postgis.rb
+++ Formula/postgis.rb
@@ -36,8 +36,8 @@ class Postgis < Formula
# For GeoJSON and raster handling
depends_on "json-c"
- depends_on "gdal" => :recommended
- depends_on "pcre" if build.with? "gdal"
+ depends_on "osgeo/osgeo4mac/gdal2" => :recommended
+ depends_on "pcre" if build.with? "osgeo/osgeo4mac/gdal2"
# For advanced 2D/3D functions
depends_on "sfcgal" => :recommended
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment