aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make/high-level.mk
diff options
context:
space:
mode:
authorRaul Infante-Sainz <infantesainz@gmail.com>2019-04-16 07:08:00 +0100
committerRaul Infante-Sainz <infantesainz@gmail.com>2019-04-16 07:08:00 +0100
commit335f05386ff8712da2f29a504a4fa42050580b79 (patch)
tree83bed42e2d3b741dd5e9337697f74bf68529e7e3 /reproduce/software/make/high-level.mk
parentc5ccdd7385499369ca0ca9ed2894658bfe235653 (diff)
Netpbm and its dependencies are now included
With this commit, the installation of `netpbm' has been included. This software has a crazy dialogue installation that we override by giving to it the answers (they differs on GNU/Linux and Mac OS systems). `libxml2' also has been built (a remaining dependency of `netpbm'). In this commit, `libpng' version has been downgraded because it is required by `netpbm'. The motivation of installing `netpbm' is that it is a dependency of Astrometry-net software.
Diffstat (limited to 'reproduce/software/make/high-level.mk')
-rw-r--r--reproduce/software/make/high-level.mk61
1 files changed, 50 insertions, 11 deletions
diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk
index 04b6cac..8aa9c55 100644
--- a/reproduce/software/make/high-level.mk
+++ b/reproduce/software/make/high-level.mk
@@ -50,9 +50,9 @@ ipydir = $(BDIR)/software/installed/version-info/python
# high level software depend on it. The current rule for ATLAS is tested
# successfully on Mac (only static) and GNU/Linux (shared and static). But,
# since it takes a few hours to build, it is not currently a target.
-top-level-libraries = cairo pixman # atlas
+top-level-libraries = # atlas
+top-level-programs = gnuastro metastore netpbm
top-level-python = astroquery matplotlib
-top-level-programs = gnuastro metastore
all: $(foreach p, $(top-level-libraries), $(ilidir)/$(p)) \
$(foreach p, $(top-level-programs), $(ibidir)/$(p)) \
$(foreach p, $(top-level-python), $(ipydir)/$(p)) \
@@ -132,7 +132,9 @@ tarballs = $(foreach t, cfitsio-$(cfitsio-version).tar.gz \
libbsd-$(libbsd-version).tar.xz \
libpng-$(libpng-version).tar.xz \
libgit2-$(libgit2-version).tar.gz \
+ libxml2-$(libxml2-version).tar.gz \
metastore-$(metastore-version).tar.gz \
+ netpbm-$(netpbm-version).tar.gz \
openmpi-$(openmpi-version).tar.gz \
openblas-$(openblas-version).tar.gz \
pixman-$(pixman-version).tar.gz \
@@ -188,7 +190,11 @@ $(tarballs): $(tdir)/%: | $(lockdir)
elif [ $$n = libgit ]; then
mergenames=0
w=https://github.com/libgit2/libgit2/archive/v$(libgit2-version).tar.gz
+ elif [ $$n = libxml ]; then w=ftp://xmlsoft.org/libxml2
elif [ $$n = metastore ]; then w=http://akhlaghi.org/src
+ elif [ $$n = netpbm ]; then
+ mergenames=0
+ w=https://sourceforge.net/projects/netpbm/files/super_stable/$(netpbm-version)/netpbm-$(netpbm-version).tgz/download
elif [ $$n = openblas ]; then
mergenames=0
w=https://github.com/xianyi/OpenBLAS/archive/v$(openblas-version).tar.gz
@@ -309,6 +315,17 @@ $(ilidir)/libpng: $(tdir)/libpng-$(libpng-version).tar.xz
$(call gbuild, $<, libpng-$(libpng-version), static) \
&& echo "Libpng $(libpng-version)" > $@
+$(ilidir)/libxml2: $(tdir)/libxml2-$(libxml2-version).tar.gz
+ # The libxml2 tarball also contains Python bindings which are built and
+ # installed to a system directory by default. If you don't need the Python
+ # bindings, the easiest solution is to compile without Python support:
+ # ./configure --without-python
+ # If you really need the Python bindings, try the
+ # --with-python-install-dir=DIR option
+ $(call gbuild, $<, libxml2-$(libxml2-version), static, \
+ --without-python) \
+ && echo "Libxml2 $(libxml2-version)" > $@
+
$(ilidir)/pixman: $(tdir)/pixman-$(pixman-version).tar.gz
$(call gbuild, $<, pixman-$(pixman-version), static) \
&& echo "Pixman $(pixman-version)" > $@
@@ -628,15 +645,37 @@ endif
&& cp $(dtexdir)/gnuastro.tex $(ictdir)/ \
&& echo "GNU Astronomy Utilities $(gnuastro-version) \citep{gnuastro}" > $@
-
-
-
-
-
-
-
-
-
+# Netpbm is a prerequisite of Astrometry-net, it contains a lot of programs.
+# This program has a crazy dialogue installation which is override using the
+# printf statment. Each `\n' is a new question that the installation process
+# ask to the user. We give all answers with a pipe to the scripts (configure
+# and install). The questions are different depending on the system (tested
+# on GNU/Linux and Mac OS).
+$(ibidir)/netpbm: $(tdir)/netpbm-$(netpbm-version).tgz \
+ $(ilidir)/libjpeg \
+ $(ilidir)/libpng \
+ $(ilidir)/libtiff \
+ $(ilidir)/libxml2 \
+ $(ibidir)/unzip
+ if [ x$(on_mac_os) = xyes ]; then \
+ answers='\n\n\n\n\n\n\n\n\n\n\n\nnone\n\n\n'; \
+ else \
+ answers='\n\n\n\ny\n\n\n\n\n\n\n\n\n\n\n\n\n'; \
+ fi; \
+ cd $(ddir) \
+ && unpackdir=netpbm-$(netpbm-version) \
+ && echo "rm -rf $$unpackdir \
+ && if ! tar xf $<; then echo; echo "Tar error"; exit 1; fi" \
+ && cd $$unpackdir \
+ && echo "printf "$$answers" | ./configure \
+ && make \
+ && rm -rf $(ddir)/$$unpackdir/install \
+ && make package pkgdir=$(ddir)/$$unpackdir/install" \
+ && printf "$(ddir)/$$unpackdir/install\n$(idir)\n\n\nN\n\n\n\n\nN\n\n" \
+ | ./installnetpbm \
+ && cd .. \
+ && rm -rf $$unpackdir \
+ && echo "Netpbm $(netpbm-version)" > $@