Full Code of OSGeo/homebrew-osgeo4mac for AI

master 22c43a0ea87e cached
272 files
1.2 MB
376.6k tokens
803 symbols
1 requests
Download .txt
Showing preview only (1,258K chars total). Download the full file or copy to clipboard to get everything.
Repository: OSGeo/homebrew-osgeo4mac
Branch: master
Commit: 22c43a0ea87e
Files: 272
Total size: 1.2 MB

Directory structure:
gitextract_dhh04ofh/

├── .ciignore
├── .circleci/
│   ├── after_script.sh
│   ├── before_deploy.sh
│   ├── before_install.sh
│   ├── changed_formulas.sh
│   ├── config.yml
│   ├── install.sh
│   ├── script.sh
│   ├── set_env.sh
│   └── skip-formulas.txt
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── stale.yml
├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Formula/
│   ├── mapcache.rb
│   ├── mapserver6.rb
│   ├── osgeo-ecwjp2-sdk.rb
│   ├── osgeo-fcgi-debug.rb
│   ├── osgeo-filegdb-api.rb
│   ├── osgeo-fyba.rb
│   ├── osgeo-gdal-ecwjp2.rb
│   ├── osgeo-gdal-filegdb.rb
│   ├── osgeo-gdal-grass.rb
│   ├── osgeo-gdal-mdb.rb
│   ├── osgeo-gdal-mongodb.rb
│   ├── osgeo-gdal-mrsid.rb
│   ├── osgeo-gdal-mysql.rb
│   ├── osgeo-gdal-ogdi.rb
│   ├── osgeo-gdal-oracle.rb
│   ├── osgeo-gdal-pdf.rb
│   ├── osgeo-gdal-python.rb
│   ├── osgeo-gdal-sosi.rb
│   ├── osgeo-gdal.rb
│   ├── osgeo-gmt.rb
│   ├── osgeo-gpkgtools.rb
│   ├── osgeo-grass.rb
│   ├── osgeo-hdf4.rb
│   ├── osgeo-hexer.rb
│   ├── osgeo-iipsrv.rb
│   ├── osgeo-insighttoolkit.rb
│   ├── osgeo-insighttoolkit@4.rb
│   ├── osgeo-lastools.rb
│   ├── osgeo-laszip@2.rb
│   ├── osgeo-laz-perf.rb
│   ├── osgeo-libgeotiff.rb
│   ├── osgeo-libght.rb
│   ├── osgeo-libkml.rb
│   ├── osgeo-liblas.rb
│   ├── osgeo-libnoise.rb
│   ├── osgeo-libpqxx.rb
│   ├── osgeo-libspatialite.rb
│   ├── osgeo-mapnik.rb
│   ├── osgeo-marble.rb
│   ├── osgeo-matplotlib.rb
│   ├── osgeo-mongo-cxx-driver-legacy.rb
│   ├── osgeo-mrsid-sdk.rb
│   ├── osgeo-muparserx.rb
│   ├── osgeo-netcdf.rb
│   ├── osgeo-nitro.rb
│   ├── osgeo-ogdi.rb
│   ├── osgeo-opencollada.rb
│   ├── osgeo-openscenegraph.rb
│   ├── osgeo-oracle-client-sdk.rb
│   ├── osgeo-orfeo.rb
│   ├── osgeo-osgearth.rb
│   ├── osgeo-osgqt.rb
│   ├── osgeo-osm2po.rb
│   ├── osgeo-ossim.rb
│   ├── osgeo-pcl.rb
│   ├── osgeo-pdal.rb
│   ├── osgeo-pdfium.rb
│   ├── osgeo-pgadmin3-lts.rb
│   ├── osgeo-pgsql-ogr-fdw.rb
│   ├── osgeo-pointcloud.rb
│   ├── osgeo-points2grid.rb
│   ├── osgeo-postgis.rb
│   ├── osgeo-postgis@2.4.rb
│   ├── osgeo-postgis@2.5.rb
│   ├── osgeo-postgresql.rb
│   ├── osgeo-postgresql@10.rb
│   ├── osgeo-postgresql@11.rb
│   ├── osgeo-proj.rb
│   ├── osgeo-psqlodbc.rb
│   ├── osgeo-pyqt-webkit.rb
│   ├── osgeo-pyspatialite.rb
│   ├── osgeo-qscintilla2.rb
│   ├── osgeo-qt-mysql.rb
│   ├── osgeo-qt-odbc.rb
│   ├── osgeo-qt-psql.rb
│   ├── osgeo-qt-webkit.rb
│   ├── osgeo-qtkeychain.rb
│   ├── osgeo-saga-lts.rb
│   ├── osgeo-saga.rb
│   ├── osgeo-shark.rb
│   ├── osgeo-simple-tiles.rb
│   ├── osgeo-six.rb
│   ├── osgeo-taudem.rb
│   ├── osgeo-vigra.rb
│   ├── osgeo-vtk.rb
│   ├── osgeo-whitebox-tools.rb
│   ├── osgeo-whitebox.rb
│   ├── prepair.rb
│   ├── qca-qt@5.7.rb
│   ├── qt-ifw-qt5.rb
│   ├── qt-ifw.rb
│   ├── qt5-webkit-qt@5.7.rb
│   ├── qtkeychain-qt@5.7.rb
│   └── travis-cache-seed.rb
├── LICENSE
├── README.md
├── Requirements/
│   ├── gdal_third_party.rb
│   ├── grass_requirements.rb
│   └── qgis_requirements.rb
├── Strategies/
│   └── cache-download.rb
├── boneyard/
│   ├── brew-stack.rb
│   ├── enki.rb
│   ├── gdal-110.rb
│   ├── gdal-19.rb
│   ├── gdal-20.rb
│   ├── gdal-ecwjp2.rb
│   ├── gdal-filegdb.rb
│   ├── gdal-grass64.rb
│   ├── gdal-mrsid.rb
│   ├── gdal-oracle.rb
│   ├── gdal-sosi.rb
│   ├── gdal1-ecwjp2.rb
│   ├── gdal1-filegdb.rb
│   ├── gdal1-grass6.rb
│   ├── gdal1-mrsid.rb
│   ├── gdal1-mysql.rb
│   ├── gdal1-oracle.rb
│   ├── gpsbabel-qt4.rb
│   ├── grass-64.rb
│   ├── grass-70.rb
│   ├── grass6.rb
│   ├── grass7-lts.rb
│   ├── libgpkg.rb
│   ├── mapcache-12.rb
│   ├── mapserver-64.rb
│   ├── minizip.rb
│   ├── openjpeg20.rb
│   ├── orfeo-32.rb
│   ├── orfeo-40.rb
│   ├── orfeo-42.rb
│   ├── orfeo-54.rb
│   ├── orfeo5.rb
│   ├── orfeo5@5.4.rb
│   ├── osgearth-qt4.rb
│   ├── osgearth.rb
│   ├── osgeo-proj@5.rb
│   ├── osgeo-pyqt.rb
│   ├── osgeo-qgis-ltr.rb
│   ├── osgeo-qgis-res.rb
│   ├── osgeo-qgis.rb
│   ├── osgeo-sip.rb
│   ├── ossim@2.1.rb
│   ├── pdfium.rb
│   ├── points2grid.rb
│   ├── pyqt-qt4.rb
│   ├── qca-qt4.rb
│   ├── qgis-18.rb
│   ├── qgis-20.rb
│   ├── qgis-214.rb
│   ├── qgis-22.rb
│   ├── qgis-24.rb
│   ├── qgis-26.rb
│   ├── qgis-28.rb
│   ├── qgis-ltr@2.rb
│   ├── qjson-qt4.rb
│   ├── qscintilla2-qt4.rb
│   ├── qscintilla2.rb
│   ├── qt-4.rb
│   ├── qt4-mysql.rb
│   ├── qt4-oracle.rb
│   ├── qtkeychain-qt4.rb
│   ├── quazip.rb
│   ├── qutepart.rb
│   ├── qwt-qt4.rb
│   ├── qwt-qt4@5.2.rb
│   ├── qwt60.rb
│   ├── qwtpolar-qt4.rb
│   ├── qwtpolar.rb
│   ├── sip-qt4.rb
│   ├── spatialite-gui-17.rb
│   ├── v8318.rb
│   ├── wxmac-28.rb
│   ├── wxmac-29.rb
│   └── wxmac-mono.rb
├── commit-msg.sh
├── docs/
│   ├── 404.html
│   ├── Gemfile
│   ├── Rakefile
│   ├── _config.yml
│   ├── _includes/
│   │   ├── head.html
│   │   ├── nav.html
│   │   ├── new-window-fix.html
│   │   ├── open-embed.html
│   │   └── scripts.html
│   ├── _layouts/
│   │   ├── about.html
│   │   ├── default.html
│   │   ├── home.html
│   │   ├── page.html
│   │   └── post.html
│   ├── _sass/
│   │   ├── base.scss
│   │   ├── buttons.scss
│   │   ├── code.scss
│   │   ├── color_schemes/
│   │   │   └── dark.scss
│   │   ├── content.scss
│   │   ├── custom/
│   │   │   └── custom.scss
│   │   ├── labels.scss
│   │   ├── layout.scss
│   │   ├── navigation.scss
│   │   ├── search.scss
│   │   ├── support/
│   │   │   ├── _functions.scss
│   │   │   ├── _variables.scss
│   │   │   ├── mixins/
│   │   │   │   ├── _buttons.scss
│   │   │   │   ├── _layout.scss
│   │   │   │   ├── _typography.scss
│   │   │   │   └── mixins.scss
│   │   │   └── support.scss
│   │   ├── tables.scss
│   │   ├── typography.scss
│   │   ├── utilities/
│   │   │   ├── _colors.scss
│   │   │   ├── _layout.scss
│   │   │   ├── _lists.scss
│   │   │   ├── _spacing.scss
│   │   │   ├── _typography.scss
│   │   │   └── utilities.scss
│   │   └── vendor/
│   │       └── normalize.scss/
│   │           ├── README.md
│   │           ├── normalize.scss
│   │           └── package.json
│   ├── assets/
│   │   ├── css/
│   │   │   ├── dark-mode-preview.scss
│   │   │   └── just-the-docs.scss
│   │   └── js/
│   │       ├── just-the-docs.js
│   │       └── search-data.json
│   ├── bin/
│   │   └── just-the-docs
│   ├── docs/
│   │   ├── developing-on-QGIS-using-OSGeo4Mac.md
│   │   ├── installing-QGIS-3.md
│   │   ├── reporting-issues.md
│   │   └── troubleshooting.md
│   ├── index.md
│   ├── just-the-docs.gemspec
│   ├── lib/
│   │   └── tasks/
│   │       └── search.rake
│   ├── package.json
│   └── script/
│       └── build
├── enviro/
│   ├── osgeo4mac-qt4.env
│   ├── osgeo4mac.env
│   ├── python_startup.py
│   └── qgis-osgeo4mac-ctest-env.sh
├── formula_renames.json
├── scripts/
│   ├── Mac/
│   │   ├── find_all-installed_w-options.sh
│   │   └── find_non-bottle-builds_w-options.sh
│   ├── qgis2-cmake-options.py
│   ├── qgis2-creator-build.sh
│   ├── qgis2-creator-install.sh
│   ├── qgis2-set-app-env.py
│   └── update-gdal.sh
├── travis/
│   ├── after_script.sh
│   ├── before_cache.sh
│   ├── before_deploy.sh
│   ├── before_install.sh
│   ├── before_script.sh
│   ├── bintray-upload.json
│   ├── changed_formulas.sh
│   ├── install.sh
│   ├── script.sh
│   └── skip-formulas.txt
└── travis_deploy_key.enc

================================================
FILE CONTENTS
================================================

================================================
FILE: .ciignore
================================================
Aliases/*
boneyard/*
enviro/*
Requirements/*
scripts/*
Strategies/*
travis/*
.circleci/*
LICENSE
.ciignore
.gitignore
.git
*.sh
*.enc
*.md
*.yml
*.json
*.txt
*.py
*.env


================================================
FILE: .circleci/after_script.sh
================================================
#!/usr/bin/env bash
###########################################################################
#    homebrew-osgeo4mac circle ci - after_script.sh
#    ---------------------
#    Date                 : Dec 2019
#    Copyright            : (C) 2016 by Boundless Spatial, Inc.
#    Author               : Larry Shaffer - FJ Perini
#    Email                : lshaffer at boundlessgeo dot com
###########################################################################
#                                                                         #
#   This program is free software; you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation; either version 2 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
###########################################################################

# OS X version
# sw_vers -productVersion
# sw_vers -productVersion | cut -d '.' -f 1,2
# MAJOR_MAC_VERSION=$(sw_vers -productVersion | awk -F '.' '{print $1 "." $2}')
# system_profiler SPSoftwareDataType

# Build the actual bottles
# In Travis, this used to be part of the deploy phase, but now it needs
# to run as part of the original build process, but only on master.
mkdir /tmp/bottles
if [ "$CIRCLE_BRANCH" != "master" ]; then
pushd /tmp/bottles
  # BOTTLE_ROOT=https://dl.bintray.com/homebrew-osgeo/osgeo-bottles
  BOTTLE_ROOT=https://bottle.download.osgeo.org
  for f in ${CHANGED_FORMULAE};do
    echo "Bottling changed formula ${f}..."
    brew bottle --verbose --json --root-url=${BOTTLE_ROOT} osgeo/osgeo4mac/${f}

    # for art in ${f}*.sierra.bottle.*; do
        # Remove double dashes introduced by the latest changes to Homebrew bottling.
        # This may need to be reverted later, but this at least normalizes the bottle names with what's in the json files.
        # Move the sierra bottle and json file
        # mv ${art} ${art/--/-}
    # done

    # temporary duplication of 10.3-Xcode-10.x-built bottles to 10.4 bottles
    # Do the bottle duplication per formula, so we can merge the changes
    for art in ${f}*.high_sierra.bottle.*; do
      new_name=${art/.high_sierra./.mojave.}
      # Remove double dashes introduced by the latest changes to Homebrew bottling.
      # This may need to be reverted later, but this at least normalizes the bottle names with what's in the json files.
      cp -a ${art} ${new_name/--/-}
      # Move the high_sierra bottle and json file
      mv ${art} ${art/--/-}
    done
    for json in ${f}*.mojave.bottle*.json; do
      sed -i '' s@high_sierra@mojave@g ${json}
    done

    # temporary duplication
    # Do the bottle duplication per formula, so we can merge the changes
    for art in ${f}*.high_sierra.bottle.*; do
      new_name=${art/.high_sierra./.catalina.}
      # Remove double dashes introduced by the latest changes to Homebrew bottling.
      # This may need to be reverted later, but this at least normalizes the bottle names with what's in the json files.
      cp -a ${art} ${new_name/--/-}
      # Move the high_sierra bottle and json file
      mv ${art} ${art/--/-}
    done
    for json in ${f}*.catalina.bottle*.json; do
      sed -i '' s@high_sierra@catalina@g ${json}
    done
  done
  ls
popd
fi


================================================
FILE: .circleci/before_deploy.sh
================================================
#!/usr/bin/env bash
###########################################################################
#    homebrew-osgeo4mac circle ci - before_deploy.sh
#    ---------------------
#    Date                 : Dec 2019
#    Copyright            : (C) 2016 by Boundless Spatial, Inc.
#    Author               : Larry Shaffer - FJ Perini
#    Email                : lshaffer at boundlessgeo dot com
###########################################################################
#                                                                         #
#   This program is free software; you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation; either version 2 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
###########################################################################

set -e

if [ "$CIRCLE_BRANCH" == "bottles" ] && [ "$CHANGED_FORMULAE" != "" ]; then
  # Setup Git configuration
  COMMIT_USER=$(git log --format='%an' ${CIRCLE_SHA1}^\!)
  COMMIT_EMAIL=$(git log --format='%ae' ${CIRCLE_SHA1}^\!)
  git config user.name "geo-ninja"
  git config user.email "qgisninja@gmail.com"
  REPO=$(git config remote.origin.url)
  SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}

  # Checkout on the proper branch
  # see https://gist.github.com/mitchellkrogza/a296ab5102d7e7142cc3599fca634203
  head_ref=$(git rev-parse HEAD)
  if [[ $? -ne 0 || ! $head_ref ]]; then
      err "failed to get HEAD reference"
      return 1
  fi
  branch_ref=$(git rev-parse "$CIRCLE_BRANCH")
  if [[ $? -ne 0 || ! $branch_ref ]]; then
      err "failed to get $CIRCLE_BRANCH reference"
      return 1
  fi
  if [[ $head_ref != $branch_ref ]]; then
      msg "HEAD ref ($head_ref) does not match $CIRCLE_BRANCH ref ($branch_ref)"
      err "someone may have pushed new commits before this build cloned the repo"
      return 1
  fi
  if ! git checkout "$CIRCLE_BRANCH"; then
      err "failed to checkout $CIRCLE_BRANCH"
      return 1
  fi

  BUILT_BOTTLES=
  pushd /tmp/workspace/bottles/
    for f in ${CHANGED_FORMULAE};do
      echo "Updating changed formula ${f} with new bottles..."

      # Do Merge bottles with the formula
      # Don't commit anything, we'll do that after updating all the formulae
      # Catch the eror and store it to a variable
      if result=$(brew bottle --merge --write --no-commit ${f}*.json 2>&1); then
        BUILT_BOTTLES="$BUILT_BOTTLES ${f}"
      else
       # If there's an error, remove the json and bottle files, we don't want them anymore.
       echo "Unable to bottle ${f}"
       echo $result
       rm ${f}*.json
       rm ${f}*.tar.gz
      fi
    done
  popd

  # Now do the commit and push
  echo "Commit and push..."
  git add -vA Formula/*.rb
  git commit -m "Updated bottles for: ${BUILT_BOTTLES}

  Committed for ${COMMIT_USER}<${COMMIT_EMAIL}>
  [ci skip]"

  # fix if there is a new commit in master
  echo "Pull rebase..."
  # git checkout $CIRCLE_BRANCH
  # git merge master

  # git pull <remote> <branch>
  # git branch --set-upstream-to=origin/<branch> bottles

  git checkout bottles
  git rebase bottles
  git checkout bottles
  git merge bottles
  
  git pull ${SSH_REPO} $CIRCLE_BRANCH
  git branch --set-upstream-to=origin/bottles bottles

  git pull --rebase

  # Now that we're all set up, we can push.
  git push ${SSH_REPO} $CIRCLE_BRANCH

  # echo "Upload to Bintray..."

  cd /tmp/workspace/bottles/

  # files=$(echo *.tar.gz | tr ' ' ',')
  # curl -X PUT -T "{$files}" -u ${BINTRAY_USER}:${BINTRAY_API} -H "X-Bintray-Publish: 1" https://api.bintray.com/content/homebrew-osgeo/osgeo-bottles/bottles/0.1/

  echo "Upload Bottles..."
    # use ssh
    # ssh-add -l
    # echo -e "\nIdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
    # cat ~/.ssh/config
    # ls ~/.ssh
    # brew install https://raw.githubusercontent.com/hudochenkov/homebrew-sshpass/master/sshpass.rb
    # sshpass -e scp -P 50023 -o stricthostkeychecking=no -r ./*.tar.gz fjperini@bottle.download.osgeo.org:/osgeo/bottle
    scp -P 50023 -o stricthostkeychecking=no -r ./*.tar.gz fjperini@bottle.download.osgeo.org:/osgeo/bottle
fi


================================================
FILE: .circleci/before_install.sh
================================================
#!/usr/bin/env bash
###########################################################################
#    homebrew-osgeo4mac circle ci - before_install.sh
#    ---------------------
#    Date                 : Dec 2019
#    Copyright            : (C) 2016 by Boundless Spatial, Inc.
#    Author               : Larry Shaffer - FJ Perini
#    Email                : lshaffer at boundlessgeo dot com
###########################################################################
#                                                                         #
#   This program is free software; you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation; either version 2 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
###########################################################################

set -o errexit
set -o xtrace

if [ "$CIRCLE_BRANCH" != "master" ]; then
for f in ${CHANGED_FORMULAE};do
  echo 'Setting up, before install'
  if [ -n "${DEBUG_CI}" ];then
    brew list --versions
  fi

  # Forcibly remove all versions of unneeded default formula provided by travis or pre-cached
  nix_f="
  gdal
  sip
  pyqt
  qscintilla2
  postgresql@10
  postgis
  "

  for nf in ${nix_f}; do
    brew uninstall --force --ignore-dependencies ${nf} || true
  done

  # brew update > /dev/null
  # brew update - slow
  # brew update-reset

  # fix: Permission Denied When Creating Directory or Writing a File
  # https://support.circleci.com/hc/en-us/articles/360003649774-Permission-Denied-When-Creating-Directory-or-Writing-a-File
  # chown -R $USER:$USER /Users/distiller
  # rm -rf /Users/distiller/.viminf*
  # chown -R $USER: /Users/distiller

  echo "Homebrew setup for changed formula ${f}..."
  deps=$(brew deps --include-build ${f})
  echo "${f} dependencies:"
  echo "${deps}"

  # Install XQuartz
  if [ "$(echo ${deps} | grep -c 'osgeo-grass')" != "0" ] || [ "$(echo ${deps} | grep -c 'osgeo-openscenegraph')" != "0" ];then
    echo "one of the dependencies requires XQuartz, installing..."
    brew cask install xquartz
  fi
  if [ "${f}" == "osgeo-grass" ] || [ "${f}" == "osgeo-openscenegraph" ];then
    echo "${f} require of XQuartz, installing..."
    brew cask install xquartz
  fi

  if [ "$(echo ${deps} | grep -c '[python|python]')" != "0" ];then
    echo "Installing and configuring Homebrew Python 3"
    brew reinstall python

    echo "Link Python 3"
    # which python3
    brew unlink python && brew link --overwrite --force python

    # ls -l /usr/local/bin/python*
    # rm /usr/local/bin/python*
    # rm /usr/local/bin/pip*
    # rm -Rf /Library/Frameworks/Python.framework/Versions/*
    # export PATH=/usr/local/bin:/usr/local/sbin:$PATH
    # export PATH="/usr/local/opt/python/libexec/bin:$PATH"
    # /usr/local/bin/python -V
    # /usr/local/bin/pip -V
    # cd /usr/local/bin
    # ln -s python3 python
    # ln -s pip3 pip


    # Set up Python .pth files
    # get python short version (major.minor)
    PY_VER=$(/usr/local/opt/python/bin/python3 -c 'import sys;print("{0}.{1}".format(sys.version_info[0],sys.version_info[1]))')
    if [ -n "${DEBUG_CI}" ];then
      echo $PY_VER
    fi
    mkdir -p ${CIRCLE_WORKING_DIRECTORY}/Library/Python/${PY_VER}/lib/python/site-packages

    echo 'import site; site.addsitedir("/usr/local/lib/python${PY_VER}/site-packages")' \
         >> ${CIRCLE_WORKING_DIRECTORY}/Library/Python/${PY_VER}/lib/python/site-packages/homebrew.pth
    echo 'import site; site.addsitedir("/usr/local/opt/osgeo-gdal/lib/python${PY_VER}/site-packages")' \
         >> ${CIRCLE_WORKING_DIRECTORY}/Library/Python/${PY_VER}/lib/python/site-packages/gdal2.pth

    if [[ "${f}" =~ "osgeo-gdal" ]];then
      echo "Installing GDAL 2 Python 3 dependencies"
      /usr/local/opt/python/bin/pip3 install numpy
    fi
  fi

  # Special handling of osgeo-grass, because it needs to be unlinked
  if [ "$(echo ${deps} | grep -c 'osgeo-grass')" != "0" ];then
    echo "Installing and unlinking grass7"
    # GDAL gets its numpy installed via pip, but grass also has a dependency, so we need to force it.
    brew install numpy || brew link --overwrite numpy
    brew install osgeo-grass
    brew unlink osgeo-grass
  fi

  if [ "${f}" == "osgeo-vtk" ] || [ "${f}" == "osgeo-insighttoolkit" ] || [ "${f}" == "osgeo-insighttoolkit@4" ] || [ "${f}" == "osgeo-pcl" ] || [ "${f}" == "osgeo-pdal" ] || [ "${f}" == "osgeo-ossim" ] || [ "${f}" == "osgeo-orfeo" ];then
    echo "Installing jpeg-turbo"
    # osgeo-vtk: Java 1.8 is required to install this formula.
    # Install AdoptOpenJDK 8 with Homebrew Cask:
    # brew cask install homebrew/cask-versions/adoptopenjdk8
    brew install jpeg-turbo
    brew unlink jpeg-turbo && brew link --force jpeg-turbo
  fi
done
fi


================================================
FILE: .circleci/changed_formulas.sh
================================================
#!/usr/bin/env bash
set -e

if [ "$CIRCLE_BRANCH" != "master" ]; then
# manually added by env var. Will not be filtered by skip-formulas.txt
# If manual formulae are specified, changed files will be ignored
# This avoids rebuilding bottles when triggered against master
if [[ -n ${CI_MANUAL_FORMULAE} ]]; then
	echo "${CI_MANUAL_FORMULAE}"
else

	  if [[ ! -z  $CIRCLE_PULL_REQUEST  ]]; then
		# if on a PR, just analyze the changed files
		FILES=$(git diff --diff-filter=AM --name-only $(git merge-base origin/master ${CIRCLE_BRANCH} ) )
	else
        # Get the commit range for the build
        # For workflows, we can't use the CIRCLE_COMPARE_URL feature, so we do it by manualy diffing the branch
#      COMMIT_RANGE=$(echo "${CIRCLE_COMPARE_URL}" | cut -d/ -f7)

#      if [[ $COMMIT_RANGE != *"..."* ]]; then
#          COMMIT_RANGE="${COMMIT_RANGE}...${COMMIT_RANGE}"
        #      fi
        # Since CircleCI doesn't currently support getting a range of commits when running as a workflow, we're stuck just looking at the changes from the most recent commit.
        # This means we always needs to rebase or squash and merge, which is mostly what we do anyways.
		    #FILES=$(git diff --diff-filter=AM --name-only master...${CIRCLE_BRANCH} )
        	FILES=$(git diff --diff-filter=AM --name-only master^1 )
	fi

	FORMULAS=
	for f in $FILES;do
		FORMULAS="$FORMULAS $(echo $f | sed -n -E 's#^Formula/(.+)\.rb$#\1#p')"
	done

	# keep formulas only
	#FORMULAS=$(sed -n -E 's#^Formula/(.+)\.rb$#\1#p' <<< $FILES)
	# skip formulas
  comm -1 -3 <(cat .circleci/skip-formulas.txt | sort -u ) <(echo ${FORMULAS} | tr ' ' '\n' | sort -u )
fi
fi


================================================
FILE: .circleci/config.yml
================================================
# Supported Xcode Versions
# https://circleci.com/docs/2.0/testing-ios/
# 10.15 - 11.3.0 - Catalina
# 10.14 - 11.1.0 - Mojave
# 10.13 - 10.1.0 - HS
# 10.12 - 9.0.1  - Sierra

build_steps: &build_steps
  steps:
    - run:
       name: Homebrew config
       command: |
         brew --version
         brew remove $(brew list)
         rm -rf /usr/local/Homebrew/Library/Taps/
         brew update-reset
         brew --env
         brew config
    - checkout
    - run:
       name: Git config
       command: |
         git checkout $CIRCLE_BRANCH
         git remote set-url origin $CIRCLE_REPOSITORY_URL
         git fetch origin
         git config --global user.name "geo-ninja"
         git config --global user.email "qgisninja@gmail.com"
         repo=$(brew --repo $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME)
         mkdir -p $repo
         cp -a ./ $repo/
    - run:
       name: Update environment variables
       command: .circleci/set_env.sh
    - run:
       name: Before install
       command: .circleci/before_install.sh
    - run:
       name: Install dependencies
       command: .circleci/install.sh
    - run:
        name: Install changed formulae
        command: .circleci/script.sh
    - run:
        name: Build bottles
        no_output_timeout: 30m
        command: |
          .circleci/after_script.sh
          # fix if the formula does not change or if a file is updated/uploaded
          # echo "${CIRCLE_BUILD_NUM}" > /tmp/bottles/build-num-${CIRCLE_BUILD_NUM}.txt
          echo "FIX" > /tmp/bottles/fix.txt
    - persist_to_workspace:
        root: /tmp
        paths:
          - bottles/*
    - store_test_results:
        path: /tmp/bottles

workflow_filter: &filter
  filters:
    branches:
      ignore:
        - master
      only:
        - bottles
        - /^(?!pull\/).*$/

version: 2
jobs:
  update-homebrew:
    macos:
      xcode: "10.1.0"
    steps:
      - restore_cache:
          keys:
            - homebrew-v1-{{ .Branch }}-{{ .Revision }}
            - homebrew-v1-{{ .Branch }}-
            - homebrew-v1-
      - run:
          name: "Update homebrew"
          command: |
            brew update-reset
      - save_cache:
          key: homebrew-v1-{{ .Branch }}-{{ .Revision }}
          paths:
            - /usr/local/Homebrew/Library/Taps/homebrew

  # catalina-build:
  #   <<: *build_steps
  #   <<: *filter
  #   macos:
  #     xcode: "11.3.0"

  # mojave-build:
  #   <<: *build_steps
  #   <<: *filter
  #   macos:
  #     xcode: "11.1.0"

  high_sierra-build:
    <<: *build_steps
    <<: *filter
    macos:
      xcode: "10.1.0"

  # sierra-build:
  #   <<: *build_steps
  #   <<: *filter
  #   macos:
  #     xcode: "9.0.1"

  collect-bottles:
    macos:
      xcode: "10.1.0"
    steps:
      - attach_workspace:
          at: /tmp/workspace
      - checkout
      - run:
         name: Update environment variables
         command: |
           .circleci/set_env.sh
      - run:
         name: Git config
         command: |
           git config --global user.name "geo-ninja"
           git config --global user.email "qgisninja@gmail.com"
      # fix for ERROR: The key you are authenticating with has been marked as read only.
      # is using the first key that is found, the one assigned in Checkout keys
      # not Add deploy key (Checkout keys)
      # Add deployment key fingerprint (SSH Permissions) for CircleCI to use for a push
      # ssh-keygen -l -E md5 -f key.pub
      - add_ssh_keys:
          fingerprints:
            - "${KEY_FINGERPRINT_OSGEO}"
            - "${KEY_FINGERPRINT}"
      - run:
          name: Avoid hosts unknown for github
          command: |
            echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config

      - run:
          name: Commit for new bottles and upload to bintray
          command: .circleci/before_deploy.sh
      - store_artifacts:
          path: /tmp/workspace/bottles
          destination: bottles

  # deploy:
  #   macos:
  #     xcode: "10.1.0"
  #   steps:
  #     - checkout
  #     - run:
  #         name: Deploy - Upload to bintray
  #         command: |
  #           cd /tmp/workspace/bottles
  #           brew install jfrog-cli-go
  #           jfrog bt config --user=${BINTRAY_USER} --key=${BINTRAY_API} --licenses=MIT
  #           echo "jfrog" > jfrog-deploy.txt
  #           jfrog bt upload --publish=true "jfrog-deploy.txt" homebrew-osgeo/osgeo-bottles/bottles/0.1/
  #           # jfrog bt upload --publish=true "/tmp/workspace/bottles/*" homebrew-osgeo/osgeo-bottles/bottles/0.1/
  #     - store_artifacts:
  #         path: /tmp/workspace/bottles
  #         destination: bottles

workflows:
  version: 2
  build-deploy:
    jobs:
      - update-homebrew:
          filters:
            branches:
              ignore:
                - master
              only:
                - bottles
                - /^(?!pull\/).*$/
      # - catalina-build:
      #     requires:
      #       - update-homebrew
      # - mojave-build:
      #     requires:
      #       - update-homebrew
      - high_sierra-build:
          requires:
            - update-homebrew
          filters:
            branches:
              ignore:
                - master
              only:
                - bottles
                - /^(?!pull\/).*$/
      # - sierra-build:
      #     requires:
      #       - update-homebrew
      - collect-bottles:
            # - catalina-build
            # - mojave-build
          requires:
            - high_sierra-build
          filters:
            branches:
              ignore:
                - master
              only:
                - bottles
                - /^(?!pull\/).*$/
            # - sierra-build
      # - deploy:
      #     requires:
      #       - collect-bottles
      #     filters:
      #       branches:
      #         only: master


================================================
FILE: .circleci/install.sh
================================================
#!/usr/bin/env bash
###########################################################################
#    homebrew-osgeo4mac circle ci - install.sh
#    ---------------------
#    Date                 : Dec 2019
#    Copyright            : (C) 2016 by Boundless Spatial, Inc.
#    Author               : Larry Shaffer - FJ Perini
#    Email                : lshaffer at boundlessgeo dot com
###########################################################################
#                                                                         #
#   This program is free software; you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation; either version 2 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
###########################################################################

set -e
ulimit -n 1024

if [ "$CIRCLE_BRANCH" != "master" ]; then
git checkout bottles

for f in ${CHANGED_FORMULAE};do
  echo "Installing dependencies for changed formula ${f}..."
  FLAGS="--only-dependencies --build-bottle"

  brew install ${FLAGS} ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${f}&
  PID=$!
  # add progress to ensure Travis doesn't complain about no output
  while true; do
    sleep 30
    if jobs -rp | grep ${PID} >/dev/null; then
      echo "."
    else
      echo
      break
    fi
  done
done
fi


================================================
FILE: .circleci/script.sh
================================================
#!/usr/bin/env bash
###########################################################################
#    homebrew-osgeo4mac circle ci - script.sh
#    ---------------------
#    Date                 : Dec 2019
#    Copyright            : (C) 2016 by Boundless Spatial, Inc.
#    Author               : Larry Shaffer - FJ Perini
#    Email                : lshaffer at boundlessgeo dot com
###########################################################################
#                                                                         #
#   This program is free software; you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation; either version 2 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
###########################################################################

set -e

ulimit -n 1024

if [ "$CIRCLE_BRANCH" != "master" ]; then
git checkout bottles

echo ${CHANGED_FORMULAE}

for f in ${CHANGED_FORMULAE};do
  deps=$(brew deps --include-build ${f})

  # fix error: Unable to import PyQt5.QtCore
  # build qscintilla2
  if [ "$(echo ${deps} | grep -c 'osgeo-pyqt')" != "0" ];then
    brew reinstall ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/osgeo-pyqt
    brew unlink osgeo-pyqt && brew link osgeo-pyqt --force
    /usr/local/opt/python/bin/python3 -c "import PyQt5.QtCore"
  fi

  # fix error: 'libintl.h' file not found
  # build qgis with grass
  if [ "$(echo ${deps} | grep -c 'osgeo-grass')" != "0" ] || [ "${f}" == "osgeo-grass" ];then
    brew reinstall gettext
    brew unlink gettext && brew link --force gettext
  fi

  if [ "${f}" == "osgeo-grass" ];then
    brew unlink osgeo-liblas && brew link osgeo-liblas --force
  fi

  # Error: The `brew link` step did not complete successfully
  # The formula built, but is not symlinked into /usr/local
  # Could not symlink lib/pkgconfig/libopenjp2.pc
  # Target /usr/local/lib/pkgconfig/libopenjp2.pc
  # is a symlink belonging to openjpeg
  if [ "$(echo ${deps} | grep -c 'osgeo-insighttoolkit')" != "0" ] || [ "${f}" == "osgeo-insighttoolkit" ];then
    brew unlink openjpeg
  fi

  if [ "$(echo ${deps} | grep -c 'osgeo-insighttoolkit@4')" != "0" ] || [ "${f}" == "osgeo-insighttoolkit@4" ];then
    brew unlink openjpeg
  fi

  # fix test
  # initdb: could not create directory "/usr/local/var/postgresql": Operation not permitted
  if [ "${f}" == "osgeo-libpqxx" ];then
    initdb /usr/local/var/postgresql -E utf8 --locale=en_US.UTF-8
    # pg_ctl -D /usr/local/var/postgresql -l logfile start
    brew services start osgeo/osgeo4mac/osgeo-postgresql
    # system "psql", "-h", "localhost", "-d", "postgres"
    # createdb template1
  fi

  # mapnik - error high_sierra-build
  # Exiting... the following required dependencies were not found:
  #  - boost regex (more info see: https://github.com/mapnik/mapnik/wiki/Mapnik-Installation & http://www.boost.org)
  # Also, these OPTIONAL dependencies were not found:
  #  - boost program_options (more info see: https://github.com/mapnik/mapnik/wiki/Mapnik-Installation & http://www.boost.org)
  #  - boost_regex_icu (libboost_regex built with optional ICU unicode support is needed for unicode regex support in mapnik.)
  #  - gdal (GDAL C++ library | configured using gdal-config program | try setting GDAL_CONFIG SCons option | more info: https://github.com/mapnik/mapnik/wiki/GDAL)
  if [ "${f}" == "osgeo-mapnik" ];then
    brew unlink boost && brew link boost --force
  fi
  # if SVG2PNG=True
  # Error: Failed changing install name in /usr/local/Cellar/osgeo-mapnik/3.0.22_2/bin/svg2png
  # from /usr/local/opt/boost/lib/libboost_system.dylib
  # to @@HOMEBREW_PREFIX@@/opt/boost/lib/libboost_system.dylib
  # Error: Updated load commands do not fit in the header of
  # /usr/local/Cellar/osgeo-mapnik/3.0.22_2/bin/svg2png. /usr/local/Cellar/osgeo-mapnik/3.0.22_2/bin/svg2png
  # needs to be relinked, possibly with -headerpad or -headerpad_max_install_names

  # if [[ $(brew list --versions ${f}) ]]; then
  #   echo "Clearing previously installed/cached formula ${f}..."
  #   brew uninstall --force --ignore-dependencies ${f} || true
  # fi

  echo "Installing changed formula ${f}..."
  # Default installation flag set
  FLAGS="--build-bottle"

  brew install -v ${FLAGS} ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${f}&
  PID=$!
  # add progress to ensure Travis doesn't complain about no output
  while true; do
    sleep 30
    if jobs -rp | grep ${PID} >/dev/null; then
      echo "."
    else
      echo
      break
    fi
  done

  echo "Testing changed formula ${f}..."
  # does running postinstall mess up the bottle?
  # (mentioned that it is skipped if installing with --build-bottle)
  # brew postinstall ${f}
  brew test ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${f}
done
fi


================================================
FILE: .circleci/set_env.sh
================================================
#!/usr/bin/env bash
###########################################################################
#    homebrew-osgeo4mac circle ci - script.sh
#    ---------------------
#    Date                 : Dec 2019
#    Copyright            : (C) 2016 by Boundless Spatial, Inc.
#    Author               : Larry Shaffer -  FJ Perini
#    Email                : lshaffer at boundlessgeo dot com
###########################################################################
#                                                                         #
#   This program is free software; you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation; either version 2 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
###########################################################################

set -e

if [ "$CIRCLE_BRANCH" != "master" ]; then
ulimit -c unlimited
           ulimit -n 2048
           export CHANGED_FORMULAE=$(.circleci/changed_formulas.sh)
           if [ "$CHANGED_FORMULAE" == "" ]; then
             echo "Skipping CI, no changed formulae found";
             exit 0;
           else
             echo "Changed formulae are ${CHANGED_FORMULAE}";
           fi
           export HOMEBREW_REPOSITORY=$(brew --repo)
           git -C "${HOMEBREW_REPOSITORY}" fetch
           git -C "${HOMEBREW_REPOSITORY}" reset --hard origin/master
           mkdir -p "${HOMEBREW_REPOSITORY}/Library/Taps/${CIRCLE_PROJECT_USERNAME}"
           echo "Linking ${CIRCLE_WORKING_DIRECTORY}" to "${HOMEBREW_REPOSITORY}/Library/Taps/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
           ln -s "${HOME}/project" "${HOMEBREW_REPOSITORY}/Library/Taps/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
           echo "export CHANGED_FORMULAE=${CHANGED_FORMULAE}" >> $BASH_ENV
           echo "export HOMEBREW_REPOSITORY=$HOMEBREW_REPOSITORY" >> $BASH_ENV
           echo 'export HOMEBREW_DEVELOPER=1' >> $BASH_ENV
           echo 'export HOMEBREW_NO_AUTO_UPDATE=1' >> $BASH_ENV
           echo 'export HOMEBREW_PREFIX=/usr/local' >> $BASH_ENV
           echo 'export CIRCLE_REPOSITORY_URL=https://github.com/OSGeo/homebrew-osgeo4mac' >> $BASH_ENV
           echo 'export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)' >> $BASH_ENV
fi


================================================
FILE: .circleci/skip-formulas.txt
================================================
ossgeo-gdal-ecwjp2
osgeo-gdal-oracle
osgeo-gdal-mrsid
gpkgtools


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report about a problem you've come across
title: ''
labels: ''
assignees: ''

---

**Please answers the following**

I've... 
- I read
	- [ ] the [reporting issues](https://osgeo.github.io/homebrew-osgeo4mac/docs/reporting-issues/)
	- [ ] the [troubleshooting](https://osgeo.github.io/homebrew-osgeo4mac/docs/troubleshooting/)
- [ ] I checked the documentation and found no answer
- [ ] I tried to install after following the suggestions
- [ ] I am running the latest version (`brew update` twice?)
- [ ] I checked to make sure that this issue has not already been filed
- [ ] I uploaded logs: `brew gist-logs formula`

**Describe the bug**

<!-- A clear and concise description of what the bug is. -->

**To Reproduce**

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**

<!-- A clear and concise description of what you expected to happen. -->

**Screenshots**

<!-- If applicable, add screenshots to help explain your problem. -->

**Additional context**

<!-- Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. Run a `brew doctor` and paster the output below could be a good idea. -->

`brew doctor` output: 

```shell
# paste here the output of your brew doctor output. Delete this line please. 
```

**Logs**

<!-- Please include the link to the uploaded gist here.  -->


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**

<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**

<!-- Add any other context or screenshots about the feature request here. -->


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

**Test Configuration**:
* Hardware:
* Operating System:

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

================================================
FILE: .github/stale.yml
================================================
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 30

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
  - "pinned :pushpin:"
  - "security :lock:" 
  - "maybe later :hourglass_flowing_sand:"

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: "stale :zzz:"

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
  This issue or pull request has been automatically marked as stale because it has not had 
  recent activity. It will be closed if no further activity occurs. 
  If you want to keep the issue open, please comment or update the info here. 
  Thank you for your contributions.

# Comment to post when removing the stale label.
# unmarkComment: >
#   Your comment here.

# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
  This issue or pull request has been automatically closed because it has not had 
  recent activity. Thank you for your contributions.

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

# Limit to only `issues` or `pulls`
# only: issues

# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
#   daysUntilStale: 30
#   markComment: >
#     This pull request has been automatically marked as stale because it has not had
#     recent activity. It will be closed if no further activity occurs. Thank you
#     for your contributions.

# issues:
#   exemptLabels:
#     - confirmed


================================================
FILE: .gitignore
================================================
*.orig

.idea/
**/*.iml

/docs/_site
/docs/.jekyll-metadata
/docs/.sass-cache
/docs/Gemfile.lock


================================================
FILE: .travis.yml
================================================
language: ruby
rvm:
  - 2.3.7
# language: python
# python:
#  - "2.7"
os: osx
env: OSX=10.12
osx_image: xcode8.3
sudo: required

branches:
  except:
    - circleci

# /usr/local subdirs are Homebrew components
# cache:
#  directories:
#    - $HOME/Library/Caches/pip
#    - /usr/local/Cellar
#    - /usr/local/Frameworks
#    - /usr/local/Homebrew
#    - /usr/local/bin
#    - /usr/local/etc
#    - /usr/local/include
#    - /usr/local/lib
#    - /usr/local/opt
#    - /usr/local/share
#    - /usr/local/var
#  timeout: 900
# before_cache:
#  - ./travis/before_cache.sh

addons:
  ssh_known_hosts: github.com

before_install:
  - gem update --system
  - gem install bundler

  - export GH_USER=$(echo -n "${TRAVIS_REPO_SLUG}" | egrep -o '^[^/]+' | tr -d '\n')
  - export TRAVIS_COMMIT="$(git rev-parse --verify -q HEAD)"
  - export CHANGED_FORMULAE=$(./travis/changed_formulas.sh)
  - if [ "${CHANGED_FORMULAE}" == "" ]; then
      echo "Skipping CI; no changed formulae found in $TRAVIS_BUILD_DIR";
      exit 0 || true;
      travis_terminate 0;
      exit 1;
    else
      echo "Changed formulae are ${CHANGED_FORMULAE}";
    fi
  - if [ "${CHANGED_FORMULAE}" == "osgeo-qt-webkit" ] || [ "${CHANGED_FORMULAE}" == "osgeo-qgis" ] || [ "${CHANGED_FORMULAE}" == "osgeo-qgis-ltr" ]|| [ "${CHANGED_FORMULAE}" == "osgeo-vtk" ]|| [ "${CHANGED_FORMULAE}" == "osgeo-insighttoolkit" ]; then
      echo "Skipping CI; These formulas exceed the time limit in Travis CI.";
      exit 0 || true;
      travis_terminate 0;
      exit 1;
    fi
  - export HOMEBREW_REPOSITORY="$(brew --repo)"
  - sudo chown -R "$USER":admin "${HOMEBREW_REPOSITORY}"
  - git -C "${HOMEBREW_REPOSITORY}" reset --hard origin/master
  - mkdir -p "${HOMEBREW_REPOSITORY}/Library/Taps/${GH_USER}"
  - ln -s "$TRAVIS_BUILD_DIR" "${HOMEBREW_REPOSITORY}/Library/Taps/${TRAVIS_REPO_SLUG}"
  - cd "${HOMEBREW_REPOSITORY}/Library/Taps/${TRAVIS_REPO_SLUG}"
  - chmod -f 0644 ${HOMEBREW_REPOSITORY}/Library/Taps/${TRAVIS_REPO_SLUG}/Formula/*.rb
  - export TRAVIS_BUILD_DIR="${HOMEBREW_REPOSITORY}/Library/Taps/${TRAVIS_REPO_SLUG}"
  - export HOMEBREW_DEVELOPER=1
  - export HOMEBREW_NO_AUTO_UPDATE=1
  - export HOMEBREW_PREFIX=$(brew --prefix)
  - ulimit -n 1024
  - ./travis/before_install.sh

install: ./travis/install.sh

# before_script: ./travis/before_script.sh

script: ./travis/script.sh

after_script: ./travis/after_script.sh

before_deploy:
  # Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
  # Decrypt the travis_deploy_key.enc key into /tmp/travis_deploy_key
  - openssl aes-256-cbc -K $encrypted_key -iv $encrypted_iv -in travis_deploy_key.enc -out /tmp/travis_deploy_key -d
  # Make sure only the current user can read the private key
  - chmod 600 /tmp/travis_deploy_key
  # Create a script to return the passphrase environment variable to ssh-add
  - echo 'echo ${SSH_PASSPHRASE}' > /tmp/askpass && chmod +x /tmp/askpass
  # Start the authentication agent
  - eval "$(ssh-agent -s)"
  # Add the key to the authentication agent
  - brew install util-linux # for setsid
  - DISPLAY=":0.0" SSH_ASKPASS="/tmp/askpass" setsid ssh-add /tmp/travis_deploy_key </dev/null
  # add changes
  - ./travis/before_deploy.sh


# is disabled to use Circle CI

# deploy:
#   skip_cleanup: true
#   provider: bintray
#   file: travis/bintray-upload.json
#   user: nickrobison
#   key:
#     secure: "nEmP/uU8N+TbbX3zWED62CsjPxoDjXcOF3RtAENW/4qVBdI9r7dFmyE4WAW732Ttd1PbANPz7Lz494j2TS2hbn2R4yQ9CuIllsnjey/ve6TAq1FfYSruBuMGLK/7EJ/cSfZWsOBex7b68UeVlvyAra3ck6y9j1ouzF9RKEtCx3P/w3heLN5Fl0pNUCzwknrdBFGfTQRy8NSQnYo/8mpIQbCrXEQThJ4PZY/7s5tqDOv3tAesPTdoGmoNWWBoQe8ZnrwSutskcm6Nsf5nz64i44vai9Xx+9U3QpHDvzuAXOzwxFBGk1dfsnLRp/P71QrDYuqnMEExmfdZAWYK0o0JLuwsecOfSvG2C14fAp1rA2GNWMK9SViYxeYnJgwenGgd7FBci6N052mvyv3+52xGc7aHUlp74PvqYEv8LoILdOlG9jGj1jS41seQyW7Qyg6VYfQ+f1Vp4kUupH3EE53QgJzM6rVyFI9qmkThJTN0ZhUzIhwrTqUfceMkWyeYKd7/hk6AUxhYNZehtR7xH8pf1vibLifUr978M4vyutSwJ4xnaJKTvuUdA0d2GQHAuEDwfqPlYcIUDbKOVmbKj+SifKdSlcwGTYunzmKkJskA9DzYIbUjKe00jluAvjGZuoCIbIKdqlH1ntTUoW5OCpE09TmIZdh/SURRKo7QsfLNQ0I="
#   # S3 bucket upload, which is not working right now
#   # provider: s3
#   # access_key_id:
#   #   secure: JxG4/zxgbYvKqX4kJTZdQxvAL+EHqmmi4OEjAOY+KUFAP4t9l5aLEYh6brjHF07kDyFyjMt8G7Hf+SZeznA/JGe8NaliXfCnxLH7ftApCP3l/Tl73z3wXnGL1L7EljiO0EbwlsJUM23B+01BMalzBfyLYOEc61LfSuJsEFFa/ck=
#   # secret_access_key:
#   #   secure: ZdsR1FsY6ER6w6KvF9rjxY4s7GjLXRkT9Rmv4GWyL9+pcHI/4/2KMfab6gj1sQdbc2ocfBgGXR8hQZHi+NZPyTnHbIXf5n2YenLo9NyOHwNs1qiJgxXgtYvhtI/NXCcD9JgX5i5BRR3jkPqJBRe70CmoTwv29kR5Tp158tr3gIg=
#   # bucket: osgeo4mac
#   # local-dir: bottles
#   # upload-dir: bottles
#   # acl: public_read
#   on:
#     branch: master
#     repo: OSGeo/homebrew-osgeo4mac


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code of conduct

This code of conduct governs how we behave in any OSGeo forum or event and whenever we will be judged by our actions. We expect it to be honored by everyone who participates in the OSGeo community formally or informally, or claims any affiliation with the OSGeo Foundation.

Version: 1.0 | Date: May 2015

### Introduction

This code of conduct governs how we behave in any OSGeo forum or event and whenever we will be judged by our actions. We expect it to be honored by everyone who participates in the OSGeo community formally or informally, or claims any affiliation with the OSGeo Foundation.

It applies to in-person events (such as conferences and related social events), IRC, public and private mailing lists, the issue tracker, the wiki, blogs, Twitter, and any other forums which the community uses for communication and interactions.

This code is not exhaustive or complete. It serves to distill our common understanding of a collaborative, shared environment and goals. We expect it to be followed in spirit as much as in the letter, so that it can enrich all of us and the technical communities in which we participate.

### Diversity Statement

OSGeo welcomes and encourages participation by everyone. We are committed to being a community that everyone feels good about joining, and we will always work to treat everyone well. No matter how you identify yourself or how others perceive you: we welcome you.

### Specific Guidelines

We strive to:

* **Be open**.

  We invite anyone to participate in our community. We preferably use **public methods of communication** for project-related messages, unless discussing something sensitive. This applies to messages for help or project-related support, too; not only is a public support request much more likely to result in an answer to a question, it also makes sure that any inadvertent mistakes made by people answering will be more easily detected and corrected.

* **Be empathetic, welcoming, friendly, and patient**.

  We work together to resolve conflict, assume good intentions, and do our best to act in an empathetic fashion. We may all experience some frustration from time to time, but we do not allow frustration to turn into a personal attack. A community where people feel uncomfortable or threatened is not a productive one. Note that we have a multi-cultural, multi-lingual community and some of us are non-native speakers. We should **be respectful when dealing with other community members as well as with people outside our community**.

* **Be collaborative**.

  Our work will be used by other people, and in turn we will depend on the work of others. When we make something for the benefit of OSGeo, we are willing to explain to others how it works, so that they can build on the work to make it even better. Any decision we make will affect users and colleagues, and we take those consequences seriously when making decisions.

* **Be inquisitive**.

  **Nobody knows everything!** Asking questions early avoids many problems later, so questions are encouraged, though they may be directed to the appropriate forum. Those who are asked should be responsive and helpful, within the context of our shared goal of improving OSGeo.

* **Be careful in the words that we choose**.

  Whether we are participating as professionals or volunteers, we value professionalism in all interactions, and take responsibility for our own speech. Be kind to others. Do not insult or put down other participants.

* **Be concise**.

  Keep in mind that what you write once will be read by hundreds of persons. Writing a **short** email means people can understand the conversation as efficiently as possible. Short emails should always strive to be empathetic, welcoming, friendly and patient. When a long explanation is necessary, consider adding a summary.

* **Step down considerately**.

  Members of every project come and go. When somebody leaves or disengages from the project they should tell people they are leaving and take the **proper steps to ensure that others can pick up where they left off**. In doing so, they should remain respectful of those who continue to participate in the project and should not misrepresent the project’s goals or achievements. Likewise, community members should respect any individual’s choice to leave the project.

### Anti-Harassment

Harassment and other exclusionary behaviour are not acceptable. This includes, but is not limited to:

* Personal insults or discriminatory jokes and language, especially those using racist or sexist terms.
* Offensive comments, excessive or unnecessary profanity.
* Intimidation, violent threats or demands.
* Sustained disruption of sessions or events.
* Stalking, harassing photography or recording.
* Unwelcome physical contact or sexual attention.
* Repeated harassment of others. In general, if someone asks you to stop, then stop.
* Posting (or threatening to post) other people’s personally identifying information (“doxing”).
* Sharing private content, such as emails sent privately or non-publicly, or unlogged forums such as IRC channel history.
* Advocating for, or encouraging, any of the above behaviour.

### Reporting Guidelines

If you believe someone is breaking this code of conduct, you may reply to them, and point to this code of conduct. Such messages may be in public or in private, whatever is most appropriate. Assume good faith; it is more likely that participants are unaware of their bad behaviour than that they intentionally try to degrade the quality of the discussion. Should there be difficulties in dealing with the situation, you may report your concerns to event staff, a forum leader or the OSGeo Board. Serious or persistent offenders may be expelled from the event or forum by event organizers or forum leaders.

### Application

All OSGeo projects and events should reference this Code of Conduct using text similar to:

*Contributors to homebrew-osgeo4mac project are expected to act respectfully toward others in accordance with the http://www.osgeo.org/code_of_conduct.*

================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Homebrew-osgeo4mac

First time contributing to Homebrew-osgeo4mac? Read our [Code of Conduct](CODE_OF_CONDUCT.md).

## How...

### To report a bug

* Run `brew update` (twice). 
* Run and read `brew doctor`. 
* Read [the Hombrew Troubleshooting Checklist](https://docs.brew.sh/Troubleshooting). 
* Read the how to [report issues](https://github.com/OSGeo/homebrew-osgeo4mac/wiki/Reporting-issues) and the [troubleshooting](https://github.com/OSGeo/homebrew-osgeo4mac/wiki/Troubleshooting).  
* [Search](https://github.com/OSGeo/homebrew-osgeo4mac/issues) for same issue or similar to yours in the repo. 
* If there is no similar issue, open or closed, [open an issue](https://github.com/OSGeo/homebrew-osgeo4mac/issues/new/choose) on the repo.

### To submit a version upgrade for the `foo` formula

* Check if the same upgrade has been already submitted by [searching the open pull requests for `foo`](https://github.com/OSGeo/Homebrew-osgeo4mac/pulls?utf8=✓&q=is%3Apr+is%3Aopen+foo).
* `brew bump-formula-pr --strict foo` with `--url=...` and `--sha256=...` or `--tag=...` and `--revision=...` arguments.

### To add a new formula for `foo` version `2.3.4` from `$URL`

* Read [the Formula Cookbook](https://docs.brew.sh/Formula-Cookbook) or: `brew create $URL` and make edits
* `brew install --build-from-source foo`
* `brew audit --new-formula foo`
* `git commit` with message formatted `foo 2.3.4 (new formula)`
* [Open a pull request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request) and fix any failing tests

### To contribute with a fix to the `foo` formula

#### You already know about Git

If you are already well versed in the use of `git`, then you can find the local
copy of the `homebrew-core` repository in this directory
(`$(brew --repository homebrew/core)`), modify the formula there
leaving the section `bottle do ... end` unchanged, and prepare a pull request
as you usually do.  Before submitting your pull request, be sure to test it
with these commands:

```shell
$ brew uninstall --force foo
$ brew install --build-from-source foo
$ brew test foo
$ brew audit --strict foo
```

After testing, if you think it is needed to force the corresponding bottles to be
rebuilt and redistributed, add a line of the form `revision 1` to the formula,
or add 1 to the revision number already present.

#### You don't know about Git

If you are not already well versed in the use of `git`, then you may learn
a little bit about it from the [Homebrew's documentation](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request) and then proceed as
follows:

* Run `brew edit foo` and make edits.
* Leave the section `bottle do ... end` unchanged.
* Test your changes using the commands listed above.
* Run `git commit` with message formatted `foo <insert new version number>` or `foo: <insert details>`. 
* Open a pull request as described in the introduction linked to above, wait for the automated test results, and fix any failing tests. 

## Help wanted :sos:

If you are interested in collaborating more close with us in the repo maintenance, formula development or just have an idea to take this tap further, please tell us. Any help, idea or suggestion is really welcomed because we want this top to be useful to people that are interested into use QGIS and the rest of the OSGeo toolset on macOS. 

In addition to the normal communication over the issue tracker in this repo we also have a have a ![](https://i.imgur.com/tZfrqQG.png)[slack workplace](https://homebrew-osgeo4mac.slack.com/) were we discuss repo matters in a more dynamic way. If you want to join us, because you are interested into collaborate in the discussion please tell us. 

**Thanks!** :pray:

\****Note****: this contributing page has been heavily based on the Homebrew core's [contributing page](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md).*

================================================
FILE: Formula/mapcache.rb
================================================
class Mapcache < Formula
  desc "Server that implements tile caching to speed up access to WMS layers."
  homepage "http://mapserver.org/mapcache/"
  url "https://github.com/mapserver/mapcache/archive/rel-1-6-1.tar.gz"
  version "1.6.1"
  sha256 "1b3de277173100e89655b7c1361468c67727895a94152931e222a48b45a48caa"

  bottle do
    root_url "https://osgeo4mac.s3.amazonaws.com/bottles"
    cellar :any
    sha256 "48db39a4b97d78a01b20b5458fb7bed8e3eb2550f2d191ba6d08a30b1760662b" => :high_sierra
    sha256 "48db39a4b97d78a01b20b5458fb7bed8e3eb2550f2d191ba6d08a30b1760662b" => :sierra
  end

  option "with-tiff-cache", "Build with TIFFs as a cache backend"
  option "without-apache-module", "Build without Apache2 module"

  depends_on "cmake" => :build
  depends_on "pkg-config" => :build
  depends_on "apr-util" => :build if build.with? "apache-module"
  depends_on "libpng"
  depends_on "jpeg"
  depends_on "pcre" => :recommended
  depends_on "pixman"
  depends_on "fcgi"
  depends_on "sqlite"
  depends_on "gdal"
  depends_on "geos"

  if build.with? "tiff-cache"
    depends_on "osgeo-libgeotiff"
    depends_on "libtiff"
  end
  depends_on "berkeley-db" => :optional
  depends_on "memcached" => :optional
  depends_on "mapserver" => :optional

  def lib_name
    "libmapcache"
  end

  def install
    args = std_cmake_args
    # option(WITH_SQLITE "Use sqlite as a cache backend" ON)
    # option(WITH_GEOS "Choose if GEOS geometry operations support should be built in" ON)
    # option(WITH_OGR "Choose if OGR/GDAL input vector support should be built in" ON)
    # option(WITH_CGI "Choose if CGI executable should be built" ON)
    # option(WITH_FCGI "Choose if CGI executable should support FastCGI" ON)
    # Fix up .fcgi install path
    args << "-DCMAKE_INSTALL_CGIBINDIR=#{libexec}"

    # option(WITH_VERSION_STRING "Show MapCache in server version string" ON)
    # option(WITH_APACHE "Build Apache Module" ON)
    if build.with? "apache-module"
      args << "-DCMAKE_PREFIX_PATH=#{Formula["apr"].opt_libexec}:#{Formula["apr-util"].opt_libexec}"
      args << "-DAPACHE_MODULE_DIR=#{libexec}"
    else
      args << "-DWITH_APACHE=OFF"
    end
    # option(WITH_PIXMAN "Use pixman for SSE optimized image manipulations" ON)
    # args << "-DWWITH_PIXMAN=" + (build.with?("pixman") ? "ON" : "OFF")
    # option(WITH_BERKELEY_DB "Use Berkeley DB as a cache backend" OFF)
    args << "-DWITH_BERKELEY_DB=" + (build.with?("berkeley-db") ? "ON" : "OFF")
    # option(WITH_MEMCACHE "Use memcache as a cache backend (requires recent apr-util)" OFF)
    args << "-DWITH_MEMCACHE=" + (build.with?("memcached") ? "ON" : "OFF")
    # option(WITH_PCRE "Use PCRE for regex tests" OFF)
    args << "-DWITH_PCRE=" + (build.with?("pcre") ? "ON" : "OFF")
    # option(WITH_MAPSERVER "Enable (experimental) support for the mapserver library" OFF)
    args << "-DWITH_MAPSERVER=" + (build.with?("mapserver") ? "ON" : "OFF")

    # option(WITH_TIFF "Use TIFFs as a cache backend" OFF)
    # option(WITH_TIFF_WRITE_SUPPORT "Enable (experimental) support for writable TIFF cache backends" OFF)
    # option(WITH_GEOTIFF "Allow GeoTIFF metadata creation for TIFF cache backends" OFF)
    args << "-DWITH_TIFF=" + (build.with?("tiff-cache") ? "ON" : "OFF")
    args << "-DWITH_GEOTIFF=" + (build.with?("tiff-cache") ? "ON" : "OFF")

    mkdir "build" do
      system "cmake", "..", *args
      # system "/usr/local/bin/bbedit", "CMakeCache.txt"
      # raise
      system "make"
      system "make", "install"
    end

    # update Apache module linking
    so_ver = 1
    lib_name_ver = "#{lib_name}.#{so_ver}"
    MachO::Tools.change_install_name("#{libexec}/mod_mapcache.so",
                                     "@rpath/#{lib_name_ver}.dylib",
                                     "#{opt_lib}/#{lib_name_ver}.dylib")

    # Add config examples
    (prefix/"config").mkpath
    cp Dir["mapcache.xml*"], prefix/"config"
  end

  def caveats; <<~EOS
    The MapCache FCGI executable and Apache module are located in:
      #{libexec}/

    Configuration examples are located in:
      #{prefix}/

  EOS
  end

  test do
    out = `#{opt_bin}/mapcache_seed -h`
    assert_match "tileset to seed", out
  end
end


================================================
FILE: Formula/mapserver6.rb
================================================
class JavaJDK < Requirement
  fatal true

  def self.home
    [
      `/usr/libexec/java_home`.chomp!,
      ENV["JAVA_HOME"],
    ].find do |dir|
      dir && File.exist?("#{dir}/bin/javac") && (File.exist?("#{dir}/include") || File.exist?("#{dir}/bundle"))
    end
  end

  satisfy :build_env => false do
    self.class.home
  end

  def message; <<~EOS
    Could not find a JDK (i.e. not a JRE)

    Do one of the following:
    - install a JDK that is detected with /usr/libexec/java_home
    - set the JAVA_HOME environment variable
    - specify --without-java

  EOS
  end
end

class Mapserver6 < Formula
  desc "Publish spatial data and interactive mapping apps to the web"
  homepage "http://mapserver.org/"
  url "http://download.osgeo.org/mapserver/mapserver-6.4.5.tar.gz"
  sha256 "b62c5c0cce2ea7da1d70553197926c14ef46bfb030a736e588367fc881b01a9a"

  bottle do
    root_url "https://osgeo4mac.s3.amazonaws.com/bottles"
    rebuild 2
    sha256 "d49321a497cc7b0826ff2febf8147dfd9428a991a45cdb1e3f2f81e0e1634d44" => :high_sierra
    sha256 "d49321a497cc7b0826ff2febf8147dfd9428a991a45cdb1e3f2f81e0e1634d44" => :sierra
  end

  # Backport patch to support compiling with gif_lib >= 5.1: https://github.com/mapserver/mapserver/pull/5144
  # Also applies a patch to build on versions of PHP5 > 5.6.25: https://github.com/mapserver/mapserver/pull/5318
  patch :DATA

  conflicts_with "mapserver", :because => "Homebrew core includes newer version of mapserver"

  option "without-php", "Build PHP MapScript module"
  option "with-rpath", "Don't embed rpath to installed libmapserver in modules"
  option "without-geos", "Build without GEOS spatial operations support"
  option "without-postgresql", "Build without PostgreSQL data source support"
  option "without-xml-mapfile", "Build with native XML mapfile support"
  option "with-java", "Build Java MapScript module"
  option "with-librsvg", "Build with SVG symbology support"
  option "with-docs", "Download and generate HTML documentation"
  option "with-unit-tests", "Download and install full unit test suite"

  depends_on "cmake" => :build
  depends_on "freetype"
  depends_on "libpng"
  depends_on "python@2"
  depends_on "swig" => :build
  depends_on "openjdk" => :optional
  depends_on "giflib"
  depends_on "osgeo-proj"
  depends_on "geos" => :recommended
  depends_on "gdal"
  depends_on "osgeo-postgresql" => :recommended
  depends_on "mysql" => :optional
  depends_on "fcgi" => :recommended
  depends_on "cairo" => :recommended
  depends_on "libxml2" if build.with?("xml-mapfile") || MacOS.version < :mountain_lion
  depends_on "libxslt" if build.with? "xml-mapfile"
  depends_on "librsvg" => :optional
  depends_on "fribidi"
  depends_on "python@2" => %w[sphinx] if build.with? "docs"
  depends_on "php@5.6" if build.with? "php"
  depends_on "perl"

  resource "sphinx" do
    url "https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-1.2.2.tar.gz"
    sha256 "2d3415f5b3e6b7535877f4c84fe228bdb802a8993c239b2d02c23169d67349bd"
  end

  resource "docs" do
    # NOTE: seems to be no tagged releases for `docs`, just active branches
    url "https://github.com/mapserver/docs.git", :branch => "branch-6-4"
    version "6.4"
  end

  resource "unittests" do
    url "https://github.com/mapserver/msautotest.git",
        :revision => "b0ba5ccbfb6b0395820f492eb5a190cf643b5ed8"
    version "6.4"
  end

  def png_prefix
    png = Formula["libpng"]
    (png.installed? || MacOS.version >= :mountain_lion) ? png.opt_prefix : MacOS::X11.prefix
  end

  def freetype_prefix
    ft = Formula["freetype"]
    (ft.installed? || MacOS.version >= :mountain_lion) ? ft.opt_prefix : MacOS::X11.prefix
  end

  def install
    # install unit tests
    (prefix/"msautotest").install resource("unittests") if build.with? "unit-tests"

    ENV.prepend_path "CMAKE_PREFIX_PATH", freetype_prefix
    ENV.prepend_path "CMAKE_PREFIX_PATH", png_prefix

    args = std_cmake_args
    if MacOS.prefer_64_bit?
      args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.arch_64_bit}"
    else
      args << "-DCMAKE_OSX_ARCHITECTURES=i386"
    end

    # defaults different than CMakeLists.txt (they don't incur extra dependencies)
    args.concat %w[
      -DWITH_KML=ON
      -DWITH_CURL=ON
      -DWITH_CLIENT_WMS=ON
      -DWITH_CLIENT_WFS=ON
      -DWITH_SOS=ON
    ]

    args << "-DWITH_XMLMAPFILE=ON" if build.with? "xml-mapfile"
    args << "-DWITH_MYSQL=ON" if build.with? "mysql"
    args << "-DWITH_RSVG=ON" if build.with? "librsvg"

    glib = Formula["glib"]
    fribidi = Formula["fribidi"]
    args << "-DFRIBIDI_INCLUDE_DIR=#{glib.opt_include}/glib-2.0;#{glib.opt_lib}/glib-2.0/include;#{fribidi.opt_include}"

    mapscr_dir = prefix/"mapscript"
    mapscr_dir.mkpath
    rpath = %Q(-Wl,-rpath,"#{opt_prefix/"lib"}")
    use_rpath = build.with? "rpath"
    cd "mapscript" do
      args << "-DWITH_PYTHON=ON"
      inreplace "python/CMakeLists.txt" do |s|
        s.gsub! "${PYTHON_SITE_PACKAGES}", lib/"python2.7/site-packages"
        s.gsub! "${PYTHON_LIBRARIES}", "-Wl,-undefined,dynamic_lookup"
        s.sub! "${MAPSERVER_LIBMAPSERVER}",
               "#{rpath} ${MAPSERVER_LIBMAPSERVER}" if use_rpath
      end

      # override language extension install locations, e.g. install to prefix/"mapscript/lang"
      args << "-DWITH_RUBY=ON"
      (mapscr_dir/"ruby").mkpath
      inreplace "ruby/CMakeLists.txt" do |s|
        s.gsub! "${RUBY_SITEARCHDIR}", %Q("#{mapscr_dir}/ruby")
        s.sub! "${MAPSERVER_LIBMAPSERVER}",
               "#{rpath} ${MAPSERVER_LIBMAPSERVER}" if use_rpath
      end

      if build.with? "php"
        args << "-DWITH_PHP=ON"
        (mapscr_dir/"php").mkpath
        inreplace "php/CMakeLists.txt" do |s|
          s.gsub! "${PHP5_EXTENSION_DIR}", %Q("#{mapscr_dir}/php")
          s.sub! "${MAPSERVER_LIBMAPSERVER}",
                 "#{rpath} ${MAPSERVER_LIBMAPSERVER}" if use_rpath
        end
      end

      args << "-DWITH_PERL=ON"
      (mapscr_dir/"perl").mkpath
      args << "-DCUSTOM_PERL_SITE_ARCH_DIR=#{mapscr_dir}/perl"
      inreplace "perl/CMakeLists.txt", "${MAPSERVER_LIBMAPSERVER}",
                "#{rpath} ${MAPSERVER_LIBMAPSERVER}" if use_rpath

      if build.with? "java"
        args << "-DWITH_JAVA=ON"
        ENV["JAVA_HOME"] = JavaJDK.home
        (mapscr_dir/"java").mkpath
        inreplace "java/CMakeLists.txt" do |s|
          s.gsub!  "DESTINATION ${CMAKE_INSTALL_LIBDIR}",
                  %Q(${CMAKE_CURRENT_BINARY_DIR}/mapscript.jar DESTINATION "#{mapscr_dir}/java")
          s.sub! "${MAPSERVER_LIBMAPSERVER}",
                 "#{rpath} ${MAPSERVER_LIBMAPSERVER}" if use_rpath
        end
      end
    end

    mkdir "build" do
      system "cmake", "..", *args
      system "make"
      system "make", "install"
    end

#    MachO::Tools.change_install_name(lib/"python2.7/site-packages/_mapscript.so",
#                                     "@rpath/libmapserver.1.dylib", opt_lib/"libmapserver.1.dylib")

#    system "install_name_tool", "-change",
#           "@rpath/libmapserver.1.dylib", opt_lib/"libmapserver.1.dylib",
#           lib/"python2.7/site-packages/_mapscript.so"

    # install devel headers
    (include/"mapserver").install Dir["*.h"]

    prefix.install "tests"
    (mapscr_dir/"python").install "mapscript/python/tests"
    cd "mapscript" do
      %w[python ruby perl].each { |x| (mapscr_dir/x.to_s).install "#{x}/examples" }
      (mapscr_dir/"php").install "php/examples" if build.with? "php"
      (mapscr_dir/"java").install "java/examples" if build.with? "java"
    end

    # write install instructions for modules
    s = ""
    mapscr_opt_dir = opt_prefix/"mapscript"
    if build.with? "php"
      s += <<~EOS
        Using the built PHP module:
          * Add the following line to php.ini:
            extension="#{mapscr_opt_dir}/php/php_mapscript.so"
          * Execute "php -m"
          * You should see MapScript in the module list

      EOS
    end
    %w[ruby perl java].each do |m|
      next if build.without?(m)

      cmd = []
      case m
      when "ruby"
        ruby_site = `ruby -r rbconfig -e 'puts RbConfig::CONFIG["sitearchdir"]'`.chomp
        cmd << "sudo cp -f mapscript.bundle #{ruby_site}/"
      when "perl"
        perl_site = `perl -MConfig -e 'print $Config{"sitearch"};'`.chomp
        cmd << "sudo cp -f mapscript.pm #{perl_site}/"
        cmd << "sudo cp -fR auto/mapscript #{perl_site}/auto/"
      else
        cmd << "sudo cp -f libjavamapscript.jnilib mapscript.jar /Library/Java/Extensions/"
      end
      s += <<~EOS
        Install the built #{m.upcase} module with:
          cd #{mapscr_opt_dir}/#{m}
          #{cmd[0]}
          #{cmd[1] + "\n" if cmd[1]}
      EOS
    end
    (mapscr_dir/"Install_Modules.txt").write s

    if build.with? "docs"
      unless which("sphinx-build")
        # vendor a local sphinx install
        sphinx_site = libexec/"lib/python2.7/site-packages"
        ENV.prepend_create_path "PYTHONPATH", sphinx_site
        resource("sphinx").stage { quiet_system "python2.7", "setup.py", "install", "--prefix=#{libexec}" }
        ENV.prepend_path "PATH", libexec/"bin"
      end
      resource("docs").stage do
        # just build the en docs
        inreplace "Makefile", "$(TRANSLATIONS_I18N) $(TRANSLATIONS_STATIC)", ""
        system "make", "html"
        doc.install "build/html" => "html"
      end
    end
  end

  def caveats; <<~EOS
    The Mapserver CGI executable is #{opt_prefix}/bin/mapserv

    Instructions for installing any built, but uninstalled, mapscript modules:
      #{opt_prefix}/mapscript/Install_Modules.txt

    EOS
  end

  test do
    mapscr_opt_dir = opt_prefix/"mapscript"
    system "#{bin}/mapserv", "-v"
    system "python2.7", "-c", '"import mapscript"'
    system "ruby", "-e", "\"require '#{mapscr_opt_dir}/ruby/mapscript'\""
    system "perl", "-I#{mapscr_opt_dir}/perl", "-e", '"use mapscript;"'

    cd "#{mapscr_opt_dir}/java/examples" do
      system "#{JavaJDK.home}/bin/javac",
             "-classpath", "../", "-Djava.ext.dirs=../", "RFC24.java"
      system "#{JavaJDK.home}/bin/java",
             "-classpath", "../", "-Djava.library.path=../", "-Djava.ext.dirs=../",
             "RFC24", "../../../tests/test.map"
    end if build.with? "java"
  end

end
__END__
diff --git a/mapimageio.c b/mapimageio.c
index 35d134f..eb63aa3 100644
--- a/mapimageio.c
+++ b/mapimageio.c
@@ -1307,6 +1307,12 @@ int readGIF(char *path, rasterBufferObj *rb)

   } while (recordType != TERMINATE_RECORD_TYPE);

+#if defined GIFLIB_MAJOR && GIFLIB_MINOR && ((GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) || (GIFLIB_MAJOR > 5))
+  if (DGifCloseFile(image, &errcode) == GIF_ERROR) {
+    msSetError(MS_MISCERR,"failed to close gif after loading: %s","readGIF()", gif_error_msg(errcode));
+    return MS_FAILURE;
+  }
+#else
   if (DGifCloseFile(image) == GIF_ERROR) {
 #if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5
     msSetError(MS_MISCERR,"failed to close gif after loading: %s","readGIF()", gif_error_msg(image->Error));
@@ -1315,6 +1321,7 @@ int readGIF(char *path, rasterBufferObj *rb)
 #endif
     return MS_FAILURE;
   }
+#endif

   return MS_SUCCESS;
 }
diff --git a/mapscript/php/error.c b/mapscript/php/error.c
index a13de647f..2e96eea27 100644
--- a/mapscript/php/error.c
+++ b/mapscript/php/error.c
@@ -31,6 +31,17 @@
 
 #include "php_mapscript.h"
 
+#if PHP_VERSION_ID >= 50625
+#undef ZVAL_STRING
+#define ZVAL_STRING(z, s, duplicate) do {       \
+    const char *__s=(s);                            \
+    zval *__z = (z);                                        \
+    Z_STRLEN_P(__z) = strlen(__s);          \
+    Z_STRVAL_P(__z) = (duplicate?estrndup(__s, Z_STRLEN_P(__z)):(char*)__s);\
+    Z_TYPE_P(__z) = IS_STRING;                      \
+} while (0)
+#endif
+
 zend_class_entry *mapscript_ce_error;
 
 ZEND_BEGIN_ARG_INFO_EX(error___get_args, 0, 0, 1)


================================================
FILE: Formula/osgeo-ecwjp2-sdk.rb
================================================
require File.expand_path("../../Strategies/cache-download", Pathname.new(__FILE__).realpath)

ECWJP2_SDK = "/Hexagon/ERDASEcwJpeg2000SDK5.5.0/Desktop_Read-Only/".freeze

class EcwJpeg2000SDK < Requirement
  fatal true
  satisfy(:build_env => false) { File.exist? ECWJP2_SDK }

  def message; <<~EOS
    ERDAS ECW/JP2 SDK was not found at:
      #{ECWJP2_SDK}

    Download SDK and install 'Desktop Read-Only' to default location from:
      http://download.intergraph.com/?ProductName=ERDAS%20ECW/JPEG2000%20SDK
  EOS
  end
end

class OsgeoEcwjp2Sdk < Formula
  desc "Decompression library for ECW- and JPEG2000-compressed imagery"
  homepage "http://www.hexagongeospatial.com/products/provider-suite/erdas-ecw-jp2-sdk"
  url "https://osgeo4mac.s3.amazonaws.com/src/dummy.tar.gz"
  version "5.5.0"
  sha256 "e7776e2ff278d6460300bd69a26d7383e6c5e2fbeb17ff12998255e7fc4c9511"

  # revision 1

  # depends_on :macos => :lion # as per SDK docs unknown version :lion
  depends_on EcwJpeg2000SDK

  def install
    lib.mkpath
    (include/"ECWJP2").mkpath
    cd ECWJP2_SDK do
      # vendor Desktop Read-Only libs, etc
      # suffix only the older stdc++
      cp "redistributable/libc++/libNCSEcw.dylib", "#{lib}/"
      # libstdc++ is not longer bundled in the distribution
#      cp "redistributable/libstdc++/libNCSEcw.dylib", "#{lib}/libNCSEcw-stdcxx.dylib"
      # Calling install_name_tool is deprecated, so we're switching to using the MachO tools
#      system "install_name_tool", "-id", opt_lib/"libNCSEcw-stdcxx.dylib", lib/"libNCSEcw-stdcxx.dylib"
#      MachO::Tools.change_dylib_id(opt_lib/"libNCSEcw-stdcxx.dylib", lib/"libNCSEcw-stdcxx.dylib")
      %w[etc Licenses].each { |f| cp_r f.to_s, "#{prefix}/" }
      cp_r Dir["include/*"], "#{include}/ECWJP2/"

      # for test
      (prefix/"test").mkpath
      cp "Examples/decompression/example1/dexample1.c", prefix/"test/"
      %w[ecw jp2].each { |f| cp "TestData/RGB_8bit.#{f}", prefix/"test/" }
    end
  end

  def caveats; <<~EOS
    Once formula is installed, the ERDAS ECW/JP2 SDK can be deleted from its
    default install location of:

      #{Pathname.new(ECWJP2_SDK).dirname}

    Headers installed to:

      #{opt_include}/ECWJP2

    EOS
  end

  test do
    cp prefix/"test/dexample1.c", testpath
    system ENV.cc, "-I#{opt_include}/ECWJP2", "-L#{opt_lib}", "-lNCSEcw",
           "-o", "test", "dexample1.c"

    %w[ecw jp2].each do |f|
      out = `./test #{prefix}/test/RGB_8bit.#{f}`
      assert_match "Region   99", out
      assert_match "Region    0", out
      assert_match "ALL    time", out
    end
  end
end


================================================
FILE: Formula/osgeo-fcgi-debug.rb
================================================
class OsgeoFcgiDebug < Formula
  desc "Helps trace FastCGI programs without having to strace them"
  homepage "http://redmine.lighttpd.net/projects/fcgi-debug/wiki"
  url "https://github.com/lighttpd/fcgi-debug/archive/fcgi-debug-0.9.3.tar.gz"
  sha256 "b63f89c563c05c2a8beb0d2dbace893928291f8f7a7ae651ff7a328a8be64725"

  revision 1

  head "https://github.com/lighttpd/fcgi-debug.git", branch: "master"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "674bace0a4d665e202d85b1179a60e2dd6987ca6540b16b2b5fc89656175b6a4" => :mojave
    sha256 "674bace0a4d665e202d85b1179a60e2dd6987ca6540b16b2b5fc89656175b6a4" => :high_sierra
    sha256 "2533dc7a2c288f6638e3996c64506543fb495cf8cffd27b165ff8d79b15d4065" => :sierra
  end

  depends_on "cmake" => :build
  depends_on "pkg-config" => :build
  depends_on "libev"
  depends_on "glib"

  def install
    man1.install "fcgi-debug.1"
    args = std_cmake_args

    mkdir "build" do
      system "cmake", "..", *args
      system "make"
      system "make", "install"
    end
  end

  test do
    # TODO
  end
end


================================================
FILE: Formula/osgeo-filegdb-api.rb
================================================
class OsgeoFilegdbApi < Formula
  desc "ESRI File Geodatabase C++ API libraries"
  homepage "https://github.com/Esri/file-geodatabase-api"
  url "https://github.com/Esri/file-geodatabase-api/raw/master/FileGDB_API_1.5.1/FileGDB_API_1_5_1-64clang.zip"
  sha256 "78b52650b3be72eacb985fd744f6766e8d57f60a3317055c5a23b1d181ae8ab2"
  version "1.5.1"

  revision 1

  head "https://github.com/Esri/file-geodatabase-api.git", :branch => "master"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "5d0737d480cacb6d13b5cb5883ba8daeb197ae99ef3cc7d7f4bcfc87aa242ebd" => :mojave
    sha256 "5d0737d480cacb6d13b5cb5883ba8daeb197ae99ef3cc7d7f4bcfc87aa242ebd" => :high_sierra
    sha256 "39854ee9fc01e80f14a5cafdbbf868c349d612955820d3407c588ff099f28e4d" => :sierra
  end

  option "with-docs", "Intall API documentation and sample code"

  def install
    prefix.install %w[lib license]
    # update libs
    cd lib do
      install_change "libFileGDBAPI.dylib",
                     "@rpath/libfgdbunixrtl.dylib",
                     "@loader_path/libfgdbunixrtl.dylib"
      set_install_name("libFileGDBAPI.dylib", opt_lib)
    end

    # build a sample for testing libs
    # Note: Editing sample failed in test sandbox; worked in Terminal
    mkdir_p libexec/"test/bin"
    mkdir libexec/"test/data"
    cp_r "samples/data/Querying.gdb", libexec/"test/data/"
    cd "samples/Querying" do
      inreplace "Makefile", "../../lib", lib
      inreplace "Makefile", "../bin", "#{libexec}/test/bin"
      system "make"
    end

    # install headers (after building test binary)
    rm_f "include/make.include"
    include.install "include" => "filegdb"

    if build.with? "docs"
      pkgshare.install %w[samples xmlResources]
      pkgshare.install "doc/html" => "html"
    end
  end

  def install_change(dylib, old, new)
    quiet_system "install_name_tool", "-change", old, new, dylib
  end

  def set_install_name(dylib, dir)
    quiet_system "install_name_tool", "-id", "#{dir}/#{dylib}", dylib
  end

  def caveats; <<~EOS
      To build software with the File GDB API, add to the following
      environment variable to find headers:

        CPPFLAGS: -I#{opt_prefix}/include/filegdb

    EOS
  end

  test do
    cd libexec/"test/bin" do
      system "./Querying"
    end
  end
end


================================================
FILE: Formula/osgeo-fyba.rb
================================================
class OsgeoFyba < Formula
  desc "Library to read/write Norwegian National geodata standard (SOSI) files"
  homepage "https://github.com/kartverket/fyba"
  url "https://github.com/kartverket/fyba/archive/4.1.1.tar.gz"
  sha256 "99f658d52e8fd8997118bb6207b9c121500700996d9481a736683474e2534179"

  revision 1

  head "https://github.com/kartverket/fyba.git", :branch => "master"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "9966047d61d968941f24082a9bd7a9bcef59bd3df81bc864a35fd44287991909" => :mojave
    sha256 "9966047d61d968941f24082a9bd7a9bcef59bd3df81bc864a35fd44287991909" => :high_sierra
    sha256 "4a2c603626d62a08824f5739d831967fea36c09d5c1150b0923f8c804063f56c" => :sierra
  end

  depends_on "autoconf" => :build
  depends_on "automake" => :build
  depends_on "libtool" => :build

  def install
    # fixup some includes: https://github.com/kartverket/fyba/issues/12
    # done with inreplace due to CRLF endings in src/UT files
    # REMOVE ON NEXT RELEASE
    %w[configure configure.ac src/UT/DISKINFO.cpp src/UT/INQSIZE.cpp src/UT/INQTID.cpp].each do |s|
      inreplace s, "sys/vfs.h", "sys/mount.h"
    end

    # fixup UT_INT64 type in include: https://github.com/kartverket/fyba/pull/19
    # done with inreplace due to CRLF endings in files
    inreplace "src/UT/fyut.h", %r{(/\* For UNIX \*/)},
        "\\1\r\n#  ifdef __APPLE__\r\n#    include <stdint.h>\r\n#    define UT_INT64 int64_t\r\n#  endif\r\n"

    system "autoreconf", "-vfi"

    system "./configure", "--prefix=#{prefix}"
    system "make"
    system "make", "install"
  end

  test do
    (testpath/"fyba_test.cpp").write <<-EOS
    #include "fyba.h"
    int main() {
      SK_EntPnt_FYBA char *LC_InqVer(void);
      return 0;
    }
    EOS
    system ENV.cxx, "-I#{include}/fyba", "-L#{lib}", "-lfyba",
           "-lfygm", "-lfyut", "-o", "fyba_test", "fyba_test.cpp"
    system "./fyba_test"
  end
end


================================================
FILE: Formula/osgeo-gdal-ecwjp2.rb
================================================
class OsgeoGdalEcwjp2 < Formula
  desc "GDAL/OGR 3.x plugin for ECW driver"
  homepage "http://www.gdal.org/frmt_ecw.html"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  # revision 1

  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  # bottle do
  #   never
  # end

  depends_on "osgeo-ecwjp2-sdk"
  depends_on "osgeo-gdal"

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def install
    ENV.cxx11

    ecwjp2_opt = Formula["osgeo-ecwjp2-sdk"].opt_prefix
    ecwjp2_opt_include = ecwjp2_opt/"include/ECWJP2"

    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    # cxx flags
    args = %W[-Iport -Igcore -Ifrmts -DFRMT_ecw -DECWSDK_VERSION=53 -Ifrmts/ecw -DDO_NOT_USE_DEBUG_BOOL
              -I#{ecwjp2_opt_include} -I#{ecwjp2_opt_include}/NCSEcw/API
              -I#{ecwjp2_opt_include}/NCSEcw/ECW -I#{ecwjp2_opt_include}/NCSEcw/JP2]

    # source files
    Dir["frmts/ecw/*.cpp"].each do |src|
      args.concat %W[#{src}]
    end

    # plugin dylib
    dylib_name = "gdal_ECW_JP2ECW.dylib"
    args.concat %W[
      -dynamiclib
      -install_name #{opt_lib}/#{gdal_plugins_subdirectory}/#{dylib_name}
      -current_version #{version}
      -compatibility_version #{gdal_majmin_ver}.0
      -o #{gdal_plugins}/#{dylib_name}
      -undefined dynamic_lookup
    ]

    # ld flags
    args.concat %W[-L#{ecwjp2_opt}/lib -lNCSEcw]

    # build and install shared plugin
    system ENV.cxx, *args
  end

  def caveats; <<~EOS
      This formula provides a plugin that allows GDAL or OGR to access geospatial
      data stored in its format. In order to use the shared plugin, you may need
      to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins
    EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    out = shell_output("#{gdal_opt_bin}/gdalinfo --formats")
    assert_match "ECW -raster- (rov)", out
    assert_match "JP2ECW -raster,vector- (rov)", out

    ecwjp2_test = Formula["osgeo-ecwjp2-sdk"].opt_prefix/"test"
    out = shell_output("#{gdal_opt_bin}/gdalinfo #{ecwjp2_test}/RGB_8bit.ecw")
    assert_match "Driver: ECW/ERDAS Compressed Wavelets", out
    assert_match "Size is 4320, 2160", out
    out = shell_output("#{gdal_opt_bin}/gdalinfo #{ecwjp2_test}/RGB_8bit.jp2")
    assert_match "Driver: JP2ECW/ERDAS JPEG2000", out
    assert_match "Size is 4320, 2160", out
  end
end


================================================
FILE: Formula/osgeo-gdal-filegdb.rb
================================================
class OsgeoGdalFilegdb < Formula
  desc "GDAL/OGR 3.x plugin for ESRI FileGDB driver"
  homepage "http://www.gdal.org/drv_filegdb.html"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  #revision 1

  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "a1becbb7db6c1b00d7c74ae4cc19734537760f0156855218c4e97d0c17d32c65" => :catalina
    sha256 "a1becbb7db6c1b00d7c74ae4cc19734537760f0156855218c4e97d0c17d32c65" => :mojave
    sha256 "a1becbb7db6c1b00d7c74ae4cc19734537760f0156855218c4e97d0c17d32c65" => :high_sierra
  end

  depends_on "osgeo-filegdb-api"
  depends_on "osgeo-gdal"

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def install
    ENV.cxx11
    filegdb_opt = Formula["osgeo-filegdb-api"].opt_prefix

    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    # cxx flags
    args = %W[-Iport -Igcore -Iogr -Iogr/ogrsf_frmts -Iogr/ogrsf_frmts/generic
              -Iogr/ogrsf_frmts/filegdb -I#{filegdb_opt}/include/filegdb]

    # source files
    Dir["ogr/ogrsf_frmts/filegdb/*.c*"].each do |src|
      args.concat %W[#{src}]
    end

    # plugin dylib
    dylib_name = "ogr_FileGDB.dylib"
    args.concat %W[
      -dynamiclib
      -install_name #{opt_lib}/#{gdal_plugins_subdirectory}/#{dylib_name}
      -current_version #{version}
      -compatibility_version #{gdal_majmin_ver}.0
      -o #{gdal_plugins}/#{dylib_name}
      -undefined dynamic_lookup
    ]

    # ld flags
    args.concat %W[-L#{filegdb_opt}/lib -lFileGDBAPI]

    # build and install shared plugin
    system ENV.cxx, *args
  end

  def caveats; <<~EOS
      This formula provides a plugin that allows GDAL or OGR to access geospatial
      data stored in its format. In order to use the shared plugin, you may need
      to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins
    EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    out = shell_output("#{gdal_opt_bin}/ogrinfo --formats")
    assert_match "FileGDB -vector- (rw+)", out
  end
end


================================================
FILE: Formula/osgeo-gdal-grass.rb
================================================
class OsgeoGdalGrass < Formula
  desc "GDAL/OGR 3.x plugin for GRASS 7"
  homepage "https://www.gdal.org"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  #revision 1

  #bottle do
  #  root_url "https://bottle.download.osgeo.org"
  #  cellar :any
  #  sha256 "24d80b0a8250aee06a5af69277371f582b24e87036c091f0b174268a898b2ae0" => :mojave
  #  sha256 "24d80b0a8250aee06a5af69277371f582b24e87036c091f0b174268a898b2ae0" => :high_sierra
  #  sha256 "736afd0da344f3b221bc0b4e58019970b50552d40e2472b00ff8872248f5a977" => :sierra
  #end

  depends_on "osgeo-gdal"
  depends_on "osgeo-grass"

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def install
    ENV.cxx11
    gdal = Formula["osgeo-gdal"]
    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    grass = Formula["osgeo-grass"]

    # due to DYLD_LIBRARY_PATH no longer being setable, strictly define extension
    inreplace "Makefile.in", ".so", ".dylib"

    system "./configure", "--prefix=#{prefix}",
                          "--disable-debug",
                          "--disable-dependency-tracking",
                          "--with-gdal=#{gdal.opt_bin}/gdal-config",
                          "--with-grass=#{grass.prefix}/grass-base",
                          "--with-autoload=#{gdal_plugins}"

    # inreplace "Makefile", "mkdir", "mkdir -p"

    system "make", "install"
  end

  def caveats; <<~EOS
      This formula provides a plugin that allows GDAL or OGR to access geospatial
      data stored in its format. In order to use the shared plugin, you may need
      to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins
    EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    out = shell_output("#{gdal_opt_bin}/gdalinfo --formats")
    assert_match "GRASS -raster- (ro)", out
    out = shell_output("#{gdal_opt_bin}/ogrinfo --formats")
    assert_match "OGR_GRASS -vector- (ro)", out
  end
end


================================================
FILE: Formula/osgeo-gdal-mdb.rb
================================================
class OsgeoGdalMdb < Formula
  desc "GDAL/OGR 3.x plugin for MDB driver"
  homepage "http://www.gdal.org/drv_mdb.html"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  #revision 1
  
  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  # bottle do
  #   never (runtime JAVA version may change too much, or be different from Travis CI)
  # end

  depends_on "openjdk"
  depends_on "osgeo-gdal"
  depends_on "libtiff"
  depends_on "osgeo-libgeotiff"

  # various deps needed for configuring
  depends_on "json-c"

  resource "jackcess-jar" do
    url "https://downloads.sf.net/project/jackcess/jackcess/1.2.14.3/jackcess-1.2.14.3.jar"
    sha256 "a6fab0c4b5daf23dcf7fd309ee4ffc6df12ff982510c094e45442adf88712787"
  end

  resource "logging-jars" do
    # lib/commons*.jar
    url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mdb-sqlite/mdb-sqlite-1.0.2.tar.bz2"
    sha256 "43a584903f4c820b97104758a0d8f15731c70cee5d3d88d96669b1d91e902520"
  end

  resource "test-mdb" do
    url "https://osgeo4mac.s3.amazonaws.com/src/NJ-Streets_Atlantic.zip"
    sha256 "811ea90c55be918d8c3a2a5c75105e224c7a37fafb7f6154f67ec8eb9d8b86ef"
  end

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def configure_args
    args = [
      # Base configuration.
      "--prefix=#{prefix}",
      "--mandir=#{man}",
      "--disable-debug",
      "--with-local=#{prefix}",
      "--with-threads",
      "--with-libtool",

      # various deps needed for configuring
      "--with-libjson-c=#{Formula["json-c"].opt_prefix}",

      # force correction of dylib setup, even though we are not building framework here
      "--with-macosx-framework",
    ]

    cmd = Language::Java.java_home_cmd("1.8")
    ENV["JAVA_HOME"] = Utils.popen_read(cmd).chomp
    args << "--with-java=yes"
    args << "--with-jvm-lib=#{ENV["JAVA_HOME"]}/jre/lib/server"
    # args << "--with-jvm-lib=dlopen" # doesn't seem to work on macOS
    # The rpath is only embedded for Oracle Java (non-framework) installs,
    # though it does not work here as we are just compiling a plugin directly
    args << "--with-jvm-lib-add-rpath=yes"
    args << "--with-mdb=yes"

    # nix all other configure tests, i.e. minimal base gdal build
    without_pkgs = %w[
      armadillo bsb cfitsio cryptopp curl dds dods-root
      ecw epsilon expat fgdb fme freexl
      geos gif gnm grass grib gta
      hdf4 hdf5 idb ingres
      j2lura jasper jp2mrsid jpeg jpeg12 kakadu kea
      libgrass libkml liblzma libz
      mongocxx mrf mrsid_lidar mrsid msg mysql netcdf
      oci odbc ogdi opencl openjpeg
      pam pcidsk pcraster pcre perl pg php png python
      qhull rasdaman rasterlite2
      sde sfcgal sosi spatialite sqlite3 static-proj4
      teigha webp xerces xml2
    ]
    args.concat without_pkgs.map { |b| "--without-" + b }
    args
  end

  def install
    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    ENV.cxx11

    # configure GDAL/OGR with minimal drivers
    system "./configure", *configure_args

    # cxx flags
    args = %W[-DLINUX -DUNIX -Iport -Igcore -Iogr
              -Iogr/ogrsf_frmts -Iogr/ogrsf_frmts/generic
              -Iogr/ogrsf_frmts/mdb -I#{ENV["JAVA_HOME"]}/include/darwin
              -I#{ENV["JAVA_HOME"]}/include]

    # source files
    Dir["ogr/ogrsf_frmts/mdb/ogrmdb*.c*"].each do |src|
      args.concat %W[#{src}]
    end

    # plugin dylib
    dylib_name = "ogr_MDB.dylib"
    args.concat %W[
      -std=c++11
      -dynamiclib
      -install_name #{opt_lib}/#{gdal_plugins_subdirectory}/#{dylib_name}
      -current_version #{version}
      -compatibility_version #{gdal_majmin_ver}.0
      -o #{gdal_plugins}/#{dylib_name}
      -undefined dynamic_lookup
    ]

    # ld flags
    args.concat %W[-L#{ENV["JAVA_HOME"]}/jre/lib/server -ljvm]

    # build and install shared plugin
    system ENV.cxx, *args

    dylib = lib/gdal_plugins_subdirectory/dylib_name
    dylib.ensure_writable do
      # manually add the libjvm.dylib rpath directory entry to the plugin
      MachO::Tools.add_rpath(dylib.to_s, "#{ENV["JAVA_HOME"]}/jre/lib/server", :strict => false)
    end

    libexec.install resource("jackcess-jar")
    resource("logging-jars").stage do
      libexec.install Dir["lib/commons*.jar"]
    end
  end

  def caveats; <<~EOS
      This formula provides a plugin that allows GDAL or OGR to access geospatial
      data stored in its format. In order to use the shared plugin, you may need
      to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins

      To have a functional MDB driver, install supporting .jar files in:
        /Library/Java/Extensions/
      from:
        #{opt_libexec}/*.jar

      (However, this can affect other JAVA software)

      Optionally, set the following JAVA environment variable, per session:

        export CLASSPATH=#{Dir[libexec/"*.jar"].join(":")}

      See: http://www.gdal.org/ogr/drv_mdb.html

      !!!!!!!!! IMPORTANT !!!!!!!!!

      You may need to adjust your JAVA JRE or JDK install to allow JNI usage:

        see: https://oliverdowling.com.au/2015/10/09/oracles-jdk-8-on-mac-os-x-el-capitan/
    EOS
  end

  test do
    # cmd = Language::Java.java_home_cmd("1.8+")
    # ENV["JAVA_HOME"] = Utils.popen_read(cmd).chomp
    ENV["CLASSPATH"] = Dir[libexec/"*.jar"].join(":")
    # puts "JAVA_HOME=#{ENV["JAVA_HOME"]}"
    # puts "CLASSPATH=#{ENV["CLASSPATH"]}"
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["odgeo-gdal"].opt_bin
    system "#{gdal_opt_bin}/ogrinfo", "--format", "MDB"
    resource("test-mdb").stage testpath
    system "#{gdal_opt_bin}/ogrinfo", "-ro", testpath/"Atlantic.mdb".to_s
  end
end


================================================
FILE: Formula/osgeo-gdal-mongodb.rb
================================================
class OsgeoGdalMongodb < Formula
  desc "GDAL/OGR 3.x plugin for MongoDB driver"
  homepage "http://www.gdal.org/drv_mongodb.html"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  #revision 1
  
  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  #bottle do
  #  root_url "https://bottle.download.osgeo.org"
  #  cellar :any
  #  sha256 "1bd81d777302cee99d33b444746f9451374cf354b64a07fdd44fb0cb51574293" => :catalina
  #  sha256 "1bd81d777302cee99d33b444746f9451374cf354b64a07fdd44fb0cb51574293" => :mojave
  #  sha256 "1bd81d777302cee99d33b444746f9451374cf354b64a07fdd44fb0cb51574293" => :high_sierra
  #end

  depends_on "boost"
  depends_on "libtiff"
  depends_on "osgeo-libgeotiff"
  depends_on "osgeo-gdal"
  depends_on "osgeo-mongo-cxx-driver-legacy"

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def configure_args
    args = [
      # Base configuration.
      "--prefix=#{prefix}",
      "--mandir=#{man}",
      "--disable-debug",
      "--with-local=#{prefix}",
      "--with-threads",
      "--with-libtool",
      # force correction of dylib setup, even though we are not building framework here
      "--with-macosx-framework",
    ]

    args << "--with-mongocxx=#{Formula["osgeo-mongo-cxx-driver-legacy"].opt_prefix}"

    # nix all other configure tests, i.e. minimal base gdal build
    without_pkgs = %w[
      armadillo bsb cfitsio cryptopp curl dds dods-root
      ecw epsilon expat fgdb fme freexl
      geos gif gnm grass grib gta
      hdf4 hdf5 idb ingres
      jasper jp2mrsid jpeg jpeg12 kakadu kea
      libgrass libkml liblzma libz
      mdb mrf mrsid_lidar mrsid msg mysql netcdf
      oci odbc ogdi opencl openjpeg
      pam pcidsk pcraster pcre perl pg php png python
      qhull rasdaman rasterlite2
      sde sfcgal sosi spatialite sqlite3 static-proj4
      teigha webp xerces xml2
    ]
    args.concat without_pkgs.map { |b| "--without-" + b }
    args
  end

  def install
    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    ENV.cxx11

    # configure GDAL/OGR with minimal drivers
    system "./configure", *configure_args

    # cxx flags
    args = %W[-DLINUX -DUNIX -Iport -Igcore -Iogr
              -Iogr/ogrsf_frmts -Iogr/ogrsf_frmts/generic
              -Iogr/ogrsf_frmts/mongodb]

    # source files
    Dir["ogr/ogrsf_frmts/mongodb/ogrmongodb*.c*"].each do |src|
      args.concat %W[#{src}]
    end

    # plugin dylib
    dylib_name = "ogr_MongoDB.dylib"
    args.concat %W[
      -std=c++11
      -dynamiclib
      -install_name #{opt_lib}/#{gdal_plugins_subdirectory}/#{dylib_name}
      -current_version #{version}
      -compatibility_version #{gdal_majmin_ver}.0
      -o #{gdal_plugins}/#{dylib_name}
      -undefined dynamic_lookup
    ]

    # Add the Mongo lib
    args.concat %W[-L#{Formula["osgeo-mongo-cxx-driver-legacy"].opt_lib} -lmongoclient]

    # build and install shared plugin
    system ENV.cxx, *args
  end

  def caveats; <<~EOS
    This formula provides a plugin that allows GDAL or OGR to access geospatial
    data stored in its format. In order to use the shared plugin, you may need
    to set the following enviroment variable:

      export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins
    EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    system "#{gdal_opt_bin}/ogrinfo", "--format", "MongoDB"
  end
end


================================================
FILE: Formula/osgeo-gdal-mrsid.rb
================================================
class OsgeoGdalMrsid < Formula
  desc "GDAL/OGR 3.x plugin for MrSID raster and LiDAR drivers"
  homepage "http://www.gdal.org/frmt_mrsid.html"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  # revision 1

  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  # bottle do
  #   never
  # end

  depends_on "osgeo-mrsid-sdk"
  depends_on "osgeo-gdal"

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def install
    ENV.cxx11
    mrsid_sdk_opt = Formula["osgeo-mrsid-sdk"].opt_prefix

    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    plugins = {}
    lidar_args = []
    mrsid_args = []

    # source files & cxx/ld flags
    # gdal_MG4Lidar.dylib
    Dir["frmts/mrsid_lidar/*.c*"].each { |src| lidar_args.concat %W[#{src}] }
    lidar_args.concat %W[
      -Iport -Igcore -Ifrmts -Ifrmts/mrsid_lidar
      -I#{mrsid_sdk_opt}/include/mrsid
    ]
    lidar_args.concat %W[-L#{mrsid_sdk_opt}/lib -llti_lidar_dsdk]
    plugins[:gdal_MG4Lidar] = lidar_args

    # gdal_MrSID.dylib
    Dir["frmts/mrsid/*.c*"].each { |src| mrsid_args.concat %W[#{src}] }
    mrsid_args.concat %W[
      -DMRSID_J2K=1
      -Iport -Igcore -Ifrmts -Ifrmts/mrsid -Ifrmts/gtiff/libgeotiff
      -I#{mrsid_sdk_opt}/include/mrsid
    ]
    mrsid_args.concat %W[-L#{mrsid_sdk_opt}/lib -lltidsdk]
    plugins[:gdal_MrSID] = mrsid_args

    # plugin dylib
    plugins.each do |key, args|
      args.concat %W[
        -dynamiclib
        -install_name #{opt_lib}/#{gdal_plugins_subdirectory}/#{key}.dylib
        -current_version #{version}
        -compatibility_version #{gdal_majmin_ver}.0
        -o #{gdal_plugins}/#{key}.dylib
        -undefined dynamic_lookup
      ]
      # build and install shared plugin
      system ENV.cxx, *args
    end
  end

  def caveats; <<~EOS
      This formula provides a plugin that allows GDAL or OGR to access geospatial
      data stored in its format. In order to use the shared plugin, you may need
      to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins
    EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    out = shell_output("#{gdal_opt_bin}/gdalinfo --formats")
    assert_match "MG4Lidar -raster- (ro)", out
    assert_match "MrSID -raster- (rov)", out
    assert_match "JP2MrSID -raster- (rov)", out
  end
end


================================================
FILE: Formula/osgeo-gdal-mysql.rb
================================================
class OsgeoGdalMysql < Formula
  desc "GDAL/OGR 3.x plugin for MySQL driver"
  homepage "http://www.gdal.org/drv_mysql.html"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  #revision 1
  
  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  #bottle do
  #  root_url "https://bottle.download.osgeo.org"
  #  sha256 "82e4ae8e22b01017f8be53a735bf19d5120fa8b80e6c561406cf73bae0a62506" => :catalina
  #  sha256 "82e4ae8e22b01017f8be53a735bf19d5120fa8b80e6c561406cf73bae0a62506" => :mojave
  #  sha256 "82e4ae8e22b01017f8be53a735bf19d5120fa8b80e6c561406cf73bae0a62506" => :high_sierra
  #end

  depends_on "mysql" => :build # adds openssl
  depends_on "osgeo-gdal"

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def install
    ENV.cxx11
    mysql = Formula["mysql"]

    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    # cxx flags
    args = %W[-Iport -Igcore -Iogr -Iogr/ogrsf_frmts -Iogr/ogrsf_frmts/generic
              -Iogr/ogrsf_frmts/mysql -I#{mysql.opt_include}/mysql]

    # source files
    Dir["ogr/ogrsf_frmts/mysql/*.c*"].each do |src|
      args.concat %W[#{src}]
    end

    # plugin dylib
    dylib_name = "ogr_MySQL.dylib"
    args.concat %W[
      -dynamiclib
      -install_name #{opt_lib}/#{gdal_plugins_subdirectory}/#{dylib_name}
      -current_version #{version}
      -compatibility_version #{gdal_majmin_ver}.0
      -o #{gdal_plugins}/#{dylib_name}
      -undefined dynamic_lookup
    ]

    # ld flags
    args.concat %W[
      #{mysql.opt_lib}/libmysqlclient.a
      -L#{Formula["openssl"].opt_lib}
      -lssl
      -lcrypto
    ]

    # build and install shared plugin
    system ENV.cxx, *args
  end

  def caveats; <<~EOS
      This formula provides a plugin that allows GDAL or OGR to access geospatial
      data stored in its format. In order to use the shared plugin, you may need
      to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins

    EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    out = shell_output("#{gdal_opt_bin}/ogrinfo --formats")
    assert_match "MySQL -vector- (rw+)", out
  end
end


================================================
FILE: Formula/osgeo-gdal-ogdi.rb
================================================
class OsgeoGdalOgdi < Formula
  desc "GDAL/OGR 3.x plugin for OGDI driver"
  homepage "http://www.gdal.org/drv_ogdi.html"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  #revision 1
  
  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  #bottle do
  #  root_url "https://bottle.download.osgeo.org"
  #  cellar :any
  #  sha256 "33c1448189416e6812f3d05af2f0751daf604d4be188363707bc2a7d6b24f5e8" => :catalina
  #  sha256 "33c1448189416e6812f3d05af2f0751daf604d4be188363707bc2a7d6b24f5e8" => :mojave
  #  sha256 "33c1448189416e6812f3d05af2f0751daf604d4be188363707bc2a7d6b24f5e8" => :high_sierra
  #end

  depends_on "osgeo-ogdi"
  depends_on "osgeo-gdal"

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def install
    ENV.cxx11
    ogdi_opt = Formula["osgeo-ogdi"].opt_prefix

    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath
    # (HOMEBREW_PREFIX/"lib/#{gdal_plugins_subdirectory}").mkpath

    # add external plugin registration
    inreplace "#{Dir.pwd}/ogr/ogrsf_frmts/ogdi/ogrogdi.h",
              %r{(#endif /\* OGDOGDI_H_INCLUDED \*/)},
              <<~EOS

              CPL_C_START
              void CPL_DLL RegisterOGROGDI();
              CPL_C_END

              \\1
              EOS

    # cxx flags
    args = %W[-Iport -Igcore -Iogr -Iogr/ogrsf_frmts -Iogr/ogrsf_frmts/generic
              -Iogr/ogrsf_frmts/ogdi -I#{ogdi_opt}/include/ogdi]

    # source files
    Dir["ogr/ogrsf_frmts/ogdi/*.c*"].each do |src|
      args.concat %W[#{src}]
    end

    # plugin dylib
    dylib_name = "ogr_OGDI.dylib"
    args.concat %W[
      -dynamiclib
      -install_name #{opt_lib}/#{gdal_plugins_subdirectory}/#{dylib_name}
      -current_version #{version}
      -compatibility_version #{gdal_majmin_ver}.0
      -o #{gdal_plugins}/#{dylib_name}
      -undefined dynamic_lookup
    ]

    # ld flags
    args.concat %W[-L#{ogdi_opt}/lib/ogdi -logdi]

    # build and install shared plugin
    system ENV.cxx, *args
  end

  def caveats; <<~EOS
    This formula provides a plugin that allows GDAL or OGR to access geospatial
    data stored in its format. In order to use the shared plugin, you may need
    to set the following enviroment variable:

      export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins
  EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    out = shell_output("#{gdal_opt_bin}/ogrinfo --formats")
    assert_match "OGR_OGDI -vector- (ro): OGDI Vectors (VPF, VMAP, DCW)", out
  end
end


================================================
FILE: Formula/osgeo-gdal-oracle.rb
================================================
class OsgeoGdalOracle < Formula
  desc "GDAL/OGR 3.x plugin for Oracle Spatial driver"
  homepage "http://www.gdal.org/drv_oci.html"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  # revision 1

  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  # bottle do
  #   never
  # end

  depends_on "osgeo-oracle-client-sdk"
  depends_on "osgeo-gdal"

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def install
    oracle_opt = Formula["osgeo-oracle-client-sdk"].opt_prefix

    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    # cxx flags
    args = %W[-Iport -Igcore -Iogr -Iogr/ogrsf_frmts -Iogr/ogrsf_frmts/generic
              -Iogr/ogrsf_frmts/oci -I#{oracle_opt}/include/oci]

    # source files
    Dir["ogr/ogrsf_frmts/oci/oci_utils.cpp", "ogr/ogrsf_frmts/oci/ogr*.c*"].each do |src|
      args.concat %W[#{src}]
    end

    # plugin dylib
    dylib_name = "ogr_OCI.dylib"
    args.concat %W[
      -std=c++11
      -dynamiclib
      -install_name #{opt_lib}/#{gdal_plugins_subdirectory}/#{dylib_name}
      -current_version #{version}
      -compatibility_version #{gdal_majmin_ver}.0
      -o #{gdal_plugins}/#{dylib_name}
      -undefined dynamic_lookup
    ]

    # ld flags
    args.concat %W[-L#{oracle_opt}/lib -lclntsh]

    # build and install shared plugin
    system ENV.cxx, *args
  end

  def caveats; <<~EOS
      This formula provides a plugin that allows GDAL or OGR to access geospatial
      data stored in its format. In order to use the shared plugin, you may need
      to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins
    EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    out = shell_output("#{gdal_opt_bin}/ogrinfo --formats")
    assert_match "OCI -vector- (rw+)", out
  end
end


================================================
FILE: Formula/osgeo-gdal-pdf.rb
================================================
class OsgeoGdalPdf < Formula
  desc "GDAL/OGR 3.x plugin for PDF driver"
  homepage "http://www.gdal.org/frmt_pdf.html"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  #revision 1
  
  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    sha256 "3daada45817c48da90738d7b8052e2bd5fb25117e2c25c35bed2030f2b96517a" => :catalina
    sha256 "3daada45817c48da90738d7b8052e2bd5fb25117e2c25c35bed2030f2b96517a" => :mojave
    sha256 "3daada45817c48da90738d7b8052e2bd5fb25117e2c25c35bed2030f2b96517a" => :high_sierra
  end

  depends_on "pkg-config" => :build
  depends_on "cairo"
  depends_on "fontconfig"
  depends_on "freetype"
  depends_on "gettext"
  depends_on "glib"
  depends_on "gobject-introspection"
  depends_on "jpeg"
  depends_on "libpng"
  depends_on "libtiff"
  depends_on "osgeo-libgeotiff"
  depends_on "openjpeg"
  depends_on "podofo"
  # TODO: new code for GDAL >3.1 from: 
  # https://github.com/rouault/pdfium_build_gdal_3_1
  #depends_on "osgeo-pdfium"
  depends_on "osgeo-gdal"

  # various deps needed for configuring
  depends_on "json-c"

  # upstream poppler 0.59.0 incompatibility
  resource "poppler" do
    url "https://poppler.freedesktop.org/poppler-0.57.0.tar.xz"
    sha256 "0ea37de71b7db78212ebc79df59f99b66409a29c2eac4d882dae9f2397fe44d8"
  end

  resource "poppler-data" do
    url "https://poppler.freedesktop.org/poppler-data-0.4.8.tar.gz"
    sha256 "1096a18161f263cccdc6d8a2eb5548c41ff8fcf9a3609243f1b6296abdf72872"
  end

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def configure_args
    args = [
      # Base configuration.
      "--prefix=#{prefix}",
      "--mandir=#{man}",
      "--disable-debug",
      "--with-local=#{prefix}",
      "--with-threads",

      # various deps needed for configuring
      "--with-libjson-c=#{Formula["json-c"].opt_prefix}",

      # force correction of dylib setup, even though we are not building framework here
      "--with-macosx-framework",
      "--enable-pdf-plugin",
      "--without-libtool"
    ]

    # PDF-supporting backends for writing
    # args << "--with-pdfium=#{Formula["osgeo-pdfium"].opt_prefix}"

    # poppler is locally vendored
    args << "--with-poppler=#{libexec}/poppler"
    args << "--with-podofo=#{Formula["podofo"].opt_prefix}"

    # nix all other configure tests, i.e. minimal base gdal build
    without_pkgs = %w[
      armadillo bsb cfitsio cryptopp curl dds dods-root
      ecw epsilon expat fgdb fme freexl
      geos gif gnm grass grib gta
      hdf4 hdf5 idb ingres
      j2lura jasper java jp2mrsid jpeg jpeg12 kakadu kea
      libgrass libkml liblzma libz
      mdb mongocxx mrf mrsid_lidar mrsid msg mysql netcdf
      oci odbc ogdi opencl openjpeg
      pam pcidsk pcraster pcre perl pg php png python
      qhull rasdaman rasterlite2
      sde sfcgal sosi spatialite sqlite3 static-proj4
      teigha webp xerces xml2
    ]
    args.concat without_pkgs.map { |b| "--without-" + b }
    args
  end

  def install
    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    # ENV.cxx11
    needs :cxx11 if MacOS.version < :mavericks
    # ENV.libstdcxx
    # set ARCHFLAGS to match how we build
    ENV["ARCHFLAGS"] = "-arch #{Hardware::CPU.arch}"
    # ENV.append_to_cflags "-mmacosx-version-min=10.8"
    # ENV["CXXFLAGS"] = "-mmacosx-version-min=10.8"
    # ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.8"

    # locally vendor dependency
    resource("poppler").stage do
      # Temp fix for supporting new OpenJPEG 2.x version, which is API/ABI compatible with OpenJPEG 2.2
      opj_ver_list = Formula["openjpeg"].version.to_s.split(".")
      opj_ver = "#{opj_ver_list[0]}.#{opj_ver_list[1]}"
      ENV["LIBOPENJPEG_CFLAGS"] = "-I#{Formula["openjpeg"].opt_include}/openjpeg-#{opj_ver}"

      inreplace "poppler.pc.in", "Cflags: -I${includedir}/poppler",
                "Cflags: -I${includedir}/poppler -I${includedir}"

      system "./configure", "--disable-dependency-tracking",
             "--prefix=#{libexec}/poppler",
             "--enable-xpdf-headers",
             "--enable-poppler-glib",
             "--disable-gtk-test",
             "--enable-introspection=no",
             "--disable-poppler-qt4"
      system "make", "install"
      resource("poppler-data").stage do
        system "make", "install", "prefix=#{libexec}/poppler"
      end
    end

    ENV.deparallelize

    inreplace "configure", "stdlib=libstdc", "stdlib=libc"
    inreplace "configure", "-std=c++0x", ""
    # inreplace "port/cpl_string.h", /#ifndef HAVE_CXX11([^#]+)#endif/, "\\1"

    # configure GDAL/OGR with minimal drivers
    system "./configure", *configure_args

    # PDF driver needs memory driver object files
    cd "ogr/ogrsf_frmts/mem" do
      system "make"
    end

    cd "frmts/pdf" do
      system "make", "plugin"
      mv "gdal_PDF.dylib", "#{gdal_plugins}/"
    end
  end

  def caveats; <<~EOS
      This formula provides a plugin that allows GDAL or OGR to access geospatial
      data stored in its format. In order to use the shared plugin, you may need
      to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins
    EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    out = shell_output("#{gdal_opt_bin}/gdalinfo --formats")
    assert_match "PDF -raster,vector- (rw+s): Geospatial PDF", out
  end
end


================================================
FILE: Formula/osgeo-gdal-python.rb
================================================
class OsgeoGdalPython < Formula
  def self.gdal
    Formula["osgeo-gdal"]
  end

  def gdal
    self.class.gdal
  end

  def self.gdal_opts
    tab = Tab.for_formula(gdal)
    tab.used_options
  end

  def gdal_opts
    self.class.gdal_opts
  end

  def self.gdal_python(python)
    py_ver = Language::Python.major_minor_version(python)
    gdal.opt_lib/"python#{py_ver}"
  end

  def self.gdal_py3_exist?
    gdal_python("python").exist?
  end

  desc "Python bindings for GDAL: Geospatial Data Abstraction Library"
  homepage "https://pypi.python.org/pypi/GDAL"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"

  #revision 2 

  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "8e2ddaec0874f61df018c622cbf465985ae4dde2171d280464d15d02c72af192" => :catalina
    sha256 "8e2ddaec0874f61df018c622cbf465985ae4dde2171d280464d15d02c72af192" => :mojave
    sha256 "8e2ddaec0874f61df018c622cbf465985ae4dde2171d280464d15d02c72af192" => :high_sierra
  end

  keg_only "older version of gdal is in main tap and installs similar components"

  depends_on "swig" => :build
  depends_on "python" => :recommended
  depends_on "numpy"
  depends_on "osgeo-gdal"

  resource "autotest" do
    url "https://download.osgeo.org/gdal/3.1.2/gdalautotest-3.1.2.tar.gz"
    sha256 "bf2b87acc8db0d59a3e44302a0e3b749dcd50ee642843f96c3db35b7e9ccb215"
  end

  def install

    cd "swig/python" do
      # Customize to gdal install opt_prefix
      inreplace "setup.cfg" do |s|
        s.sub! "../../apps/gdal-config", "#{gdal.opt_bin}/gdal-config"
      end
      ENV.prepend "LDFLAGS", "-L#{gdal.opt_lib}" # or gdal1 lib will be found

      # Check for GNM support
      (Pathname.pwd/"setup_vars.ini").write "GNM_ENABLED=yes\n" unless gdal_opts.include? "without-gnm"

      python_version = Language::Python.major_minor_version "python3"

      system "python3", *Language::Python.setup_install_args(prefix)
      system "echo", "#{opt_prefix}/lib/python#{python_version}/site-packages",
             ">", "#{lib}/python#{python_version}/site-packages/#{name}.pth"

      # Scripts compatible with Python3? Appear to be...
      bin.install Dir["scripts/*"]
      # Clean up any stray doxygen files.
      Dir.glob("#{bin}/*.dox") { |p| rm p }
      # Add sample Python scripts
      (libexec/"bin").install Dir["samples/*"]
      chmod 0555, Dir[libexec/"bin/*.py"] # some randomly have no exec bit set
    end
  end

  def caveats; <<~EOS
    Sample Python scripts installed to:
      #{opt_libexec}/bin

    To run full test suite use:
      `brew test -v #{name} --with-autotest`
    EOS
  end

  test do
    python_version = Language::Python.major_minor_version "python3"

    next unless (lib/"python#{python_version}/site-packages").exist?
    ENV["PYTHONPATH"] = lib/"python#{python_version}/site-packages"
    pkgs = %w[gdal ogr osr gdal_array gdalconst]
    pkgs << "gnm" unless gdal_opts.include? "without-gnm"
    system "python3", "-c", "from osgeo import #{pkgs.join ","}"

    if ENV["GDAL_AUTOTEST"]
      ENV.prepend_path "PATH", gdal.opt_bin.to_s
      ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
      ENV["GDAL_DATA"] = "#{gdal.opt_share}/gdal"
      ENV["GDAL_DOWNLOAD_TEST_DATA"] = "YES"
      # These driver tests cause hard failures, stopping test output
      ENV["GDAL_SKIP"] = "GRASS"
      ENV["OGR_SKIP"] = "ElasticSearch,GFT,OGR_GRASS"
      Language::Python.each_python(build) do |python, python_version|
        ENV["PYTHONPATH"] = opt_lib/"python#{python_version}/site-packages"
        resource("autotest").stage do
          # Split up tests, to reduce chance of execution expiration
          # ogr gcore gdrivers osr alg gnm utilities pyscripts
          %w[ogr gcore gdrivers osr alg gnm utilities pyscripts].each do |t|
            begin
              system "python3", "run_all.py", t.to_s
            rescue
              next
            end
          end
        end
        # Run autotest just once, with first found binding
        break
      end
    else
      ohai "To run full test suite use:\n\n    `GDAL_AUTOTEST=1 brew test -v #{name}`\n"
    end
  end
end


================================================
FILE: Formula/osgeo-gdal-sosi.rb
================================================
class OsgeoGdalSosi < Formula
  desc "GDAL/OGR 3.x plugin for SOSI driver"
  homepage "https://trac.osgeo.org/gdal/wiki/SOSI"
  url "https://download.osgeo.org/gdal/3.1.1/gdal-3.1.1.tar.xz"
  sha256 "97154a606339a6c1d87c80fb354d7456fe49828b2ef9a3bc9ed91771a03d2a04"

  #revision 1
  
  head "https://github.com/OSGeo/gdal.git", :branch => "master"

  #bottle do
  #  root_url "https://bottle.download.osgeo.org"
  #  cellar :any
  #  sha256 "15712928f08930894519dbb44294fd3747c4504ce99b5d3f3498ea1771bebfb8" => :catalina
  #  sha256 "15712928f08930894519dbb44294fd3747c4504ce99b5d3f3498ea1771bebfb8" => :mojave
  #  sha256 "15712928f08930894519dbb44294fd3747c4504ce99b5d3f3498ea1771bebfb8" => :high_sierra
  #end

  depends_on "osgeo-fyba"
  depends_on "osgeo-gdal"

  def gdal_majmin_ver
    gdal_ver_list = Formula["osgeo-gdal"].version.to_s.split(".")
    "#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def gdal_plugins_subdirectory
    "gdalplugins/#{gdal_majmin_ver}"
  end

  def install
    ENV.cxx11
    fyba_opt = Formula["osgeo-fyba"].opt_prefix

    gdal_plugins = lib/gdal_plugins_subdirectory
    gdal_plugins.mkpath

    # cxx flags
    args = %W[-DLINUX -DUNIX -Iport -Igcore -Iogr
              -Iogr/ogrsf_frmts -Iogr/ogrsf_frmts/generic
              -Iogr/ogrsf_frmts/sosi -I#{fyba_opt}/include/fyba]

    # source files
    Dir["ogr/ogrsf_frmts/sosi/ogrsosi*.c*"].each do |src|
      args.concat %W[#{src}]
    end

    # plugin dylib
    dylib_name = "ogr_SOSI.dylib"
    args.concat %W[
      -dynamiclib
      -install_name #{opt_lib}/#{gdal_plugins_subdirectory}/#{dylib_name}
      -current_version #{version}
      -compatibility_version #{gdal_majmin_ver}.0
      -o #{gdal_plugins}/#{dylib_name}
      -undefined dynamic_lookup
    ]

    # ld flags
    args.concat %W[-L#{fyba_opt}/lib -lfyba -lfygm -lfyut]

    # build and install shared plugin
    system ENV.cxx, *args
  end

  def caveats; <<~EOS
      This formula provides a plugin that allows GDAL or OGR to access geospatial
      data stored in its format. In order to use the shared plugin, you may need
      to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins
    EOS
  end

  test do
    ENV["GDAL_DRIVER_PATH"] = "#{HOMEBREW_PREFIX}/lib/gdalplugins"
    gdal_opt_bin = Formula["osgeo-gdal"].opt_bin
    out = shell_output("#{gdal_opt_bin}/ogrinfo --formats")
    assert_match "SOSI -vector- (ro)", out
  end
end


================================================
FILE: Formula/osgeo-gdal.rb
================================================
class Unlinked < Requirement
  fatal true

  satisfy(:build_env => false) { !core_gdal_linked }

  def core_gdal_linked
    Formula["gdal"].linked_keg.exist?
  rescue
    return false
  end

  def message
    s = "\033[31mYou have other linked versions!\e[0m\n\n"

    s += "Unlink with \e[32mbrew unlink gdal\e[0m or remove with brew \e[32muninstall --ignore-dependencies gdal\e[0m\n\n" if core_gdal_linked
    s
  end
end

class OsgeoGdal < Formula
  desc "GDAL: Geospatial Data Abstraction Library"
  homepage "https://www.gdal.org/"
  url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz"
  sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641"
  #url "https://github.com/OSGeo/gdal.git",
  #  :branch => "release/3.1",
  #  :commit => "a9e385e76d8f4e7891d10adf1fc99fe3a4a89602"
  #version "3.1.2"

  revision 2  

  head do
    url "https://github.com/OSGeo/gdal.git", :branch => "master"
    depends_on "doxygen" => :build
  end

  bottle do
    root_url "https://bottle.download.osgeo.org"
    rebuild 1
    sha256 "5c0cfe587fff624ed20d33db5ffbf2c7f9bc9af026a9bcecf795b1a07193925d" => :catalina
    sha256 "5c0cfe587fff624ed20d33db5ffbf2c7f9bc9af026a9bcecf795b1a07193925d" => :mojave
    sha256 "5c0cfe587fff624ed20d33db5ffbf2c7f9bc9af026a9bcecf795b1a07193925d" => :high_sierra
  end

  # keg_only "gdal is already provided by homebrew/core"
  # we will verify that other versions are not linked
  depends_on Unlinked

  option "with-pg10", "Build with PostgreSQL 10 client"
  option "with-pg11", "Build with PostgreSQL 11 client"
  #deprecated_option "with-postgresql10" => "with-pg10"

  depends_on "pkg-config" => :build
  depends_on "armadillo"
  depends_on "ant"
  #depends_on "cryptopp"
  depends_on "curl-openssl"
  depends_on "expat"
  depends_on "freexl"
  depends_on "geos"
  depends_on "giflib"
  depends_on "json-c"
  depends_on "mdbtools"
  depends_on "numpy"
  depends_on "libiconv"
  depends_on "osgeo-libkml"
  depends_on "libpq"
  depends_on "osgeo-libspatialite"
  depends_on "libzip"
  depends_on "pcre" # for REGEXP operator in SQLite/Spatialite driver
  depends_on "openssl"
  depends_on "qhull"
  depends_on "sfcgal"
  depends_on "sqlite" # To ensure compatibility with SpatiaLite.
  depends_on "swig"
  depends_on "zlib"
  
  depends_on "openjdk" => :build
  
  # Raster libraries
  depends_on "cfitsio"
  depends_on "epsilon"
  depends_on "osgeo-hdf4"
  depends_on "hdf5"
  #depends_on "jpeg"
  depends_on "jpeg-turbo"
  depends_on "jasper"
  depends_on "libdap"
  #depends_on "osgeo-libgeotiff"
  depends_on "libpng"
  #depends_on "libtiff"
  depends_on "libxml2"
  depends_on "osgeo-netcdf" # Also brings in HDF5
  depends_on "openjpeg"
  depends_on "webp"
  depends_on "zstd"

  # Vector libraries
  depends_on "unixodbc" # OS X version is not complete enough
  depends_on "xerces-c"

  # Other libraries
  depends_on "xz" # get liblzma compression algorithm library from XZutils

  # depends_on "charls" # cask

  depends_on "osgeo-proj"

  if build.with?("pg10")
    depends_on "osgeo-postgresql@10"
  elsif build.with?("pg11")
    depends_on "osgeo-postgresql@11"
  else
    depends_on "osgeo-postgresql"
  end

  # use: osgeo-gdal-pdf
  # depends_on "poppler"

  # use: osgeo-gdal-python
  # depends_on "python"
  # depends_on "python@2"

  # - Base configuration
  # - GDAL native backends
  # - Supported backends: optional Homebrew packages supporting additional formats.
  # - Unsupported backends: The libraries are either proprietary, not available for public
  #   download or have no stable version in the Homebrew core that is
  #   compatible with GDAL. Interested users will have to install such software
  #   manually and most likely have to tweak the install routine.
  # - GRASS backend explicitly disabled.  Creates a chicken-and-egg problem.
  #   Should be installed separately after GRASS installation using the
  #   official GDAL GRASS plugin.
  # - Python is installed manually to ensure everything is properly sandboxed
  # - All PDF driver functionality moved to gdal2-pdf plugin
  #   Older pdfium (for gdal driver) is still built against libstdc++ and
  #   causes the base build to be built like that as well.
  #   See: https://github.com/rouault/pdfium
  # - Database support

    # Fix build with Jasper.
  # Remove on next release.
  # https://github.com/OSGeo/gdal/issues/2844
  patch :p2 do
    url "https://github.com/OSGeo/gdal/commit/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch?full_index=1"
    sha256 "54e10575646666f31fb2a87b7fc5b2831282fe2fa08642231e94fdee1fee8374"
  end

  patch :p2 do
    url "https://github.com/OSGeo/gdal/commit/e236eeaed1be45a4af457565085e3db1f2fc489f.patch?full_index=1"
    sha256 "5b582258a556d96712761932bf94dbd3343a7a0ac61bb53c6c83a7ba4c962fe5"
  end

  def configure_args
    args = [
      "--prefix=#{prefix}",
      "--disable-debug",
      "--with-local=#{prefix}",
      "--with-proj=#{Formula["osgeo-proj"].opt_prefix}",
      "--with-dods-root=#{Formula["libdap"].opt_prefix}", # #{HOMEBREW_PREFIX}
      "--with-libtool",
      "--with-bsb",
      "--with-grib",
      "--with-pam",
      "--with-opencl",
      "--with-pcre",
      "--with-threads=yes",
      "--with-java=yes",
      "--with-liblzma=yes",
      "--with-pcidsk=internal",
      "--with-pcraster=internal",
      "--with-qhull=internal",
      "--with-libz=#{Formula["libzip"].opt_prefix}",
      "--with-png=#{Formula["libpng"].opt_prefix}",
      "--with-libtiff=internal", # #{Formula["libtiff"].opt_prefix}
      "--with-geotiff=internal", # #{Formula["osgeo-libgeotiff"].opt_prefix}
      "--with-jpeg=#{Formula["jpeg-turbo"].opt_prefix}",
      "--with-gif=#{Formula["giflib"].opt_prefix}",
      "--with-libjson-c=#{Formula["json-c"].opt_prefix}",
      "--with-libiconv-prefix=#{Formula["libiconv"].opt_prefix}",
      "--with-zstd=#{Formula["zstd"].opt_prefix}",
      "--with-cfitsio=#{Formula["cfitsio"].opt_prefix}",
      "--with-hdf4=#{Formula["osgeo-hdf4"].opt_prefix}",
      "--with-hdf5=#{Formula["hdf5"].opt_prefix}",
      "--with-netcdf=#{Formula["osgeo-netcdf"].opt_prefix}",
      "--with-jasper=#{Formula["jasper"].opt_prefix}", #  or GDAL_SKIP="Jasper"
      "--with-openjpeg=#{Formula["openjpeg"].opt_prefix}",
      "--with-expat=#{Formula["expat"].opt_prefix}",
      "--with-odbc=#{Formula["unixodbc"].opt_prefix}",
      "--with-curl=#{Formula["curl-openssl"].opt_bin}/curl-config",
      "--with-xml2=yes",
      "--with-spatialite=#{Formula["osgeo-libspatialite"].opt_prefix}",
      "--with-sqlite3=#{Formula["sqlite"].opt_prefix}",
      "--with-webp=#{Formula["webp"].opt_prefix}",
      "--with-geos=#{Formula["geos"].opt_bin}/geos-config",
      "--with-freexl=#{Formula["freexl"].opt_prefix}",
      "--with-xerces=#{Formula["xerces-c"].opt_prefix}",
      "--with-libkml=#{Formula["osgeo-libkml"].opt_prefix}",
      "--with-epsilon=#{Formula["epsilon"].opt_prefix}",
      "--with-sfcgal=#{Formula["sfcgal"].opt_bin}/sfcgal-config",
      "--with-armadillo=#{Formula["armadillo"].opt_prefix}",
      "--with-cryptopp=no",
      "--with-crypto=yes",
      "--with-grass=no",
      "--with-libgrass=no",
      "--with-fme=no",
      "--with-ecw=no",
      "--with-kakadu=no",
      "--with-mrsid=no",
      "--with-jp2mrsid=no",
      "--with-msg=no",
      "--with-oci=no",
      "--with-ingres=no",
      "--with-idb=no",
      "--with-sde=no",
      "--with-perl=no",
      "--with-python=no",
      "--with-gta=no",
      "--with-ogdi=no",
      "--with-sosi=no",
      "--with-mongocxx=no",
      "--with-fgdb=no",
      "--with-mrsid_lidar=no",
      "--with-gnm",
      "--with-mysql=no",
      "--with-pg=yes",
      "--with-poppler=no",
      "--with-podofo=no",
      "--with-pdfium=no",
      "--with-kea=no",
      "--with-teigha=no",
      "--with-mdb=no",
      "--with-dds=no",
      "--with-hdfs=no",
      "--with-j2lura=no",
      "--with-rasterlite2=no",
      "--with-rasdaman=no",
      # "--with-charls",

      # "--with-boost-lib-path",
      # "--with-mongocxxv3",
      # "--with-teigha-plt",
      # "--with-jvm-lib",
      # "--with-jvm-lib-add-rpath",
      # "--with-cpp14",
      # "--with-pic",
      # "--with-aix-soname",
      # "--with-gnu-ld",
      # "--with-sysroot",
      # "--with-unix-stdio-64",
      # "--with-sse",
      # "--with-ssse3",
      # "--with-avx",
      # "--with-hide-internal-symbols",
      # "--with-rename-internal-libtiff-symbols",
      # "--with-rename-internal-libgeotiff-symbols",
      # "--with-rename-internal-shapelib-symbols",
      # "--with-gnu-ld",
      # "--with-spatialite-soname",
      # "--with-sde-version",
      # "--with-gdal-ver",
      # "--with-macosx-framework",
      # "--with-null",
      # "--with-podofo-lib",
      # "--with-podofo-extra-lib-for-test",
      # "--with-pdfium-lib",
      # "--with-pdfium-extra-lib-for-test",
      # "--with-xerces-inc",
      # "--with-xerces-lib",
      # "--with-expat-inc",
      # "--with-expat-lib",
      # "--with-libkml-inc",
      # "--with-libkml-lib",
      # "--with-oci-include",
      # "--with-oci-lib",
      # "--with-opencl-include",
      # "--with-opencl-lib",

      "--without-jpeg12", # Needs specially configured JPEG and TIFF libraries
      # "--without-lerc",
      # "--without-libtool",
      # "--without-ld-shared",
      # "--without-libiconv-prefix",
      # "--without-pam",
      # "--without-php",
      # "--without-dwgdirect",
      # "--without-ruby",
    ]
    args
  end

  def plugins_subdirectory
    gdal_ver_list = version.to_s.split(".")
    "gdalplugins/#{gdal_ver_list[0]}.#{gdal_ver_list[1]}"
  end

  def install
    # Temporary fix for Xcode/CLT 9.0.x issue of missing header files
    # See: https://github.com/OSGeo/homebrew-osgeo4mac/issues/276
    # Work around "error: no member named 'signbit' in the global namespace"
    if DevelopmentTools.clang_build_version >= 900
      ENV.delete "SDKROOT"
      ENV.delete "HOMEBREW_SDKROOT"
    end

    # Linking flags for SQLite are not added at a critical moment when the GDAL
    # library is being assembled. This causes the build to fail due to missing
    # symbols. Also, ensure Homebrew SQLite is used so that Spatialite is
    # functional
    # Fortunately, this can be remedied using LDFLAGS
    sqlite = Formula["sqlite"]
    ENV.append "LDFLAGS", "-L#{sqlite.opt_lib} -lsqlite3"
    ENV.append "CFLAGS", "-I#{sqlite.opt_include}"

    # Reset ARCHFLAGS to match how we build
    ENV["ARCHFLAGS"] = "-arch #{Hardware::CPU.arch}"

    # chdir "gdal" do
      # GDAL looks for the renamed hdf4 library, which is an artifact of old builds, so we need to repoint it
      inreplace "configure", "-ldf", "-lhdf"

      # These libs are statically linked in libkml-dev and libkml formula
      inreplace "configure", " -lminizip -luriparser", ""

      # All PDF driver functionality moved to osgeo-gdal-pdf plugin,
      # so nix default internal-built PDF w+ driver, which keeps plugin from loading.
      # Just using --enable-pdf-plugin isn't enough (we don't want the plugin built here)
      # inreplace "GDALmake.opt.in", "PDF_PLUGIN),yes", "PDF_PLUGIN),no"
      # https://github.com/OSGeo/gdal/commit/20716436ce5debca66cbbe0396304e09b79bc3aa#diff-adc90aa0203327969e0048718b911252

      args = configure_args

      system "./configure", *args
      system "make"
      system "make", "install"

      # Add GNM headers for osgeo-gdal-python swig wrapping
      include.install Dir["gnm/**/*.h"]

      cd "swig/java" do
        inreplace "java.opt", "linux", "darwin"
        inreplace "java.opt", "#JAVA_HOME = /usr/lib/jvm/java-6-openjdk/", "JAVA_HOME=#{ENV["JAVA_HOME"]}"
        system "make"
        system "make", "install"

        # Install the jar that complements the native JNI bindings
        lib.install "gdal.jar"
      end

      system "make", "man" if build.head?
      system "make", "install-man"
      # Clean up any stray doxygen files.
      Dir.glob("#{bin}/*.dox") { |p| rm p }
    # end
  end

  def post_install
    # Create versioned plugins path for other formulae
    (HOMEBREW_PREFIX/"lib/#{plugins_subdirectory}").mkpath
  end

  def caveats
    s = <<~EOS
      Plugins for this version of GDAL/OGR, generated by other formulae, should
      be symlinked to the following directory:

        #{HOMEBREW_PREFIX}/lib/#{plugins_subdirectory}

      You may need to set the following enviroment variable:

        export GDAL_DRIVER_PATH=#{HOMEBREW_PREFIX}/lib/gdalplugins

      PYTHON BINDINGS are now built in a separate formula: osgeo-gdal-python
    EOS
    s
  end

  test do
    # basic tests to see if third-party dylibs are loading OK
    system "#{bin}/gdalinfo", "--formats"
    system "#{bin}/ogrinfo", "--formats"
  end
end


================================================
FILE: Formula/osgeo-gmt.rb
================================================
class OsgeoGmt < Formula
  include Language::Python::Virtualenv
  desc "Tools for processing and displaying xy and xyz datasets"
  homepage "https://gmt.soest.hawaii.edu/"
  url "ftp://ftp.soest.hawaii.edu/gmt/gmt-5.4.5-src.tar.gz"
  mirror "https://mirrors.ustc.edu.cn/gmt/gmt-5.4.5-src.tar.xz"
  mirror "https://fossies.org/linux/misc/GMT/gmt-5.4.5-src.tar.xz"
  sha256 "225629c7869e204d5f9f1a384c4ada43e243f83e1ed28bdca4f7c2896bf39ef6"

  revision 2

  bottle do
    root_url "https://bottle.download.osgeo.org"
    rebuild 1
    sha256 "ecf434fbf0e700d50f8d5b304d0ff9d963b94c7f8b66ef65664108bc1676d66e" => :mojave
    sha256 "ecf434fbf0e700d50f8d5b304d0ff9d963b94c7f8b66ef65664108bc1676d66e" => :high_sierra
    sha256 "2dd8acb9ce1d0415001851bc6d24cb63be8f74a75196d3d7d7b611a38dbd1103" => :sierra
  end

  depends_on "cmake" => :build
  depends_on "fftw"
  depends_on "hdf5"
  depends_on "osgeo-netcdf"
  depends_on "pcre"
  depends_on "osgeo-gdal"

  depends_on "zlib"
  depends_on "curl"
  depends_on "openblas"
  depends_on "sphinx"

  depends_on "ghostscript"
  depends_on "graphicsmagick"
  depends_on "subversion"
  depends_on "lapack"
  # depends_on "texlive"

  # Using CFLAGS = -I/Library/Java/JavaVirtualMachines/..
  depends_on "openjdk" => :build

  # OpenMP support: disabled

  resource "gshhg" do
    url "ftp://ftp.soest.hawaii.edu/gmt/gshhg-gmt-2.3.7.tar.gz"
    mirror "https://mirrors.ustc.edu.cn/gmt/gshhg-gmt-2.3.7.tar.gz"
    mirror "https://fossies.org/linux/misc/GMT/gshhg-gmt-2.3.7.tar.gz"
    sha256 "9bb1a956fca0718c083bef842e625797535a00ce81f175df08b042c2a92cfe7f"
  end

  # digital chart of the world polygon map
  resource "dcw" do
    url "ftp://ftp.soest.hawaii.edu/gmt/dcw-gmt-1.1.4.tar.gz"
    mirror "https://mirrors.ustc.edu.cn/gmt/dcw-gmt-1.1.4.tar.gz"
    mirror "https://fossies.org/linux/misc/GMT/dcw-gmt-1.1.4.tar.gz"
    sha256 "8d47402abcd7f54a0f711365cd022e4eaea7da324edac83611ca035ea443aad3"
  end

  # gmt-coast (optional) – coastlines

  resource "Sphinx" do
    url "https://files.pythonhosted.org/packages/2a/86/8e1e8400bb6eca5ed960917952600fce90599e1cb0d20ddedd81ba163370/Sphinx-1.8.5.tar.gz"
    sha256 "c7658aab75c920288a8cf6f09f244c6cfdae30d82d803ac1634d9f223a80ca08"
  end

  def install
    # install python modules
    venv = virtualenv_create(libexec/'vendor', "#{HOMEBREW_PREFIX}/opt/python/bin/python3")

    # venv.pip_install "Sphinx"

    res = resources.map(&:name).to_set - %w[gshhg dcw]
    res.each do |r|
      venv.pip_install resource(r)
    end

    (buildpath/"gshhg").install resource("gshhg")
    (buildpath/"dcw").install resource("dcw")

    args = std_cmake_args.concat %W[
      -DCMAKE_INSTALL_PREFIX=#{prefix}
      -DGSHHG_ROOT=#{buildpath}/gshhg
      -DCOPY_GSHHG:BOOL=TRUE
      -DDCW_ROOT=#{buildpath}/dcw
      -DCOPY_DCW:BOOL=TRUE
      -DFFTW3_ROOT=#{Formula["fftw"].opt_prefix}
      -DGMT_INSTALL_MODULE_LINKS:BOOL=TRUE
      -DGMT_INSTALL_TRADITIONAL_FOLDERNAMES:BOOL=FALSE
      -DLICENSE_RESTRICTED:BOOL=FALSE
    ]

    # args << "-DFLOCK:BOOL=TRUE" # not used by the project
    # args << "-DCMAKE_CXX_FLAGS_RELEASE"

    args << "-DGMT_DOCDIR=#{share}/doc/gmt"
    args << "-DGMT_MANDIR=#{man}"
    # args << "-DGMT_DATADIR=#{share}/gmt"

    args << "-DPCRE_ROOT=#{Formula["pcre"].opt_prefix}" # PCRE_DIR

    args << "-DGDAL_ROOT=#{Formula["osgeo-gdal"].opt_prefix}" # GDAL_DIR

    args << "-DNETCDF_ROOT=#{Formula["osgeo-netcdf"].opt_prefix}" # NETCDF_DIR

    # SPHINX_DIR or SPHINX_ROOT
    # args << "-DSPHINX_EXECUTABLE=#{Formula["sphinx"].opt_bin}" # sphinx-build
    args << "-DSPHINX_EXECUTABLE=#{libexec}/vendor/bin/sphinx-build"

    mkdir "build" do
      system "cmake", "..", *args
      system "make", "install"
    end
  end

  test do
    system "#{bin}/pscoast -R0/360/-70/70 -Jm1.2e-2i -Ba60f30/a30f15 -Dc -G240 -W1/0 -P > test.ps"
    assert_predicate testpath/"test.ps", :exist?
  end
end


================================================
FILE: Formula/osgeo-gpkgtools.rb
================================================
require 'formula'

class OsgeoGpkgtools < Formula
  desc "Some tools for the GeoPackage mapping (vector, tiles and raster) container"
  homepage 'https://launchpad.net/gpkgtools'

  revision 1

  head "lp:gpkgtools", :using => :bzr

  depends_on 'osgeo-libspatialite'
  depends_on "python@2"

  resource "Pillow" do
    url "https://files.pythonhosted.org/packages/81/1a/6b2971adc1bca55b9a53ed1efa372acff7e8b9913982a396f3fa046efaf8/Pillow-6.0.0.tar.gz"
    sha256 "809c0a2ce9032cbcd7b5313f71af4bdc5c8c771cb86eb7559afd954cab82ebb5"
  end

  def install
    head_ext = "#{HOMEBREW_PREFIX}/Cellar/osgeo-libspatialite/HEAD/lib/spatialite.dylib"
    unless File.exist? head_ext
      odie <<~EOS
        No osgeo-libspatialite HEAD build or SQLite3 extension 'spatialite.dylib' exists.
        Install osgeo-libspatialite using --HEAD and --with-geopackage options'.
        NOTE: To experiment with the HEAD build, but already have osgeo-libspatialite
              installed, do the following:
                `brew upgrade osgeo-libspatialite --HEAD --with-geopackage`
                `brew list --versions osgeo-libspatialite` (note non-HEAD version)
                `brew switch osgeo-libspatialite <non-HEAD version>`
      EOS
    end

    resource("Pillow").stage { system "python", *Language::Python.setup_install_args(libexec/"vendor") }

    cd 'gpkgtools' do
      inreplace %w[util_sqlite.py GeoPackage.py] do |s|
        s.sub! 'from pysqlite2', '#from pysqlite2'
        s.sub! '#import sqlite3', 'import sqlite3'
        s.sub! /load_extension\(.*spatialite"\)/, "load_extension('#{head_ext}')"
      end
    end

    (lib/python.xy/'site-packages').install 'gpkgtools'
    bin.install Dir['*gpkg*']
    prefix.install %w[tests testdata]
  end

  test do
    cd "#{opt_prefix}" do
      system 'python', 'tests/geonames.py'
    end
  end
end


================================================
FILE: Formula/osgeo-grass.rb
================================================
class OsgeoGrass < Formula
  include Language::Python::Virtualenv

  desc "Geographic Resources Analysis Support System"
  homepage "https://grass.osgeo.org/"

  revision 7

  # svn: E230001: Server SSL certificate verification failed: issuer is not trusted
  # head "https://svn.osgeo.org/grass/grass/trunk", :using => :svn
  # head "svn://svn.osgeo.org/grass/grass/trunk"
  # head "https://github.com/GRASS-GIS/grass-ci.git", :branch => "master"
  head "https://github.com/OSGeo/grass.git", :branch => "master"

  stable do
    #url "https://github.com/OSGeo/grass/archive/7.8.2.tar.gz"
    #sha256 "07b69e2fe0678bca29d9303a90eaf4a29dddcfa97fa92e056e214f0415629b6d"
    url "https://github.com/OSGeo/grass.git",
    :branch => "releasebranch_7_8",
    :commit => "8bcecc9a609bff0184519b124df17fb38e1195a5"
    version "7.8.3"

    # Patches to keep files from being installed outside of the prefix.
    # Remove lines from Makefile that try to install to /Library/Documentation.
    # no_symbolic_links
    patch :DATA
  end

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "a7f144c886435ab9c4fab9f3096882709f00b319d476648f42a145b3531de1a7" => :catalina
    sha256 "a7f144c886435ab9c4fab9f3096882709f00b319d476648f42a145b3531de1a7" => :mojave
    sha256 "a7f144c886435ab9c4fab9f3096882709f00b319d476648f42a145b3531de1a7" => :high_sierra
  end

  option "without-gui", "Build without WxPython interface. Command line tools still available"
  option "with-aqua", "Build with experimental Aqua GUI backend"
  option "with-app", "Build GRASS.app Package"
  option "with-avce00", "Build with AVCE00 support: Make Arc/Info (binary) Vector Coverages appear as E00"
  option "with-pg11", "Build with PostgreSQL 11 client"
  option "with-mysql", "Build with MySQL client"
  option "with-others", "Build with other optional dependencies"
  # option "with-openmp", "Build with openmp support"
  # option "with-opendwg", "Build with OpenDWG support"
  # option "with-pdal", "Build with PDAL support" # Build - Error: /vector/v.in.pdal

  depends_on "autoconf" => :build
  depends_on "automake" => :build
  depends_on "pkg-config" => :build
  depends_on "fftw" => :recommended
  depends_on "tcl-tk" => :recommended
  depends_on "python"
  depends_on "boost"
  depends_on "libiconv"
  depends_on "bison"
  depends_on "cairo"
  depends_on "flex"
  depends_on "freetype"
  depends_on "gettext"
  depends_on "ghostscript"
  depends_on "libtiff"
  depends_on "libpng"
  depends_on "sqlite"
  depends_on "regex-opt"
  depends_on "geos"
  depends_on "readline"
  depends_on "lapack"
  depends_on "openblas"
  depends_on "bzip2"
  depends_on "zlib"
  depends_on "unixodbc"
  depends_on "wxmac"
  depends_on "wxpython"
  depends_on "zstd"
  depends_on "lbzip2"
  depends_on "xz"
  depends_on "byacc" # yacc
  depends_on "subversion" # for g.extension
  depends_on "openjpeg" # for Pillow
  depends_on "osgeo-netcdf"
  depends_on "osgeo-proj"
  depends_on "osgeo-gdal"
  depends_on "osgeo-gdal-python"
  depends_on "osgeo-libgeotiff"

  # matplotlib
  depends_on "py3cairo"
  depends_on "pygobject3"
  # depends_on "pygobject" # Does not support Python 3, and needs pygtk which has been removed.
  depends_on "pyqt"
  depends_on "osgeo-six"
  depends_on "numpy"
  depends_on "scipy"
  depends_on "osgeo-matplotlib"

  # optional dependencies
  #depends_on "osgeo-liblas"
  depends_on "mysql" if build.with? "mysql"
  #depends_on "r"
  depends_on "avce00" => :optional # avcimport
  # depends_on "libomp" if build.with? "openmp"
  # depends_on "osgeo-pdal"

  if build.with?("pg11")
    depends_on "osgeo-postgresql@11"
  else
    depends_on "osgeo-postgresql"
  end

  depends_on :x11 if build.without? "aqua" # needs to find at least X11/include/GL/gl.h

  # other dependencies
  if build.with? "others"
    depends_on "gpsbabel"
    depends_on "netpbm" # mpeg_encode or ppmtompeg
    depends_on "openssl"
    depends_on "swig"
    depends_on "ffmpeg"
    depends_on "ffmpeg2theora"
    depends_on "ffmpegthumbnailer"
    depends_on "libav"
    depends_on "jasper"
    depends_on "wget"
    depends_on "dateutils"
    depends_on "gsl"
    depends_on "ncurses"
    depends_on "gdbm"
    depends_on "mesa"
    depends_on "mesalib-glw"
    depends_on "desktop-file-utils"
    depends_on "fontconfig"
    depends_on "openmotif" # or lesstif
    depends_on "libjpeg-turbo"
    depends_on "cfitsio"
    depends_on "imagemagick"
    depends_on "gd"
    # depends_on "mariadb-connector-c"
    # depends_on "mariadb"
  end

  def headless?
    # The GRASS GUI is based on WxPython.
    build.without? "gui"
  end

  def majmin_ver
    ver_split = version.to_s.split(".")
    ver_split[0] + ver_split[1]
  end

  resource "setuptools" do
    url "https://files.pythonhosted.org/packages/42/3e/2464120172859e5d103e5500315fb5555b1e908c0dacc73d80d35a9480ca/setuptools-45.1.0.zip"
    sha256 "91f72d83602a6e5e4a9e4fe296e27185854038d7cbda49dcd7006c4d3b3b89d5"
  end

  resource "pip" do
    url "https://files.pythonhosted.org/packages/8e/76/66066b7bc71817238924c7e4b448abdb17eb0c92d645769c223f9ace478f/pip-20.0.2.tar.gz"
    sha256 "7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f"
  end

  resource "wheel" do
    url "https://files.pythonhosted.org/packages/75/28/521c6dc7fef23a68368efefdcd682f5b3d1d58c2b90b06dc1d0b805b51ae/wheel-0.34.2.tar.gz"
    sha256 "8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96"
  end

  resource "Pillow" do
    url "https://files.pythonhosted.org/packages/39/47/f28067b187dd664d205f75b07dcc6e0e95703e134008a14814827eebcaab/Pillow-7.0.0.tar.gz"
    sha256 "4d9ed9a64095e031435af120d3c910148067087541131e82b3e8db302f4c8946"
  end

  resource "ply" do
    url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz"
    sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3"
  end

  resource "argparse" do
    url "https://files.pythonhosted.org/packages/18/dd/e617cfc3f6210ae183374cd9f6a26b20514bbb5a792af97949c5aacddf0f/argparse-1.4.0.tar.gz"
    sha256 "62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4"
  end

  resource "python-dateutil" do
    url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz"
    sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"
  end

  # resource "six" do
  #   url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz"
  #   sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a"
  # end

  resource "PyOpenGL" do
    url "https://files.pythonhosted.org/packages/b8/73/31c8177f3d236e9a5424f7267659c70ccea604dab0585bfcd55828397746/PyOpenGL-3.1.5.tar.gz"
    sha256 "4107ba0d0390da5766a08c242cf0cf3404c377ed293c5f6d701e457c57ba3424"
  end

  resource "psycopg2" do
    url "https://files.pythonhosted.org/packages/84/d7/6a93c99b5ba4d4d22daa3928b983cec66df4536ca50b22ce5dcac65e4e71/psycopg2-2.8.4.tar.gz"
    sha256 "f898e5cc0a662a9e12bde6f931263a1bbd350cfb18e1d5336a12927851825bb6"
  end

  resource "termcolor" do
    url "https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz"
    sha256 "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"
  end

  # for matplotlib

  resource "cycler" do
    url "https://files.pythonhosted.org/packages/c2/4b/137dea450d6e1e3d474e1d873cd1d4f7d3beed7e0dc973b06e8e10d32488/cycler-0.10.0.tar.gz"
    sha256 "cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8"
  end

  resource "kiwisolver" do
    url "https://files.pythonhosted.org/packages/16/e7/df58eb8868d183223692d2a62529a594f6414964a3ae93548467b146a24d/kiwisolver-1.1.0.tar.gz"
    sha256 "53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75"
  end

  resource "pyparsing" do
    url "https://files.pythonhosted.org/packages/a2/56/0404c03c83cfcca229071d3c921d7d79ed385060bbe969fde3fd8f774ebd/pyparsing-2.4.6.tar.gz"
    sha256 "4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f"
  end

  resource "pytz" do
    url "https://files.pythonhosted.org/packages/82/c3/534ddba230bd4fbbd3b7a3d35f3341d014cca213f369a9940925e7e5f691/pytz-2019.3.tar.gz"
    sha256 "b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be"
  end

  # resource "tornado" do
  #   url "https://files.pythonhosted.org/packages/e6/78/6e7b5af12c12bdf38ca9bfe863fcaf53dc10430a312d0324e76c1e5ca426/tornado-5.1.1.tar.gz"
  #   sha256 "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409"
  # end

  resource "tornado" do
    url "https://files.pythonhosted.org/packages/30/78/2d2823598496127b21423baffaa186b668f73cd91887fcef78b6eade136b/tornado-6.0.3.tar.gz"
    sha256 "c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9"
  end

  resource "cairocffi" do
    url "https://files.pythonhosted.org/packages/f7/99/b3a2c6393563ccbe081ffcceb359ec27a6227792c5169604c1bd8128031a/cairocffi-1.1.0.tar.gz"
    sha256 "f1c0c5878f74ac9ccb5d48b2601fcc75390c881ce476e79f4cfedd288b1b05db"
  end

  resource "subprocess32" do
    url "https://files.pythonhosted.org/packages/32/c8/564be4d12629b912ea431f1a50eb8b3b9d00f1a0b1ceff17f266be190007/subprocess32-3.5.4.tar.gz"
    sha256 "eb2937c80497978d181efa1b839ec2d9622cf9600a039a79d0e108d1f9aec79d"
  end

  resource "backports.functools_lru_cache" do
    url "https://files.pythonhosted.org/packages/ad/2e/aa84668861c3de458c5bcbfb9813f0e26434e2232d3e294469e96efac884/backports.functools_lru_cache-1.6.1.tar.gz"
    sha256 "8fde5f188da2d593bd5bc0be98d9abc46c95bb8a9dde93429570192ee6cc2d4a"
  end

  # resource "numpy" do
  #   url "https://files.pythonhosted.org/packages/40/de/0ea5092b8bfd2e3aa6fdbb2e499a9f9adf810992884d414defc1573dca3f/numpy-1.18.1.zip"
  #   sha256 "b6ff59cee96b454516e47e7721098e6ceebef435e3e21ac2d6c3b8b02628eb77"
  # end

  # python version >= 3.5 required
  # resource "scipy" do
  #   url "https://files.pythonhosted.org/packages/04/ab/e2eb3e3f90b9363040a3d885ccc5c79fe20c5b8a3caa8fe3bf47ff653260/scipy-1.4.1.tar.gz"
  #   sha256 "dee1bbf3a6c8f73b6b218cb28eed8dd13347ea2f87d572ce19b289d6fd3fbc59"
  # end

  # "error: no member named 'signbit' in the global namespace"
  # resource "matplotlib" do
  #   url "https://github.com/matplotlib/matplotlib/archive/v2.2.5.tar.gz"
  #   sha256 "75e9de4e4e47ae4cb23393e9df9431424d5034da77771d598ff14363d6a51dd1"
  # end

  # resource "matplotlib" do
  #   url "https://github.com/matplotlib/matplotlib/archive/v3.1.3.tar.gz"
  #   sha256 "6edfe021671fcad1bd6081c980c380cb3d66d00895eb8c3450fa3842c441d1d1"
  # end

  # resource "wxPython" do
  #   url "https://files.pythonhosted.org/packages/b9/8b/31267dd6d026a082faed35ec8d97522c0236f2e083bf15aff64d982215e1/wxPython-4.0.7.post2.tar.gz"
  #   sha256 "5a229e695b64f9864d30a5315e0c1e4ff5e02effede0a07f16e8d856737a0c4e"
  # end

  def install
    # Work around "error: no member named 'signbit' in the global namespace"
    # encountered when trying to detect boost regex in configure
    if DevelopmentTools.clang_build_version >= 900
      ENV.delete "SDKROOT"
      ENV.delete "HOMEBREW_SDKROOT"
    end

    # ENV.append "CPPFLAGS", ""
    # ENV.append "LDFLAGS", "-framework OpenCL"
    # ENV.append "CFLAGS", "-O2 -Werror=implicit-function-declaration"
    if build.with?("mysql")
      ENV["MYSQLD_CONFIG"] = "#{Formula["mysql"].opt_bin}/mysql_config"
    end

    # install python modules
    venv = virtualenv_create(libexec/'vendor', "#{Formula["python"].opt_bin}/python3")
    res = resources.map(&:name).to_set # - %w[python-dateutil]

    # fix pip._vendor.pep517.wrappers.BackendUnavailable
    # system libexec/"vendor/bin/pip3", "install", "--upgrade", "-v", "setuptools", "pip<19.0.0", "wheel"
    # venv.pip_install_and_link "python-dateutil"

    res.each do |r|
      venv.pip_install resource(r)
    end

    # noinspection RubyLiteralArrayInspection
    args = [
      "--with-cxx",
      "--enable-shared",
      "--enable-largefile",
      "--with-nls",
      "--with-includes=#{HOMEBREW_PREFIX}/include",
      "--with-libs=#{HOMEBREW_PREFIX}/LIB",
      "--with-python=#{libexec}/vendor/bin/python-config",
      "--with-tcltk",
      "--with-netcdf=#{Formula["osgeo-netcdf"].opt_bin}/nc-config",
      "--with-zstd",
      "--with-zstd-includes=#{Formula["zstd"].opt_include}",
      "--with-zstd-libs=#{Formula["zstd"].opt_lib}",
      "--with-readline",
      "--with-readline-includes=#{Formula["readline"].opt_include}",
      "--with-readline-libs=#{Formula["readline"].opt_lib}",
      "--with-blas",
      "--with-blas-includes=#{Formula["openblas"].opt_include}",
      "--with-blas-libs=#{Formula["openblas"].opt_lib}",
      "--with-lapack",
      "--with-lapack-includes=#{Formula["lapack"].opt_include}",
      "--with-lapack-libs=#{Formula["lapack"].opt_lib}",
      "--with-geos=#{Formula["geos"].opt_bin}/geos-config",
      "--with-geos-includes=#{Formula["geos"].opt_include}",
      "--with-geos-libs=#{Formula["geos"].opt_lib}",
      "--with-odbc",
      "--with-odbc-includes=#{Formula["unixodbc"].opt_include}",
      "--with-odbc-libs=#{Formula["unixodbc"].opt_lib}",
      "--with-gdal=#{Formula["osgeo-gdal"].opt_bin}/gdal-config",
      "--with-zlib-includes=#{Formula["zlib"].opt_include}",
      "--with-zlib-libs=#{Formula["zlib"].opt_lib}",
      "--with-bzlib",
      "--with-bzlib-includes=#{Formula["bzip2"].opt_include}",
      "--with-bzlib-libs=#{Formula["bzip2"].opt_lib}",
      "--with-cairo",
      "--with-cairo-includes=#{Formula["cairo"].opt_include}/cairo",
      "--with-cairo-libs=#{Formula["cairo"].opt_lib}",
      "--with-cairo-ldflags=-lfontconfig",
      "--with-freetype",
      "--with-freetype-includes=#{Formula["freetype"].opt_include}/freetype2",
      "--with-freetype-libs=#{Formula["freetype"].opt_lib}",
      # "--with-proj",
      "--with-proj-includes=#{Formula["osgeo-proj"].opt_include}",
      "--with-proj-libs=#{Formula["osgeo-proj"].opt_lib}",
      "--with-proj-share=#{Formula["osgeo-proj"].opt_share}/proj",
      "--with-tiff",
      "--with-tiff-includes=#{Formula["libtiff"].opt_include}",
      "--with-tiff-libs=#{Formula["libtiff"].opt_lib}",
      "--with-png",
      "--with-png-includes=#{Formula["libpng"].opt_include}",
      "--with-png-libs=#{Formula["libpng"].opt_lib}",
      "--with-regex",
      # "--with-regex-includes=#{Formula["regex-opt"].opt_lib}",
      # "--with-regex-libs=#{Formula["regex-opt"].opt_lib}",
      "--with-fftw",
      "--with-fftw-includes=#{Formula["fftw"].opt_include}",
      "--with-fftw-libs=#{Formula["fftw"].opt_lib}",
      "--with-sqlite",
      "--with-sqlite-includes=#{Formula["sqlite"].opt_include}",
      "--with-sqlite-libs=#{Formula["sqlite"].opt_lib}"
    ]

    # Disable some dependencies that don't build correctly on older version of MacOS
    args << "--without-fftw" if build.without? "fftw"

    #args << "--with-liblas=#{Formula["osgeo-liblas"].opt_bin}/liblas-config" # if build.with? "liblas"

    args << "--with-postgres"
    if build.with?("pg11")
      args << "--with-postgres-includes=#{Formula["osgeo-postgresql@11"].opt_include}"
      args << "--with-postgres-libs=#{Formula["osgeo-postgresql@11"].opt_lib}"
    else
      args << "--with-postgres-includes=#{Formula["osgeo-postgresql"].opt_include}"
      args << "--with-postgres-libs=#{Formula["osgeo-postgresql"].opt_lib}"
    end

    if build.with?("mysql")
      args << "--with-mysql"
      args << "--with-mysql-includes=#{Formula["mysql"].opt_include}/mysql"
      args << "--with-mysql-libs=#{Formula["mysql"].opt_lib}"
    end

    args << "--with-pthread"
    args << "--with-pthread-includes=#{Formula["boost"].opt_include}/boost/thread"
    args << "--with-pthread-libs=#{Formula["boost"].opt_lib}"

    # if build.with? "pdal"
    #   args << "--with-pdal=#{Formula["osgeo-pdal"].opt_bin}/pdal-config"
    # end

    # if build.with? "opendwg"
    #   args << "--with-opendwg"
    #   args << "--with-opendwg-includes="
    #   args << "--with-opendwg-libs="
    # end

    # if build.with? "openmp"
    #   # install openblas --with-openmp
    #   args << "--with-openmp"
    #   args << "--with-openmp-includes=#{Formula["libomp"].opt_include}"
    #   args << "--with-openmp-libs=#{Formula["libomp"].opt_lib}"
    # end

    # if build.with? "opencl"
    #   args << "--with-opencl"
    #   args << "--with-opencl-includes="
    #   args << "--with-opencl-libs="
    # end

    if MacOS.version >= :el_capitan
      # handle stripping of DYLD_* env vars by SIP when passed to utilities;
      # HOME env var is .brew_home during build, so it is still checked for lib
      ln_sf "#{buildpath}/dist.x86_64-apple-darwin#{`uname -r`.strip}/lib", ".brew_home/lib"
    end

    # NoMethodError: undefined method `prefer_64_bit?' for OS::Mac:Module
    # MacOS.prefer_64_bit? is deprecated! There is no replacement.
    # args << "--enable-64bit" if MacOS.prefer_64_bit?
    # args << "--with-macos-archs=#{MacOS.preferred_arch}"

    # unless MacOS::CLT.installed?
    # On Xcode-only systems (without the CLT), we have to help:
    args << "--with-macosx-sdk=#{MacOS.sdk_path}"
    args << "--with-macosx-archs=#{Hardware::CPU.arch}" # Hardware::CPU.universal_archs
    args << "--with-opengl-includes=#{MacOS.sdk_path}/System/Library/Frameworks/OpenGL.framework/Headers"
    # args << "--with-opengl-libs=" # GL
    # args << "--with-opengl-framework="
    # end

    # Enable Aqua GUI, instead of X11
    if build.with? "aqua"
      args.concat [
        "--with-opengl=aqua",
        "--without-glw",
        "--without-motif"
      ]
    end

    if headless?
      args << "--without-wxwidgets"
    else
      wx_paths = formula_site_packages "wxpython"
      ENV.prepend("PYTHONPATH", wx_paths, File::PATH_SEPARATOR) if wx_paths
      args << "--with-wxwidgets=#{Formula["wxmac"].opt_bin}/wx-config"
    end

    system "./configure", "--prefix=#{prefix}", *args
    system "make", "-j", Hardware::CPU.cores, "GDAL_DYNAMIC=" # make and make install must be separate steps.
    system "make", "-j", Hardware::CPU.cores, "GDAL_DYNAMIC=", "install" # GDAL_DYNAMIC set to blank for r.external compatability
  end

  def post_install
    # ensure QGIS's Processing plugin recognizes install
    # 2.14.8+ and other newer QGIS versions may reference just grass.sh
    bin_grass = "#{bin}/grass#{majmin_ver}"
    ln_sf "#{bin_grass}", "#{prefix}/grass#{majmin_ver}/grass#{majmin_ver}.sh"
    ln_sf "#{bin_grass}", "#{prefix}/grass#{majmin_ver}/grass.sh"
    # link so settings in external apps don't need updated on grass version bump
    # in QGIS Processing options, GRASS folder = HOMEBREW_PREFIX/opt/grass7/grass-base
    ln_sf "grass#{majmin_ver}", "#{prefix}/grass-base"
    # Writes a wrapper env script and moves all files to the dst

    # ensure python3 is used
    # for some reason, in this build (v7.6.1_1), the script is not created.
    # bin.env_script_all_files("#{libexec}/bin", :GRASS_PYTHON => "python3")
    # for this reason we move the binary and create another that will call
    # this with the requirements mentioned above.
    mkdir "#{libexec}/bin"
    mv "#{bin}/grass#{majmin_ver}", "#{libexec}/bin/grass#{majmin_ver}"
    # And fix "ValueError: unknown locale: UTF-8"
    # if exist: rm "#{bin}/grass#{majmin_ver}"
    File.open("#{bin}/grass#{majmin_ver}", "w") { |file|
      file << '#!/bin/bash'
      file << "\n"
      file << "export LANG=en_US.UTF-8"
      file << "\n"
      file << "export LC_CTYPE=en_US.UTF-8"
      file << "\n"
      file << "export LC_ALL=en_US.UTF-8"
      file << "\n"
      file << "export GRASS_PREFIX=#{prefix}/grass-base"
      file << "\n"
      file << "export GRASS_SH=/bin/sh"
      file << "\n"
      file << "export GRASS_PROJSHARE=#{Formula["osgeo-proj"].opt_share}"
      file << "\n"
      file << "export GRASS_VERSION=#{version}"
      file << "\n"
      file << "export GRASS_LD_LIBRARY_PATH=#{prefix}/grass#{majmin_ver}/lib"
      file << "\n"
      # file << "export GRASS_PERL=#{Formula["perl"].opt_bin}/perl"
      # file << "\n"
      file << "export PROJ_LIB=#{Formula["osgeo-proj"].opt_lib}"
      file << "\n"
      file << "export GEOTIFF_CSV=#{Formula["osgeo-libgeotiff"].opt_share}/epsg_csv"
      file << "\n"
      file << "export GDAL_DATA=#{Formula["osgeo-gdal"].opt_share}/gdal"
      # file << "\n"
      # file << "export PYTHONHOME=#{Formula["python"].opt_frameworks}/Python.framework/Versions/#{py_ver}:$PYTHONHOME"
      # file << "export R_HOME=#{Formula["r"].opt_bin}/R:$R_HOME"
      # file << "export R_HOME=/Applications/RStudio.app/Contents/MacOS/RStudio:$R_HOME"
      # file << "export R_USER=USER_PROFILE/Documents"
      file << "\n"
      file << "GRASS_PYTHON=python3 exec #{libexec}/bin/grass#{majmin_ver} $@"
      # file << "GISBASE=#{HOMEBREW_PREFIX}/osgeo-grass"
      # file << "PATH=#{PATH}:#{GISBASE}/bin:#{GISBASE}/scripts"
      # file << "MANPATH=#{MANPATH}:#{GISBASE}/man"
    }
    chmod("+x", "#{bin}/grass#{majmin_ver}")
    chmod("+x", "#{libexec}/bin/grass#{majmin_ver}")

    # for "--enable-macosx-app"
    # mkdir - permission denied: /Library/GRASS
    if build.with? "app"
      ("#{prefix}/GRASS7.app/Contents/PkgInfo").write "APPLGRASS"
      mkdir "#{prefix}/GRASS7.app/Contents/Resources"
      cp_r "#{buildpath}/macosx/app/app.icns", "#{prefix}/GRASS7.app/Contents/Resources"

      config = <<~EOS
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
          <key>CFBundleDevelopmentRegion</key>
          <string>English</string>
          <key>CFBundleExecutable</key>
          <string>grass#{majmin_ver}</string>
          <key>CFBundleGetInfoString</key>
          <string>GRASS GIS #{version}</string>
          <key>CFBundleIconFile</key>
          <string>app.icns</string>
          <key>CFBundleIdentifier</key>
          <string>https://grass.osgeo.org/grass#{majmin_ver}/source/</string>
          <key>CFBundleInfoDictionaryVersion</key>
          <string>6.0</string>
          <key>CFBundlePackageType</key>
          <string>APPL</string>
          <key>CFBundleShortVersionString</key>
          <string>GRASS GIS #{version}</string>
          <key>CFBundleSignature</key>
          <string>????</string>
          <key>CFBundleVersion</key>
          <string>#{version}</string>
          <key>NSMainNibFile</key>
          <string>MainMenu.nib</string>
          <key>NSPrincipalClass</key>
          <string>NSApplication</string>
          <key>CFBundleDocumentTypes</key>
          <array>
            <dict>
              <key>CFBundleTypeExtensions</key>
              <array>
                <string>****</string>
              </array>
              <key>CFBundleTypeName</key>
              <string>FolderType</string>
              <key>CFBundleTypeOSTypes</key>
              <array>
                <string>fold</string>
              </array>
              <key>CFBundleTypeRole</key>
              <string>Editor</string>
            </dict>
          </array>
        </dict>
        </plist>
      EOS

      ("#{prefix}/GRASS7.app/Contents/Info.plist").write config

      chdir "#{prefix}/GRASS7.app/Contents" do
        mkdir "MacOS" do
          ln_s "#{bin}/grass#{majmin_ver}", "grass#{majmin_ver}"
        end
      end
    end
  end

  def formula_site_packages(f)
    `#{Formula["python"].opt_bin}/python3 -c "import os, sys, site; sp1 = list(sys.path); site.addsitedir('#{Formula[f].opt_lib}/python3.7/site-packages'); print(os.pathsep.join([x for x in sys.path if x not in sp1]))"`.strip
  end

  def caveats
    s = <<~EOS

      If it is the case that you can change the shebang at the beginning of
      the script to enforce Python 3 usage.

        \e[32m#!/usr/bin/env python\e[0m

      Should be changed into

        \e[32m#!/usr/bin/env python3\e[0m

    EOS

    if headless?
      s += <<~EOS

      This build of GRASS has been compiled without the WxPython GUI.

      The command line tools remain fully functional.

      EOS
    end

    if build.with? "app"
      s += <<~EOS

      You may also symlink \e[32mGRASS.app\e[0m into \e[32m/Applications\e[0m or \e[32m~/Applications\e[0m:

        \e[32mln -Fs `find $(brew --prefix) -name "GRASS.app"` /Applications/GRASS.app\e[0m

      EOS
    end
    s
  end

  test do
    system bin/"grass#{majmin_ver}", "--version"
  end
end

__END__

--- a/configure
+++ b/configure
@@ -6894,7 +6894,7 @@
   ac_save_cflags="$CFLAGS"
   ac_save_cppflags="$CPPFLAGS"
   LIBS="$LIBS $LIBLAS_LIBS"
-  CFLAGS="$CFLAGS $LIBLAS_CFLAGS"
+  CFLAGS="$CFLAGS $LIBLAS_CFLAGS $LIBLAS_INC"
   CPPFLAGS="$CPPFLAGS $LIBLAS_INC"
   for ac_hdr in liblas/capi/liblas.h
 do


--- a/include/Make/Install.make
+++ b/include/Make/Install.make
@@ -114,11 +114,6 @@ real-install: | $(INST_DIR) $(UNIX_BIN)
 	-$(INSTALL) config.status $(INST_DIR)/config.status
 	-$(CHMOD) -R a+rX $(INST_DIR) 2>/dev/null

-ifneq ($(findstring darwin,$(ARCH)),)
-	@# enable OSX Help Viewer
-	@/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
-endif
-
 $(INST_DIR) $(UNIX_BIN):
 	$(MAKE_DIR_CMD) $@

--- a/macosx/app/build_html_user_index.sh
+++ b/macosx/app/build_html_user_index.sh
@@ -140,7 +140,6 @@ else
 #      echo "<tr><td valign=\"top\"><a href=\"$HTMLDIRG/$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX
       # make them local to user to simplify page links
       echo "<tr><td valign=\"top\"><a href=\"global_$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX
-      ln -sf "$HTMLDIRG/$i" global_$i
     done
   done
 fi
@@ -183,8 +182,3 @@ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
 </html>" > $i.html
 done

-# add Help Viewer links in user docs folder
-
-mkdir -p $HOME/Library/Documentation/Help/
-ln -sfh ../../GRASS/$GRASS_MMVER/Modules/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER-addon
-ln -sfh $GISBASE/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER


================================================
FILE: Formula/osgeo-hdf4.rb
================================================
class OsgeoHdf4 < Formula
  homepage "http://www.hdfgroup.org"
  url "https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.14/src/hdf-4.2.14.tar.gz"
  sha256 "2d383e87c8a0ca6a5352adbd1d5546e6cc43dc21ff7d90f93efa644d85c0b14a"

  option "with-fortran", "Build Fortran interface."
  option "with-tests", "Run the test suite (may fail)"

  depends_on "cmake" => :build
  depends_on "pkg-config" => :build
  depends_on "szip" => :recommended
  depends_on "jpeg"
  depends_on "gcc" if build.with? "fortran"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    rebuild 1
    sha256 "e9c44564bd0f3be8a6c7bb0d6f103fd64865a927a16f8ae5fc2b6a8a6e3221d7" => :mojave
    sha256 "e9c44564bd0f3be8a6c7bb0d6f103fd64865a927a16f8ae5fc2b6a8a6e3221d7" => :high_sierra
    sha256 "a7d7759edd6ef51195fe94a77d20a76531c83f1460139acccad37791483ca135" => :sierra
  end

  resource "test_file" do
    url "https://gamma.hdfgroup.org/ftp/pub/outgoing/h4map/data/CT01_Rank6ArraysTablesAttributesGroups.hdf"
    sha256 "e4a610c95ddd1f2247038adf46de354fe902e72b5b72757322d19c362c0d415a"
  end

  def install
    ENV.O0 # Per the release notes, -O2 can cause memory corruption
    ENV["SZIP_INSTALL"] = HOMEBREW_PREFIX

    args = std_cmake_args
    args.concat [
      "-DBUILD_SHARED_LIBS=ON",
      "-DHDF4_BUILD_TOOLS=ON",
      "-DHDF4_BUILD_UTILS=ON",
      "-DHDF4_BUILD_WITH_INSTALL_NAME=ON",
      "-DHDF4_ENABLE_JPEG_LIB_SUPPORT=ON",
      "-DHDF4_ENABLE_NETCDF=OFF", # Conflict. Just install NetCDF for this.
      "-DHDF4_ENABLE_Z_LIB_SUPPORT=ON"
    ]

    # szip has been reported to break linking with GDAL, so it may need to be disabled if you run into errors.
    if build.with? "szip"
      args.concat %W[-DHDF4_ENABLE_SZIP_ENCODING=ON -DHDF4_ENABLE_SZIP_SUPPORT=ON]
    else
      args << "-DHDF4_ENABLE_SZIP_SUPPORT=OFF"
    end

    if build.with? "fortran"
      args.concat %W[-DHDF4_BUILD_FORTRAN=ON -DCMAKE_Fortran_MODULE_DIRECTORY=#{include}]
    else
      args << "-DHDF4_BUILD_FORTRAN=OFF"
    end

    args << "-DBUILD_TESTING=OFF" if build.without? "tests"

    mkdir "build" do
      system "cmake", "..", *args
      system "make", "install"
      system "make", "test" if build.with? "tests"

      # Remove stray nc* artifacts which conflict with NetCDF.
      rm (bin+"ncdump")
      rm (bin+"ncgen")
#      rm (include+"netcdf.inc")
    end
  end

  def caveats; <<~EOS
      HDF4 has been superseeded by HDF5.  However, the API changed
      substantially and some programs still require the HDF4 libraries in order
      to function.
    EOS
  end

  test do
    resource("test_file").stage do
      system "#{opt_prefix}/bin/vshow", "CT01_Rank6ArraysTablesAttributesGroups.hdf"
    end
  end

end


================================================
FILE: Formula/osgeo-hexer.rb
================================================
class OsgeoHexer < Formula
  desc "LAS and OGR hexagonal density and boundary surface generation"
  homepage "https://github.com/hobu/hexer"
  url "https://github.com/hobu/hexer/archive/1.4.0.tar.gz"
  sha256 "886134fcdd75da2c50aa48624de19f5ae09231d5290812ec05f09f50319242cb"

  revision 5

  head "https://github.com/hobu/hexer.git", :branch => "master"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "949ebcb075de3dca10041016a155d53cc130e797b985c4c9a84e3ba817727762" => :catalina
    sha256 "949ebcb075de3dca10041016a155d53cc130e797b985c4c9a84e3ba817727762" => :mojave
    sha256 "949ebcb075de3dca10041016a155d53cc130e797b985c4c9a84e3ba817727762" => :high_sierra
  end

  # Add cmath and limits headers to utils
  # Link with dl for curse on non-win32
  patch :DATA

  option "with-drawing", "Build Cairo-based SVG drawing"

  depends_on "cmake" => :build
  depends_on "osgeo-gdal" => :recommended

  depends_on "cairo" # if build.with? "drawing"

  def install
    args = std_cmake_args
    args << "-DWITH_DRAWING=TRUE" # if build.with? "drawing"

    mkdir "build" do
      system "cmake", "..", *args
      system "make"
      system "make", "install"
    end
  end

  test do
    # TODO
    # system "curse", "--version"
  end
end

__END__

--- a/include/hexer/Utils.hpp
+++ b/include/hexer/Utils.hpp
@@ -15,6 +15,9 @@

 #pragma once

+#include <cmath>
+#include <limits>
+
 namespace hexer
 {


From e06d361eec613ed046592d378a01bf0a0694a6f8 Mon Sep 17 00:00:00 2001
From: Pete Gadomski <pete.gadomski@gmail.com>
Date: Tue, 25 Apr 2017 16:08:24 +0000
Subject: [PATCH 2/2] Link with dl for curse on non-win32

---
 apps/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

--- a/apps/CMakeLists.txt
+++ b/apps/CMakeLists.txt
@@ -17,6 +17,9 @@ endif()
 if(CURSE)
     add_executable(${CURSE} curse.cpp lasfile.hpp las.hpp las.cpp OGR.hpp OGR.cpp mmaplib.hpp pdal_util_export.hpp ProgramArgs.hpp Utils.cpp Utils.hpp )
     target_link_libraries(${CURSE} ${HEXER_LIB_NAME} ${HEXERBOOST_LIB_NAME})
+    if(NOT WIN32)
+        target_link_libraries(${CURSE} dl)
+    endif()
 endif()

 install(TARGETS ${HEXER_UTILITIES}


================================================
FILE: Formula/osgeo-iipsrv.rb
================================================
class OsgeoIipsrv < Formula
  desc "Publish spatial data and interactive mapping apps to the web"
  homepage "https://github.com/ruven/iipsrv"
  url "https://github.com/ruven/iipsrv/archive/f68b225013c54dd08badcd55d0819d29eb4fc5f8.tar.gz"
  sha256 "9d9e90cdc1f4588f1cb14b004c17a07ffa3ad88cd2c3e69582b660483dc5114b"
  version "1.1-dev"

  revision 1

  head "https://github.com/ruven/iipsrv.git", :branch => "master"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "4e6c8c55f45543b26eaa7b031c87a4e00b3cfcbf037aa33c6e62fbef2cf22b6d" => :mojave
    sha256 "4e6c8c55f45543b26eaa7b031c87a4e00b3cfcbf037aa33c6e62fbef2cf22b6d" => :high_sierra
    sha256 "8ce2d0857dcf778a32aef8298b42e2a94d845526c87158fa3c88b24e58612ff3" => :sierra
  end

  option "with-lighttpd", "Install lighttpd and iipsrv configuration file"
  option "with-nginx", "Install nginx and iipsrv configuration file"
  option "without-tests", "Do not run test suite"

  depends_on "autoconf"
  depends_on "automake"
  depends_on "libtool"

  depends_on "pkg-config"

  depends_on "fcgi"
  depends_on "jpeg"
  depends_on "libtiff"
  depends_on "little-cms2"
  depends_on "libmemcached"
  # NOTE: PNG support is currently turned off in configure.in
  depends_on "spawn-fcgi"
  depends_on "lighttpd" => :optional
  depends_on "nginx" => :optional
  depends_on "vips" # for creating Tiled Pyramidal TIFFs
  depends_on "imagemagick" # for creating Tiled Pyramidal TIFFs

  resource "iipmooviewer" do
    url "https://github.com/ruven/iipmooviewer/archive/cbcbe75b1af7d2fcf75c62d8fc650060c8081e13.tar.gz"
    sha256 "0c84fd68b9d295c37d3afd9b659442c0d5ba67ebe3f9c3fe10160d6aca5d9126"
    version "2.0-dev"
  end

  resource "palaisuulouvre" do
    url "http://merovingio.c2rmf.cnrs.fr/iipimage/PalaisDuLouvre.tif"
    sha256 "e76b75c0b16609aa85e02c13b1ccd4c85ff4b452811e7878442422ce8b23ce6b"
  end

  def install
    system "./autogen.sh"
    system "./configure",
      "--disable-dependency-tracking"

    system "make"
    system "make", "check" if build.with? "tests"
    (prefix/"fcgi-bin").install "src/iipsrv.fcgi"
    man1.install "man/iipsrv.8"

    # Out-of-htdocs directory for images
    iipimage = var/"iipimage"
    iipimage.install resource("palaisuulouvre") # sample image

    # Copy of iipmooviewer
    resource("iipmooviewer").stage do
      inreplace "index.html", "/path/to/image.tif", "#{iipimage}/PalaisDuLouvre.tif"
      (prefix/"iipmooviewer").install Dir["*"]
    end

    # Set up log
    # touch iipsrv_log

    # fix for: No such file or directory @ rb_sysopen - /usr/local/var/log/iipsrv.log
    config = <<~EOS
      # iipsrv_log
    EOS
    (var/"log/iipsrv.log").write config

    # Spawn-fcgi utility
    (bin/"iipsrv-spawn").write(spawn_script)
  end

  def spawn_script; <<~EOS
    #!/bin/bash

    export LOGFILE=#{iipsrv_log}
    export VERBOSITY=5
    export MAX_IMAGE_CACHE_SIZE=10
    export FILENAME_PATTERN=_pyr_
    export JPEG_QUALITY=50
    export MAX_CVT=3000
    exec 2>&1
    exec #{Formula["spawn-fcgi"].opt_bin}/spawn-fcgi -n -s #{iipsrv_sock} -- #{opt_prefix}/fcgi-bin/iipsrv.fcgi &
    EOS
  end

  plist_options :manual => "iipsrv-spawn"

  def plist; <<~EOS
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
      <key>Label</key>
      <string>#{plist_name}</string>
      <key>RunAtLoad</key>
      <true/>
      <key>KeepAlive</key>
      <false/>
      <key>WorkingDirectory</key>
      <string>#{HOMEBREW_PREFIX}</string>
      <key>ProgramArguments</key>
      <array>
        <string>#{Formula["spawn-fcgi"].opt_bin}/spawn-fcgi</string>
        <string>-n</string>
        <string>-s</string>
        <string>#{iipsrv_sock}</string>
        <string>--</string>
        <string>#{opt_prefix}/fcgi-bin/iipsrv.fcgi</string>
      </array>
      <key>EnvironmentVariables</key>
      <dict>
        <key>LOGFILE</key>
        <string>#{iipsrv_log}</string>
        <key>VERBOSITY</key>
        <string>5</string>
        <key>MAX_IMAGE_CACHE_SIZE</key>
        <string>10</string>
        <key>FILENAME_PATTERN</key>
        <string>_pyr_</string>
        <key>JPEG_QUALITY</key>
        <string>50</string>
        <key>MAX_CVT</key>
        <string>3000</string>
      </dict>
      <key>UserName</key>
      <string>#{`whoami`.chomp}</string>
    </dict>
    </plist>
    EOS
  end

  def iipsrv_log
    "#{var}/log/iipsrv.log"
  end

  def iipsrv_sock
    "#{var}/run/iipsrv.sock"
  end

  def post_install
    conf_dir = prefix/"config"
    opts = Tab.for_formula(self).used_options

    conf_s = conf_dir/"lighttpd_iipsrv_spawn.conf.sample"
    rm_f conf_s
    conf_s.write <<~EOS
      server.modules += ( "mod_fastcgi" )
      fastcgi.server = ( "/fcgi-bin/iipsrv.fcgi" =>
        (( "socket" => "#{iipsrv_sock}",
           "check-local" => "disable"
        ))
      )
    EOS

    conf_s = conf_dir/"lighttpd_iipsrv.conf.sample"
    rm_f conf_s
    conf_s.write <<~EOS
      server.modules += ( "mod_fastcgi" )
      fastcgi.server = ( "/fcgi-bin/iipsrv.fcgi" =>
        (( "socket" => "#{iipsrv_sock}",
           "check-local" => "disable",
           "min-procs" => 1,
           "max-procs" => 2,
           "bin-path" => "#{opt_prefix}/fcgi-bin/iipsrv.fcgi",
           "bin-environment" => (
              "LOGFILE" => "#{iipsrv_log}",
              "VERBOSITY" => "5",
              "MAX_IMAGE_CACHE_SIZE" => "10",
              "FILENAME_PATTERN" => "_pyr_",
              "JPEG_QUALITY" => "50",
              "MAX_CVT" => "3000"
            )
        ))
      )
    EOS

    if opts.include? "with-lighttpd"
      conf = etc/"lighttpd/conf.d/iipsrv.conf"
      rm conf if File.exist? conf
      cp conf_s, conf

      # Make sure iipsrv.conf will be loaded
      inc_conf = 'include "conf.d/iipsrv.conf"'
      mod_conf = etc/"lighttpd/modules.conf"
      unless File.readlines(mod_conf).grep(/#{Regexp.escape inc_conf}/).any?
        mod_conf.open("a") { |f| f.write("\n" + inc_conf) }
      end
    end

    conf_s = conf_dir/"apache_iipsrv.conf.sample"
    rm_f conf_s
    conf_s.write <<~EOS
      # Set the options on that directory
      <Directory "#{opt_prefix}/fcgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
      </Directory>

      # Set the handler
      AddHandler fastcgi-script fcgi

      # Initialise the FCGI server - set some default values
      FastCgiServer #{opt_prefix}/fcgi-bin/iipsrv.fcgi \
      -initial-env LOGFILE=#{iipsrv_log} \
      -initial-env VERBOSITY=2 \
      -initial-env JPEG_QUALITY=50 \
      -initial-env MAX_IMAGE_CACHE_SIZE=10 \
      -initial-env MAX_CVT=3000 \
      -processes 2
    EOS

    conf_s = conf_dir/"nginx_iipsrv.conf.sample"
    rm_f conf_s
    conf_s.write <<~EOS
      location /fcgi-bin/iipsrv.fcgi {
        include fastcgi_params;
        fastcgi_pass unix:#{iipsrv_sock};
      }
    EOS
    if opts.include? "with-nginx"
      conf = etc/"nginx/iipsrv.conf"
      rm conf if File.exist? conf
      cp conf_s, conf
    end
  end

  def caveats; <<~EOS
    When IIPImage Server is launched from its plist or iipsrv-spawn script, the
    FastCGI process with be available at:
      #{iipsrv_sock}

    Tiled TIFF images can be stored in #{var}/iipimage (outside the www tree).
    There is a sample already installed there: PalaisDuLouvre.tif.

    There are configuration scripts in #{opt_prefix}/config for the following
    web servers (copy the whatever.sample to iipsrv.conf accordingly):

    * Lighttpd - can spawn the FastCGI process (no external spawning needed), or
                 connect externally to the spawned FastCGI process

      config:   #{etc}/lighttpd/conf.d/iipsrv.conf
      include:  include "conf.d/iipsrv.conf"
           in:  #{etc}/lighttpd/modules.conf
      www root: #{var}/www/htdocs

    * Nginx - connects to the externally spawned FastCGI process

      config:   #{etc}/nginx/iipsrv.conf
      include:  include iipsrv.conf;
           in:  #{etc}/nginx/nginx.conf <-- (or other .conf's) 'server' block
      www root: #{var}/www

    * Apache - can spawn the FastCGI process (no external spawning needed), or
               connect externally to the spawned FastCGI process

               homebrew/apache/mod_fastcgi REQUIRED

      config:   /etc/apache2/other/iipsrv.conf
      www root: /Library/WebServer/Documents

    Upon successful server configuration test at:

      http://localhost[:port]/fcgi-bin/iipsrv.fcgi

    An install of 'iipmooviewer' is in #{opt_prefix}. Copy the 'iipmooviewer'
    directory to your server's www root. Test viewer, with sample image, at:

      http://localhost[:port]/iipmooviewer

  EOS
  end

  test do
  end
end


================================================
FILE: Formula/osgeo-insighttoolkit.rb
================================================
class OsgeoInsighttoolkit < Formula
  desc "ITK is a toolkit for performing registration and segmentation"
  homepage "https://www.itk.org"
  url "https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.0.1/InsightToolkit-5.0.1.tar.gz"
  sha256 "613b125cbf58481e8d1e36bdeacf7e21aba4b129b4e524b112f70c4d4e6d15a6"

  revision 1

  bottle do
    root_url "https://bottle.download.osgeo.org"
    sha256 "cc31b55d65c9b587c5b86ccc21414054baa5af82ee22dadf21fdbf609bab1f0b" => :catalina
    sha256 "cc31b55d65c9b587c5b86ccc21414054baa5af82ee22dadf21fdbf609bab1f0b" => :mojave
    sha256 "cc31b55d65c9b587c5b86ccc21414054baa5af82ee22dadf21fdbf609bab1f0b" => :high_sierra
  end

  head "https://github.com/InsightSoftwareConsortium/ITK.git", :branch => "master"

  option "with-examples", "Compile and install various examples"
  option "with-itkv3-compatibility", "Include ITKv3 compatibility"
  option "with-remove-legacy", "Disable legacy APIs"

  deprecated_option "examples" => "with-examples"
  deprecated_option "remove-legacy" => "with-remove-legacy"

  depends_on "cmake" => :build
  depends_on "opencv@2" => :recommended
  depends_on "python" => :recommended
  depends_on "fftw" => :recommended
  depends_on "hdf5" => :recommended
  # depends_on "jpeg" => :recommended
  depends_on "libjpeg-turbo" => :recommended
  depends_on "libpng" => :recommended
  depends_on "libtiff" => :recommended
  depends_on "gdcm" => :optional
  depends_on "expat" unless OS.mac?

  depends_on "osgeo-vtk" => :build

  # JAVA_VERSION = "1.8" # "1.10+"
  depends_on "openjdk" => :build # JAVA_VERSION

  depends_on "zlib"
  depends_on "bison"
  depends_on "libpng"
  depends_on "tcl-tk"
  depends_on "pcre"
  depends_on "swig"
  depends_on "castxml"
  depends_on "git"
  # depends_on "ruby"
  # depends_on "perl"

  def install
    ENV.cxx11

    # error: 'auto' not allowed in function return type
    # Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h
    ENV.append "CXXFLAGS", "-std=c++11"

    # Temporary fix for Xcode/CLT 9.0.x issue of missing header files
    # See: https://github.com/OSGeo/homebrew-osgeo4mac/issues/276
    # Work around "error: no member named 'signbit' in the global namespace"
    if DevelopmentTools.clang_build_version >= 900
      ENV.delete "SDKROOT"
      ENV.delete "HOMEBREW_SDKROOT"
    end

    # Warning: python modules have explicit framework links
    # These python extension modules were linked directly to a Python
    # framework binary. They should be linked with -undefined dynamic_lookup
    # instead of -lpython or -framework Python
    # ENV["PYTHON_LIBS"] = "-undefined dynamic_lookup"
    # PYTHON_LDFLAGS=-undefined dynamic_lookup
    # PYTHON_EXTRA_LIBS=-undefined dynamic_lookup
    # PYTHON_EXTRA_LDFLAGS=-undefined dynamic_lookup

    # cmd = Language::Java.java_home_cmd("1.8") # JAVA_VERSION
    # ENV["JAVA_HOME"] = Utils.popen_read(cmd).chomp

    dylib = OS.mac? ? "dylib" : "so"

    args = std_cmake_args + %W[
      -DBUILD_TESTING=OFF
      -DBUILD_SHARED_LIBS=ON
      -DITK_USE_64BITS_IDS=ON
      -DITK_USE_STRICT_CONCEPT_CHECKING=ON
      -DITK_USE_SYSTEM_ZLIB=ON
      -DITK_USE_SYSTEM_EXPAT=ON
      -DCMAKE_INSTALL_RPATH:STRING=#{lib}
      -DCMAKE_INSTALL_NAME_DIR:STRING=#{lib}
      -DModule_SCIFIO=ON
    ]

    args << ".."
    args << "-DBUILD_EXAMPLES=" + (build.include?("examples") ? "ON" : "OFF")
    args << "-DModule_ITKVideoBridgeOpenCV=" + (build.with?("opencv") ? "ON" : "OFF")
    args << "-DITKV3_COMPATIBILITY:BOOL=" + (build.with?("itkv3-compatibility") ? "ON" : "OFF")

    args << "-DITK_USE_SYSTEM_FFTW=ON" << "-DITK_USE_FFTWF=ON" << "-DITK_USE_FFTWD=ON" if build.with? "fftw"
    args << "-DITK_USE_SYSTEM_HDF5=ON" if build.with? "hdf5"
    args << "-DITK_USE_SYSTEM_JPEG=ON" if build.with? "libjpeg-turbo" # jpeg
    args << "-DITK_USE_SYSTEM_PNG=ON" if build.with? :libpng
    args << "-DITK_USE_SYSTEM_TIFF=ON" if build.with? "libtiff"
    args << "-DITK_USE_SYSTEM_GDCM=ON" if build.with? "gdcm"
    args << "-DITK_LEGACY_REMOVE=ON" if build.include? "remove-legacy"
    args << "-DModule_ITKLevelSetsv4Visualization=ON"
    args << "-DModule_ITKReview=ON"
    args << "-DModule_ITKVtkGlue=ON"
    args << "-DITK_USE_GPU=" + (OS.mac? ? "ON" : "OFF")

    args << "-DVCL_INCLUDE_CXX_0X=ON" # for cxx11

    args << "-DITK_USE_SYSTEM_LIBRARIES=ON"
    args << "-DITK_USE_SYSTEM_SWIG=ON"
    args << "-DITK_USE_SYSTEM_CASTXML=ON"
    args << "-DITK_LEGACY_SILENT=ON"
    args << "-DModule_ITKIOMINC=ON"
    args << "-DModule_ITKIOTransformMINC=ON"
    # args << "-DITK_WRAP_TCL=ON"
    # args << "-DITK_WRAP_JAVA=ON"
    # args << "-DITK_WRAP_RUBY=ON"
    # args << "-DITK_WRAP_PERL=ON"

    # Could NOT find GTest
    # it is not installed
    args << "-DITK_USE_SYSTEM_GOOGLETEST=OFF"

    mkdir "itk-build" do

      python_executable = `which python3`.strip

      python_prefix = `#{python_executable} -c 'import sys;print(sys.prefix)'`.chomp
      python_include = `#{python_executable} -c 'from distutils import sysconfig;print(sysconfig.get_python_inc(True))'`.chomp
      python_version = "python" + `#{python_executable} -c 'import sys;print(sys.version[:3])'`.chomp

      args << "-DITK_WRAP_PYTHON=ON"
      args << "-DPYTHON_EXECUTABLE='#{python_executable}'"
      args << "-DPYTHON_INCLUDE_DIR='#{python_include}'"

      # if PYTHON_EXECUTABLE
      # does not match Python's prefix
      # Python site-packages directory to install Python bindings
      # PY_SITE_PACKAGES_PATH

      # CMake picks up the system's python dylib, even if we have a brewed one.
      if File.exist? "#{python_prefix}/Python"
        args << "-DPYTHON_LIBRARY='#{python_prefix}/Python'"
      elsif File.exist? "#{python_prefix}/lib/lib#{python_version}.a"
        args << "-DPYTHON_LIBRARY='#{python_prefix}/lib/lib#{python_version}.a'"
      elsif File.exist? "#{python_prefix}/lib/lib#{python_version}.#{dylib}"
        args << "-DPYTHON_LIBRARY='#{python_prefix}/lib/lib#{python_version}.#{dylib}'"
      elsif File.exist? "#{python_prefix}/lib/x86_64-linux-gnu/lib#{python_version}.#{dylib}"
        args << "-DPYTHON_LIBRARY='#{python_prefix}/lib/x86_64-linux-gnu/lib#{python_version}.#{dylib}'"
      else
        odie "No libpythonX.Y.{dylib|so|a} file found!"
      end

      system "cmake", *args
      system "make", "install"
    end
  end

  test do
    (testpath/"test.cxx").write <<-EOS
      #include "itkImage.h"

      int main(int argc, char* argv[])
      {
        typedef itk::Image< unsigned short, 3 > ImageType;
        ImageType::Pointer image = ImageType::New();
        image->Update();

        return EXIT_SUCCESS;
      }
    EOS

    dylib = OS.mac? ? "1.dylib" : "so.1"
    v=version.to_s.split(".")[0..1].join(".")
    # Build step
    system ENV.cxx, "-std=c++11", "-isystem", "#{include}/ITK-#{v}", "-o", "test.cxx.o", "-c", "test.cxx"
    # Linking step
    system ENV.cxx, "-std=c++11", "test.cxx.o", "-o", "test",
                    "#{lib}/libITKCommon-#{v}.#{dylib}",
                    "#{lib}/libITKVNLInstantiation-#{v}.#{dylib}",
                    "#{lib}/libitkvnl_algo-#{v}.#{dylib}",
                    "#{lib}/libitkvnl-#{v}.#{dylib}"
    system "./test"
  end
end


================================================
FILE: Formula/osgeo-insighttoolkit@4.rb
================================================
class OsgeoInsighttoolkitAT4 < Formula
  desc "ITK is a toolkit for performing registration and segmentation"
  homepage "https://www.itk.org"
  url "https://downloads.sourceforge.net/project/itk/itk/4.13/InsightToolkit-4.13.2.tar.gz"
  sha256 "d8760b279de20497c432e7cdf97ed349277da1ae435be1f6f0f00fbe8d4938c1"

  revision 3

  bottle do
    root_url "https://bottle.download.osgeo.org"
    sha256 "1ddb7fb9794d353994d388e8e4e4408442fa2d3eef38dda01fadd6b42fb8d92a" => :catalina
    sha256 "1ddb7fb9794d353994d388e8e4e4408442fa2d3eef38dda01fadd6b42fb8d92a" => :mojave
    sha256 "1ddb7fb9794d353994d388e8e4e4408442fa2d3eef38dda01fadd6b42fb8d92a" => :high_sierra
  end

  head "https://github.com/InsightSoftwareConsortium/ITK.git", :branch => "master"

  # keg_only "Testing ITK - is not linked"

  option "with-examples", "Compile and install various examples"
  option "with-itkv3-compatibility", "Include ITKv3 compatibility"
  option "with-remove-legacy", "Disable legacy APIs"

  deprecated_option "examples" => "with-examples"
  deprecated_option "remove-legacy" => "with-remove-legacy"

  depends_on "cmake" => :build
  depends_on "opencv@2" => :recommended
  depends_on "python" => :recommended
  depends_on "fftw" => :recommended
  depends_on "hdf5" => :recommended
  # depends_on "jpeg" => :recommended
  depends_on "libjpeg-turbo" => :recommended
  depends_on "libpng" => :recommended
  depends_on "libtiff" => :recommended
  depends_on "gdcm" => :optional
  depends_on "expat" unless OS.mac?

  depends_on "osgeo-vtk" => :build

  # JAVA_VERSION = "1.8" # "1.10+"
  depends_on "openjdk" => :build # JAVA_VERSION

  depends_on "zlib"
  depends_on "bison"
  depends_on "libpng"
  depends_on "tcl-tk"
  depends_on "pcre"
  depends_on "swig"
  depends_on "castxml"
  depends_on "git"
  # depends_on "ruby"
  # depends_on "perl"

  def install
    ENV.cxx11

    # error: 'auto' not allowed in function return type
    # Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h
    ENV.append "CXXFLAGS", "-std=c++11"

    # Temporary fix for Xcode/CLT 9.0.x issue of missing header files
    # See: https://github.com/OSGeo/homebrew-osgeo4mac/issues/276
    # Work around "error: no member named 'signbit' in the global namespace"
    if DevelopmentTools.clang_build_version >= 900
      ENV.delete "SDKROOT"
      ENV.delete "HOMEBREW_SDKROOT"
    end

    # Warning: python modules have explicit framework links
    # These python extension modules were linked directly to a Python
    # framework binary. They should be linked with -undefined dynamic_lookup
    # instead of -lpython or -framework Python
    # ENV["PYTHON_LIBS"] = "-undefined dynamic_lookup"
    # PYTHON_LDFLAGS=-undefined dynamic_lookup
    # PYTHON_EXTRA_LIBS=-undefined dynamic_lookup
    # PYTHON_EXTRA_LDFLAGS=-undefined dynamic_lookup

    # cmd = Language::Java.java_home_cmd("1.8") # JAVA_VERSION
    # ENV["JAVA_HOME"] = Utils.popen_read(cmd).chomp

    dylib = OS.mac? ? "dylib" : "so"

    args = std_cmake_args + %W[
      -DBUILD_TESTING=OFF
      -DBUILD_SHARED_LIBS=ON
      -DITK_USE_64BITS_IDS=ON
      -DITK_USE_STRICT_CONCEPT_CHECKING=ON
      -DITK_USE_SYSTEM_ZLIB=ON
      -DITK_USE_SYSTEM_EXPAT=ON
      -DCMAKE_INSTALL_RPATH:STRING=#{lib}
      -DCMAKE_INSTALL_NAME_DIR:STRING=#{lib}
      -DModule_SCIFIO=ON
    ]

    args << ".."
    args << "-DBUILD_EXAMPLES=" + (build.include?("examples") ? "ON" : "OFF")
    args << "-DModule_ITKVideoBridgeOpenCV=" + (build.with?("opencv") ? "ON" : "OFF")
    args << "-DITKV3_COMPATIBILITY:BOOL=" + (build.with?("itkv3-compatibility") ? "ON" : "OFF")

    args << "-DITK_USE_SYSTEM_FFTW=ON" << "-DITK_USE_FFTWF=ON" << "-DITK_USE_FFTWD=ON" if build.with? "fftw"
    args << "-DITK_USE_SYSTEM_HDF5=ON" if build.with? "hdf5"
    args << "-DITK_USE_SYSTEM_JPEG=ON" if build.with? "libjpeg-turbo" # jpeg
    args << "-DITK_USE_SYSTEM_PNG=ON" if build.with? :libpng
    args << "-DITK_USE_SYSTEM_TIFF=ON" if build.with? "libtiff"
    args << "-DITK_USE_SYSTEM_GDCM=ON" if build.with? "gdcm"
    args << "-DITK_LEGACY_REMOVE=ON" if build.include? "remove-legacy"
    args << "-DModule_ITKLevelSetsv4Visualization=ON"
    args << "-DModule_ITKReview=ON"
    args << "-DModule_ITKVtkGlue=ON"
    args << "-DITK_USE_GPU=" + (OS.mac? ? "ON" : "OFF")

    args << "-DVCL_INCLUDE_CXX_0X=ON" # for cxx11

    args << "-DITK_USE_SYSTEM_LIBRARIES=ON"
    args << "-DITK_USE_SYSTEM_SWIG=ON"
    args << "-DITK_USE_SYSTEM_CASTXML=ON"
    args << "-DITK_LEGACY_SILENT=ON"
    args << "-DModule_ITKIOMINC=ON"
    args << "-DModule_ITKIOTransformMINC=ON"
    # args << "-DITK_WRAP_TCL=ON"
    # args << "-DITK_WRAP_JAVA=ON"
    # args << "-DITK_WRAP_RUBY=ON"
    # args << "-DITK_WRAP_PERL=ON"

    # Could NOT find GTest
    # it is not installed
    args << "-DITK_USE_SYSTEM_GOOGLETEST=OFF"

    mkdir "itk-build" do
      python_executable = `which python3`.strip
      python_prefix = `#{python_executable} -c 'import sys;print(sys.prefix)'`.chomp
      python_include = `#{python_executable} -c 'from distutils import sysconfig;print(sysconfig.get_python_inc(True))'`.chomp
      python_version = "python" + `#{python_executable} -c 'import sys;print(sys.version[:3])'`.chomp

      args << "-DITK_WRAP_PYTHON=ON"
      args << "-DPYTHON_EXECUTABLE='#{python_executable}'"
      args << "-DPYTHON_INCLUDE_DIR='#{python_include}'"

      # if PYTHON_EXECUTABLE
      # does not match Python's prefix
      # Python site-packages directory to install Python bindings
      # PY_SITE_PACKAGES_PATH

      # CMake picks up the system's python dylib, even if we have a brewed one.
      if File.exist? "#{python_prefix}/Python"
        args << "-DPYTHON_LIBRARY='#{python_prefix}/Python'"
      elsif File.exist? "#{python_prefix}/lib/lib#{python_version}.a"
        args << "-DPYTHON_LIBRARY='#{python_prefix}/lib/lib#{python_version}.a'"
      elsif File.exist? "#{python_prefix}/lib/lib#{python_version}.#{dylib}"
        args << "-DPYTHON_LIBRARY='#{python_prefix}/lib/lib#{python_version}.#{dylib}'"
      elsif File.exist? "#{python_prefix}/lib/x86_64-linux-gnu/lib#{python_version}.#{dylib}"
        args << "-DPYTHON_LIBRARY='#{python_prefix}/lib/x86_64-linux-gnu/lib#{python_version}.#{dylib}'"
      else
        odie "No libpythonX.Y.{dylib|so|a} file found!"
      end

      system "cmake", *args
      system "make", "install"
    end
  end

  test do
    (testpath/"test.cxx").write <<-EOS
      #include "itkImage.h"

      int main(int argc, char* argv[])
      {
        typedef itk::Image< unsigned short, 3 > ImageType;
        ImageType::Pointer image = ImageType::New();
        image->Update();

        return EXIT_SUCCESS;
      }
    EOS

    dylib = OS.mac? ? "1.dylib" : "so.1"
    v=version.to_s.split(".")[0..1].join(".")
    # Build step
    system ENV.cxx, "-std=c++11", "-isystem", "#{include}/ITK-#{v}", "-o", "test.cxx.o", "-c", "test.cxx"
    # Linking step
    system ENV.cxx, "-std=c++11", "test.cxx.o", "-o", "test",
                    "#{lib}/libITKCommon-#{v}.#{dylib}",
                    "#{lib}/libITKVNLInstantiation-#{v}.#{dylib}",
                    "#{lib}/libitkvnl_algo-#{v}.#{dylib}",
                    "#{lib}/libitkvnl-#{v}.#{dylib}"
    system "./test"
  end
end


================================================
FILE: Formula/osgeo-lastools.rb
================================================
class OsgeoLastools < Formula
  desc "Efficient tools for LiDAR processing. Contains LASlib, a C++ programming API for reading / writing LIDAR data stored in standard LAS format"
  homepage "https://rapidlasso.com/lastools"
  url "https://github.com/LAStools/LAStools/archive/25fe552719970baf15b5c1b233174cc70190eb67.tar.gz"
  sha256 "1718456d7a8d223877498d4fcee6f7b2dd9b1ce203c9fb5ace5f33088c478d1f"
  version "19.05.10"

  # evision 1

  head "https://github.com/LAStools/LAStools.git", :branch => "master"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any_skip_relocation
    rebuild 1
    sha256 "d716dda8ec8ede2cf07517190456e6e3f5407d7ff5e5dbf190e6b7b310eaf1a2" => :mojave
    sha256 "d716dda8ec8ede2cf07517190456e6e3f5407d7ff5e5dbf190e6b7b310eaf1a2" => :high_sierra
    sha256 "d6c319e04e9c03e3ce7dfaf110e187164e8f6398c82dd71f63ed892792328a19" => :sierra
  end

  option "with-wine", "Use Wine to have more support"

  depends_on "cmake" => :build

  if build.with? "wine"
    depends_on "wine"
    depends_on :x11
  end

  def install
    mkdir "build" do
       system "cmake", "..", *std_cmake_args
       system "make", "install"
     end

     ln_s "#{bin}/las2las64", "#{bin}/las2las"
     ln_s "#{bin}/las2txt64", "#{bin}/las2txt"
     ln_s "#{bin}/lasdiff64", "#{bin}/lasdiff"
     ln_s "#{bin}/lasindex64", "#{bin}/lasindex"
     ln_s "#{bin}/lasinfo64", "#{bin}/lasinfo"
     ln_s "#{bin}/lasmerge64", "#{bin}/lasmerge"
     ln_s "#{bin}/lasprecision64", "#{bin}/lasprecision"
     ln_s "#{bin}/laszip64", "#{bin}/laszip"
     ln_s "#{bin}/txt2las64", "#{bin}/txt2las"

     # Pkg-Config file
     mkdir "#{lib}/pkgconfig"
     File.open("#{lib}/pkgconfig/laslib.pc", "w") { |file|
       file << "Name: laslib\n"
       file << "Description: C++ programming API for reading / writing LIDAR data\n"
       file << "Version: #{version}\n"
       file << "Libs: -L\${libdir} -llas\n"
       file << "Cflags: -I${includedir}\n"
     }
  end

  def caveats
    if build.with? "wine"
      <<~EOS
        \n1 - Download \e[32mhttp://lastools.org/download/LAStools.zip\e[0m and unzip LASTools.\n
            Remember where you unzipped it.\n

        2 - Start QGIS. Select \e[32mProcessing/Options.\e[0m\n
            In the Providers section scroll to “LASTools”. Fill out the blanks:\n

            \033[31mLASTools folder:\e[0m \e[32mLASTools directory\e[0m (unzipped)\n
            \033[31mWine Folder:\e[0m \e[32m#{Formula["wine"].opt_bin}\e[0m\n

      EOS
    else
      <<~EOS

      You can use the \e[32m--with-wine\e[0m version for more support.\n

      EOS
    end
  end

  test do
    # TODO
  end
end


================================================
FILE: Formula/osgeo-laszip@2.rb
================================================
class OsgeoLaszipAT2 < Formula
  desc "Lossless LiDAR compression"
  homepage "https://www.laszip.org/"
  url "https://github.com/LASzip/LASzip/archive/v2.2.0.tar.gz"
  sha256 "b8e8cc295f764b9d402bc587f3aac67c83ed8b39f1cb686b07c168579c61fbb2"

  revision 1

  head "https://github.com/LASzip/LASzip.git", :tag => "v2.2.0"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "a785cd4b90dc00fb0454badb64aecab0ad033c7bae47e40afaa77fbd548c1f11" => :mojave
    sha256 "a785cd4b90dc00fb0454badb64aecab0ad033c7bae47e40afaa77fbd548c1f11" => :high_sierra
    sha256 "03096e03a39bd9605f8efc66d43299a794b5596ab58d56ca6b8a72b0498d6e8a" => :sierra
  end

  keg_only :versioned_formula

  depends_on "cmake" => :build

  def install
    system "cmake", ".", *std_cmake_args
    system "make", "install"
  end

  test do
    system bin/"laszippertest"
  end
end


================================================
FILE: Formula/osgeo-laz-perf.rb
================================================
class OsgeoLazPerf < Formula
  desc "Alternative LAZ implementation for C++ and JavaScript"
  homepage "https://github.com/hobu/laz-perf"
  url "https://github.com/hobu/laz-perf/archive/1.4.4.zip"
  sha256 "9801e671ac7122bfa67436d8ed3b202323c4f05f467882fe54ae1f20c4f0df88"
  #url "https://github.com/hobu/laz-perf.git",
  #  :branch => "master",
  #  :commit => "834629e362d8ff90669dcec60bef5cf555d197e2"
  #version "1.4.4"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any_skip_relocation
    sha256 "f2251ec963bfe2db4fcfba2e67a44e28f0c9184a102fdb280ba4185afeb92b83" => :catalina
    sha256 "f2251ec963bfe2db4fcfba2e67a44e28f0c9184a102fdb280ba4185afeb92b83" => :mojave
    sha256 "f2251ec963bfe2db4fcfba2e67a44e28f0c9184a102fdb280ba4185afeb92b83" => :high_sierra
  end

  #revision 1

  head "https://github.com/hobu/laz-perf.git", :branch => "master"

  depends_on "cmake" => :build

  def install
    ENV.cxx11

    system "cmake", ".", *std_cmake_args
    system "make", "install"
  end

  test do
    # TODO
  end
end


================================================
FILE: Formula/osgeo-libgeotiff.rb
================================================
class Unlinked < Requirement
  fatal true

  satisfy(:build_env => false) { !core_libgeotiff_linked }

  def core_libgeotiff_linked
    Formula["libgeotiff"].linked_keg.exist?
  rescue
    return false
  end

  def message
    s = "\033[31mYou have other linked versions!\e[0m\n\n"

    s += "Unlink with \e[32mbrew unlink libgeotiff\e[0m or remove with brew \e[32muninstall --ignore-dependencies libgeotiff\e[0m\n\n" if core_libgeotiff_linked
    s
  end
end

class OsgeoLibgeotiff < Formula
  desc "Library and tools for dealing with GeoTIFF"
  homepage "https://geotiff.osgeo.org/"
  # url "https://github.com/OSGeo/libgeotiff/releases/download/1.6.0/libgeotiff-1.6.0.tar.gz"
  # sha256 "9311017e5284cffb86f2c7b7a9df1fb5ebcdc61c30468fb2e6bca36e4272ebca"
  url "https://github.com/OSGeo/libgeotiff.git",
    :branch => "master",
    :commit => "8b1a8f52bc909f86e04ceadd699db102208074a2"
  version "1.6.0"

  bottle do
    root_url "https://bottle.download.osgeo.org"
    cellar :any
    sha256 "bcaf0e372b3a5c3875d695f34660d2efd90a728ade4960e1c7b4d9669bb29177" => :catalina
    sha256 "bcaf0e372b3a5c3875d695f34660d2efd90a728ade4960e1c7b4d9669bb29177" => :mojave
    sha256 "bcaf0e372b3a5c3875d695f34660d2efd90a728ade4960e1c7b4d9669bb29177" => :high_sierra
  end

  #revision 3 

  head "https://github.com/OSGeo/libgeotiff.git", :branch => "master"

  # keg_only "libgeotiff is already provided by homebrew/core"
  # we will verify that other versions are not linked
  depends_on Unlinked

  depends_on "autoconf" => :build
  depends_on "automake" => :build
  depends_on "libtool" => :build
  depends_on "gettext" => :build
  depends_on "pkgconfig" => :build
  depends_on "jpeg"
  depends_on "zlib"
  depends_on "libtiff"
  depends_on "osgeo-proj"

  def install
    cd "libgeotiff" do
      # autoreconf -fvi
      system "./autogen.sh"
      system "./configure", "--disable-dependency-tracking",
                            "--prefix=#{prefix}",
                            "--with-jpeg", "--with-zlib"
      system "make" # Separate steps or install fails
      system "make", "install"
    end
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include "geotiffio.h"
      #include "xtiffio.h"
      #include <stdlib.h>
      #include <string.h>

      int main(int argc, char* argv[])
      {
        TIFF *
Download .txt
gitextract_dhh04ofh/

├── .ciignore
├── .circleci/
│   ├── after_script.sh
│   ├── before_deploy.sh
│   ├── before_install.sh
│   ├── changed_formulas.sh
│   ├── config.yml
│   ├── install.sh
│   ├── script.sh
│   ├── set_env.sh
│   └── skip-formulas.txt
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── stale.yml
├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Formula/
│   ├── mapcache.rb
│   ├── mapserver6.rb
│   ├── osgeo-ecwjp2-sdk.rb
│   ├── osgeo-fcgi-debug.rb
│   ├── osgeo-filegdb-api.rb
│   ├── osgeo-fyba.rb
│   ├── osgeo-gdal-ecwjp2.rb
│   ├── osgeo-gdal-filegdb.rb
│   ├── osgeo-gdal-grass.rb
│   ├── osgeo-gdal-mdb.rb
│   ├── osgeo-gdal-mongodb.rb
│   ├── osgeo-gdal-mrsid.rb
│   ├── osgeo-gdal-mysql.rb
│   ├── osgeo-gdal-ogdi.rb
│   ├── osgeo-gdal-oracle.rb
│   ├── osgeo-gdal-pdf.rb
│   ├── osgeo-gdal-python.rb
│   ├── osgeo-gdal-sosi.rb
│   ├── osgeo-gdal.rb
│   ├── osgeo-gmt.rb
│   ├── osgeo-gpkgtools.rb
│   ├── osgeo-grass.rb
│   ├── osgeo-hdf4.rb
│   ├── osgeo-hexer.rb
│   ├── osgeo-iipsrv.rb
│   ├── osgeo-insighttoolkit.rb
│   ├── osgeo-insighttoolkit@4.rb
│   ├── osgeo-lastools.rb
│   ├── osgeo-laszip@2.rb
│   ├── osgeo-laz-perf.rb
│   ├── osgeo-libgeotiff.rb
│   ├── osgeo-libght.rb
│   ├── osgeo-libkml.rb
│   ├── osgeo-liblas.rb
│   ├── osgeo-libnoise.rb
│   ├── osgeo-libpqxx.rb
│   ├── osgeo-libspatialite.rb
│   ├── osgeo-mapnik.rb
│   ├── osgeo-marble.rb
│   ├── osgeo-matplotlib.rb
│   ├── osgeo-mongo-cxx-driver-legacy.rb
│   ├── osgeo-mrsid-sdk.rb
│   ├── osgeo-muparserx.rb
│   ├── osgeo-netcdf.rb
│   ├── osgeo-nitro.rb
│   ├── osgeo-ogdi.rb
│   ├── osgeo-opencollada.rb
│   ├── osgeo-openscenegraph.rb
│   ├── osgeo-oracle-client-sdk.rb
│   ├── osgeo-orfeo.rb
│   ├── osgeo-osgearth.rb
│   ├── osgeo-osgqt.rb
│   ├── osgeo-osm2po.rb
│   ├── osgeo-ossim.rb
│   ├── osgeo-pcl.rb
│   ├── osgeo-pdal.rb
│   ├── osgeo-pdfium.rb
│   ├── osgeo-pgadmin3-lts.rb
│   ├── osgeo-pgsql-ogr-fdw.rb
│   ├── osgeo-pointcloud.rb
│   ├── osgeo-points2grid.rb
│   ├── osgeo-postgis.rb
│   ├── osgeo-postgis@2.4.rb
│   ├── osgeo-postgis@2.5.rb
│   ├── osgeo-postgresql.rb
│   ├── osgeo-postgresql@10.rb
│   ├── osgeo-postgresql@11.rb
│   ├── osgeo-proj.rb
│   ├── osgeo-psqlodbc.rb
│   ├── osgeo-pyqt-webkit.rb
│   ├── osgeo-pyspatialite.rb
│   ├── osgeo-qscintilla2.rb
│   ├── osgeo-qt-mysql.rb
│   ├── osgeo-qt-odbc.rb
│   ├── osgeo-qt-psql.rb
│   ├── osgeo-qt-webkit.rb
│   ├── osgeo-qtkeychain.rb
│   ├── osgeo-saga-lts.rb
│   ├── osgeo-saga.rb
│   ├── osgeo-shark.rb
│   ├── osgeo-simple-tiles.rb
│   ├── osgeo-six.rb
│   ├── osgeo-taudem.rb
│   ├── osgeo-vigra.rb
│   ├── osgeo-vtk.rb
│   ├── osgeo-whitebox-tools.rb
│   ├── osgeo-whitebox.rb
│   ├── prepair.rb
│   ├── qca-qt@5.7.rb
│   ├── qt-ifw-qt5.rb
│   ├── qt-ifw.rb
│   ├── qt5-webkit-qt@5.7.rb
│   ├── qtkeychain-qt@5.7.rb
│   └── travis-cache-seed.rb
├── LICENSE
├── README.md
├── Requirements/
│   ├── gdal_third_party.rb
│   ├── grass_requirements.rb
│   └── qgis_requirements.rb
├── Strategies/
│   └── cache-download.rb
├── boneyard/
│   ├── brew-stack.rb
│   ├── enki.rb
│   ├── gdal-110.rb
│   ├── gdal-19.rb
│   ├── gdal-20.rb
│   ├── gdal-ecwjp2.rb
│   ├── gdal-filegdb.rb
│   ├── gdal-grass64.rb
│   ├── gdal-mrsid.rb
│   ├── gdal-oracle.rb
│   ├── gdal-sosi.rb
│   ├── gdal1-ecwjp2.rb
│   ├── gdal1-filegdb.rb
│   ├── gdal1-grass6.rb
│   ├── gdal1-mrsid.rb
│   ├── gdal1-mysql.rb
│   ├── gdal1-oracle.rb
│   ├── gpsbabel-qt4.rb
│   ├── grass-64.rb
│   ├── grass-70.rb
│   ├── grass6.rb
│   ├── grass7-lts.rb
│   ├── libgpkg.rb
│   ├── mapcache-12.rb
│   ├── mapserver-64.rb
│   ├── minizip.rb
│   ├── openjpeg20.rb
│   ├── orfeo-32.rb
│   ├── orfeo-40.rb
│   ├── orfeo-42.rb
│   ├── orfeo-54.rb
│   ├── orfeo5.rb
│   ├── orfeo5@5.4.rb
│   ├── osgearth-qt4.rb
│   ├── osgearth.rb
│   ├── osgeo-proj@5.rb
│   ├── osgeo-pyqt.rb
│   ├── osgeo-qgis-ltr.rb
│   ├── osgeo-qgis-res.rb
│   ├── osgeo-qgis.rb
│   ├── osgeo-sip.rb
│   ├── ossim@2.1.rb
│   ├── pdfium.rb
│   ├── points2grid.rb
│   ├── pyqt-qt4.rb
│   ├── qca-qt4.rb
│   ├── qgis-18.rb
│   ├── qgis-20.rb
│   ├── qgis-214.rb
│   ├── qgis-22.rb
│   ├── qgis-24.rb
│   ├── qgis-26.rb
│   ├── qgis-28.rb
│   ├── qgis-ltr@2.rb
│   ├── qjson-qt4.rb
│   ├── qscintilla2-qt4.rb
│   ├── qscintilla2.rb
│   ├── qt-4.rb
│   ├── qt4-mysql.rb
│   ├── qt4-oracle.rb
│   ├── qtkeychain-qt4.rb
│   ├── quazip.rb
│   ├── qutepart.rb
│   ├── qwt-qt4.rb
│   ├── qwt-qt4@5.2.rb
│   ├── qwt60.rb
│   ├── qwtpolar-qt4.rb
│   ├── qwtpolar.rb
│   ├── sip-qt4.rb
│   ├── spatialite-gui-17.rb
│   ├── v8318.rb
│   ├── wxmac-28.rb
│   ├── wxmac-29.rb
│   └── wxmac-mono.rb
├── commit-msg.sh
├── docs/
│   ├── 404.html
│   ├── Gemfile
│   ├── Rakefile
│   ├── _config.yml
│   ├── _includes/
│   │   ├── head.html
│   │   ├── nav.html
│   │   ├── new-window-fix.html
│   │   ├── open-embed.html
│   │   └── scripts.html
│   ├── _layouts/
│   │   ├── about.html
│   │   ├── default.html
│   │   ├── home.html
│   │   ├── page.html
│   │   └── post.html
│   ├── _sass/
│   │   ├── base.scss
│   │   ├── buttons.scss
│   │   ├── code.scss
│   │   ├── color_schemes/
│   │   │   └── dark.scss
│   │   ├── content.scss
│   │   ├── custom/
│   │   │   └── custom.scss
│   │   ├── labels.scss
│   │   ├── layout.scss
│   │   ├── navigation.scss
│   │   ├── search.scss
│   │   ├── support/
│   │   │   ├── _functions.scss
│   │   │   ├── _variables.scss
│   │   │   ├── mixins/
│   │   │   │   ├── _buttons.scss
│   │   │   │   ├── _layout.scss
│   │   │   │   ├── _typography.scss
│   │   │   │   └── mixins.scss
│   │   │   └── support.scss
│   │   ├── tables.scss
│   │   ├── typography.scss
│   │   ├── utilities/
│   │   │   ├── _colors.scss
│   │   │   ├── _layout.scss
│   │   │   ├── _lists.scss
│   │   │   ├── _spacing.scss
│   │   │   ├── _typography.scss
│   │   │   └── utilities.scss
│   │   └── vendor/
│   │       └── normalize.scss/
│   │           ├── README.md
│   │           ├── normalize.scss
│   │           └── package.json
│   ├── assets/
│   │   ├── css/
│   │   │   ├── dark-mode-preview.scss
│   │   │   └── just-the-docs.scss
│   │   └── js/
│   │       ├── just-the-docs.js
│   │       └── search-data.json
│   ├── bin/
│   │   └── just-the-docs
│   ├── docs/
│   │   ├── developing-on-QGIS-using-OSGeo4Mac.md
│   │   ├── installing-QGIS-3.md
│   │   ├── reporting-issues.md
│   │   └── troubleshooting.md
│   ├── index.md
│   ├── just-the-docs.gemspec
│   ├── lib/
│   │   └── tasks/
│   │       └── search.rake
│   ├── package.json
│   └── script/
│       └── build
├── enviro/
│   ├── osgeo4mac-qt4.env
│   ├── osgeo4mac.env
│   ├── python_startup.py
│   └── qgis-osgeo4mac-ctest-env.sh
├── formula_renames.json
├── scripts/
│   ├── Mac/
│   │   ├── find_all-installed_w-options.sh
│   │   └── find_non-bottle-builds_w-options.sh
│   ├── qgis2-cmake-options.py
│   ├── qgis2-creator-build.sh
│   ├── qgis2-creator-install.sh
│   ├── qgis2-set-app-env.py
│   └── update-gdal.sh
├── travis/
│   ├── after_script.sh
│   ├── before_cache.sh
│   ├── before_deploy.sh
│   ├── before_install.sh
│   ├── before_script.sh
│   ├── bintray-upload.json
│   ├── changed_formulas.sh
│   ├── install.sh
│   ├── script.sh
│   └── skip-formulas.txt
└── travis_deploy_key.enc
Download .txt
SYMBOL INDEX (803 symbols across 175 files)

FILE: Formula/mapcache.rb
  class Mapcache (line 1) | class Mapcache < Formula
    method lib_name (line 38) | def lib_name
    method install (line 42) | def install
    method caveats (line 97) | def caveats; <<~EOS

FILE: Formula/mapserver6.rb
  class JavaJDK (line 1) | class JavaJDK < Requirement
    method home (line 4) | def self.home
    method message (line 17) | def message; <<~EOS
  class Mapserver6 (line 29) | class Mapserver6 < Formula
    method png_prefix (line 97) | def png_prefix
    method freetype_prefix (line 102) | def freetype_prefix
    method install (line 107) | def install
    method caveats (line 267) | def caveats; <<~EOS

FILE: Formula/osgeo-ecwjp2-sdk.rb
  class EcwJpeg2000SDK (line 5) | class EcwJpeg2000SDK < Requirement
    method message (line 9) | def message; <<~EOS
  class OsgeoEcwjp2Sdk (line 19) | class OsgeoEcwjp2Sdk < Formula
    method install (line 31) | def install
    method caveats (line 53) | def caveats; <<~EOS

FILE: Formula/osgeo-fcgi-debug.rb
  class OsgeoFcgiDebug (line 1) | class OsgeoFcgiDebug < Formula
    method install (line 24) | def install

FILE: Formula/osgeo-filegdb-api.rb
  class OsgeoFilegdbApi (line 1) | class OsgeoFilegdbApi < Formula
    method install (line 22) | def install
    method install_change (line 53) | def install_change(dylib, old, new)
    method set_install_name (line 57) | def set_install_name(dylib, dir)
    method caveats (line 61) | def caveats; <<~EOS

FILE: Formula/osgeo-fyba.rb
  class OsgeoFyba (line 1) | class OsgeoFyba < Formula
    method install (line 23) | def install

FILE: Formula/osgeo-gdal-ecwjp2.rb
  class OsgeoGdalEcwjp2 (line 1) | class OsgeoGdalEcwjp2 < Formula
    method gdal_majmin_ver (line 18) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 23) | def gdal_plugins_subdirectory
    method install (line 27) | def install
    method caveats (line 64) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-filegdb.rb
  class OsgeoGdalFilegdb (line 1) | class OsgeoGdalFilegdb < Formula
    method gdal_majmin_ver (line 22) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 27) | def gdal_plugins_subdirectory
    method install (line 31) | def install
    method caveats (line 65) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-grass.rb
  class OsgeoGdalGrass (line 1) | class OsgeoGdalGrass < Formula
    method gdal_majmin_ver (line 20) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 25) | def gdal_plugins_subdirectory
    method install (line 29) | def install
    method caveats (line 52) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-mdb.rb
  class OsgeoGdalMdb (line 1) | class OsgeoGdalMdb < Formula
    method gdal_majmin_ver (line 39) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 44) | def gdal_plugins_subdirectory
    method configure_args (line 48) | def configure_args
    method install (line 94) | def install
    method caveats (line 144) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-mongodb.rb
  class OsgeoGdalMongodb (line 1) | class OsgeoGdalMongodb < Formula
    method gdal_majmin_ver (line 25) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 30) | def gdal_plugins_subdirectory
    method configure_args (line 34) | def configure_args
    method install (line 68) | def install
    method caveats (line 106) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-mrsid.rb
  class OsgeoGdalMrsid (line 1) | class OsgeoGdalMrsid < Formula
    method gdal_majmin_ver (line 18) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 23) | def gdal_plugins_subdirectory
    method install (line 27) | def install
    method caveats (line 73) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-mysql.rb
  class OsgeoGdalMysql (line 1) | class OsgeoGdalMysql < Formula
    method gdal_majmin_ver (line 21) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 26) | def gdal_plugins_subdirectory
    method install (line 30) | def install
    method caveats (line 69) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-ogdi.rb
  class OsgeoGdalOgdi (line 1) | class OsgeoGdalOgdi < Formula
    method gdal_majmin_ver (line 22) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 27) | def gdal_plugins_subdirectory
    method install (line 31) | def install
    method caveats (line 78) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-oracle.rb
  class OsgeoGdalOracle (line 1) | class OsgeoGdalOracle < Formula
    method gdal_majmin_ver (line 18) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 23) | def gdal_plugins_subdirectory
    method install (line 27) | def install
    method caveats (line 61) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-pdf.rb
  class OsgeoGdalPdf (line 1) | class OsgeoGdalPdf < Formula
    method gdal_majmin_ver (line 50) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 55) | def gdal_plugins_subdirectory
    method configure_args (line 59) | def configure_args
    method install (line 103) | def install
    method caveats (line 159) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-python.rb
  class OsgeoGdalPython (line 1) | class OsgeoGdalPython < Formula
    method gdal (line 2) | def self.gdal
    method gdal (line 6) | def gdal
    method gdal_opts (line 10) | def self.gdal_opts
    method gdal_opts (line 15) | def gdal_opts
    method gdal_python (line 19) | def self.gdal_python(python)
    method gdal_py3_exist? (line 24) | def self.gdal_py3_exist?
    method install (line 57) | def install
    method caveats (line 85) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal-sosi.rb
  class OsgeoGdalSosi (line 1) | class OsgeoGdalSosi < Formula
    method gdal_majmin_ver (line 22) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 27) | def gdal_plugins_subdirectory
    method install (line 31) | def install
    method caveats (line 66) | def caveats; <<~EOS

FILE: Formula/osgeo-gdal.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_gdal_linked (line 6) | def core_gdal_linked
    method message (line 12) | def message
  class OsgeoGdal (line 20) | class OsgeoGdal < Formula
    method configure_args (line 154) | def configure_args
    method plugins_subdirectory (line 292) | def plugins_subdirectory
    method install (line 297) | def install
    method post_install (line 357) | def post_install
    method caveats (line 362) | def caveats

FILE: Formula/osgeo-gmt.rb
  class OsgeoGmt (line 1) | class OsgeoGmt < Formula
    method install (line 65) | def install

FILE: Formula/osgeo-gpkgtools.rb
  class OsgeoGpkgtools (line 3) | class OsgeoGpkgtools < Formula
    method install (line 19) | def install

FILE: Formula/osgeo-grass.rb
  class OsgeoGrass (line 1) | class OsgeoGrass < Formula
    method headless? (line 142) | def headless?
    method majmin_ver (line 147) | def majmin_ver
    method install (line 281) | def install
    method post_install (line 460) | def post_install
    method formula_site_packages (line 587) | def formula_site_packages(f)
    method caveats (line 591) | def caveats

FILE: Formula/osgeo-hdf4.rb
  class OsgeoHdf4 (line 1) | class OsgeoHdf4 < Formula
    method install (line 29) | def install
    method caveats (line 71) | def caveats; <<~EOS

FILE: Formula/osgeo-hexer.rb
  class OsgeoHexer (line 1) | class OsgeoHexer < Formula
    method install (line 30) | def install

FILE: Formula/osgeo-iipsrv.rb
  class OsgeoIipsrv (line 1) | class OsgeoIipsrv < Formula
    method install (line 53) | def install
    method spawn_script (line 86) | def spawn_script; <<~EOS
    method plist (line 102) | def plist; <<~EOS
    method iipsrv_log (line 146) | def iipsrv_log
    method iipsrv_sock (line 150) | def iipsrv_sock
    method post_install (line 154) | def post_install
    method caveats (line 243) | def caveats; <<~EOS

FILE: Formula/osgeo-insighttoolkit.rb
  class OsgeoInsighttoolkit (line 1) | class OsgeoInsighttoolkit < Formula
    method install (line 53) | def install

FILE: Formula/osgeo-insighttoolkit@4.rb
  class OsgeoInsighttoolkitAT4 (line 1) | class OsgeoInsighttoolkitAT4 < Formula
    method install (line 55) | def install

FILE: Formula/osgeo-lastools.rb
  class OsgeoLastools (line 1) | class OsgeoLastools < Formula
    method install (line 30) | def install
    method caveats (line 57) | def caveats

FILE: Formula/osgeo-laszip@2.rb
  class OsgeoLaszipAT2 (line 1) | class OsgeoLaszipAT2 < Formula
    method install (line 23) | def install

FILE: Formula/osgeo-laz-perf.rb
  class OsgeoLazPerf (line 1) | class OsgeoLazPerf < Formula
    method install (line 25) | def install

FILE: Formula/osgeo-libgeotiff.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_libgeotiff_linked (line 6) | def core_libgeotiff_linked
    method message (line 12) | def message
  class OsgeoLibgeotiff (line 20) | class OsgeoLibgeotiff < Formula
    method install (line 56) | def install

FILE: Formula/osgeo-libght.rb
  class OsgeoLibght (line 1) | class OsgeoLibght < Formula
    method install (line 24) | def install

FILE: Formula/osgeo-libkml.rb
  class OsgeoLibkml (line 1) | class OsgeoLibkml < Formula
    method install (line 26) | def install

FILE: Formula/osgeo-liblas.rb
  class OsgeoLiblas (line 1) | class OsgeoLiblas < Formula
    method install (line 63) | def install
    method post_install (line 103) | def post_install

FILE: Formula/osgeo-libnoise.rb
  class OsgeoLibnoise (line 1) | class OsgeoLibnoise < Formula
    method install (line 33) | def install
    method caveats (line 67) | def caveats; <<~EOS

FILE: Formula/osgeo-libpqxx.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_libpqxx_linked (line 6) | def core_libpqxx_linked
    method message (line 12) | def message
  class OsgeoLibpqxx (line 20) | class OsgeoLibpqxx < Formula
    method install (line 58) | def install

FILE: Formula/osgeo-libspatialite.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_libspatialite_linked (line 6) | def core_libspatialite_linked
    method message (line 12) | def message
  class OsgeoLibspatialite (line 20) | class OsgeoLibspatialite < Formula
    method install (line 67) | def install

FILE: Formula/osgeo-mapnik.rb
  class OsgeoMapnik (line 1) | class OsgeoMapnik < Formula
    method install (line 122) | def install

FILE: Formula/osgeo-marble.rb
  class OsgeoMarble (line 1) | class OsgeoMarble < Formula
    method install (line 31) | def install

FILE: Formula/osgeo-matplotlib.rb
  class NoExternalPyCXXPackage (line 1) | class NoExternalPyCXXPackage < Requirement
    method message (line 8) | def message; <<~EOS
  class OsgeoMatplotlib (line 20) | class OsgeoMatplotlib < Formula
    method install (line 138) | def install

FILE: Formula/osgeo-mongo-cxx-driver-legacy.rb
  class OsgeoMongoCxxDriverLegacy (line 1) | class OsgeoMongoCxxDriverLegacy < Formula
    method install (line 41) | def install

FILE: Formula/osgeo-mrsid-sdk.rb
  class OsgeoMrsidSdk (line 3) | class OsgeoMrsidSdk < Formula
    method install (line 19) | def install
    method install_change (line 121) | def install_change(dylib, old, new)
    method set_install_name (line 130) | def set_install_name(dylib, dir)
    method caveats (line 135) | def caveats; <<~EOS

FILE: Formula/osgeo-muparserx.rb
  class OsgeoMuparserx (line 1) | class OsgeoMuparserx < Formula
    method install (line 21) | def install

FILE: Formula/osgeo-netcdf.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_netcdf_linked (line 6) | def core_netcdf_linked
    method message (line 12) | def message
  class OsgeoNetcdf (line 20) | class OsgeoNetcdf < Formula
    method install (line 64) | def install

FILE: Formula/osgeo-nitro.rb
  class OsgeoNitro (line 1) | class OsgeoNitro < Formula
    method install (line 23) | def install

FILE: Formula/osgeo-ogdi.rb
  class OsgeoOgdi (line 1) | class OsgeoOgdi < Formula
    method install (line 31) | def install

FILE: Formula/osgeo-opencollada.rb
  class OsgeoOpencollada (line 1) | class OsgeoOpencollada < Formula
    method install (line 45) | def install

FILE: Formula/osgeo-openscenegraph.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method osgeo_openscenegraph_linked (line 6) | def osgeo_openscenegraph_linked
    method core_openscenegraph_linked (line 12) | def core_openscenegraph_linked
    method message (line 18) | def message
  class OsgeoOpenscenegraph (line 27) | class OsgeoOpenscenegraph < Formula
    method install (line 97) | def install

FILE: Formula/osgeo-oracle-client-sdk.rb
  class OsgeoOracleClientSdk (line 3) | class OsgeoOracleClientSdk < Formula
    method fixup_rpaths (line 66) | def fixup_rpaths(mach_bins)
    method oracle_env_vars (line 79) | def oracle_env_vars
    method install (line 87) | def install
    method caveats (line 148) | def caveats

FILE: Formula/osgeo-orfeo.rb
  class OsgeoOrfeo (line 1) | class OsgeoOrfeo < Formula
    method install (line 130) | def install
    method caveats (line 274) | def caveats; <<~EOS

FILE: Formula/osgeo-osgearth.rb
  class OsgeoOsgearth (line 1) | class OsgeoOsgearth < Formula
    method install (line 64) | def install
    method caveats (line 163) | def caveats
    method py_ver (line 181) | def py_ver

FILE: Formula/osgeo-osgqt.rb
  class OsgeoOsgqt (line 1) | class OsgeoOsgqt < Formula
    method install (line 32) | def install

FILE: Formula/osgeo-osm2po.rb
  class CurlRefererDownloadStrategy (line 1) | class CurlRefererDownloadStrategy < CurlDownloadStrategy
    method _fetch (line 2) | def _fetch
  class OsgeoOsm2po (line 8) | class OsgeoOsm2po < Formula
    method install (line 25) | def install
    method caveats (line 33) | def caveats; <<~EOS

FILE: Formula/osgeo-ossim.rb
  class OsgeoOssim (line 1) | class OsgeoOssim < Formula
    method install (line 74) | def install

FILE: Formula/osgeo-pcl.rb
  class OsgeoPcl (line 1) | class OsgeoPcl < Formula
    method install (line 63) | def install

FILE: Formula/osgeo-pdal.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_pdal_linked (line 6) | def core_pdal_linked
    method message (line 12) | def message
  class OsgeoPdal (line 20) | class OsgeoPdal < Formula
    method install (line 92) | def install
    method py_ver (line 138) | def py_ver

FILE: Formula/osgeo-pdfium.rb
  class OsgeoPdfium (line 1) | class OsgeoPdfium < Formula
    method install (line 33) | def install
    method caveats (line 137) | def caveats; <<~EOS

FILE: Formula/osgeo-pgadmin3-lts.rb
  class OsgeoPgadmin3Lts (line 1) | class OsgeoPgadmin3Lts < Formula
    method install (line 91) | def install
    method caveats (line 263) | def caveats

FILE: Formula/osgeo-pgsql-ogr-fdw.rb
  class OsgeoPgsqlOgrFdw (line 1) | class OsgeoPgsqlOgrFdw < Formula
    method pour_bottle? (line 23) | def pour_bottle?
    method install (line 41) | def install
    method caveats (line 135) | def caveats;

FILE: Formula/osgeo-pointcloud.rb
  class OsgeoPointcloud (line 1) | class OsgeoPointcloud < Formula
    method install (line 55) | def install

FILE: Formula/osgeo-points2grid.rb
  class OsgeoPoints2grid (line 1) | class OsgeoPoints2grid < Formula
    method install (line 25) | def install

FILE: Formula/osgeo-postgis.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method osgeo_postgis_linked (line 6) | def osgeo_postgis_linked
    method core_postgis_linked (line 12) | def core_postgis_linked
    method message (line 18) | def message
  class OsgeoPostgis (line 27) | class OsgeoPostgis < Formula
    method install (line 93) | def install
    method caveats (line 215) | def caveats

FILE: Formula/osgeo-postgis@2.4.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method osgeo_postgis_linked (line 6) | def osgeo_postgis_linked
    method core_postgis_linked (line 12) | def core_postgis_linked
    method message (line 18) | def message
  class OsgeoPostgisAT24 (line 27) | class OsgeoPostgisAT24 < Formula
    method install (line 87) | def install
    method caveats (line 205) | def caveats

FILE: Formula/osgeo-postgis@2.5.rb
  class OsgeoPostgisAT25 (line 1) | class OsgeoPostgisAT25 < Formula
    method install (line 67) | def install
    method caveats (line 189) | def caveats

FILE: Formula/osgeo-postgresql.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method osgeo_postgresql11_linked (line 6) | def osgeo_postgresql11_linked
    method osgeo_postgresql10_linked (line 12) | def osgeo_postgresql10_linked
    method core_postgresql_linked (line 18) | def core_postgresql_linked
    method core_postgresql11_linked (line 24) | def core_postgresql11_linked
    method core_postgresql10_linked (line 30) | def core_postgresql10_linked
    method message (line 36) | def message
  class OsgeoPostgresql (line 48) | class OsgeoPostgresql < Formula
    method install (line 87) | def install
    method post_install (line 200) | def post_install
    method caveats (line 232) | def caveats; <<~EOS
    method plist (line 285) | def plist; <<~EOS

FILE: Formula/osgeo-postgresql@10.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method osgeo_postgresql_linked (line 6) | def osgeo_postgresql_linked
    method osgeo_postgresql11_linked (line 12) | def osgeo_postgresql11_linked
    method core_postgresql_linked (line 18) | def core_postgresql_linked
    method core_postgresql11_linked (line 24) | def core_postgresql11_linked
    method core_postgresql10_linked (line 30) | def core_postgresql10_linked
    method message (line 36) | def message
  class OsgeoPostgresqlAT10 (line 48) | class OsgeoPostgresqlAT10 < Formula
    method install (line 87) | def install
    method post_install (line 201) | def post_install
    method caveats (line 233) | def caveats; <<~EOS
    method plist (line 286) | def plist; <<~EOS

FILE: Formula/osgeo-postgresql@11.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method osgeo_postgresql_linked (line 6) | def osgeo_postgresql_linked
    method osgeo_postgresql10_linked (line 12) | def osgeo_postgresql10_linked
    method core_postgresql_linked (line 18) | def core_postgresql_linked
    method core_postgresql11_linked (line 24) | def core_postgresql11_linked
    method core_postgresql10_linked (line 30) | def core_postgresql10_linked
    method message (line 36) | def message
  class OsgeoPostgresqlAT11 (line 48) | class OsgeoPostgresqlAT11 < Formula
    method install (line 87) | def install
    method post_install (line 200) | def post_install
    method caveats (line 232) | def caveats; <<~EOS
    method plist (line 285) | def plist; <<~EOS

FILE: Formula/osgeo-proj.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_proj_linked (line 6) | def core_proj_linked
    method message (line 12) | def message
  class OsgeoProj (line 20) | class OsgeoProj < Formula
    method install (line 61) | def install

FILE: Formula/osgeo-psqlodbc.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_psqlodbc_linked (line 6) | def core_psqlodbc_linked
    method message (line 12) | def message
  class OsgeoPsqlodbc (line 20) | class OsgeoPsqlodbc < Formula
    method install (line 60) | def install

FILE: Formula/osgeo-pyqt-webkit.rb
  class OsgeoPyqtWebkit (line 1) | class OsgeoPyqtWebkit < Formula
    method install (line 30) | def install

FILE: Formula/osgeo-pyspatialite.rb
  class OsgeoPyspatialite (line 1) | class OsgeoPyspatialite < Formula
    method install (line 38) | def install

FILE: Formula/osgeo-qscintilla2.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_qscintilla2_linked (line 6) | def core_qscintilla2_linked
    method message (line 12) | def message
  class OsgeoQscintilla2 (line 20) | class OsgeoQscintilla2 < Formula
    method install (line 45) | def install

FILE: Formula/osgeo-qt-mysql.rb
  class OsgeoQtMysql (line 1) | class OsgeoQtMysql < Formula
    method install (line 31) | def install
    method caveats (line 45) | def caveats; <<~EOS

FILE: Formula/osgeo-qt-odbc.rb
  class OsgeoQtOdbc (line 1) | class OsgeoQtOdbc < Formula
    method install (line 31) | def install
    method caveats (line 45) | def caveats; <<~EOS

FILE: Formula/osgeo-qt-psql.rb
  class OsgeoQtPsql (line 1) | class OsgeoQtPsql < Formula
    method install (line 32) | def install
    method caveats (line 46) | def caveats; <<~EOS

FILE: Formula/osgeo-qt-webkit.rb
  class OsgeoQtWebkit (line 1) | class OsgeoQtWebkit < Formula
    method cmake_args (line 53) | def cmake_args
    method install (line 64) | def install

FILE: Formula/osgeo-qtkeychain.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_qtkeychain_linked (line 6) | def core_qtkeychain_linked
    method message (line 12) | def message
  class OsgeoQtkeychain (line 20) | class OsgeoQtkeychain < Formula
    method lib_name (line 48) | def lib_name
    method install (line 52) | def install
    method caveats (line 77) | def caveats

FILE: Formula/osgeo-saga-lts.rb
  class OsgeoSagaLts (line 1) | class OsgeoSagaLts < Formula
    method install (line 73) | def install
    method caveats (line 186) | def caveats

FILE: Formula/osgeo-saga.rb
  class OsgeoSaga (line 1) | class OsgeoSaga < Formula
    method install (line 80) | def install
    method caveats (line 188) | def caveats

FILE: Formula/osgeo-shark.rb
  class OsgeoShark (line 1) | class OsgeoShark < Formula
    method install (line 16) | def install

FILE: Formula/osgeo-simple-tiles.rb
  class OsgeoSimpleTiles (line 1) | class OsgeoSimpleTiles < Formula
    method install (line 25) | def install

FILE: Formula/osgeo-six.rb
  class OsgeoSix (line 1) | class OsgeoSix < Formula
    method install (line 32) | def install

FILE: Formula/osgeo-taudem.rb
  class OsgeoTaudem (line 1) | class OsgeoTaudem < Formula
    method install (line 30) | def install

FILE: Formula/osgeo-vigra.rb
  class OsgeoVigra (line 1) | class OsgeoVigra < Formula
    method install (line 66) | def install
    method caveats (line 95) | def caveats

FILE: Formula/osgeo-vtk.rb
  class OsgeoVtk (line 1) | class OsgeoVtk < Formula
    method install (line 167) | def install

FILE: Formula/osgeo-whitebox-tools.rb
  class OsgeoWhiteboxTools (line 1) | class OsgeoWhiteboxTools < Formula
    method install (line 18) | def install

FILE: Formula/osgeo-whitebox.rb
  class OsgeoWhitebox (line 1) | class OsgeoWhitebox < Formula
    method install (line 23) | def install
    method caveats (line 84) | def caveats

FILE: Formula/prepair.rb
  class Prepair (line 1) | class Prepair < Formula
    method install (line 20) | def install

FILE: Formula/qca-qt@5.7.rb
  class QcaQtAT57 (line 1) | class QcaQtAT57 < Formula
    method install (line 52) | def install

FILE: Formula/qt-ifw-qt5.rb
  class QtIfwQt5 (line 1) | class QtIfwQt5 < Formula
    method install (line 17) | def install
    method caveats (line 62) | def caveats; <<~EOS

FILE: Formula/qt-ifw.rb
  class QtIfw (line 1) | class QtIfw < Formula
    method install (line 9) | def install
    method caveats (line 25) | def caveats; <<~EOS

FILE: Formula/qt5-webkit-qt@5.7.rb
  class NoQt5WebKitAlreadyRequirement (line 1) | class NoQt5WebKitAlreadyRequirement < Requirement
    method message (line 5) | def message; <<~EOS
  class Qt5WebkitQtAT57 (line 11) | class Qt5WebkitQtAT57 < Formula
    method install (line 35) | def install

FILE: Formula/qtkeychain-qt@5.7.rb
  class QtkeychainQtAT57 (line 1) | class QtkeychainQtAT57 < Formula
    method install (line 24) | def install
    method caveats (line 47) | def caveats

FILE: Formula/travis-cache-seed.rb
  class TravisCacheSeed (line 1) | class TravisCacheSeed < Formula
    method install (line 86) | def install
    method caveats (line 90) | def caveats; <<~EOS

FILE: Requirements/gdal_third_party.rb
  class GdalThirdParty (line 1) | class GdalThirdParty < Requirement
    method message (line 9) | def message; <<~EOS

FILE: Requirements/grass_requirements.rb
  class UnlinkedGRASS7 (line 1) | class UnlinkedGRASS7 < Requirement
    method unlinked_grass (line 4) | def unlinked_grass
    method message (line 11) | def message
  class UnlinkedGRASS6 (line 28) | class UnlinkedGRASS6 < Requirement
    method unlinked_grass (line 31) | def unlinked_grass
    method message (line 38) | def message

FILE: Requirements/qgis_requirements.rb
  class UnlinkedQGIS2 (line 1) | class UnlinkedQGIS2 < Requirement
    method unlinked_qgis (line 4) | def unlinked_qgis
    method message (line 11) | def message
  class SipBinary (line 30) | class SipBinary < Requirement
    method message (line 36) | def message
  class PyQtConfig (line 45) | class PyQtConfig < Requirement
    method message (line 54) | def message

FILE: Strategies/cache-download.rb
  class CacheDownloadStrategy (line 1) | class CacheDownloadStrategy < CurlDownloadStrategy
    method fetch (line 2) | def fetch

FILE: boneyard/brew-stack.rb
  function usage (line 15) | def usage; <<-EOS
  class Stack (line 29) | class Stack
    method initialize (line 36) | def initialize formula, options=[], argv=nil, dry=false, all=false, ve...
    method tap_name (line 45) | def tap_name(f_obj)
    method to_tap_names (line 49) | def to_tap_names(f_name_list)
    method oohai (line 53) | def oohai title, *sput
    method ooh1 (line 59) | def ooh1 title
    method owell (line 64) | def owell title
    method install (line 68) | def install
    method attempt_install (line 124) | def attempt_install f_obj, args
    method pour_bottle? (line 148) | def pour_bottle? f

FILE: boneyard/enki.rb
  class Enki (line 3) | class Enki < Formula
    method install (line 16) | def install

FILE: boneyard/gdal-110.rb
  class Gdal110 (line 3) | class Gdal110 < Formula
    method get_configure_args (line 78) | def get_configure_args
    method install (line 209) | def install
    method caveats (line 258) | def caveats

FILE: boneyard/gdal-19.rb
  class Gdal19 (line 3) | class Gdal19 < Formula
    method get_configure_args (line 61) | def get_configure_args
    method install (line 182) | def install
    method which_python (line 237) | def which_python
    method caveats (line 242) | def caveats

FILE: boneyard/gdal-20.rb
  class Gdal20 (line 1) | class Gdal20 < Formula
    method configure_args (line 99) | def configure_args
    method install (line 234) | def install
    method caveats (line 306) | def caveats

FILE: boneyard/gdal-ecwjp2.rb
  class EcwJp2Sdk (line 3) | class EcwJp2Sdk < Requirement
    method message (line 7) | def message; <<~EOS
  class GdalEcwjp2 (line 17) | class GdalEcwjp2 < Formula
    method gdal_clib (line 26) | def gdal_clib
    method install (line 31) | def install
    method caveats (line 69) | def caveats; <<~EOS

FILE: boneyard/gdal-filegdb.rb
  class GdalFilegdb (line 3) | class GdalFilegdb < Formula
    method install (line 11) | def install
    method caveats (line 51) | def caveats; <<~EOS

FILE: boneyard/gdal-grass64.rb
  class GdalGrass64 (line 3) | class GdalGrass64 < Formula
    method install (line 21) | def install
    method caveats (line 37) | def caveats; <<~EOS

FILE: boneyard/gdal-mrsid.rb
  class GdalMrsid (line 1) | class GdalMrsid < Formula
    method install (line 9) | def install
    method caveats (line 55) | def caveats; <<~EOS

FILE: boneyard/gdal-oracle.rb
  class GdalOracle (line 1) | class GdalOracle < Formula
    method install (line 9) | def install
    method caveats (line 41) | def caveats; <<~EOS

FILE: boneyard/gdal-sosi.rb
  class GdalSosi (line 1) | class GdalSosi < Formula
    method install (line 9) | def install
    method caveats (line 41) | def caveats; <<~EOS

FILE: boneyard/gdal1-ecwjp2.rb
  class Gdal1Ecwjp2 (line 1) | class Gdal1Ecwjp2 < Formula
    method gdal_majmin_ver (line 10) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 15) | def gdal_plugins_subdirectory
    method gdal_clib (line 19) | def gdal_clib
    method install (line 24) | def install
    method caveats (line 63) | def caveats; <<~EOS

FILE: boneyard/gdal1-filegdb.rb
  class Gdal1Filegdb (line 1) | class Gdal1Filegdb < Formula
    method gdal_majmin_ver (line 10) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 15) | def gdal_plugins_subdirectory
    method install (line 19) | def install
    method caveats (line 53) | def caveats; <<~EOS

FILE: boneyard/gdal1-grass6.rb
  class Gdal1Grass6 (line 1) | class Gdal1Grass6 < Formula
    method gdal_majmin_ver (line 16) | def gdal_majmin_ver
    method install (line 21) | def install
    method caveats (line 43) | def caveats; <<~EOS

FILE: boneyard/gdal1-mrsid.rb
  class Gdal1Mrsid (line 1) | class Gdal1Mrsid < Formula
    method gdal_majmin_ver (line 10) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 15) | def gdal_plugins_subdirectory
    method install (line 19) | def install
    method caveats (line 65) | def caveats; <<~EOS

FILE: boneyard/gdal1-mysql.rb
  class Gdal1Mysql (line 1) | class Gdal1Mysql < Formula
    method gdal_majmin_ver (line 10) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 15) | def gdal_plugins_subdirectory
    method install (line 19) | def install
    method caveats (line 58) | def caveats; <<~EOS

FILE: boneyard/gdal1-oracle.rb
  class Gdal1Oracle (line 1) | class Gdal1Oracle < Formula
    method gdal_majmin_ver (line 10) | def gdal_majmin_ver
    method gdal_plugins_subdirectory (line 15) | def gdal_plugins_subdirectory
    method install (line 19) | def install
    method caveats (line 53) | def caveats; <<~EOS

FILE: boneyard/gpsbabel-qt4.rb
  class GpsbabelQt4 (line 1) | class GpsbabelQt4 < Formula
    method install (line 27) | def install

FILE: boneyard/grass-64.rb
  class Grass64 (line 1) | class Grass64 < Formula
    method headless? (line 44) | def headless?
    method install (line 49) | def install
    method post_install (line 122) | def post_install
    method formula_site_packages (line 130) | def formula_site_packages(f)
    method caveats (line 134) | def caveats

FILE: boneyard/grass-70.rb
  class Grass70 (line 1) | class Grass70 < Formula
    method headless? (line 49) | def headless?
    method install (line 54) | def install
    method formula_site_packages (line 148) | def formula_site_packages(f)
    method caveats (line 152) | def caveats

FILE: boneyard/grass6.rb
  class Grass6 (line 4) | class Grass6 < Formula
    method headless? (line 45) | def headless?
    method install (line 50) | def install
    method post_install (line 123) | def post_install
    method formula_site_packages (line 131) | def formula_site_packages(f)
    method caveats (line 135) | def caveats

FILE: boneyard/grass7-lts.rb
  class Grass7Lts (line 4) | class Grass7Lts < Formula
    method headless? (line 55) | def headless?
    method majmin_ver (line 60) | def majmin_ver
    method install (line 65) | def install
    method formula_site_packages (line 165) | def formula_site_packages(f)
    method caveats (line 169) | def caveats

FILE: boneyard/libgpkg.rb
  class RubyVersion19 (line 3) | class RubyVersion19 < Requirement
    method message (line 7) | def message; <<~EOS
  class Libgpkg (line 14) | class Libgpkg < Formula
    method install (line 31) | def install
    method caveats (line 44) | def caveats; <<~EOS

FILE: boneyard/mapcache-12.rb
  class Mapcache12 (line 1) | class Mapcache12 < Formula
    method install (line 32) | def install
    method caveats (line 79) | def caveats; <<~EOS

FILE: boneyard/mapserver-64.rb
  class JavaJDK (line 1) | class JavaJDK < Requirement
    method home (line 4) | def self.home
    method message (line 16) | def message; <<~EOS
  class Mapserver64 (line 28) | class Mapserver64 < Formula
    method png_prefix (line 97) | def png_prefix
    method freetype_prefix (line 102) | def freetype_prefix
    method install (line 107) | def install
    method caveats (line 256) | def caveats; <<~EOS
    method which_python (line 283) | def which_python

FILE: boneyard/minizip.rb
  class Minizip (line 3) | class Minizip < Formula
    method patches (line 17) | def patches
    method install (line 25) | def install
    method caveats (line 44) | def caveats

FILE: boneyard/openjpeg20.rb
  class Openjpeg20 (line 3) | class Openjpeg20 < Formula
    method install (line 17) | def install

FILE: boneyard/orfeo-32.rb
  class Orfeo32 (line 3) | class Orfeo32 < Formula
    method install (line 55) | def install

FILE: boneyard/orfeo-40.rb
  class Orfeo40 (line 3) | class Orfeo40 < Formula
    method install (line 49) | def install

FILE: boneyard/orfeo-42.rb
  class Orfeo42 (line 1) | class Orfeo42 < Formula
    method install (line 43) | def install

FILE: boneyard/orfeo-54.rb
  class Orfeo54 (line 1) | class Orfeo54 < Formula
    method install (line 55) | def install

FILE: boneyard/orfeo5.rb
  class Orfeo5 (line 1) | class Orfeo5 < Formula
    method install (line 85) | def install
    method caveats (line 149) | def caveats; <<~EOS

FILE: boneyard/orfeo5@5.4.rb
  class Orfeo5AT54 (line 1) | class Orfeo5AT54 < Formula
    method install (line 70) | def install
    method caveats (line 135) | def caveats; <<~EOS

FILE: boneyard/osgearth-qt4.rb
  class OsgearthQt4 (line 1) | class OsgearthQt4 < Formula
    method install (line 47) | def install
    method caveats (line 90) | def caveats

FILE: boneyard/osgearth.rb
  class Osgearth (line 3) | class Osgearth < Formula
    method patches (line 35) | def patches
    method install (line 39) | def install
    method caveats (line 87) | def caveats

FILE: boneyard/osgeo-proj@5.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_proj_linked (line 6) | def core_proj_linked
    method message (line 12) | def message
  class OsgeoProjAT5 (line 20) | class OsgeoProjAT5 < Formula
    method install (line 56) | def install

FILE: boneyard/osgeo-pyqt.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_pyqt_linked (line 6) | def core_pyqt_linked
    method message (line 12) | def message
  class OsgeoPyqt (line 20) | class OsgeoPyqt < Formula
    method install (line 45) | def install

FILE: boneyard/osgeo-qgis-ltr.rb
  class UnlinkedQGIS (line 6) | class UnlinkedQGIS < Requirement
    method qt4_linked (line 11) | def qt4_linked
    method pyqt4_linked (line 17) | def pyqt4_linked
    method txt2tags_linked (line 23) | def txt2tags_linked
    method message (line 29) | def message
  class OsgeoQgisLtr (line 39) | class OsgeoQgisLtr < Formula
    method pour_bottle? (line 61) | def pour_bottle?
    method install (line 308) | def install
    method post_install (line 842) | def post_install
    method caveats (line 1094) | def caveats
    method majmin_ver (line 1192) | def majmin_ver
    method brewed_oracle? (line 1210) | def brewed_oracle?
    method brewed_python? (line 1214) | def brewed_python?
    method python_exec (line 1218) | def python_exec
    method py_ver (line 1228) | def py_ver
    method python_prefix (line 1232) | def python_prefix
    method qgis_python_packages (line 1236) | def qgis_python_packages
    method qgis_site_packages (line 1240) | def qgis_site_packages
    method python_site_packages (line 1244) | def python_site_packages
    method gdal_python_packages (line 1248) | def gdal_python_packages
    method gdal_python_opt_bin (line 1252) | def gdal_python_opt_bin
    method gdal_opt_bin (line 1256) | def gdal_opt_bin

FILE: boneyard/osgeo-qgis-res.rb
  class OsgeoQgisRes (line 6) | class OsgeoQgisRes < Formula
    method install (line 121) | def install
    method caveats (line 233) | def caveats

FILE: boneyard/osgeo-qgis.rb
  class UnlinkedQGIS (line 6) | class UnlinkedQGIS < Requirement
    method qt4_linked (line 11) | def qt4_linked
    method pyqt4_linked (line 17) | def pyqt4_linked
    method txt2tags_linked (line 23) | def txt2tags_linked
    method message (line 29) | def message
  class OsgeoQgis (line 39) | class OsgeoQgis < Formula
    method pour_bottle? (line 61) | def pour_bottle?
    method install (line 308) | def install
    method post_install (line 842) | def post_install
    method caveats (line 1094) | def caveats
    method majmin_ver (line 1192) | def majmin_ver
    method brewed_oracle? (line 1210) | def brewed_oracle?
    method brewed_python? (line 1214) | def brewed_python?
    method python_exec (line 1218) | def python_exec
    method py_ver (line 1228) | def py_ver
    method python_prefix (line 1232) | def python_prefix
    method qgis_python_packages (line 1236) | def qgis_python_packages
    method qgis_site_packages (line 1240) | def qgis_site_packages
    method python_site_packages (line 1244) | def python_site_packages
    method gdal_python_packages (line 1248) | def gdal_python_packages
    method gdal_python_opt_bin (line 1252) | def gdal_python_opt_bin
    method gdal_opt_bin (line 1256) | def gdal_opt_bin

FILE: boneyard/osgeo-sip.rb
  class Unlinked (line 1) | class Unlinked < Requirement
    method core_sip_linked (line 6) | def core_sip_linked
    method message (line 12) | def message
  class OsgeoSip (line 21) | class OsgeoSip < Formula
    method install (line 45) | def install
    method post_install (line 71) | def post_install
    method caveats (line 75) | def caveats; <<~EOS

FILE: boneyard/ossim@2.1.rb
  class OssimAT21 (line 1) | class OssimAT21 < Formula
    method install (line 34) | def install

FILE: boneyard/pdfium.rb
  class Pdfium (line 1) | class Pdfium < Formula
    method pdfium_build_dir (line 29) | def pdfium_build_dir
    method copy_file_and_dir_path (line 33) | def copy_file_and_dir_path(dir_search, dst_pathname)
    method install (line 41) | def install
    method caveats (line 108) | def caveats; <<~EOS

FILE: boneyard/points2grid.rb
  class Points2grid (line 3) | class Points2grid < Formula
    method install (line 13) | def install

FILE: boneyard/pyqt-qt4.rb
  class PyqtQt4 (line 1) | class PyqtQt4 < Formula
    method install (line 18) | def install
    method caveats (line 92) | def caveats

FILE: boneyard/qca-qt4.rb
  class QcaQt4 (line 1) | class QcaQt4 < Formula
    method install (line 53) | def install

FILE: boneyard/qgis-18.rb
  class PyQtImportable (line 3) | class PyQtImportable < Requirement
    method message (line 7) | def message
  class Qgis18 (line 18) | class Qgis18 < Formula
    method install (line 39) | def install
    method caveats (line 86) | def caveats

FILE: boneyard/qgis-20.rb
  class UnlinkedQGIS20 (line 5) | class UnlinkedQGIS20 < UnlinkedQGIS
    method qgis_list (line 7) | def qgis_list
  class Qgis20 (line 13) | class Qgis20 < Formula
    method install (line 106) | def install
    method post_install (line 214) | def post_install
    method caveats (line 301) | def caveats
    method brewed_python_framework (line 374) | def brewed_python_framework
    method brewed_python_framework? (line 378) | def brewed_python_framework?
    method brewed_python? (line 382) | def brewed_python?
    method python_exec (line 386) | def python_exec
    method python_incdir (line 394) | def python_incdir
    method python_libdir (line 398) | def python_libdir
    method python_site_packages (line 402) | def python_site_packages
    method module_importable? (line 406) | def module_importable?(mod)

FILE: boneyard/qgis-214.rb
  class Qgis214 (line 4) | class Qgis214 < Formula
    method pour_bottle? (line 28) | def pour_bottle?
    method install (line 118) | def install
    method post_install (line 260) | def post_install
    method caveats (line 376) | def caveats
    method brewed_grass7? (line 462) | def brewed_grass7?
    method brewed_grass6? (line 466) | def brewed_grass6?
    method brewed_python_framework (line 470) | def brewed_python_framework
    method brewed_python_framework? (line 474) | def brewed_python_framework?
    method brewed_python? (line 478) | def brewed_python?
    method python_exec (line 482) | def python_exec
    method python_incdir (line 490) | def python_incdir
    method python_libdir (line 494) | def python_libdir
    method python_site_packages (line 498) | def python_site_packages
    method module_importable? (line 502) | def module_importable?(mod)

FILE: boneyard/qgis-22.rb
  class UnlinkedQGIS22 (line 5) | class UnlinkedQGIS22 < UnlinkedQGIS
    method qgis_formula_name (line 7) | def qgis_formula_name
  class Qgis22 (line 13) | class Qgis22 < Formula
    method install (line 96) | def install
    method post_install (line 199) | def post_install
    method caveats (line 284) | def caveats
    method brewed_python_framework (line 353) | def brewed_python_framework
    method brewed_python_framework? (line 357) | def brewed_python_framework?
    method brewed_python? (line 361) | def brewed_python?
    method python_exec (line 365) | def python_exec
    method python_incdir (line 373) | def python_incdir
    method python_libdir (line 377) | def python_libdir
    method python_site_packages (line 381) | def python_site_packages
    method module_importable? (line 385) | def module_importable?(mod)

FILE: boneyard/qgis-24.rb
  class UnlinkedQGIS24 (line 4) | class UnlinkedQGIS24 < UnlinkedQGIS
    method qgis_formula_name (line 6) | def qgis_formula_name
  class Qgis24 (line 12) | class Qgis24 < Formula
    method pour_bottle? (line 18) | def pour_bottle?
    method bottle_caveat (line 22) | def bottle_caveat
    method install (line 119) | def install
    method post_install (line 223) | def post_install
    method caveats (line 332) | def caveats
    method brewed_python_framework (line 419) | def brewed_python_framework
    method brewed_python_framework? (line 423) | def brewed_python_framework?
    method brewed_python? (line 427) | def brewed_python?
    method python_exec (line 431) | def python_exec
    method python_incdir (line 439) | def python_incdir
    method python_libdir (line 443) | def python_libdir
    method python_site_packages (line 447) | def python_site_packages
    method module_importable? (line 451) | def module_importable?(mod)

FILE: boneyard/qgis-26.rb
  class UnlinkedQGIS26 (line 4) | class UnlinkedQGIS26 < UnlinkedQGIS
    method qgis_formula_name (line 6) | def qgis_formula_name
  class Qgis26 (line 12) | class Qgis26 < Formula
    method pour_bottle? (line 24) | def pour_bottle?
    method install (line 118) | def install
    method post_install (line 228) | def post_install
    method caveats (line 337) | def caveats
    method brewed_python_framework (line 425) | def brewed_python_framework
    method brewed_python_framework? (line 429) | def brewed_python_framework?
    method brewed_python? (line 433) | def brewed_python?
    method python_exec (line 437) | def python_exec
    method python_incdir (line 445) | def python_incdir
    method python_libdir (line 449) | def python_libdir
    method python_site_packages (line 453) | def python_site_packages
    method module_importable? (line 457) | def module_importable?(mod)

FILE: boneyard/qgis-28.rb
  class UnlinkedQGIS28 (line 4) | class UnlinkedQGIS28 < UnlinkedQGIS
    method qgis_formula_name (line 6) | def qgis_formula_name
  class Qgis28 (line 12) | class Qgis28 < Formula
    method pour_bottle? (line 24) | def pour_bottle?
    method install (line 119) | def install
    method post_install (line 235) | def post_install
    method caveats (line 344) | def caveats
    method brewed_python_framework (line 425) | def brewed_python_framework
    method brewed_python_framework? (line 429) | def brewed_python_framework?
    method brewed_python? (line 433) | def brewed_python?
    method python_exec (line 437) | def python_exec
    method python_incdir (line 445) | def python_incdir
    method python_libdir (line 449) | def python_libdir
    method python_site_packages (line 453) | def python_site_packages
    method module_importable? (line 457) | def module_importable?(mod)

FILE: boneyard/qgis-ltr@2.rb
  class QgisLtrAT2 (line 1) | class QgisLtrAT2 < Formula
    method pour_bottle? (line 22) | def pour_bottle?
    method install (line 226) | def install
    method post_install (line 423) | def post_install
    method caveats (line 594) | def caveats
    method brewed_grass7? (line 677) | def brewed_grass7?
    method brewed_grass6? (line 681) | def brewed_grass6?
    method brewed_orfeo5? (line 685) | def brewed_orfeo5?
    method brewed_python_framework (line 689) | def brewed_python_framework
    method brewed_python_framework? (line 693) | def brewed_python_framework?
    method brewed_python? (line 697) | def brewed_python?
    method python_exec (line 701) | def python_exec
    method python_incdir (line 709) | def python_incdir
    method python_libdir (line 713) | def python_libdir
    method python_site_packages (line 717) | def python_site_packages
    method hb_lib_qt4 (line 721) | def hb_lib_qt4
    method python_qt4_site_packages (line 725) | def python_qt4_site_packages
    method lib_qt4 (line 729) | def lib_qt4
    method opt_lib_qt4 (line 733) | def opt_lib_qt4
    method module_importable? (line 737) | def module_importable?(mod)

FILE: boneyard/qjson-qt4.rb
  class QjsonQt4 (line 1) | class QjsonQt4 < Formula
    method install (line 18) | def install

FILE: boneyard/qscintilla2-qt4.rb
  class Qscintilla2Qt4 (line 1) | class Qscintilla2Qt4 < Formula
    method install (line 37) | def install
    method caveats (line 106) | def caveats

FILE: boneyard/qscintilla2.rb
  class Qscintilla2 (line 3) | class Qscintilla2 < Formula
    method install (line 11) | def install

FILE: boneyard/qt-4.rb
  class Qt4 (line 1) | class Qt4 < Formula
    method install (line 48) | def install
    method post_install (line 147) | def post_install
    method caveats (line 151) | def caveats; <<~EOS

FILE: boneyard/qt4-mysql.rb
  class NoQt4MysqlAlreadyRequirement (line 1) | class NoQt4MysqlAlreadyRequirement < Requirement
    method message (line 5) | def message; <<~EOS
  class Qt4Mysql (line 11) | class Qt4Mysql < Formula
    method install (line 30) | def install

FILE: boneyard/qt4-oracle.rb
  class Qt4Oracle (line 1) | class Qt4Oracle < Formula
    method oracle_env_vars (line 11) | def oracle_env_vars
    method install (line 24) | def install
    method caveats (line 55) | def caveats

FILE: boneyard/qtkeychain-qt4.rb
  class QtkeychainQt4 (line 1) | class QtkeychainQt4 < Formula
    method install (line 24) | def install
    method caveats (line 51) | def caveats

FILE: boneyard/quazip.rb
  class Quazip (line 3) | class Quazip < Formula
    method install (line 10) | def install

FILE: boneyard/qutepart.rb
  class Qutepart (line 3) | class Qutepart < Formula
    method install (line 12) | def install

FILE: boneyard/qwt-qt4.rb
  class QwtQt4 (line 1) | class QwtQt4 < Formula
    method install (line 24) | def install
    method caveats (line 52) | def caveats

FILE: boneyard/qwt-qt4@5.2.rb
  class QwtQt4AT52 (line 1) | class QwtQt4AT52 < Formula
    method install (line 16) | def install

FILE: boneyard/qwt60.rb
  class Qwt60 (line 3) | class Qwt60 < Formula
    method install (line 12) | def install
    method caveats (line 33) | def caveats; <<~EOS

FILE: boneyard/qwtpolar-qt4.rb
  class QwtpolarQt4 (line 1) | class QwtpolarQt4 < Formula
    method install (line 25) | def install
    method caveats (line 61) | def caveats

FILE: boneyard/qwtpolar.rb
  class Qwtpolar (line 3) | class Qwtpolar < Formula
    method install (line 13) | def install

FILE: boneyard/sip-qt4.rb
  class SipQt4 (line 1) | class SipQt4 < Formula
    method install (line 16) | def install
    method post_install (line 36) | def post_install
    method caveats (line 40) | def caveats

FILE: boneyard/spatialite-gui-17.rb
  class SpatialiteGui17 (line 3) | class SpatialiteGui17 < Formula
    method install (line 22) | def install

FILE: boneyard/v8318.rb
  class V8318 (line 8) | class V8318 < Formula
    method install (line 19) | def install

FILE: boneyard/wxmac-28.rb
  class Wxpython28 (line 3) | class Wxpython28 < Formula
  class Wxmac28 (line 11) | class Wxmac28 < Formula
    method test_python_arch (line 19) | def test_python_arch
    method install_wx_python (line 37) | def install_wx_python
    method install (line 69) | def install
    method caveats (line 102) | def caveats

FILE: boneyard/wxmac-29.rb
  class FrameworkPython (line 3) | class FrameworkPython < Requirement
    method message (line 11) | def message
  class Wxmac29 (line 16) | class Wxmac29 < Formula
    method install_wx_python (line 27) | def install_wx_python
    method install (line 56) | def install
    method caveats (line 101) | def caveats

FILE: boneyard/wxmac-mono.rb
  class WxmacMono (line 1) | class WxmacMono < Formula
    method install (line 23) | def install

FILE: docs/assets/js/just-the-docs.js
  function addEvent (line 3) | function addEvent(el, type, handler) {
  function removeEvent (line 6) | function removeEvent(el, type, handler) {
  function toggleNav (line 12) | function toggleNav(){
  function initSearch (line 34) | function initSearch() {
  function pageFocus (line 153) | function pageFocus() {
  function ready (line 162) | function ready(){

FILE: scripts/qgis2-cmake-options.py
  function cmake_opts (line 34) | def cmake_opts(qi, hb, ver):
  function arg_parser (line 149) | def arg_parser():
  function main (line 173) | def main():

FILE: scripts/qgis2-set-app-env.py
  function env_vars (line 37) | def env_vars(ap, hb, qb='', ql=''):
  function plist_bud (line 83) | def plist_bud(cmd, plist, quiet=False):
  function arg_parser (line 89) | def arg_parser():
  function main (line 120) | def main():
Condensed preview — 272 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,294K chars).
[
  {
    "path": ".ciignore",
    "chars": 169,
    "preview": "Aliases/*\nboneyard/*\nenviro/*\nRequirements/*\nscripts/*\nStrategies/*\ntravis/*\n.circleci/*\nLICENSE\n.ciignore\n.gitignore\n.g"
  },
  {
    "path": ".circleci/after_script.sh",
    "chars": 3390,
    "preview": "#!/usr/bin/env bash\n###########################################################################\n#    homebrew-osgeo4mac "
  },
  {
    "path": ".circleci/before_deploy.sh",
    "chars": 4287,
    "preview": "#!/usr/bin/env bash\n###########################################################################\n#    homebrew-osgeo4mac "
  },
  {
    "path": ".circleci/before_install.sh",
    "chars": 4922,
    "preview": "#!/usr/bin/env bash\n###########################################################################\n#    homebrew-osgeo4mac "
  },
  {
    "path": ".circleci/changed_formulas.sh",
    "chars": 1649,
    "preview": "#!/usr/bin/env bash\nset -e\n\nif [ \"$CIRCLE_BRANCH\" != \"master\" ]; then\n# manually added by env var. Will not be filtered "
  },
  {
    "path": ".circleci/config.yml",
    "chars": 5880,
    "preview": "# Supported Xcode Versions\n# https://circleci.com/docs/2.0/testing-ios/\n# 10.15 - 11.3.0 - Catalina\n# 10.14 - 11.1.0 - M"
  },
  {
    "path": ".circleci/install.sh",
    "chars": 1527,
    "preview": "#!/usr/bin/env bash\n###########################################################################\n#    homebrew-osgeo4mac "
  },
  {
    "path": ".circleci/script.sh",
    "chars": 4975,
    "preview": "#!/usr/bin/env bash\n###########################################################################\n#    homebrew-osgeo4mac "
  },
  {
    "path": ".circleci/set_env.sh",
    "chars": 2445,
    "preview": "#!/usr/bin/env bash\n###########################################################################\n#    homebrew-osgeo4mac "
  },
  {
    "path": ".circleci/skip-formulas.txt",
    "chars": 64,
    "preview": "ossgeo-gdal-ecwjp2\nosgeo-gdal-oracle\nosgeo-gdal-mrsid\ngpkgtools\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 1492,
    "preview": "---\nname: Bug report\nabout: Create a report about a problem you've come across\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 635,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 1359,
    "preview": "# Description\n\nPlease include a summary of the change and which issue is fixed. Please also include relevant motivation "
  },
  {
    "path": ".github/stale.yml",
    "chars": 2118,
    "preview": "# Configuration for probot-stale - https://github.com/probot/stale\n\n# Number of days of inactivity before an Issue or Pu"
  },
  {
    "path": ".gitignore",
    "chars": 97,
    "preview": "*.orig\n\n.idea/\n**/*.iml\n\n/docs/_site\n/docs/.jekyll-metadata\n/docs/.sass-cache\n/docs/Gemfile.lock\n"
  },
  {
    "path": ".travis.yml",
    "chars": 4736,
    "preview": "language: ruby\nrvm:\n  - 2.3.7\n# language: python\n# python:\n#  - \"2.7\"\nos: osx\nenv: OSX=10.12\nosx_image: xcode8.3\nsudo: r"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 6085,
    "preview": "# Code of conduct\n\nThis code of conduct governs how we behave in any OSGeo forum or event and whenever we will be judged"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 3876,
    "preview": "# Contributing to Homebrew-osgeo4mac\n\nFirst time contributing to Homebrew-osgeo4mac? Read our [Code of Conduct](CODE_OF_"
  },
  {
    "path": "Formula/mapcache.rb",
    "chars": 4204,
    "preview": "class Mapcache < Formula\n  desc \"Server that implements tile caching to speed up access to WMS layers.\"\n  homepage \"http"
  },
  {
    "path": "Formula/mapserver6.rb",
    "chars": 11868,
    "preview": "class JavaJDK < Requirement\n  fatal true\n\n  def self.home\n    [\n      `/usr/libexec/java_home`.chomp!,\n      ENV[\"JAVA_H"
  },
  {
    "path": "Formula/osgeo-ecwjp2-sdk.rb",
    "chars": 2601,
    "preview": "require File.expand_path(\"../../Strategies/cache-download\", Pathname.new(__FILE__).realpath)\n\nECWJP2_SDK = \"/Hexagon/ERD"
  },
  {
    "path": "Formula/osgeo-fcgi-debug.rb",
    "chars": 1096,
    "preview": "class OsgeoFcgiDebug < Formula\n  desc \"Helps trace FastCGI programs without having to strace them\"\n  homepage \"http://re"
  },
  {
    "path": "Formula/osgeo-filegdb-api.rb",
    "chars": 2317,
    "preview": "class OsgeoFilegdbApi < Formula\n  desc \"ESRI File Geodatabase C++ API libraries\"\n  homepage \"https://github.com/Esri/fil"
  },
  {
    "path": "Formula/osgeo-fyba.rb",
    "chars": 1937,
    "preview": "class OsgeoFyba < Formula\n  desc \"Library to read/write Norwegian National geodata standard (SOSI) files\"\n  homepage \"ht"
  },
  {
    "path": "Formula/osgeo-gdal-ecwjp2.rb",
    "chars": 2750,
    "preview": "class OsgeoGdalEcwjp2 < Formula\n  desc \"GDAL/OGR 3.x plugin for ECW driver\"\n  homepage \"http://www.gdal.org/frmt_ecw.htm"
  },
  {
    "path": "Formula/osgeo-gdal-filegdb.rb",
    "chars": 2464,
    "preview": "class OsgeoGdalFilegdb < Formula\n  desc \"GDAL/OGR 3.x plugin for ESRI FileGDB driver\"\n  homepage \"http://www.gdal.org/dr"
  },
  {
    "path": "Formula/osgeo-gdal-grass.rb",
    "chars": 2296,
    "preview": "class OsgeoGdalGrass < Formula\n  desc \"GDAL/OGR 3.x plugin for GRASS 7\"\n  homepage \"https://www.gdal.org\"\n  url \"https:/"
  },
  {
    "path": "Formula/osgeo-gdal-mdb.rb",
    "chars": 6004,
    "preview": "class OsgeoGdalMdb < Formula\n  desc \"GDAL/OGR 3.x plugin for MDB driver\"\n  homepage \"http://www.gdal.org/drv_mdb.html\"\n "
  },
  {
    "path": "Formula/osgeo-gdal-mongodb.rb",
    "chars": 3694,
    "preview": "class OsgeoGdalMongodb < Formula\n  desc \"GDAL/OGR 3.x plugin for MongoDB driver\"\n  homepage \"http://www.gdal.org/drv_mon"
  },
  {
    "path": "Formula/osgeo-gdal-mrsid.rb",
    "chars": 2687,
    "preview": "class OsgeoGdalMrsid < Formula\n  desc \"GDAL/OGR 3.x plugin for MrSID raster and LiDAR drivers\"\n  homepage \"http://www.gd"
  },
  {
    "path": "Formula/osgeo-gdal-mysql.rb",
    "chars": 2495,
    "preview": "class OsgeoGdalMysql < Formula\n  desc \"GDAL/OGR 3.x plugin for MySQL driver\"\n  homepage \"http://www.gdal.org/drv_mysql.h"
  },
  {
    "path": "Formula/osgeo-gdal-ogdi.rb",
    "chars": 2819,
    "preview": "class OsgeoGdalOgdi < Formula\n  desc \"GDAL/OGR 3.x plugin for OGDI driver\"\n  homepage \"http://www.gdal.org/drv_ogdi.html"
  },
  {
    "path": "Formula/osgeo-gdal-oracle.rb",
    "chars": 2167,
    "preview": "class OsgeoGdalOracle < Formula\n  desc \"GDAL/OGR 3.x plugin for Oracle Spatial driver\"\n  homepage \"http://www.gdal.org/d"
  },
  {
    "path": "Formula/osgeo-gdal-pdf.rb",
    "chars": 5748,
    "preview": "class OsgeoGdalPdf < Formula\n  desc \"GDAL/OGR 3.x plugin for PDF driver\"\n  homepage \"http://www.gdal.org/frmt_pdf.html\"\n"
  },
  {
    "path": "Formula/osgeo-gdal-python.rb",
    "chars": 4301,
    "preview": "class OsgeoGdalPython < Formula\n  def self.gdal\n    Formula[\"osgeo-gdal\"]\n  end\n\n  def gdal\n    self.class.gdal\n  end\n\n "
  },
  {
    "path": "Formula/osgeo-gdal-sosi.rb",
    "chars": 2468,
    "preview": "class OsgeoGdalSosi < Formula\n  desc \"GDAL/OGR 3.x plugin for SOSI driver\"\n  homepage \"https://trac.osgeo.org/gdal/wiki/"
  },
  {
    "path": "Formula/osgeo-gdal.rb",
    "chars": 12765,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_gdal_linked }\n\n  def core_gdal_linked\n"
  },
  {
    "path": "Formula/osgeo-gmt.rb",
    "chars": 3912,
    "preview": "class OsgeoGmt < Formula\n  include Language::Python::Virtualenv\n  desc \"Tools for processing and displaying xy and xyz d"
  },
  {
    "path": "Formula/osgeo-gpkgtools.rb",
    "chars": 1853,
    "preview": "require 'formula'\n\nclass OsgeoGpkgtools < Formula\n  desc \"Some tools for the GeoPackage mapping (vector, tiles and raste"
  },
  {
    "path": "Formula/osgeo-grass.rb",
    "chars": 26313,
    "preview": "class OsgeoGrass < Formula\n  include Language::Python::Virtualenv\n\n  desc \"Geographic Resources Analysis Support System\""
  },
  {
    "path": "Formula/osgeo-hdf4.rb",
    "chars": 2734,
    "preview": "class OsgeoHdf4 < Formula\n  homepage \"http://www.hdfgroup.org\"\n  url \"https://support.hdfgroup.org/ftp/HDF/releases/HDF4"
  },
  {
    "path": "Formula/osgeo-hexer.rb",
    "chars": 2168,
    "preview": "class OsgeoHexer < Formula\n  desc \"LAS and OGR hexagonal density and boundary surface generation\"\n  homepage \"https://gi"
  },
  {
    "path": "Formula/osgeo-iipsrv.rb",
    "chars": 8832,
    "preview": "class OsgeoIipsrv < Formula\n  desc \"Publish spatial data and interactive mapping apps to the web\"\n  homepage \"https://gi"
  },
  {
    "path": "Formula/osgeo-insighttoolkit.rb",
    "chars": 7213,
    "preview": "class OsgeoInsighttoolkit < Formula\n  desc \"ITK is a toolkit for performing registration and segmentation\"\n  homepage \"h"
  },
  {
    "path": "Formula/osgeo-insighttoolkit@4.rb",
    "chars": 7240,
    "preview": "class OsgeoInsighttoolkitAT4 < Formula\n  desc \"ITK is a toolkit for performing registration and segmentation\"\n  homepage"
  },
  {
    "path": "Formula/osgeo-lastools.rb",
    "chars": 2655,
    "preview": "class OsgeoLastools < Formula\n  desc \"Efficient tools for LiDAR processing. Contains LASlib, a C++ programming API for r"
  },
  {
    "path": "Formula/osgeo-laszip@2.rb",
    "chars": 884,
    "preview": "class OsgeoLaszipAT2 < Formula\n  desc \"Lossless LiDAR compression\"\n  homepage \"https://www.laszip.org/\"\n  url \"https://g"
  },
  {
    "path": "Formula/osgeo-laz-perf.rb",
    "chars": 1051,
    "preview": "class OsgeoLazPerf < Formula\n  desc \"Alternative LAZ implementation for C++ and JavaScript\"\n  homepage \"https://github.c"
  },
  {
    "path": "Formula/osgeo-libgeotiff.rb",
    "chars": 3120,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_libgeotiff_linked }\n\n  def core_libgeo"
  },
  {
    "path": "Formula/osgeo-libght.rb",
    "chars": 1204,
    "preview": "class OsgeoLibght < Formula\n  desc \"GeoHashTree for storing and accessing multi-dimensional point clouds\"\n  homepage \"ht"
  },
  {
    "path": "Formula/osgeo-libkml.rb",
    "chars": 1574,
    "preview": "class OsgeoLibkml < Formula\n  desc \"Library to parse, generate and operate on KML (development version)\"\n  homepage \"htt"
  },
  {
    "path": "Formula/osgeo-liblas.rb",
    "chars": 8558,
    "preview": "class OsgeoLiblas < Formula\n  desc \"C/C++ library for reading and writing the LAS LiDAR format\"\n  homepage \"https://libl"
  },
  {
    "path": "Formula/osgeo-libnoise.rb",
    "chars": 3031,
    "preview": "class OsgeoLibnoise < Formula\n  desc \"Portable, open-source, coherent noise-generating library for C++\"\n  homepage \"http"
  },
  {
    "path": "Formula/osgeo-libpqxx.rb",
    "chars": 2648,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_libpqxx_linked }\n\n  def core_libpqxx_l"
  },
  {
    "path": "Formula/osgeo-libspatialite.rb",
    "chars": 3661,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_libspatialite_linked }\n\n  def core_lib"
  },
  {
    "path": "Formula/osgeo-mapnik.rb",
    "chars": 11909,
    "preview": "class OsgeoMapnik < Formula\n  include Language::Python::Virtualenv\n  desc \"Toolkit for developing mapping applications\"\n"
  },
  {
    "path": "Formula/osgeo-marble.rb",
    "chars": 2288,
    "preview": "class OsgeoMarble < Formula\n  homepage \"http://marble.kde.org/\"\n  url \"https://download.kde.org/stable/applications/19.0"
  },
  {
    "path": "Formula/osgeo-matplotlib.rb",
    "chars": 6422,
    "preview": "class NoExternalPyCXXPackage < Requirement\n  fatal false\n\n  satisfy do\n    !quiet_system \"python3\", \"-c\", \"import CXX\"\n "
  },
  {
    "path": "Formula/osgeo-mongo-cxx-driver-legacy.rb",
    "chars": 5168,
    "preview": "class OsgeoMongoCxxDriverLegacy < Formula\n  desc \"C++ driver for MongoDB\"\n  homepage \"https://github.com/mongodb/mongo-c"
  },
  {
    "path": "Formula/osgeo-mrsid-sdk.rb",
    "chars": 4750,
    "preview": "require File.expand_path(\"../../Strategies/cache-download\", Pathname.new(__FILE__).realpath)\n\nclass OsgeoMrsidSdk < Form"
  },
  {
    "path": "Formula/osgeo-muparserx.rb",
    "chars": 1079,
    "preview": "class OsgeoMuparserx < Formula\n  desc \"the muparserx math parser library\"\n  homepage \"http://articles.beltoforion.de/art"
  },
  {
    "path": "Formula/osgeo-netcdf.rb",
    "chars": 5902,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_netcdf_linked }\n\n  def core_netcdf_lin"
  },
  {
    "path": "Formula/osgeo-nitro.rb",
    "chars": 1000,
    "preview": "class OsgeoNitro < Formula\n  desc \"Library reading/writing the National Imagery Transmission Format (NITF).\"\n  homepage "
  },
  {
    "path": "Formula/osgeo-ogdi.rb",
    "chars": 5233,
    "preview": "class OsgeoOgdi < Formula\n  desc \"Open Geographic Datastore Interface - client/server API for GIS\"\n  homepage \"https://o"
  },
  {
    "path": "Formula/osgeo-opencollada.rb",
    "chars": 2034,
    "preview": "class OsgeoOpencollada < Formula\n  desc \"Stream based reader and writer library for COLLADA files\"\n  homepage \"http://ww"
  },
  {
    "path": "Formula/osgeo-openscenegraph.rb",
    "chars": 8480,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !osgeo_openscenegraph_linked && !core_opensc"
  },
  {
    "path": "Formula/osgeo-oracle-client-sdk.rb",
    "chars": 5868,
    "preview": "require File.expand_path(\"../../Strategies/cache-download\", Pathname.new(__FILE__).realpath)\n\nclass OsgeoOracleClientSdk"
  },
  {
    "path": "Formula/osgeo-orfeo.rb",
    "chars": 12523,
    "preview": "class OsgeoOrfeo < Formula\n  desc \"Library of image processing algorithms\"\n  homepage \"https://www.orfeo-toolbox.org/otb"
  },
  {
    "path": "Formula/osgeo-osgearth.rb",
    "chars": 11837,
    "preview": "class OsgeoOsgearth < Formula\n  desc \"Geospatial SDK and terrain engine for OpenSceneGraph\"\n  homepage \"http://osgearth."
  },
  {
    "path": "Formula/osgeo-osgqt.rb",
    "chars": 3207,
    "preview": "class OsgeoOsgqt < Formula\n  desc \"3D graphics toolkit (osgQt)\"\n  homepage \"https://github.com/openscenegraph/osgQt\"\n  u"
  },
  {
    "path": "Formula/osgeo-osm2po.rb",
    "chars": 1316,
    "preview": "class CurlRefererDownloadStrategy < CurlDownloadStrategy\n  def _fetch\n    domain_url = @url.sub(/([^:]+:\\/\\/[^\\/]+)(.*)/"
  },
  {
    "path": "Formula/osgeo-ossim.rb",
    "chars": 5499,
    "preview": "class OsgeoOssim < Formula\n  desc \"Geospatial libs and apps to process imagery, terrain, and vector data\"\n  homepage \"ht"
  },
  {
    "path": "Formula/osgeo-pcl.rb",
    "chars": 2723,
    "preview": "class OsgeoPcl < Formula\n  desc \"Library for 2D/3D image and point cloud processing\"\n  homepage \"http://www.pointclouds."
  },
  {
    "path": "Formula/osgeo-pdal.rb",
    "chars": 4690,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_pdal_linked }\n\n  def core_pdal_linked\n"
  },
  {
    "path": "Formula/osgeo-pdfium.rb",
    "chars": 5364,
    "preview": "class OsgeoPdfium < Formula\n  desc \"Google-contributed PDF library (without V8 JavaScript engine)\"\n  homepage \"https://p"
  },
  {
    "path": "Formula/osgeo-pgadmin3-lts.rb",
    "chars": 10217,
    "preview": "class OsgeoPgadmin3Lts < Formula\n  # include Language::Python::Virtualenv\n  desc \"Comprehensive design and management in"
  },
  {
    "path": "Formula/osgeo-pgsql-ogr-fdw.rb",
    "chars": 5148,
    "preview": "class OsgeoPgsqlOgrFdw < Formula\n  desc \"PostgreSQL foreign data wrapper for OGR\"\n  homepage \"https://github.com/pramsey"
  },
  {
    "path": "Formula/osgeo-pointcloud.rb",
    "chars": 5359,
    "preview": "class OsgeoPointcloud < Formula\n  desc \"PostgreSQL extension for storing point cloud (LIDAR) data\"\n  homepage \"https://g"
  },
  {
    "path": "Formula/osgeo-points2grid.rb",
    "chars": 1336,
    "preview": "class OsgeoPoints2grid < Formula\n  desc \"Generate digital elevation models using local griding\"\n  homepage \"https://gith"
  },
  {
    "path": "Formula/osgeo-postgis.rb",
    "chars": 10701,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !osgeo_postgis_linked && !core_postgis_linke"
  },
  {
    "path": "Formula/osgeo-postgis@2.4.rb",
    "chars": 10120,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !osgeo_postgis_linked && !core_postgis_linke"
  },
  {
    "path": "Formula/osgeo-postgis@2.5.rb",
    "chars": 9953,
    "preview": "class OsgeoPostgisAT25 < Formula\n  desc \"Adds support for geographic objects to PostgreSQL\"\n  homepage \"https://postgis."
  },
  {
    "path": "Formula/osgeo-postgresql.rb",
    "chars": 12384,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !osgeo_postgresql11_linked && !osgeo_postgre"
  },
  {
    "path": "Formula/osgeo-postgresql@10.rb",
    "chars": 12448,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !osgeo_postgresql11_linked && !osgeo_postgre"
  },
  {
    "path": "Formula/osgeo-postgresql@11.rb",
    "chars": 12374,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !osgeo_postgresql_linked && !osgeo_postgresq"
  },
  {
    "path": "Formula/osgeo-proj.rb",
    "chars": 2724,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_proj_linked }\n\n  def core_proj_linked\n"
  },
  {
    "path": "Formula/osgeo-psqlodbc.rb",
    "chars": 2044,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_psqlodbc_linked }\n\n  def core_psqlodbc"
  },
  {
    "path": "Formula/osgeo-pyqt-webkit.rb",
    "chars": 3082,
    "preview": "class OsgeoPyqtWebkit < Formula\n  desc \"Python bindings for v5 of Qt's Webkit\"\n  homepage \"https://www.riverbankcomputin"
  },
  {
    "path": "Formula/osgeo-pyspatialite.rb",
    "chars": 2073,
    "preview": "class OsgeoPyspatialite < Formula\n  desc \"DB-API 2.0 interface for SQLite with Spatialite\"\n  homepage \"https://code.goog"
  },
  {
    "path": "Formula/osgeo-qscintilla2.rb",
    "chars": 3688,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_qscintilla2_linked }\n\n  def core_qscin"
  },
  {
    "path": "Formula/osgeo-qt-mysql.rb",
    "chars": 3638,
    "preview": "class OsgeoQtMysql < Formula\n  desc \"Qt SQL Database Driver - QMYSQL for MySQL 4 and higher\"\n  homepage \"https://doc.qt."
  },
  {
    "path": "Formula/osgeo-qt-odbc.rb",
    "chars": 3656,
    "preview": "class OsgeoQtOdbc < Formula\n  desc \"Qt SQL Database Driver - QODBC for Open Database Connectivity (ODBC)\"\n  homepage \"ht"
  },
  {
    "path": "Formula/osgeo-qt-psql.rb",
    "chars": 3665,
    "preview": "class OsgeoQtPsql < Formula\n  desc \"Qt SQL Database Driver - QPSQL for PostgreSQL\"\n  homepage \"https://doc.qt.io/qt-5/sq"
  },
  {
    "path": "Formula/osgeo-qt-webkit.rb",
    "chars": 10743,
    "preview": "class OsgeoQtWebkit < Formula\n  desc \"Classes for a WebKit2 based implementation and a new QML API\"\n  homepage \"https://"
  },
  {
    "path": "Formula/osgeo-qtkeychain.rb",
    "chars": 2724,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_qtkeychain_linked }\n\n  def core_qtkeyc"
  },
  {
    "path": "Formula/osgeo-saga-lts.rb",
    "chars": 7653,
    "preview": "class OsgeoSagaLts < Formula\n  desc \"System for Automated Geoscientific Analyses - Long Term Support\"\n  homepage \"http:/"
  },
  {
    "path": "Formula/osgeo-saga.rb",
    "chars": 7695,
    "preview": "class OsgeoSaga < Formula\n  desc \"System for Automated Geoscientific Analyses - Long Term Support\"\n  homepage \"http://sa"
  },
  {
    "path": "Formula/osgeo-shark.rb",
    "chars": 984,
    "preview": "class OsgeoShark < Formula\n  desc \"Machine leaning library\"\n  homepage \"http://image.diku.dk/shark/\"\n  url \"https://gith"
  },
  {
    "path": "Formula/osgeo-simple-tiles.rb",
    "chars": 1594,
    "preview": "class OsgeoSimpleTiles < Formula\n  desc \"Image generation library for spatial data\"\n  homepage \"https://propublica.githu"
  },
  {
    "path": "Formula/osgeo-six.rb",
    "chars": 2108,
    "preview": "class OsgeoSix < Formula\n  desc \"Python 2 and 3 compatibility utilities\"\n  homepage \"https://pypi.python.org/pypi/six\"\n "
  },
  {
    "path": "Formula/osgeo-taudem.rb",
    "chars": 1408,
    "preview": "class OsgeoTaudem < Formula\n  desc \"Terrain Analysis Using Digital Elevation Models for hydrology\"\n  homepage \"http://hy"
  },
  {
    "path": "Formula/osgeo-vigra.rb",
    "chars": 3787,
    "preview": "class OsgeoVigra < Formula\n  include Language::Python::Virtualenv\n  desc \"Image processing and analysis library\"\n  homep"
  },
  {
    "path": "Formula/osgeo-vtk.rb",
    "chars": 54146,
    "preview": "class OsgeoVtk < Formula\n  # include Language::Python::Virtualenv\n  desc \"Toolkit for 3D computer graphics, image proces"
  },
  {
    "path": "Formula/osgeo-whitebox-tools.rb",
    "chars": 938,
    "preview": "class OsgeoWhiteboxTools < Formula\n  desc \"An advanced geospatial data analysis platform\"\n  homepage \"https://www.uoguel"
  },
  {
    "path": "Formula/osgeo-whitebox.rb",
    "chars": 3344,
    "preview": "class OsgeoWhitebox < Formula\n  desc \"Geographic information system (GIS) and remote sensing package intended for advanc"
  },
  {
    "path": "Formula/prepair.rb",
    "chars": 1334,
    "preview": "class Prepair < Formula\n  desc \"Automatic repair of single GIS polygons using constrained triangulation\"\n  homepage \"htt"
  },
  {
    "path": "Formula/qca-qt@5.7.rb",
    "chars": 2722,
    "preview": "class QcaQtAT57 < Formula\n  desc \"Qt Cryptographic Architecture (QCA)\"\n  homepage \"http://delta.affinix.com/qca/\"\n  head"
  },
  {
    "path": "Formula/qt-ifw-qt5.rb",
    "chars": 3827,
    "preview": "class QtIfwQt5 < Formula\n  desc \"Static build of version 5 of Qt for use in Qt Installer Framework\"\n  homepage \"http://q"
  },
  {
    "path": "Formula/qt-ifw.rb",
    "chars": 1001,
    "preview": "class QtIfw < Formula\n  desc \"Tools and utilities to create installers for Qt desktop platforms\"\n  homepage \"http://qt-p"
  },
  {
    "path": "Formula/qt5-webkit-qt@5.7.rb",
    "chars": 6982,
    "preview": "class NoQt5WebKitAlreadyRequirement < Requirement\n  fatal true\n  satisfy(:build_env => false) { !(Formula[\"qt@5.7\"].lib/"
  },
  {
    "path": "Formula/qtkeychain-qt@5.7.rb",
    "chars": 1857,
    "preview": "class QtkeychainQtAT57 < Formula\n  desc \"Platform-independent Qt API for storing passwords securely\"\n  homepage \"https:/"
  },
  {
    "path": "Formula/travis-cache-seed.rb",
    "chars": 2696,
    "preview": "class TravisCacheSeed < Formula\n  desc \"Trigger update of Travis CI cache with geospatial dependencies\"\n  homepage \"http"
  },
  {
    "path": "LICENSE",
    "chars": 1533,
    "preview": "BSD 3-Clause License\n\nCopyright (c) 2003, Open Source Geospatial Foundation\nAll rights reserved.\n\nRedistribution and use"
  },
  {
    "path": "README.md",
    "chars": 2117,
    "preview": "![docs/assets/images/osgeo-logo-brew-rgb.png](docs/assets/images/osgeo-logo-brew-rgb.png)\n\n\n\n# Homebrew-osgeo4mac\n\n**Bui"
  },
  {
    "path": "Requirements/gdal_third_party.rb",
    "chars": 400,
    "preview": "class GdalThirdParty < Requirement\n  fatal true\n\n  satisfy do\n    envar = ENV['GDAL_THIRD_PARTY']\n    envar && File.exis"
  },
  {
    "path": "Requirements/grass_requirements.rb",
    "chars": 1543,
    "preview": "class UnlinkedGRASS7 < Requirement\n  fatal true\n\n  def unlinked_grass\n    found = `readlink ${HOMEBREW_PREFIX}/bin/grass"
  },
  {
    "path": "Requirements/qgis_requirements.rb",
    "chars": 2020,
    "preview": "class UnlinkedQGIS2 < Requirement\n  fatal true\n\n  def unlinked_qgis\n    found = `readlink ${HOMEBREW_PREFIX}/bin/qgis | "
  },
  {
    "path": "Strategies/cache-download.rb",
    "chars": 487,
    "preview": "class CacheDownloadStrategy < CurlDownloadStrategy\n  def fetch\n    archive = @url.sub(%r[^file://], \"\")\n    unless File."
  },
  {
    "path": "boneyard/brew-stack.rb",
    "chars": 5923,
    "preview": "# Install a formula and dependencies from pre-made bottles or as built bottles.\n#\n# Useful for creating a portable Homeb"
  },
  {
    "path": "boneyard/enki.rb",
    "chars": 595,
    "preview": "require \"formula\"\n\nclass Enki < Formula\n  homepage \"http://enki-editor.org/\"\n  url \"https://github.com/hlamer/enki/archi"
  },
  {
    "path": "boneyard/gdal-110.rb",
    "chars": 15048,
    "preview": "require 'formula'\n\nclass Gdal110 < Formula\n  homepage 'http://www.gdal.org/'\n  url 'http://download.osgeo.org/gdal/1.10."
  },
  {
    "path": "boneyard/gdal-19.rb",
    "chars": 8940,
    "preview": "require 'formula'\n\nclass Gdal19 < Formula\n  homepage 'http://www.gdal.org/'\n  url 'http://download.osgeo.org/gdal/gdal-1"
  },
  {
    "path": "boneyard/gdal-20.rb",
    "chars": 10853,
    "preview": "class Gdal20 < Formula\n  desc \"GDAL: Geospatial Data Abstraction Library\"\n  homepage \"http://www.gdal.org/\"\n  url \"http:"
  },
  {
    "path": "boneyard/gdal-ecwjp2.rb",
    "chars": 2494,
    "preview": "ECWJP2_SDK = \"/Hexagon/ERDASEcwJpeg2000SDK5.2.1/Desktop_Read-Only\"\n\nclass EcwJp2Sdk < Requirement\n  fatal true\n  satisfy"
  },
  {
    "path": "boneyard/gdal-filegdb.rb",
    "chars": 2283,
    "preview": "require 'formula'\n\nclass GdalFilegdb < Formula\n  homepage 'http://www.gdal.org/ogr/drv_filegdb.html'\n  url 'http://downl"
  },
  {
    "path": "boneyard/gdal-grass64.rb",
    "chars": 1574,
    "preview": "require 'formula'\n\nclass GdalGrass64 < Formula\n  homepage 'http://www.gdal.org'\n  url 'http://download.osgeo.org/gdal/gd"
  },
  {
    "path": "boneyard/gdal-mrsid.rb",
    "chars": 2444,
    "preview": "class GdalMrsid < Formula\n  homepage \"http://www.gdal.org/frmt_mrsid.html\"\n  url \"http://download.osgeo.org/gdal/1.11.0/"
  },
  {
    "path": "boneyard/gdal-oracle.rb",
    "chars": 1476,
    "preview": "class GdalOracle < Formula\n  homepage \"http://www.gdal.org/ogr/drv_oci.html\"\n  url 'http://download.osgeo.org/gdal/1.11."
  },
  {
    "path": "boneyard/gdal-sosi.rb",
    "chars": 1394,
    "preview": "class GdalSosi < Formula\n  homepage \"http://trac.osgeo.org/gdal/wiki/SOSI\"\n  url \"http://download.osgeo.org/gdal/1.11.0/"
  },
  {
    "path": "boneyard/gdal1-ecwjp2.rb",
    "chars": 2816,
    "preview": "class Gdal1Ecwjp2 < Formula\n  desc \"GDAL/OGR 1.x plugin for ECW driver\"\n  homepage \"http://www.gdal.org/frmt_ecw.html\"\n "
  },
  {
    "path": "boneyard/gdal1-filegdb.rb",
    "chars": 2031,
    "preview": "class Gdal1Filegdb < Formula\n  desc \"GDAL/OGR 1.x plugin for ESRI FileGDB driver\"\n  homepage \"http://www.gdal.org/drv_fi"
  },
  {
    "path": "boneyard/gdal1-grass6.rb",
    "chars": 2000,
    "preview": "class Gdal1Grass6 < Formula\n  desc \"GDAL/OGR 1.x plugin for GRASS 6\"\n  homepage \"http://www.gdal.org\"\n  url \"http://down"
  },
  {
    "path": "boneyard/gdal1-mrsid.rb",
    "chars": 2545,
    "preview": "class Gdal1Mrsid < Formula\n  desc \"GDAL/OGR 1 plugin for MrSID raster and LiDAR drivers\"\n  homepage \"http://www.gdal.org"
  },
  {
    "path": "boneyard/gdal1-mysql.rb",
    "chars": 2081,
    "preview": "class Gdal1Mysql < Formula\n  desc \"GDAL/OGR 1.x plugin for MySQL driver\"\n  homepage \"http://www.gdal.org/drv_mysql.html\""
  },
  {
    "path": "boneyard/gdal1-oracle.rb",
    "chars": 2053,
    "preview": "class Gdal1Oracle < Formula\n  desc \"GDAL/OGR 1.x plugin for Oracle Spatial driver\"\n  homepage \"http://www.gdal.org/drv_o"
  },
  {
    "path": "boneyard/gpsbabel-qt4.rb",
    "chars": 1646,
    "preview": "class GpsbabelQt4 < Formula\n  desc \"Converts/uploads GPS waypoints, tracks, and routes\"\n  homepage \"https://www.gpsbabel"
  },
  {
    "path": "boneyard/grass-64.rb",
    "chars": 7454,
    "preview": "class Grass64 < Formula\n  desc \"Geographic Resources Analysis Support System\"\n  homepage \"http://grass.osgeo.org/\"\n\n  st"
  },
  {
    "path": "boneyard/grass-70.rb",
    "chars": 6389,
    "preview": "class Grass70 < Formula\n  desc \"Geographic Resources Analysis Support System\"\n  homepage \"http://grass.osgeo.org/\"\n\n  st"
  },
  {
    "path": "boneyard/grass6.rb",
    "chars": 7427,
    "preview": "require File.expand_path(\"../../Requirements/grass_requirements\",\n                         Pathname.new(__FILE__).realpa"
  },
  {
    "path": "boneyard/grass7-lts.rb",
    "chars": 7093,
    "preview": "require File.expand_path(\"../../Requirements/grass_requirements\",\n                         Pathname.new(__FILE__).realpa"
  },
  {
    "path": "boneyard/libgpkg.rb",
    "chars": 1483,
    "preview": "require \"formula\"\n\nclass RubyVersion19 < Requirement\n  fatal true\n  satisfy(:build_env => false) { %x(ruby -e 'print RUB"
  },
  {
    "path": "boneyard/mapcache-12.rb",
    "chars": 3339,
    "preview": "class Mapcache12 < Formula\n  MAPSERVER = \"mapserver-64\"\n\n  homepage \"http://mapserver.org/mapcache/\"\n  url \"https://gith"
  },
  {
    "path": "boneyard/mapserver-64.rb",
    "chars": 9658,
    "preview": "class JavaJDK < Requirement\n  fatal true\n\n  def self.home\n    [\n        `/usr/libexec/java_home`.chomp!,\n        ENV[\"JA"
  },
  {
    "path": "boneyard/minizip.rb",
    "chars": 1561,
    "preview": "require 'formula'\n\nclass Minizip < Formula\n  homepage 'http://www.winimage.com/zLibDll/minizip.html'\n  url 'http://zlib."
  },
  {
    "path": "boneyard/openjpeg20.rb",
    "chars": 507,
    "preview": "require 'formula'\n\nclass Openjpeg20 < Formula\n  homepage 'http://www.openjpeg.org/'\n  url 'http://openjpeg.googlecode.co"
  },
  {
    "path": "boneyard/orfeo-32.rb",
    "chars": 3294,
    "preview": "require 'formula'\n\nclass Orfeo32 < Formula\n  homepage 'http://www.orfeo-toolbox.org/otb/'\n  url 'https://downloads.sourc"
  },
  {
    "path": "boneyard/orfeo-40.rb",
    "chars": 3523,
    "preview": "require 'formula'\n\nclass Orfeo40 < Formula\n  homepage 'http://www.orfeo-toolbox.org/otb/'\n  # url 'https://downloads.sf."
  },
  {
    "path": "boneyard/orfeo-42.rb",
    "chars": 3707,
    "preview": "class Orfeo42 < Formula\n  homepage \"http://www.orfeo-toolbox.org/otb/\"\n  url \"https://downloads.sourceforge.net/project/"
  },
  {
    "path": "boneyard/orfeo-54.rb",
    "chars": 4073,
    "preview": "class Orfeo54 < Formula\n  desc \"Library of image processing algorithms\"\n  homepage \"http://www.orfeo-toolbox.org/otb/\"\n "
  },
  {
    "path": "boneyard/orfeo5.rb",
    "chars": 7237,
    "preview": "class Orfeo5 < Formula\n  desc \"Library of image processing algorithms\"\n  homepage \"https://www.orfeo-toolbox.org/otb/\"\n\n"
  },
  {
    "path": "boneyard/orfeo5@5.4.rb",
    "chars": 5686,
    "preview": "class Orfeo5AT54 < Formula\n  desc \"Library of image processing algorithms\"\n  homepage \"http://www.orfeo-toolbox.org/otb/"
  },
  {
    "path": "boneyard/osgearth-qt4.rb",
    "chars": 4021,
    "preview": "class OsgearthQt4 < Formula\n  desc \"Geospatial SDK and terrain engine for OpenSceneGraph\"\n  homepage \"http://osgearth.or"
  },
  {
    "path": "boneyard/osgearth.rb",
    "chars": 5123,
    "preview": "require \"formula\"\n\nclass Osgearth < Formula\n  homepage \"http://osgearth.org\"\n  url \"https://github.com/gwaldron/osgearth"
  },
  {
    "path": "boneyard/osgeo-proj@5.rb",
    "chars": 2454,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_proj_linked }\n\n  def core_proj_linked\n"
  },
  {
    "path": "boneyard/osgeo-pyqt.rb",
    "chars": 3431,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_pyqt_linked }\n\n  def core_pyqt_linked\n"
  },
  {
    "path": "boneyard/osgeo-qgis-ltr.rb",
    "chars": 55876,
    "preview": "################################################################################\n# Maintainer: FJ Perini @fjperini\n# Col"
  },
  {
    "path": "boneyard/osgeo-qgis-res.rb",
    "chars": 9219,
    "preview": "################################################################################\n# Maintainer: FJ Perini @fjperini\n# Col"
  },
  {
    "path": "boneyard/osgeo-qgis.rb",
    "chars": 56442,
    "preview": "################################################################################\n# Maintainer: FJ Perini @fjperini\n# Col"
  },
  {
    "path": "boneyard/osgeo-sip.rb",
    "chars": 3432,
    "preview": "class Unlinked < Requirement\n  fatal true\n\n  satisfy(:build_env => false) { !core_sip_linked }\n\n  def core_sip_linked\n  "
  },
  {
    "path": "boneyard/ossim@2.1.rb",
    "chars": 3161,
    "preview": "class OssimAT21 < Formula\n  desc \"Geospatial libs and apps to process imagery, terrain, and vector data\"\n  homepage \"htt"
  },
  {
    "path": "boneyard/pdfium.rb",
    "chars": 4026,
    "preview": "class Pdfium < Formula\n  ver = \"3625\".freeze # relates to chromium version\n\n  desc \"Google-contributed PDF library (with"
  },
  {
    "path": "boneyard/points2grid.rb",
    "chars": 711,
    "preview": "require 'formula'\n\nclass Points2grid < Formula\n  homepage 'https://github.com/CRREL/points2grid'\n  url 'https://github.c"
  },
  {
    "path": "boneyard/pyqt-qt4.rb",
    "chars": 4458,
    "preview": "class PyqtQt4 < Formula\n  desc \"Python bindings for Qt\"\n  homepage \"https://www.riverbankcomputing.com/software/pyqt/int"
  },
  {
    "path": "boneyard/qca-qt4.rb",
    "chars": 2669,
    "preview": "class QcaQt4 < Formula\n  desc \"Qt Cryptographic Architecture (QCA)\"\n  homepage \"http://delta.affinix.com/qca/\"\n  head \"h"
  },
  {
    "path": "boneyard/qgis-18.rb",
    "chars": 3481,
    "preview": "require 'formula'\n\nclass PyQtImportable < Requirement\n  fatal true\n  satisfy { quiet_system 'python', '-c', '\"from PyQt4"
  },
  {
    "path": "boneyard/qgis-20.rb",
    "chars": 15823,
    "preview": "require 'formula'\nrequire File.expand_path(\"../../Requirements/qgis_requirements\",\n                         Pathname.new"
  },
  {
    "path": "boneyard/qgis-214.rb",
    "chars": 19350,
    "preview": "require File.expand_path(\"../../Requirements/qgis_requirements\",\n                         Pathname.new(__FILE__).realpat"
  },
  {
    "path": "boneyard/qgis-22.rb",
    "chars": 14389,
    "preview": "require 'formula'\nrequire File.expand_path(\"../../Requirements/qgis_requirements\",\n                         Pathname.new"
  },
  {
    "path": "boneyard/qgis-24.rb",
    "chars": 17070,
    "preview": "require File.expand_path(\"../../Requirements/qgis_requirements\",\n                         Pathname.new(__FILE__).realpat"
  },
  {
    "path": "boneyard/qgis-26.rb",
    "chars": 17295,
    "preview": "require File.expand_path(\"../../Requirements/qgis_requirements\",\n                         Pathname.new(__FILE__).realpat"
  },
  {
    "path": "boneyard/qgis-28.rb",
    "chars": 17231,
    "preview": "require File.expand_path(\"../../Requirements/qgis_requirements\",\n                         Pathname.new(__FILE__).realpat"
  },
  {
    "path": "boneyard/qgis-ltr@2.rb",
    "chars": 29538,
    "preview": "class QgisLtrAT2 < Formula\n  include Language::Python::Virtualenv\n  desc \"Open Source Geographic Information System\"\n  h"
  },
  {
    "path": "boneyard/qjson-qt4.rb",
    "chars": 1161,
    "preview": "class QjsonQt4 < Formula\n  desc \"Map JSON to QVariant objects\"\n  homepage \"https://qjson.sourceforge.io/\"\n  url \"https:/"
  },
  {
    "path": "boneyard/qscintilla2-qt4.rb",
    "chars": 4783,
    "preview": "class Qscintilla2Qt4 < Formula\n  desc \"Port to Qt of the Scintilla editing component\"\n  homepage \"https://www.riverbankc"
  },
  {
    "path": "boneyard/qscintilla2.rb",
    "chars": 1986,
    "preview": "require 'formula'\n\nclass Qscintilla2 < Formula\n  homepage 'http://www.riverbankcomputing.co.uk/software/qscintilla/intro"
  },
  {
    "path": "boneyard/qt-4.rb",
    "chars": 5752,
    "preview": "class Qt4 < Formula\n  desc \"Cross-platform application and UI framework\"\n  homepage \"https://www.qt.io/\"\n  url \"https://"
  },
  {
    "path": "boneyard/qt4-mysql.rb",
    "chars": 3983,
    "preview": "class NoQt4MysqlAlreadyRequirement < Requirement\n  fatal true\n  satisfy(:build_env => false) { !(Formula[\"qt-4\"].prefix/"
  },
  {
    "path": "boneyard/qt4-oracle.rb",
    "chars": 4012,
    "preview": "class Qt4Oracle < Formula\n  desc \"Oracle database plugin for Qt 4\"\n  homepage \"http://qt-project.org/\"\n  # stripped down"
  },
  {
    "path": "boneyard/qtkeychain-qt4.rb",
    "chars": 2153,
    "preview": "class QtkeychainQt4 < Formula\n  desc \"Platform-independent Qt API for storing passwords securely\"\n  homepage \"https://gi"
  },
  {
    "path": "boneyard/quazip.rb",
    "chars": 972,
    "preview": "require \"formula\"\n\nclass Quazip < Formula\n  homepage \"http://quazip.sourceforge.net/\"\n  url \"https://downloads.sourcefor"
  },
  {
    "path": "boneyard/qutepart.rb",
    "chars": 706,
    "preview": "require \"formula\"\n\nclass Qutepart < Formula\n  homepage \"https://github.com/hlamer/qutepart\"\n  url \"https://github.com/hl"
  },
  {
    "path": "boneyard/qwt-qt4.rb",
    "chars": 3516,
    "preview": "class QwtQt4 < Formula\n  desc \"Qt Widgets for Technical Applications\"\n  homepage \"https://qwt.sourceforge.io/\"\n  url \"ht"
  },
  {
    "path": "boneyard/qwt-qt4@5.2.rb",
    "chars": 1546,
    "preview": "class QwtQt4AT52 < Formula\n  desc \"Qt Widgets for Technical Applications\"\n  homepage \"https://qwt.sourceforge.io/\"\n  url"
  },
  {
    "path": "boneyard/qwt60.rb",
    "chars": 1277,
    "preview": "require 'formula'\n\nclass Qwt60 < Formula\n  homepage 'http://qwt.sourceforge.net/'\n  url 'http://downloads.sourceforge.ne"
  },
  {
    "path": "boneyard/qwtpolar-qt4.rb",
    "chars": 3885,
    "preview": "class QwtpolarQt4 < Formula\n  desc \"Library for displaying values on a polar coordinate system\"\n  homepage \"https://qwtp"
  },
  {
    "path": "boneyard/qwtpolar.rb",
    "chars": 2133,
    "preview": "require \"formula\"\n\nclass Qwtpolar < Formula\n  homepage \"http://qwtpolar.sourceforge.net/\"\n  url \"http://downloads.sf.net"
  },
  {
    "path": "boneyard/sip-qt4.rb",
    "chars": 3264,
    "preview": "class SipQt4 < Formula\n  desc \"Tool to create Python bindings for C and C++ libraries\"\n  homepage \"https://www.riverbank"
  },
  {
    "path": "boneyard/spatialite-gui-17.rb",
    "chars": 2195,
    "preview": "require 'formula'\n\nclass SpatialiteGui17 < Formula\n  homepage 'https://www.gaia-gis.it/fossil/spatialite_gui/index'\n  ur"
  },
  {
    "path": "boneyard/v8318.rb",
    "chars": 1028,
    "preview": "require 'formula'\n\n# Use the official github mirror, it is easier to find tags there\n# .even versions are stable, .odd r"
  },
  {
    "path": "boneyard/wxmac-28.rb",
    "chars": 3958,
    "preview": "require 'formula'\n\nclass Wxpython28 < Formula\n  # For 2.8, we use this separate formula for wxPython. For 2.9 we use the"
  },
  {
    "path": "boneyard/wxmac-29.rb",
    "chars": 3312,
    "preview": "require 'formula'\n\nclass FrameworkPython < Requirement\n  fatal true\n\n  satisfy do\n    q = `python -c \"import distutils.s"
  },
  {
    "path": "boneyard/wxmac-mono.rb",
    "chars": 4214,
    "preview": "class WxmacMono < Formula\n  homepage \"http://www.wxwidgets.org\"\n  url \"https://downloads.sourceforge.net/project/wxwindo"
  },
  {
    "path": "commit-msg.sh",
    "chars": 825,
    "preview": "#!/usr/bin/env bash\n\nif [[ ! -a .ciignore ]]; then\n\texit # If .ciignore doesn't exists, just quit this Git hook\nfi\n\n# Lo"
  },
  {
    "path": "docs/404.html",
    "chars": 362,
    "preview": "---\nlayout: default\ntitle: Page not found\npermalink: /404\nnav_exclude: true\nsearch_exclude: true\n---\n\n<h1>Page not found"
  },
  {
    "path": "docs/Gemfile",
    "chars": 79,
    "preview": "source \"https://rubygems.org\"\ngemspec\n\ngem \"jemoji\"\ngem \"jekyll-include-cache\"\n"
  },
  {
    "path": "docs/Rakefile",
    "chars": 49,
    "preview": "Dir.glob('lib/tasks/*.rake').each {|r| import r}\n"
  },
  {
    "path": "docs/_config.yml",
    "chars": 1856,
    "preview": "# Welcome to Jekyll!\n#\n# This config file is meant for settings that affect your whole site, values\n# which you are expe"
  },
  {
    "path": "docs/_includes/head.html",
    "chars": 1158,
    "preview": "<head>\n  <meta charset=\"UTF-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\">\n  {% if page.description %}\n  <m"
  },
  {
    "path": "docs/_includes/nav.html",
    "chars": 2560,
    "preview": "<nav role=\"navigation\" aria-label=\"Main navigation\">\n  <ul class=\"navigation-list\">\n    {% assign pages_list = site.html"
  },
  {
    "path": "docs/_includes/new-window-fix.html",
    "chars": 841,
    "preview": "<script>\n//open external links in a new window\nfunction external_new_window() {\n    for(var c = document.getElementsByTa"
  }
]

// ... and 72 more files (download for full content)

About this extraction

This page contains the full source code of the OSGeo/homebrew-osgeo4mac GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 272 files (1.2 MB), approximately 376.6k tokens, and a symbol index with 803 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!