aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/software/make/basic.mk28
-rw-r--r--reproduce/software/make/high-level.mk15
2 files changed, 37 insertions, 6 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index 212c738..47a01a3 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -1002,10 +1002,34 @@ $(ibidir)/libbsd: | $(ibidir)/coreutils \
$(call gbuild, libbsd-$(libbsd-version), static,,V=1) \
&& echo "Libbsd $(libbsd-version)" > $@
-$(ibidir)/m4: | $(ibidir)/coreutils \
+# We need to apply a patch to the M4 source to be used properly on macOS.
+# The patch [1] was inspired by Homebrew's build instructions [1].
+#
+# [1] https://raw.githubusercontent.com/macports/macports-ports/edf0ee1e2cf/devel/m4/files/secure_snprintf.patch
+# [2] https://github.com/Homebrew/homebrew-core/blob/master/Formula/m4.rb
+$(ibidir)/m4: | $(ibidir)/sed \
$(ibidir)/texinfo \
+ $(ibidir)/coreutils \
$(tdir)/m4-$(m4-version).tar.gz
- $(call gbuild, m4-$(m4-version), static,,V=1) \
+ cd $(ddir); \
+ unpackdir=m4-$(m4-version); \
+ rm -rf $$unpackdir \
+ && if ! tar xf $(word 1,$(filter $(tdir)/%,$|)); then \
+ echo; echo "Tar error"; exit 1; \
+ fi \
+ && cd $$unpackdir \
+ && if [ x$(on_mac_os) = xyes ]; then \
+ sed -i -e's|if !(((__GLIBC__ > 2|if !defined(__APPLE__) \&\& !(((__GLIBC__ > 2|' lib/vasnprintf.c; \
+ fi \
+ && sed -i -e's|\#\! /bin/sh|\#\! $(ibdir)/bash|' \
+ -e's|\#\!/bin/sh|\#\! $(ibdir)/bash|' \
+ configure \
+ && ./configure --prefix=$(idir) SHELL=$(ibdir)/bash \
+ LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+ && make SHELL=$(ibdir)/bash V=1 -j$(numthreads) \
+ && make SHELL=$(ibdir)/bash V=1 install \
+ && cd .. \
+ && rm -rf $$unpackdir \
&& echo "GNU M4 $(m4-version)" > $@
# Metastore is used (through a Git hook) to restore the source modification
diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk
index 916cb0a..603e710 100644
--- a/reproduce/software/make/high-level.mk
+++ b/reproduce/software/make/high-level.mk
@@ -1069,7 +1069,7 @@ $(ibidir)/minizip: $(ibidir)/automake \
&& rm $(iidir)/minizip/crypt.h \
&& cd ../../.. \
&& rm -rf $$unpackdir \
- && echo "Minizip $(minizip-version)" > $@
+ && echo "Minizip $(minizip)" > $@
$(ibidir)/missfits: | $(tdir)/missfits-$(missfits-version).tar.gz
$(call gbuild, missfits-$(missfits-version), static) \
@@ -1197,10 +1197,17 @@ $(ibidir)/xlsxio: $(ibidir)/cmake \
-DMINIZIP_DIR:PATH=$(idir) \
-DMINIZIP_LIBRARIES=$(idir) \
-DMINIZIP_INCLUDE_DIRS=$(iidir)) \
- && if [ "x$(on_mac_os)" != xyes ]; then \
- echo "Adding RPATH to the XLSX I/O executables..."; \
+ && echo "Correcting internal linking of XLSX I/O executables..." \
+ && if [ "x$(on_mac_os)" = xyes ]; then \
+ for f in $(ibdir)/xlsxio_* $(ildir)/libxlsxio_*.dylib; do \
+ install_name_tool -change libxlsxio_read.dylib \
+ $(ildir)/libxlsxio_read.dylib $$f; \
+ install_name_tool -change libxlsxio_write.dylib \
+ $(ildir)/libxlsxio_write.dylib $$f; \
+ done; \
+ else \
for f in $(ibdir)/xlsxio_* $(ildir)/libxlsxio_*.so; do \
- patchelf --set-rpath $(ildir) $$f; \
+ patchelf --set-rpath $(ildir) $$f; \
done; \
fi \
&& echo "Deleting XLSX I/O example files..." \