aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure4
-rw-r--r--reproduce/src/make/dependencies-build-rules.mk4
-rw-r--r--reproduce/src/make/dependencies.mk9
3 files changed, 13 insertions, 4 deletions
diff --git a/configure b/configure
index b10f536..840a350 100755
--- a/configure
+++ b/configure
@@ -591,8 +591,8 @@ fi
# some versions of Make complain about not having enough 'pipe' (memory) on
# some systems. After some searching, I found out its because of too many
# threads.
-if which nproc 2> /dev/null; then numthreads=$(nproc --all);
-else numthreads=4;
+if which nproc &> /dev/null; then numthreads=$(nproc --all);
+else numthreads=2;
fi
make -f reproduce/src/make/dependencies-basic.mk \
static_build=$static_build -j$numthreads
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)