aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-05-27 18:13:47 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-05-27 18:13:47 +0100
commit397de4c918afa7eacc4c6a22b23f8c64b9478b3d (patch)
tree03e06a1b9a782100ee0be043915a1e2ff6732ccf
parent53b8dae45dc959bbd37783932e3eee7f0dccad5c (diff)
Software: CFITSIO 3.47, implemented many common standards
Until now, CFITSIO had several peculiar features which needed special attention: 1) Its tarball didn't have a `.' in the version name and would sometimes have extra `0's. 2) When unpacked it was just `cfitsio'. 3) It hard coded the directory to search for cURL library. All of these forced us to do a lot of extra steps for CFITSIO. So I got in touch with them and fortunately they were very open to correcting these issues and with version 3.47 all such issues have been addressed in the tarball. Thanks to these changes, with this commit, CFITSIO's build rule is now very similar to many other programs. I also noticed that it has an optional `--with-bz2' feature to enable unpacking `.fits.bz2' files. So this feature is also added.
-rw-r--r--.file-metadatabin6829 -> 6001 bytes
-rw-r--r--reproduce/software/config/installation/versions.mk2
-rw-r--r--reproduce/software/make/high-level.mk35
3 files changed, 6 insertions, 31 deletions
diff --git a/.file-metadata b/.file-metadata
index 0e13322..7c7af19 100644
--- a/.file-metadata
+++ b/.file-metadata
Binary files differ
diff --git a/reproduce/software/config/installation/versions.mk b/reproduce/software/config/installation/versions.mk
index 7019ee4..2b303dd 100644
--- a/reproduce/software/config/installation/versions.mk
+++ b/reproduce/software/config/installation/versions.mk
@@ -72,7 +72,7 @@ astrometrynet-version = 0.77
atlas-version = 3.10.3
cairo-version = 1.16.0
cdsclient-version = 3.84
-cfitsio-version = 3.45
+cfitsio-version = 3.47
cmake-version = 3.14.2
fftw-version = 3.3.8
flock-version = 0.2.3
diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk
index fe6efd0..0e7e72b 100644
--- a/reproduce/software/make/high-level.mk
+++ b/reproduce/software/make/high-level.mk
@@ -148,21 +148,13 @@ $(tarballs): $(tdir)/%: | $(lockdir)
# Set the top download link of the requested tarball.
mergenames=1
- if [ $$n = cfitsio ]; then
- mergenames=0
- v=$$(echo $(cfitsio-version) | sed -e's/\.//' \
- | awk '{l=length($$1); \
- printf (l==4 ? "%d\n" \
- : (l==3 ? "%d0\n" \
- : (l==2 ? "%d00\n" \
- : "%d000\n") ), $$1)}')
- w=https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio$$v.tar.gz
- elif [ $$n = astrometry ]; then w=http://astrometry.net/downloads
+ if [ $$n = astrometry ]; then w=http://astrometry.net/downloads
elif [ $$n = atlas ]; then
mergenames=0
w=https://sourceforge.net/projects/math-atlas/files/Stable/$(atlas-version)/atlas$(atlas-version).tar.bz2/download
elif [ $$n = cairo ]; then w=https://www.cairographics.org/releases
elif [ $$n = cdsclient ]; then w=http://cdsarc.u-strasbg.fr/ftp/pub/sw
+ elif [ $$n = cfitsio ]; then w=https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c
elif [ $$n = cmake ]; then
mergenames=0
majv=$$(echo $(cmake-version) \
@@ -250,26 +242,9 @@ $(tarballs): $(tdir)/%: | $(lockdir)
# and create/write into it when the library is successfully built.
$(ibidir)/cfitsio: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \
$(ibidir)/curl
-
- # CFITSIO hard-codes the absolute address of cURL's `curl-config'
- # program (which gives the necessary header and linking
- # information) into the configure script. So we'll have to modify
- # it manually before doing the standard build.
- topdir=$(pwd); cd $(ddir); tar xf $<
- customtar=cfitsio-$(cfitsio-version)-custom.tar.gz
- sed cfitsio/configure \
- -e's|/usr/bin/curl-config|$(ibdir)/curl-config|g' \
- > cfitsio/configure_tmp
- mv cfitsio/configure_tmp cfitsio/configure
- chmod +x cfitsio/configure
- tar cf $$customtar cfitsio
- cd $$topdir
-
- # Continue the standard build on the customized tarball.
- $(call gbuild, $$customtar, cfitsio, , \
- --enable-sse2 --enable-reentrant, , \
- make shared) \
- && rm $$customtar \
+ $(call gbuild, $<, cfitsio-$(cfitsio-version), , \
+ --enable-sse2 --enable-reentrant \
+ --with-bzip2=$(idir), , make shared) \
&& echo "CFITSIO $(cfitsio-version)" > $@
$(ibidir)/cairo: $(tdir)/cairo-$(cairo-version).tar.xz \