From 1d4c587489cbb17c7ae9f6c0d0d5d919690fafde Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 28 Oct 2019 15:19:34 +0000 Subject: HEALPix, Autoconf and Automake now in library The tarball of HEALPix includes multiple languages and doesn't include the ready-to-run GNU Build System by default, we actually have to build the `./configure' script for the C/C++ libraries. So it was necessary to also include GNU Autoconf and GNU Automake as prerequisites of HEALPix. However, the official GNU Autoconf tarball (dating from 2012) doesn't build on modern systems, so I just cloned it from its source and bootstrapped it and built its modern tarball which we are using here. --- reproduce/software/bibtex/healpix.tex | 18 +++++++ .../software/config/installation/checksums.mk | 4 ++ reproduce/software/config/installation/versions.mk | 4 ++ reproduce/software/make/basic.mk | 1 + reproduce/software/make/high-level.mk | 63 +++++++++++++++++++++- reproduce/software/make/python.mk | 10 ++++ 6 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 reproduce/software/bibtex/healpix.tex (limited to 'reproduce/software') diff --git a/reproduce/software/bibtex/healpix.tex b/reproduce/software/bibtex/healpix.tex new file mode 100644 index 0000000..b9089be --- /dev/null +++ b/reproduce/software/bibtex/healpix.tex @@ -0,0 +1,18 @@ +@ARTICLE{healpix, + author = {{G{\'o}rski}, K.~M. and {Hivon}, E. and {Banday}, A.~J. and {Wand + elt}, B.~D. and {Hansen}, F.~K. and {Reinecke}, M. and {Bartelmann}, M.}, + title = "{HEALPix: A Framework for High-Resolution Discretization and Fast Analysis of Data Distributed on the Sphere}", + journal = {ApJ}, + keywords = {Cosmology: Cosmic Microwave Background, Cosmology: Observations, Methods: Statistical, Astrophysics}, + year = "2005", + month = "Apr", + volume = {622}, + number = {2}, + pages = {759}, + doi = {10.1086/427976}, +archivePrefix = {arXiv}, + eprint = {astro-ph/0409513}, + primaryClass = {astro-ph}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2005ApJ...622..759G}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} diff --git a/reproduce/software/config/installation/checksums.mk b/reproduce/software/config/installation/checksums.mk index d1b900d..1fbe7dd 100644 --- a/reproduce/software/config/installation/checksums.mk +++ b/reproduce/software/config/installation/checksums.mk @@ -77,6 +77,8 @@ apr-checksum = daa140c83c7e2c45c3980d9dc81d34fa662bebd050653562c39572d0ddf2eaedb apr-util-checksum = 84da76e9b64da2de0996d4d6f3ab3f23db3724eb6352d218e0e8196bcc0b0a5d4fe791f41b4cc350ce3d04cce3bb3cf8bfb513d777d0cd030928368e6b55a536 astrometrynet-checksum = 35c268bf0a7068e01323b9bfccdf255c993df83c24b2e6026a00084c4ab87d031f1024205d0ed3aecc7e2a495d4bc0b0e67270d66679020b7cc2e4b2f30f5c4a atlas-checksum = bf17306f09f2aa973cb776e2c9eacfb2409ad4d95d19802e1c4e0597d0a099fccdb5eaafe273c2682a41e41a3c6fabc8bbba4ce03180cffea40ede5df1d1f56e +autoconf-checksum = c25e834251bfc2befe822614caf1c80d7e1314a83e7173304abc235fd15a958b8db9fbc801e8ad98328dfd6d9dbc425bfbbefec500fa268992ae7bbf4fa5bc35 +automake-checksum = 47b0120a59e3e020529a6ce750297d7de1156fd2be38db5d101e50120f11b40c28741ecd5eacf2790a9e25386713dcf7717339cfa5d7943d0dbf47c417383448 bison-checksum = 00d2b37187b93100ec4b220ce2752d12ccf68f9d0d39b380d375d36dd8a22aa1d6e60156918f95e4493f9531c5d42d8fad38fd807307b491c1ca7ca4177823d9 boost-checksum = 4378e20f18db9f186ac0f38ad98c522526e0fe48a8deb968c41325e3f69e733be3298505e91ea713e79a9d9e741305fa879d289f74e6276e0ec7286f03be87fc cairo-checksum = 9eb27c4cf01c0b8b56f2e15e651f6d4e52c99d0005875546405b64f1132aed12fbf84727273f493d84056a13105e065009d89e94a8bfaf2be2649e232b82377f @@ -91,6 +93,7 @@ ghostscript-checksum = 9ad7bd24b6d9b7d258e943783817be036a2e0234517baffa1016804ef gnuastro-checksum = 6ff8e86f2834a08acf94295ae022736a3f31afd3c66c0d74b012d98e53c2184c42d6d4558997a85b268c5e3ebb258041fe2db2478435788b26c0b94068dd892e gsl-checksum = 0be8240715f0b86aba2c63d9f12da4dba4719d4e350e9308d279e0dd3b2f0519ea26fd2e38a17f3e8cf43aacbaa2455207a7ca0d6c305f3b8725e8ece2250a74 hdf5-checksum = f828ee9d63533effe1ad358230e5ce7b64c5016e49291d9533575f713cbfba496290fc0151fd9617898bdf36785984ddb38a9207f529d7702d4e23838fe050d8 +healpix-checksum = 29fe680d757bd94651bf029654257cb67286643aad510df4c2f0b06245174411376ec1beca64feebfac14a6fc0194525170635842916d79dcaddeddd9ac6f6c7 help2man-checksum = 786a6bd4336c591cfeb0b4f2dc1429f6545e36514e7b238453c91368b8f531c46db2be025f02dc52e6dd8b971d6edbb4ff1a8e1b519f9253a3957ad7157790be imagemagick-checksum = ad4325df57769f9c4edf8ac71370cb9bb19e090e588d47eb0311e3f4895abd7a7edcbd2e7a495f21acd1daca97fa224bdf1fd978577588e45c11a7799c3d67f4 imfit-checksum = 15edd2349232c1c8e611b31d3a46b0700112d274515f54d0a0085bb4bfa6d3d5f8a15cd926516e043a29ce841accf3534ae58dbfb952d858dc9445199c957096 @@ -148,6 +151,7 @@ flake8-checksum = a25076bb7f978ca23af0f2016b30bf5fe4680371b4c0939361a6f8c496f3c8 future-checksum = c70565a660cf87c5e7e994bae0d4eb0b2b8b607ecb5ce65521c027bf0a39ce5699f0578413bd3c7edd5d01aeb1617de48dcea098a9e9021d8487a73007573030 galsim-checksum = 11ecbfb9628cf85a4c25024c6f3a34bbdadf522f64e4e93e6428b545c65a48906a05eb7774d0faaacf52a48dddfd599bfc7cc7252ca854a18c3930f116533a3c h5py-checksum = 73b1f59e3e2b3eceebf7b97e49bd8f5199afafd7ef29917af05ff8415c2f2129a5c59db9658944370c9bcf8fc04ab26948ee27fc6fd948a22d19cace1ce8c853 +healpy-checksum = installed-with-healpix html5lib-checksum = 35939b4450893864da04e735ee5e0addacf1dd34bae6a6909c76572abf6bfded446a78a713dfde91c1485ba45867d7abeb6a45cf0545c16ea968707be7de5dd2 idna-checksum = 8ca5cfe6350c51250bafdac7c6e4ddd54c4a5d6bf7acbcef896760a759868c8e9df1fdf550121d8512fa3eb316dcf031ec6058e03b4f66eadee21b63e2187d33 jeepney-checksum = 43083994a7c6af84a5a68d3ff8f6dc4d9129ce9fa55517838fb62d9f62bb78bdf52067649d0b95d08d689b7d7475cb9b2a956662e265a776ad42dcf4ccc0ab63 diff --git a/reproduce/software/config/installation/versions.mk b/reproduce/software/config/installation/versions.mk index 20e6632..278baf0 100644 --- a/reproduce/software/config/installation/versions.mk +++ b/reproduce/software/config/installation/versions.mk @@ -75,6 +75,8 @@ apr-version = 1.7.0 apr-util-version = 1.6.1 astrometrynet-version = 0.77 atlas-version = 3.10.3 +autoconf-version = 2.69.200-babc +automake-version = 1.16.1 bison-version = 3.4.2 boost-version = 1.71.0 cairo-version = 1.16.0 @@ -90,6 +92,7 @@ ghostscript-version = 9.27 gnuastro-version = 0.10 gsl-version = 2.6 hdf5-version = 1.10.5 +healpix-version = 3.50 help2man-version = 1.47.11 imagemagick-version = 7.0.8-67 imfit-version = 1.6.1 @@ -143,6 +146,7 @@ flake8-version = 3.7.8 future-version = 0.18.1 galsim-version = 2.2.1 h5py-version = 2.9.0 +healpy-version = installed-with-healpix html5lib-version = 1.0.1 idna-version = 2.8 jeepney-version = 0.4 diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index b0b757f..65bdf1e 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -904,6 +904,7 @@ $(ibidir)/glibtool: $(tdir)/libtool-$(libtool-version).tar.xz \ | $(ibidir)/m4 $(call gbuild, $<, libtool-$(libtool-version), static, \ --program-prefix=g) \ + && ln -s $(ibdir)/glibtoolize $(ibdir)/libtoolize \ && echo "GNU Libtool $(libtool-version)" > $@ $(ibidir)/grep: $(tdir)/grep-$(grep-version).tar.xz \ diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk index 36e88ef..7ee7062 100644 --- a/reproduce/software/make/high-level.mk +++ b/reproduce/software/make/high-level.mk @@ -136,6 +136,8 @@ tarballs = $(foreach t, apr-$(apr-version).tar.gz \ apr-util-$(apr-util-version).tar.gz \ astrometry.net-$(astrometrynet-version).tar.gz \ atlas-$(atlas-version).tar.bz2 \ + autoconf-$(autoconf-version).tar.lz \ + automake-$(automake-version).tar.gz \ bison-$(bison-version).tar.xz \ boost-$(boost-version).tar.gz \ cairo-$(cairo-version).tar.xz \ @@ -150,6 +152,7 @@ tarballs = $(foreach t, apr-$(apr-version).tar.gz \ gnuastro-$(gnuastro-version).tar.lz \ gsl-$(gsl-version).tar.gz \ hdf5-$(hdf5-version).tar.gz \ + healpix-$(healpix-version).tar.gz \ help2man-$(help2man-version).tar.xz \ imagemagick-$(imagemagick-version).tar.xz \ imfit-$(imfit-version).tar.gz \ @@ -194,7 +197,9 @@ $(tarballs): $(tdir)/%: | $(lockdir) mergenames=0 c=$(atlas-checksum) w=https://sourceforge.net/projects/math-atlas/files/Stable/$(atlas-version)/atlas$(atlas-version).tar.bz2/download - elif [ $$n = bison ]; then c=$(bison-checksum); w=http://ftp.gnu.org/gnu/bison/ + elif [ $$n = autoconf ]; then c=$(autoconf-checksum); w=http://akhlaghi.org/reproduce-software + elif [ $$n = automake ]; then c=$(automake-checksum); w=http://ftp.gnu.org/gnu/automake + elif [ $$n = bison ]; then c=$(bison-checksum); w=http://ftp.gnu.org/gnu/bison elif [ $$n = boost ]; then mergenames=0 c=$(boost-checksum) @@ -228,6 +233,7 @@ $(tarballs): $(tdir)/%: | $(lockdir) c=$(hdf5-checksum) majorver=$$(echo $(hdf5-version) | sed -e 's/\./ /g' | awk '{printf("%d.%d", $$1, $$2)}') w=https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-$$majorver/hdf5-$(hdf5-version)/src/$* + elif [ $$n = healpix ]; then c=$(healpix-checksum); w=http://akhlaghi.org/reproduce-software elif [ $$n = help ]; then c=$(help2man-checksum); w=http://ftp.gnu.org/gnu/help2man elif [ $$n = imagemagick ]; then c=$(imagemagick-checksum); w=http://akhlaghi.org/reproduce-software elif [ $$n = imfit ]; then @@ -519,6 +525,53 @@ $(ibidir)/hdf5: $(tdir)/hdf5-$(hdf5-version).tar.gz \ --enable-fortran, -j$(numthreads) V=1) \ && echo "HDF5 library $(hdf5-version)" > $@ +# HEALPix includes the source of its C, C++, Python (and several other +# languages) libraries within one tarball. We will include the Python +# installation only when any other Python module is requested (in +# `TARGETS.mk'). +# +# Note that the default `./configure' script is an interactive script which +# is hard to automate. So we need to go into the `autotools' directory of +# the `C' and `cxx' directories and configure the GNU Build System (with +# `autoreconf', which uses `autoconf' and `automake') to easily build the +# HEALPix C/C++ libraries in batch mode. +ifeq ($(strip $(top-level-python)),) +healpix-python-dep = +else +healpix-python-dep = $(ipydir)/matplotlib $(ipydir)/astropy +endif +$(ibidir)/healpix: $(tdir)/healpix-$(healpix-version).tar.gz \ + $(healpix-python-dep) \ + $(ibidir)/autoconf \ + $(ibidir)/automake \ + $(ibidir)/cfitsio + if [ x"$(healpix-python-dep)" = x ]; then + pycommand1="echo no-healpy-because-no-other-python" + pycommand2="echo no-healpy-because-no-other-python" + else + pycommand1="python setup.py build" + pycommand2="python setup.py install" + fi + rm -rf $(ddir)/Healpix_$(healpix-version) + topdir=$(pwd); cd $(ddir); tar xf $< + cd Healpix_$(healpix-version)/src/C/autotools/ \ + && autoreconf --install \ + && ./configure --prefix=$(idir) \ + && make V=1 -j$(numthreads) SHELL=$(ibdir)/bash \ + && make install \ + && cd ../../cxx/autotools/ \ + && autoreconf --install \ + && ./configure --prefix=$(idir) \ + && make V=1 -j$(numthreads) SHELL=$(ibdir)/bash \ + && make install \ + && cd ../../healpy \ + && $$pycommand1 \ + && $$pycommand2 \ + && cd $$topdir \ + && rm -rf $(ddir)/Healpix_$(healpix-version) \ + && cp $(dtexdir)/healpix.tex $(ictdir)/ \ + && echo "HEALPix $(healpix-version) \citep{healpix}" > $@ + $(ibidir)/libjpeg: $(tdir)/jpegsrc.$(libjpeg-version).tar.gz $(call gbuild, $<, jpeg-9b, static) \ && echo "Libjpeg $(libjpeg-version)" > $@ @@ -705,6 +758,14 @@ $(ibidir)/astrometrynet: $(tdir)/astrometry.net-$(astrometrynet-version).tar.gz && cp $(dtexdir)/astrometrynet.tex $(ictdir)/ \ && echo "Astrometry.net $(astrometrynet-version) \citep{astrometrynet}" > $@ +$(ibidir)/autoconf: $(tdir)/autoconf-$(autoconf-version).tar.lz + $(call gbuild, $<, autoconf-$(autoconf-version), static, ,V=1) \ + && echo "GNU Autoconf $(autoconf-version)" > $@ + +$(ibidir)/automake: $(tdir)/automake-$(automake-version).tar.gz + $(call gbuild, $<, automake-$(automake-version), static, ,V=1) \ + && echo "GNU Automake $(automake-version)" > $@ + $(ibidir)/bison: $(tdir)/bison-$(bison-version).tar.xz \ $(ibidir)/help2man $(call gbuild, $<, bison-$(bison-version), static, ,V=1) \ diff --git a/reproduce/software/make/python.mk b/reproduce/software/make/python.mk index b7cbc9b..14e7b75 100644 --- a/reproduce/software/make/python.mk +++ b/reproduce/software/make/python.mk @@ -455,6 +455,16 @@ $(ipydir)/h5py: $(tdir)/h5py-$(h5py-version).tar.gz \ $(call pybuild, tar xf, $<, h5py-$(h5py-version), ,\ h5py $(h5py-version)) +# `healpy' is actually installed as part of the HEALPix package. It will be +# installed with its C/C++ libraries if any other Python library is +# requested with HEALPix. So actually calling for `healpix' (when `healpix' +# is requested) is not necessary. But some users might not know about this +# and just ask for `healpy'. To avoid confusion in such cases, we'll just +# set `healpy' to be dependent on `healpix' and not download any tarball +# for it, or write anything in the final target. +$(ipydir)/healpy: $(ibidir)/healpix + touch $@ + $(ipydir)/html5lib: $(tdir)/html5lib-$(html5lib-version).tar.gz \ $(ipydir)/webencodings \ $(ipydir)/six -- cgit v1.2.1