From 5aa8e6bf8dc2143330d1ec2422145c0dbe9976d4 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Tue, 24 Jan 2017 14:06:33 +0100
Subject: [PATCH] Set MacOSX min version to 10.7 to follow defaults

---
 gitlab/functions.sh | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index a3e663c..91511d7 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -3,8 +3,8 @@
 
 # Build utilities
 
-# Determines the architecture we're using
-arch() {
+# Determines the os name we're using
+osname() {
   [[ "$(uname -s)" == "Darwin" ]] && echo "macosx" || echo "linux"
 }
 
@@ -226,7 +226,7 @@ check_pass DOCUSER
 check_pass DOCPASS
 
 # Sets up variables
-ARCH=`arch`
+OSNAME=`osname`
 
 if [ -z "${CONDA_FOLDER}" ]; then
   CONDA_FOLDER=/opt/conda
@@ -255,7 +255,7 @@ if [ -z "{PREFIX}" ]; then
   fi
 fi
 
-if [ "${ARCH}" == "linux" ]; then
+if [ "${OSNAME}" == "linux" ]; then
   # Temporary hack to get building done right with gcc-5 compilers
   if [ -z "${CFLAGS}" ]; then
     CFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"
@@ -273,7 +273,7 @@ fi
 
 TESTSERVER=https://testpypi.python.org/pypi
 
-check_env ARCH
+check_env OSNAME
 check_env PYVER
 check_env PREFIX
 export_env PREFIX
@@ -298,3 +298,8 @@ if [ -z "${CI_BUILD_TAG}" ]; then
 else
   log_info "Building tag, not setting BOB_DOCUMENTATION_SERVER"
 fi
+
+if [ "${OSNAME}" == "macosx" ]; then
+  MACOSX_DEPLOYMENT_TARGET="10.7"
+  export_env MACOSX_DEPLOYMENT_TARGET
+fi
-- 
GitLab