From 11ca538b0d1bf28d530ca26c1e6e026972deef28 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Wed, 5 Dec 2018 15:10:21 +0000 Subject: 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). --- reproduce/src/make/dependencies.mk | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'reproduce/src/make') 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) -- cgit v1.2.1