From 7b75ea7c9018dc269280b9fcc57367d7e7319b51 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <helling@atdotde.de>
Date: Thu, 25 Dec 2014 23:44:59 +0100
Subject: [PATCH 2/2] Updated Mac build instructions

This uses Qt5 downloaded from their websitte (qt5 from homebrew
is not linked and thus not working for me) and our custom libdivecomputer
and marble

Signed-off-by: Robert C. Helling <helling@atdotde.de>
---
 INSTALL | 52 +++++++++++++++++++++++++++++++++-------------------
 1 file changed, 33 insertions(+), 19 deletions(-)

diff --git a/INSTALL b/INSTALL
index a39ba75..7a2bd77 100644
--- a/INSTALL
+++ b/INSTALL
@@ -169,47 +169,61 @@ $ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
 
 2) Install needed dependencies
 
-$ brew install asciidoc libzip qt sqlite cmake libusb pkg-config
+$ brew install asciidoc libzip sqlite cmake libusb pkg-config
 
 3) Make the brew version of sqlite the default
 
 $ brew link --force sqlite
 
-4) Install Marble
+4) Download Qt from http://www.qt.io/download-open-source/
+
+In the installer, I choose a folder Qt4 in my home directory, in "Select components" select the most recent version and be sure you also install the "Source Components".
+
+Build it (takes a long time)
+
+$ cd ~/Qt5/5.4/Src/
+
+$ ./configure -prefix /usr/local -opensource
 
-$ mkdir -p ~/src/marble/build
-$ git clone -b KDE/4.11 git://anongit.kde.org/marble ~/src/marble/sources
-$ cd ~/src/marble/build
-$ cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE -DCMAKE_INSTALL_PREFIX=/usr/local ../sources
- - or -
-$ cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DCMAKE_INSTALL_PREFIX=/usr/local ../sources
-$ cd src/lib
 $ make -j4
-$ install_name_tool -id /usr/local/lib/`echo libmarblewidget.??.dylib` libmarblewidget.dylib
-$ cp *dylib /usr/local/lib/
-$ mkdir -p /usr/local/include/marble
-$ cd ../../../sources/src/lib
-$ cp $(find . -name '*.h') /usr/local/include/marble/
+
+$ make install
+
+5) Install custom subsurface Marble
+
+$ cd ~/src
+$ git clone -b Subsurface-4.3 git://subsurface-divelog.org/marble marble-source
+$ cd marble-source
+$ mkdir marble-build
+$ cd marble-build
+$ cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE -DWITH_PHONON=OFF \
+-DQT5BUILD=ON -DCMAKE_INSTALL_PREFIX=/usr/local ../../marble-source
+$ cd src/lib/marble
+$ make -j4
 
 5) Install Libdivecomputer
 
 $ brew install automake libtool
 $ cd ~/src
-$ git clone git://git.libdivecomputer.org/libdivecomputer
+$ git clone -b Subsurface-4.3 git://subsurface-divelog.org/libdc \
+libdivecomputer
 $ cd libdivecomputer
-$ git checkout release-0.4
 $ autoreconf --install
 $ ./configure --disable-shared
-$ make
+$ make -j4
 $ make install
 
+
 6) Compile Subsurface
 
 $ cd ~/src
 $ git clone git://subsurface-divelog.org/subsurface.git
 $ cd subsurface
-$ qmake
-$ make
+$ qmake SPECIAL_MARBLE_PREFIX=1 INCLUDEPATH+=/usr/local/include \ 
+LIBS+=-L/usr/local/lib LIBS+='-L/usr/local/Cellar/libzip/0.11.2/lib -lzip -lz' \
+INCLUDEPATH+=/usr/local/Cellar/libzip/0.11.2/include V=1 \ 
+LIBMARBLEDEVEL=../marble-source/marble-build/
+$ make -j4
 $ make install_mac_bundle
 
 After the above is done, Subsurface will be installed to
-- 
1.9.3 (Apple Git-50)

