aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul Infante-Sainz <infantesainz@gmail.com>2019-05-31 18:35:36 +0100
committerRaul Infante-Sainz <infantesainz@gmail.com>2019-05-31 18:35:36 +0100
commit880379181a36e949a05724229879ea4576a51b29 (patch)
treebd3bf37d475927a72f0c495ba02ba731a5087b6e
parentf2facb9fa47374dff8a1c9505c66c82c6af19b00 (diff)
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.
-rw-r--r--.file-metadatabin6740 -> 6796 bytes
-rw-r--r--reproduce/software/config/installation/TARGETS.mk2
-rw-r--r--reproduce/software/make/high-level.mk21
3 files changed, 15 insertions, 8 deletions
diff --git a/.file-metadata b/.file-metadata
index c3d5427..12bdf38 100644
--- a/.file-metadata
+++ b/.file-metadata
Binary files differ
diff --git a/reproduce/software/config/installation/TARGETS.mk b/reproduce/software/config/installation/TARGETS.mk
index 2b61109..b9157f1 100644
--- a/reproduce/software/config/installation/TARGETS.mk
+++ b/reproduce/software/config/installation/TARGETS.mk
@@ -36,7 +36,7 @@
# Programs and libraries.
-top-level-programs = gnuastro imfit
+top-level-programs = gnuastro
# Python libraries/modules.
top-level-python = astropy
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}" > $@