aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-03-18 18:50:23 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-03-18 18:52:30 +0000
commit8e82dcc513b2e61e981c39987af426e700c607ad (patch)
treeac6cc9d775fdc88e706a5ca5af6ac0ef1e092901 /reproduce
parent5c51f92f2535a2153ae46fb6311ffd9a15c244b3 (diff)
No Bzip2 shared libraries on macOS systems
Bzip2 has a special/separate Makefile to build shared libraries which didn't work on a macOS. So with this commit, we are allowing Bzip2 shared libraries only on macOS systems. Also, I noticed that macOS's `sed' doesn't have the `-i' option (to do the change in place within the same file). So we are using `-e' to write the changed Makefile in a temporary directory, then rename that.
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/src/make/dependencies-basic.mk12
1 files changed, 9 insertions, 3 deletions
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk
index 5965f00..c08e6eb 100644
--- a/reproduce/src/make/dependencies-basic.mk
+++ b/reproduce/src/make/dependencies-basic.mk
@@ -293,7 +293,7 @@ $(ibdir)/bzip2: $(tdir)/bzip2-$(bzip2-version).tar.gz
# function here and we need to take some extra steps (inspired
# from the "Linux from Scratch" guide for Bzip2):
# 1) The `sed' call is for relative installed symbolic links.
- # 2) The special Makefile-libbz2_so builds the shared library.
+ # 2) The special Makefile-libbz2_so builds shared libraries.
#
# NOTE: the major version number appears in the final symbolic
# link.
@@ -303,10 +303,16 @@ $(ibdir)/bzip2: $(tdir)/bzip2-$(bzip2-version).tar.gz
makeshared="echo no-shared"; \
else \
makecommand="make"; \
- makeshared="make -f Makefile-libbz2_so"; \
+ if [ x$(on_mac_os) = xyes ]; then \
+ makeshared="echo no-shared"; \
+ else \
+ makeshared="make -f Makefile-libbz2_so"; \
+ fi; \
fi; \
cd $(ddir) && rm -rf $$tdir && tar xf $< && cd $$tdir \
- && sed -i 's@\(ln -s -f \)$$(PREFIX)/bin/@\1@' Makefile \
+ && sed -e 's@\(ln -s -f \)$$(PREFIX)/bin/@\1@' Makefile \
+ > Makefile.sed \
+ && mv Makefile.sed Makefile \
&& $$makeshared \
&& cp -a libbz2* $(ildir)/ \
&& make clean \