aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-30 16:02:37 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-30 16:09:57 +0000
commit7c7b79cae6302999851230cf1d186ad5153b99a9 (patch)
treeb0176d881511291029379c90be837004d4dc821d /reproduce
parentd068937a9fe037871fa89759122fc7df9056683d (diff)
Setting libgit2 to build statically in any case
On the Libgit2 webpage, it has recommended to build it statically on Mac systems. By default we are doing this on Linux systems, but the `-static' flag failed on Mac. But apparently CMake might be able to deal with the issue in a different way.
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/src/make/dependencies-build-rules.mk4
-rw-r--r--reproduce/src/make/dependencies.mk9
2 files changed, 11 insertions, 2 deletions
diff --git a/reproduce/src/make/dependencies-build-rules.mk b/reproduce/src/make/dependencies-build-rules.mk
index 479b008..f613975 100644
--- a/reproduce/src/make/dependencies-build-rules.mk
+++ b/reproduce/src/make/dependencies-build-rules.mk
@@ -57,7 +57,9 @@ gbuild = if [ x$(static_build) = xyes ] && [ $(3)x = staticx ]; then \
fi; \
check="$(6)"; \
if [ x"$$check" = x ]; then check="echo Skipping-check"; fi; \
- cd $(ddir); rm -rf $(2); tar xf $(1); cd $(2); \
+ cd $(ddir); rm -rf $(2); \
+ if ! tar xf $(1); then echo; echo "Tar error"; exit 1; fi; \
+ cd $(2); \
\
if [ -f $(ibdir)/bash ]; then \
sed configure -e's|\#\! /bin/sh|\#\! $(ibdir)/bash|' \
diff --git a/reproduce/src/make/dependencies.mk b/reproduce/src/make/dependencies.mk
index 9f16615..e84de28 100644
--- a/reproduce/src/make/dependencies.mk
+++ b/reproduce/src/make/dependencies.mk
@@ -171,12 +171,19 @@ $(ilidir)/cfitsio: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \
&& echo "CFITSIO is built" > $@
+# The libgit2 page recommends doing a static build, especially for Mac
+# systems. Under XCode, the following link has written "It’s highly
+# recommended that you build libgit2 as a static library for Xcode
+# projects. This simplifies distribution significantly, as the resolution
+# of dynamic libraries at runtime can be extremely problematic.". This is a
+# major problem we have been having so far with Mac systems:
+# https://libgit2.org/docs/guides/build-and-link
$(ilidir)/libgit2: $(tdir)/libgit2-$(libgit2-version).tar.gz \
$(ibdir)/cmake \
$(ibdir)/curl | $(ilidir)
$(call cbuild, $<, libgit2-$(libgit2-version), static, \
-DUSE_SSH=OFF -DUSE_OPENSSL=OFF -DBUILD_CLAR=OFF \
- -DTHREADSAFE=ON) \
+ -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF) \
&& echo "Libgit2 is built" > $@
$(ilidir)/gsl: $(tdir)/gsl-$(gsl-version).tar.gz | $(ilidir)