From 7d1960b1675f7764ef0b48776f995e191c99b695 Mon Sep 17 00:00:00 2001
From: Raul Infante-Sainz <infantesainz@gmail.com>
Date: Mon, 27 May 2019 10:32:29 +0100
Subject: Adding SCons into the project
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

With this commit, SCons has been included into the project. As in the
official webpage of this program says:

  SCons is an Open Source software construction tool—that is, a
  next-generation build tool. Think of SCons as an improved,
  cross-platform substitute for the classic Make utility with integrated
  functionality similar to autoconf/automake and compiler caches such as
  ccache. In short, SCons is an easier, more reliable and faster way to
  build software.

The motivation for including this software into the project is because
there are some software that use this system for the installation. In
particular, the necessity of installing it comes from Imfit. This is an
astronomical software that uses this system so that is why it has been
included into the project. In principle it is simple, and I have tested
it on Mac OS sytem without any problem.
---
 reproduce/software/make/high-level.mk | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

(limited to 'reproduce/software/make')

diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk
index fe6efd0..14c4a2a 100644
--- a/reproduce/software/make/high-level.mk
+++ b/reproduce/software/make/high-level.mk
@@ -130,6 +130,7 @@ tarballs = $(foreach t, astrometry.net-$(astrometrynet-version).tar.gz \
                         openblas-$(openblas-version).tar.gz \
                         pixman-$(pixman-version).tar.gz \
                         scamp-$(scamp-version).tar.lz \
+                        scons-$(scons-version).tar.gz \
                         sextractor-$(sextractor-version).tar.lz \
                         swarp-$(swarp-version).tar.gz \
                         swig-$(swig-version).tar.gz \
@@ -199,6 +200,9 @@ $(tarballs): $(tdir)/%: | $(lockdir)
 	    w=https://download.open-mpi.org/release/open-mpi/v$$majorver/$*
 	  elif [ $$n = pixman      ]; then w=https://www.cairographics.org/releases
 	  elif [ $$n = scamp       ]; then w=http://akhlaghi.org/src
+	  elif [ $$n = scons       ]; then
+	    mergenames=0
+	    w=https://sourceforge.net/projects/scons/files/scons/$(scons-version)/scons-$(scons-version).tar.gz/download
 	  elif [ $$n = sextractor  ]; then w=http://akhlaghi.org/src
 	  elif [ $$n = swarp       ]; then w=https://www.astromatic.net/download/swarp
 	  elif [ $$n = swig        ]; then w=https://sourceforge.net/projects/swig/files/swig/swig-$(swig-version)
@@ -658,6 +662,18 @@ $(ibidir)/scamp: $(tdir)/scamp-$(scamp-version).tar.lz \
 	&& cp $(dtexdir)/scamp.tex $(ictdir)/ \
 	&& echo "SCAMP $(scamp-version) \citep{scamp}" > $@
 
+# Since `scons' doesn't use the traditional GNU installation with
+# `configure' and `make' it is installed manually using `python'.
+$(ibidir)/scons: $(tdir)/scons-$(scons-version).tar.gz \
+                 $(ibidir)/python
+	cd $(ddir) \
+	&& unpackdir=scons-$(scons-version) \
+	&& rm -rf $$unpackdir \
+	&& if ! tar xf $<; then echo; echo "Tar error"; exit 1; fi \
+	&& cd $$unpackdir \
+	&& python setup.py install \
+	&& echo "SCons $(scons-version)" > $@
+
 # Sextractor crashes complaining about not linking with some ATLAS
 # libraries. But we can override this issue since we have Openblas
 # installed, it is just necessary to explicity tell sextractor to use it in
-- 
cgit v1.2.1