summaryrefslogtreecommitdiffstats
path: root/scripts/build.sh
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@libreoffice.org>2018-05-20 10:53:02 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-20 08:12:10 -0700
commit96079d7e6a9ae476dfbcc9d62dd8f6ba722fdc0d (patch)
tree512a27614feedbe0fcf02c9ceb5f8c831d60452c /scripts/build.sh
parentaab33694f2c76378f975dc614d6090456b6147c4 (diff)
downloadsubsurface-96079d7e6a9ae476dfbcc9d62dd8f6ba722fdc0d.tar.gz
build-system: libgit2 depends on libcurl and libssh2
When building with -builddeps on a "virgin" mac, configure of libgit2 could not find libcurl and libssh2 moved building of libcurl and libssh2 in front of libgit2 Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-xscripts/build.sh47
1 files changed, 26 insertions, 21 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index edba083e0..7589f7eaa 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -194,6 +194,32 @@ else
fi
fi
+if [[ $PLATFORM = Darwin && "$BUILD_DEPS" == "1" ]] ; then
+ # when building distributable binaries on a Mac, we cannot rely on anything from Homebrew,
+ # because that always requires the latest OS (how stupid is that - and they consider it a
+ # feature). So we painfully need to build the dependencies ourselves.
+ cd $SRC
+ ./subsurface/scripts/get-dep-lib.sh single . libcurl
+ pushd libcurl
+ bash ./buildconf
+ mkdir -p build
+ cd build
+ CFLAGS="$OLDER_MAC" ../configure --prefix=$INSTALL_ROOT --with-darwinssl \
+ --disable-tftp --disable-ftp --disable-ldap --disable-ldaps --disable-imap --disable-pop3 --disable-smtp --disable-gopher --disable-smb --disable-rtsp
+ make -j4
+ make install
+ popd
+
+ ./subsurface/scripts/get-dep-lib.sh single . libssh2
+ pushd libssh2
+ mkdir -p build
+ cd build
+ cmake $OLDER_MAC_CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF ..
+ make -j4
+ make install
+ popd
+fi
+
if [[ "$LIBGIT" < "24" ]] ; then
LIBGIT_ARGS=" -DLIBGIT2_INCLUDE_DIR=$INSTALL_ROOT/include -DLIBGIT2_LIBRARIES=$INSTALL_ROOT/lib/libgit2.$SH_LIB_EXT "
@@ -232,7 +258,6 @@ if [[ $PLATFORM = Darwin && "$BUILD_DEPS" == "1" ]] ; then
make install
popd
-
./subsurface/scripts/get-dep-lib.sh single . hidapi
pushd hidapi
# there is no good tag, so just build master
@@ -244,17 +269,6 @@ if [[ $PLATFORM = Darwin && "$BUILD_DEPS" == "1" ]] ; then
make install
popd
- ./subsurface/scripts/get-dep-lib.sh single . libcurl
- pushd libcurl
- bash ./buildconf
- mkdir -p build
- cd build
- CFLAGS="$OLDER_MAC" ../configure --prefix=$INSTALL_ROOT --with-darwinssl \
- --disable-tftp --disable-ftp --disable-ldap --disable-ldaps --disable-imap --disable-pop3 --disable-smtp --disable-gopher --disable-smb --disable-rtsp
- make -j4
- make install
- popd
-
./subsurface/scripts/get-dep-lib.sh single . libusb
pushd libusb
bash ./bootstrap.sh
@@ -275,15 +289,6 @@ if [[ $PLATFORM = Darwin && "$BUILD_DEPS" == "1" ]] ; then
make -j4 -k
make -k install
popd
-
- ./subsurface/scripts/get-dep-lib.sh single . libssh2
- pushd libssh2
- mkdir -p build
- cd build
- cmake $OLDER_MAC_CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF ..
- make -j4
- make install
- popd
else
# we are getting libusb and hidapi from pkg-config and that goes wrong
# or more specifically, the way libdivecomputer references