From 880379181a36e949a05724229879ea4576a51b29 Mon Sep 17 00:00:00 2001 From: Raul Infante-Sainz Date: Fri, 31 May 2019 18:35:36 +0100 Subject: Modified Imfit installation to not consider default and host paths Until this commit, 'imfit' was installed using proper flags in order to use our own libraries. However, it looks first of all to the default system. As a consecuence, `imfit' program was linked to the host system libraries, even when we told to use our own libraries!! With this commit, the installation of `imfit' has been modified in order to remove the default paths already set in the `SConstruct' script. By doing this, only our paths are take into account for compiling the program. It has been tested on Mac OS laptop and it works fine. Test on GNU/Linux systems remain before merge into the main project branch. --- reproduce/software/make/high-level.mk | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'reproduce/software/make/high-level.mk') diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk index 61b06d6..2ea3534 100644 --- a/reproduce/software/make/high-level.mk +++ b/reproduce/software/make/high-level.mk @@ -627,8 +627,11 @@ $(ibidir)/imagemagick: $(tdir)/imagemagick-$(imagemagick-version).tar.xz \ # `imfit doesn't use the traditional `configure' and `make' to install it. # Instead of that, it uses `scons'. As a consecuence, the installation is # manually done by decompressing the tarball, and running `scons' with the -# necessary flags. After that, each compiled program (`imfit', `imfit-mcmc' -# and `makeimage') is copied into the installation directory.' +# necessary flags. Despite of that, it is necessary to replace the default +# searching paths in this script by our installation paths. This is done +# with `sed', replacing each ocurrence of `/usr/local' by `$(idir)'. After +# that, each compiled program (`imfit', `imfit-mcmc' and `makeimage') is +# copied into the installation directory. $(ibidir)/imfit: $(tdir)/imfit-$(imfit-version).tar.gz \ $(ibidir)/cfitsio \ $(ibidir)/fftw \ @@ -639,14 +642,18 @@ $(ibidir)/imfit: $(tdir)/imfit-$(imfit-version).tar.gz \ && rm -rf $$unpackdir \ && if ! tar xf $<; then echo; echo "Tar error"; exit 1; fi \ && cd $$unpackdir \ - && scons --no-openmp --no-nlopt \ + && sed -i 's|/usr/local|$(idir)|g' SConstruct \ + && scons --no-openmp --no-nlopt\ + --cc=$(ibdir)/gcc --cpp=$(ibdir)/g++ \ --header-path=$(idir)/include --lib-path=$(idir)/lib imfit \ && cp imfit $(ibdir) \ - && scons --no-openmp --no-nlopt --header-path=$(idir)/inlcude \ - --lib-path=$(idir)/lib imfit-mcmc \ + && scons --no-openmp --no-nlopt\ + --cc=$(ibdir)/gcc --cpp=$(ibdir)/g++ \ + --header-path=$(idir)/include --lib-path=$(idir)/lib imfit-mcmc \ && cp imfit-mcmc $(ibdir) \ - && scons --no-openmp --no-nlopt --header-path=$(idir)/inlcude \ - --lib-path=$(idir)/lib makeimage \ + && scons --no-openmp --no-nlopt\ + --cc=$(ibdir)/gcc --cpp=$(ibdir)/g++ \ + --header-path=$(idir)/include --lib-path=$(idir)/lib makeimage \ && cp makeimage $(ibdir) \ && cp $(dtexdir)/imfit.tex $(ictdir)/ \ && echo "Imfit $(imfit-version) \citep{imfit2015}" > $@ -- cgit v1.2.1