Updated Mac build instructions
Henrik Brautaset Aronsen
subsurface at henrik.synth.no
Fri Jan 2 11:31:08 PST 2015
Dirk Hohndel wrote:
> On Fri, Dec 26, 2014 at 11:35:41AM +0100, Robert C. Helling wrote:
>>> Am 26.12.2014 um 11:02 schrieb Henrik Brautaset Aronsen<subsurface at henrik.synth.no>:
>>>
>>> I updated the build instructions on the web page awhile ago,
>> Do those really work for you? For me qt5 from homebrew is "keg only" i.e. Does not link files not to interfere wit qt4. Even
>>
>> brew link --force qt5
>>
>> Leaves my system in an unusable mess. So I gave up on qt5 from homebrew and compiled it manually.
>
> I gave up on homebrew ages ago. It causes way more problems than it
> solves, especially when trying to ship binaries
I had a Mac here without any dev tools on it, so I decided to try the
build instructions that I updated on the website in October. It has
later been changed by others, but my version still works with minor
changes.
Advantages:
- Uses Qt5 from Homebrew, no compilation necessary.
- Uses latest Marble from official sources, no special branch or patches
necessary.
- Fewer options in Subsurface qmake.
Disadvantages:
- Somewhat longer Marble build instructions. But I could make a script
in packages/macosx/ to fix that (if anyone wants it).
Here it is:
$ brew install asciidoc libzip qt5 sqlite cmake libusb pkg-config libgit2
$ brew link --force sqlite
$ cd ~/src
$ git clone git://anongit.kde.org/marble marble-source
$ cd marble-source
$ mkdir marble-build
$ cd marble-build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE -DWITH_PHONON=OFF
-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake
-DCMAKE_INSTALL_PREFIX=/usr/local ..
$ cd src/lib/marble
$ make -j4
$ install_name_tool -id /usr/local/lib/$(echo libmarblewidget.??.dylib)
libmarblewidget.dylib
$ cp -v *dylib /usr/local/lib/
$ mkdir -p /usr/local/include/marble
$ cp -v $(find ~/src/marble-source/src/lib -name '*.h')
/usr/local/include/marble/
$ cd ~/src
$ brew install automake libtool
$ git clone -b Subsurface-testing git://subsurface-divelog.org/libdc
libdivecomputer
$ cd libdivecomputer
$ autoreconf --install
$ ./configure --disable-shared
$ make -j4
$ make install
$ cd ~/src
$ git clone git://subsurface-divelog.org/subsurface.git
$ cd subsurface
$ /usr/local/opt/qt5/bin/qmake INCLUDEPATH+="/usr/local/include
/usr/local/opt/sqlite/include" LIBS+="-L/usr/local/lib
-L/usr/local/opt/sqlite/lib"
$ make -j4
$ make install_mac_bundle
Should I create a patch for the INSTALL file, and update the website?
Henrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150102/6a671b37/attachment.html>
More information about the subsurface
mailing list