From 2b90a5c7c67dfb25d4b3d7c7ec956f5282eed2eb Mon Sep 17 00:00:00 2001
From: Shlomi Fish <shlomif@shlomifish.org>
Date: Sun, 11 Nov 2018 21:03:39 +0200
Subject: [PATCH] [travis] first attempt at a macOS build.

See
https://sourceforge.net/p/pysolfc/discussion/503708/thread/4179422b22/?limit=25
.
---
 .travis.yml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 7f8055ab..b070f765 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,11 @@
 os: linux
 dist: trusty
+os:
+    - linux
+    - osx
 before_install:
-    - sudo apt-get update -qq
-    - sudo apt-get install -y ack-grep cpanminus libperl-dev make perl python-glade2 python-gnome2 python-gnome2-dev python-gtk2 python-setuptools python-tk python3 python3-pip python3-setuptools python3-tk
-    - sudo dpkg-divert --local --divert /usr/bin/ack --rename --add /usr/bin/ack-grep
+    - if test "$TRAVIS_OS_NAME" = "linux" ; then sudo apt-get update -qq ; sudo apt-get install -y ack-grep cpanminus libperl-dev make perl python-glade2 python-gnome2 python-gnome2-dev python-gtk2 python-setuptools python-tk python3 python3-pip python3-setuptools python3-tk ; sudo dpkg-divert --local --divert /usr/bin/ack --rename --add /usr/bin/ack-grep ; fi
+    - if test "$TRAVIS_OS_NAME" = "osx" ; then brew bundle ; brew link gettext --force ; export PATH="$PATH:/usr/local/bin" ; export DYLD_LIBRARY_PATH="/usr/local/opt/curl/lib:/usr/local/opt/openssl/lib:${DYLD_LIBRARY_PATH}" ; export PATH="/usr/local/opt/openssl/bin:$PATH" ; export LDFLAGS="$LDFLAGS -L/usr/local/opt/openssl/lib" ; export CPPFLAGS="$CPPFLAGS -I/usr/local/opt/openssl/include" ; export CPPFLAGS="$CPPFLAGS -I$(brew --prefix openssl)/include" PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig:$PKG_CONFIG_PATH" LDFLAGS="$LDFLAGS -L$(brew --prefix openssl)/lib" ;fi
 install:
     - sudo cpanm Code::TidyAll::Plugin::Flake8 Perl::Tidy Test::Code::TidyAll Test::Differences Test::TrailingSpace
     - export PY_MODS='pycotap random2 six'