From a04d30999a0f9fb0bc4a9a7099d642f9563db6ab Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Fri, 9 Mar 2018 18:51:07 +0100
Subject: [PATCH] SuperBuild: patch to install properly GDAL python binding on
 MacOS

---
 .../GDAL/gdal-6-pythonInstall-macx.diff       | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 SuperBuild/patches/GDAL/gdal-6-pythonInstall-macx.diff

diff --git a/SuperBuild/patches/GDAL/gdal-6-pythonInstall-macx.diff b/SuperBuild/patches/GDAL/gdal-6-pythonInstall-macx.diff
new file mode 100644
index 0000000000..c1948c29cd
--- /dev/null
+++ b/SuperBuild/patches/GDAL/gdal-6-pythonInstall-macx.diff
@@ -0,0 +1,21 @@
+--- gdal-2.2.1-orig/swig/python/GNUmakefile	2017-06-23 14:18:44.000000000 +0200
++++ gdal-2.2.1/swig/python/GNUmakefile	2018-03-09 18:44:06.533081541 +0100
+@@ -81,18 +81,7 @@
+ endif
+ 
+ ifdef prefix
+-    ifeq ($(shell uname),Darwin)
+-        STD_UNIX_LAYOUT=$(shell $(PYTHON) -c "from __future__ import print_function;import sys;print(\"FALSE\" if \"framework\" in sys.prefix.lower() else \"TRUE\")")
+-        ifeq ($(STD_UNIX_LAYOUT),"TRUE")
+             setup_opts+=--prefix=$(prefix)
+-        else
+-            ifdef PYTHON_INSTALL_LIB
+-                setup_opts+=--install-lib=$(PYTHON_INSTALL_LIB)
+-            endif
+-        endif
+-    else
+-        setup_opts+=--prefix=$(prefix)
+-    endif
+ endif
+ 
+ ifdef INSTALL_LAYOUT
-- 
GitLab