aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-12-05 15:10:21 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-12-05 15:10:21 +0000
commit11ca538b0d1bf28d530ca26c1e6e026972deef28 (patch)
tree9d7cf67735855e540a69bbf268ecbb1124133a46
parent631eeb1302628ce0cd4e84d30553bb77934e3dcf (diff)
CFITSIO configure script looks for our build of cURL on Mac OS
On Mac OS systems, CFITSIO doesn't use path to find the `curl-config' program (used by to give the library header and linking options), but uses an absolute path. Therefore the only way we can ask CFITSIO to look into our build of cURL is to manually change that absolute address. Also, since all the libraries are now linked dynamically, we don't need the extra linking flags when building WCSLIB (so it finds CFITSIO).
-rw-r--r--reproduce/src/make/dependencies.mk23
1 files changed, 20 insertions, 3 deletions
diff --git a/reproduce/src/make/dependencies.mk b/reproduce/src/make/dependencies.mk
index a22c872..836bcfc 100644
--- a/reproduce/src/make/dependencies.mk
+++ b/reproduce/src/make/dependencies.mk
@@ -184,8 +184,25 @@ $(tarballs): $(tdir)/%:
# and create/write into it when the library is successfully built.
$(ilidir)/cfitsio: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \
$(ibdir)/curl
- $(call gbuild, $<, cfitsio, static, LIBS="-lssl -lcrypto -lz" \
- --enable-sse2 --enable-reentrant) \
+
+ # CFITSIO hard-codes the absolute address of cURL's `curl-config'
+ # program (which gives the necessary header and linking
+ # information) into the configure script. So we'll have to modify
+ # it manually before doing the standard build.
+ topdir=$(pwd); cd $(ddir); tar xf $<
+ customtar=cfitsio-$(cfitsio-version)-custom.tar.gz
+ sed cfitsio/configure \
+ -e's|/usr/bin/curl-config|$(ibdir)/curl-config|g' \
+ > cfitsio/configure_tmp
+ mv cfitsio/configure_tmp cfitsio/configure
+ chmod +x cfitsio/configure
+ tar cf $$customtar cfitsio
+ cd $$topdir
+
+ # Continue the standard build on the customized tarball.
+ $(call gbuild, $$customtar, cfitsio, static, \
+ --enable-sse2 --enable-reentrant) \
+ && rm $$customtar \
&& echo "CFITSIO is built" > $@
$(ilidir)/gsl: $(tdir)/gsl-$(gsl-version).tar.gz
@@ -242,7 +259,7 @@ $(ilidir)/wcslib: $(tdir)/wcslib-$(wcslib-version).tar.bz2 \
$(ilidir)/cfitsio
# Build and install the library.
$(call gbuild, $<, wcslib-$(wcslib-version), , \
- LIBS="-pthread -lcurl -lssl -lcrypto -lz -lm" \
+ LIBS="-pthread -lcurl -lm" \
--with-cfitsiolib=$(ildir) \
--with-cfitsioinc=$(idir)/include \
--without-pgplot --disable-fortran)