aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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