aboutsummaryrefslogtreecommitdiff
path: root/iraf.stsdas
diff options
context:
space:
mode:
authorJames E.H. Turner <jturner@gemini.edu>2016-09-29 20:00:15 -0400
committerJames E.H. Turner <jturner@gemini.edu>2016-09-29 20:00:15 -0400
commit708688dfa7293de3f7a93192a19721580fc54c84 (patch)
tree83aac6442e4e75ce2de4f2b354232eab21ab1a00 /iraf.stsdas
parenta32e82dd68e48216723ab26caeca2d07efc52aa6 (diff)
downloadastroconda-iraf-708688dfa7293de3f7a93192a19721580fc54c84.tar.gz
Add STSDAS package.
Diffstat (limited to 'iraf.stsdas')
-rw-r--r--iraf.stsdas/ac.iraf.stsci.patch100
-rw-r--r--iraf.stsdas/bld.bat3
-rw-r--r--iraf.stsdas/build.sh22
-rw-r--r--iraf.stsdas/meta.yaml29
-rw-r--r--iraf.stsdas/post-link.sh4
-rw-r--r--iraf.stsdas/ur_extern.pkg8
-rw-r--r--iraf.stsdas/ur_manifest91
-rw-r--r--iraf.stsdas/ur_mkpkg_cmd44
-rw-r--r--iraf.stsdas/ur_mkpkg_patterns60
9 files changed, 361 insertions, 0 deletions
diff --git a/iraf.stsdas/ac.iraf.stsci.patch b/iraf.stsdas/ac.iraf.stsci.patch
new file mode 100644
index 0000000..355d347
--- /dev/null
+++ b/iraf.stsdas/ac.iraf.stsci.patch
@@ -0,0 +1,100 @@
+diff -ur ../original/stsdas/apropos.cl ./stsdas/apropos.cl
+--- ../original/stsdas/apropos.cl 2014-03-14 14:21:23.000000000 -0300
++++ ./stsdas/apropos.cl 2016-08-10 17:47:39.000000000 -0300
+@@ -1,13 +1,66 @@
+ procedure apropos ( topic )
+
+ string topic {prompt = ">Apropos ? ", mode="ql"}
+-file index = "stsdas$lib/apropos.db" {prompt=">index to search"}
++file index = "aproposdb" {prompt=">index to search"}
+
+ begin
+-string csubject
+
+- # remove case sensitivity
++string csubject, dblist, fname, pvar
++int len, n, iend
++bool var_ok
++
++ # Remove case sensitivity
+ csubject = "{"//topic//"}"
+- match ( csubject, index, stop=no, meta=yes, print_file_names=no)
++
++ # As a special case, if we're given the name of the "aproposdb"
++ # environment variable then get the list of database filenames
++ # from that:
++ if (index == "aproposdb") {
++ if (defvar("aproposdb")) {
++ dblist = envget("aproposdb")
++ } else {
++ error(1, "variable aproposdb is not set!")
++ }
++ } else {
++ dblist = index
++ }
++
++ len = strlen(dblist)
++
++ # Loop over the database filenames in the list:
++ while (len > 0) {
++
++ # Parse next name and remove it from the start of the list:
++ iend = stridx(",", dblist) - 1
++ if (iend < 0) iend = len # no more commas; use what's left
++ fname = substr(dblist, 1, iend) # parse next filename
++ if (iend > len-2) { # no more filenames; empty list
++ dblist=""
++ } else { # still have another file
++ dblist = substr(dblist, iend+2, len)
++ }
++ len = strlen(dblist)
++
++ # Extract any path variable and check that it exists,
++ # otherwise IRAF will complain:
++ var_ok = yes
++ iend = stridx("$", fname) - 1
++ if (iend > -1) {
++ pvar = substr(fname, 1, iend)
++ if (!defvar(pvar))
++ var_ok = no
++ }
++
++ # Try to match the query if the database file exists:
++ if (var_ok)
++ if (access(fname)) {
++
++ # Print any matches in this database file:
++ match ( csubject, fname, stop=no, meta=yes, \
++ print_file_names=no)
++
++ }
++
++ } # while loop over database files
+
+ end
+diff -ur ../original/tables/lib/tbtables/mkpkg ./tables/lib/tbtables/mkpkg
+--- ../original/tables/lib/tbtables/mkpkg 2014-03-14 14:21:28.000000000 -0300
++++ ./tables/lib/tbtables/mkpkg 2016-08-10 17:47:39.000000000 -0300
+@@ -233,12 +233,10 @@
+ $ifdef (SPPFITSIO)
+ $echo "NOTE: SPP FITSIO will be used for FITS tables."
+ tbfhp_f.x <tbset.h> tbtables.h tblfits.h
+- @fitsio
+ $else
+ $echo "NOTE: CFITSIO will be used for FITS tables."
+ $echo "NOTE: CFITSIO does not support IRAF networking."
+ tbfhp.x <tbset.h> tbtables.h tblfits.h
+ tbfxff.c <fitsio.h> fitsio_spp.h underscore.h
+- @cfitsio
+ $endif
+ ;
+diff -ur ../original/tables/lib/tbtables/tbfxff.c ./tables/lib/tbtables/tbfxff.c
+--- ../original/tables/lib/tbtables/tbfxff.c 2014-03-14 14:21:28.000000000 -0300
++++ ./tables/lib/tbtables/tbfxff.c 2016-08-10 17:47:39.000000000 -0300
+@@ -1,5 +1,5 @@
+ # include <stdlib.h>
+-# include "cfitsio/fitsio.h" /* CFITSIO include file */
++# include <fitsio.h> /* CFITSIO include file */
+ # include "fitsio_spp.h" /* sizes of SPP strings and Fortran FITSIO */
+ # include "underscore.h" /* appends underscore, if needed */
+
diff --git a/iraf.stsdas/bld.bat b/iraf.stsdas/bld.bat
new file mode 100644
index 0000000..fa5316a
--- /dev/null
+++ b/iraf.stsdas/bld.bat
@@ -0,0 +1,3 @@
+
+echo Not supported on Windows
+exit 1 \ No newline at end of file
diff --git a/iraf.stsdas/build.sh b/iraf.stsdas/build.sh
new file mode 100644
index 0000000..c5b339c
--- /dev/null
+++ b/iraf.stsdas/build.sh
@@ -0,0 +1,22 @@
+name=stsdas
+
+# Configure the environment for IRAF, since conda build appears not to do
+# "source activate" after installing dependencies (this would instead need to
+# eval $PREFIX/iraf/unix/hlib/setup directly if "--level" needs specifying):
+. setup_iraf.sh
+
+# Copy list of proprietary files to remove, from ../stsci_iraf/release_tools
+# (conda build stops if this fails, due to "set -e"):
+sed -ne "s|^$name/||p" release_tools/numrec_list.txt > $name/numrec_list.txt
+
+# Copy a couple of files used by the build into the package dir:
+mkdir -p $name/build_check
+cp -p release_tools/read_data_files.grep $name/build_check/
+cp -p release_tools/read_data_files.expect $name/build_check/
+
+# Change to the package subdir (special case for STScI IRAF):
+cd $name
+
+# Build from source in envs/_build (using build script from astroconda-utils):
+ac_build_iraf_pkg
+
diff --git a/iraf.stsdas/meta.yaml b/iraf.stsdas/meta.yaml
new file mode 100644
index 0000000..39f2ff9
--- /dev/null
+++ b/iraf.stsdas/meta.yaml
@@ -0,0 +1,29 @@
+about:
+ home: http://www.stsci.edu/institute/software_hardware/stsdas
+ license: US government notice (and third-party licenses)
+ summary: STScI STSDAS package for IRAF
+build:
+ binary_relocation: False
+ number: '0'
+ # These must be copied from astroconda-build-utils, since conda unhelpfully
+ # disallows the post-install step from depending on other packages:
+ always_include_files:
+ - bin/ac_config_iraf_pkg
+ - bin/ac_update_extern_pkg
+package:
+ name: iraf.stsdas
+ version: 3.17
+source:
+ fn: stsci_iraf-3.17-local.tar.gz # quirky requirement in addition to url
+ url: http://astroconda-source:4440/stsci_iraf-3.17-local.tar.gz
+ patches:
+ - ac.iraf.stsci.patch
+requirements:
+ build:
+ - astroconda-build-utils
+ - iraf !=2.16.1,>=2.16.UR
+ - iraf.tables
+ run:
+ - iraf !=2.16.1,>=2.16.UR
+ - iraf.tables
+
diff --git a/iraf.stsdas/post-link.sh b/iraf.stsdas/post-link.sh
new file mode 100644
index 0000000..5b6d8b2
--- /dev/null
+++ b/iraf.stsdas/post-link.sh
@@ -0,0 +1,4 @@
+# Call a common script that updates extern.pkg for the new IRAF package:
+
+"$PREFIX/bin/ac_config_iraf_pkg" stsdas
+
diff --git a/iraf.stsdas/ur_extern.pkg b/iraf.stsdas/ur_extern.pkg
new file mode 100644
index 0000000..63ab4ec
--- /dev/null
+++ b/iraf.stsdas/ur_extern.pkg
@@ -0,0 +1,8 @@
+reset stsdas = UR_VDIR
+task stsdas.pkg = stsdas$stsdas.cl
+task apropos = stsdas$apropos.cl
+if (access("stsdas$lib")) {
+ reset helpdb= ( envget("helpdb") + ",stsdas$lib/helpdb.mip" )
+ reset aproposdb= ( envget("aproposdb") + ",stsdas$lib/apropos.db" )
+}
+
diff --git a/iraf.stsdas/ur_manifest b/iraf.stsdas/ur_manifest
new file mode 100644
index 0000000..3b16102
--- /dev/null
+++ b/iraf.stsdas/ur_manifest
@@ -0,0 +1,91 @@
+bin/cs0.e
+bin/cs1.e
+bin/cs11.e
+bin/cs12.e
+bin/cs2.e
+bin/cs4.e
+bin/cs6.e
+bin/cs7.e
+bin/cs8.e
+bin/inttag.e
+bin/libapplib.a
+bin/libcvos.a
+bin/libf77util.a
+bin/libhstio.a
+bin/libiraf77.a
+bin/libsynphot.a
+bin/slitless.e
+bin/x_acoadd.e
+bin/x_asnexpand.e
+bin/x_biaseq.e
+bin/x_blot.e
+bin/x_calfoc.e
+bin/x_calfos.e
+bin/x_calhrs.e
+bin/x_calnica.e
+bin/x_calnicb.e
+bin/x_calpar.e
+bin/x_calwfp.e
+bin/x_calwp2.e
+bin/x_cdgasp.e
+bin/x_ctools.e
+bin/x_dither.e
+bin/x_doppinfo.e
+bin/x_drizzle.e
+bin/x_echscript.e
+bin/x_fitting.e
+bin/x_focprism.e
+bin/x_fos.e
+bin/x_fourier.e
+bin/x_fquot.e
+bin/x_fweight.e
+bin/x_gcombine.e
+bin/x_headers.e
+bin/x_hrs.e
+bin/x_imgtools.e
+bin/x_infostis.e
+bin/x_isophote.e
+bin/x_msarith.e
+bin/x_msbadpix.e
+bin/x_mscopy.e
+bin/x_msreadnoise.e
+bin/x_msstatistics.e
+bin/x_msstreakflat.e
+bin/x_nebular.e
+bin/x_newgeom.e
+bin/x_nicmos.e
+bin/x_odelaytime.e
+bin/x_ovac2air.e
+bin/x_paperprod.e
+bin/x_pedsky.e
+bin/x_pedsub.e
+bin/x_playpen.e
+bin/x_pltsol.e
+bin/x_plucy.e
+bin/x_psikern.e
+bin/x_pweight.e
+bin/x_restore.e
+bin/x_sdisplay.e
+bin/x_sharp.e
+bin/x_simulators.e
+bin/x_spec_polar.e
+bin/x_spfitpkg.e
+bin/x_splice.e
+bin/x_statistics.e
+bin/x_stplot.e
+bin/x_synphot.e
+bin/x_tastis.e
+bin/x_tools.e
+bin/x_tranback.e
+bin/x_traxy.e
+bin/x_treqxy.e
+bin/x_trxyeq.e
+bin/x_ucrpix.e
+bin/x_w_calib.e
+bin/x_wblot.e
+bin/x_wcs2dr.e
+bin/x_wdrizzle.e
+bin/x_wfpc.e
+bin/x_wtranback.e
+bin/x_wtraxy.e
+bin/x_xcor.e
diff --git a/iraf.stsdas/ur_mkpkg_cmd b/iraf.stsdas/ur_mkpkg_cmd
new file mode 100644
index 0000000..2554a0b
--- /dev/null
+++ b/iraf.stsdas/ur_mkpkg_cmd
@@ -0,0 +1,44 @@
+# In Ureka, this script used to call make_all from the stsci_iraf tarball but
+# in AstroConda, the applicable parts of make_all are instead included here, to
+# accommodate stsci_iraf being split into separate conda packages:
+
+status=0
+
+#ls -la
+pwd
+
+# Execute the build:
+echo report: STSDAS
+mkpkg $IRAFARCH || status=1
+mkpkg -p tables -p stsdas update || status=1
+chmod g+r */*.e || status=1
+
+# Do the additional steps from the tarball's make_all:
+echo report: STSDAS READ DATA FILES
+cd build_check # created by build.sh in iraf.stsdas
+rm -rf iraf
+mkdir iraf
+cd iraf
+echo xterm | mkiraf > mkiraf_tmp 2>&1
+sed 's/^/report: /' < mkiraf_tmp
+touch .hushiraf
+cl > tmp << ARF
+stsdas
+fitsio
+cd stsdas
+cd data/fits
+cl < read_fits.cl
+logout
+ARF
+cd ..
+grep -v -f read_data_files.grep < iraf/tmp > result || status=1
+diff -b read_data_files.expect result || status=1
+
+# Proprietary code now gets removed by build_iraf_package. For stsci_iraf the
+# conda recipe copies the (separately-maintained) list to the right place first.
+
+# Tidy up a bit (unless something failed detectably):
+[ $status = 0 ] && rm -fr iraf/
+
+exit $status
+
diff --git a/iraf.stsdas/ur_mkpkg_patterns b/iraf.stsdas/ur_mkpkg_patterns
new file mode 100644
index 0000000..d2c0861
--- /dev/null
+++ b/iraf.stsdas/ur_mkpkg_patterns
@@ -0,0 +1,60 @@
+^gcc: -headerpad_max_install_names: linker input file unused because linking not done
+^ld: warning
+^libtool: file:
+^libtool: warning same member name
+^report:
+^total[ ][0-9]
+^[drwxl-]{10}
+^/.*/iraf_extern/tables
+^/.*/iraf_extern/stsdas
+^/.*/iraf_extern/stecf
+^_=
+^[A-Za-z0-9_]*=
+^Warning:
+^ apropos
+^ dataio
+^ dbms
+^ fitsio
+^(>.*)?ecl>[ \t]*$
+^ [+]-*[+][ ]*$
+^ [|].*[|][ ]*$
+^ [+]-*[+][ ]*$
+^tables>
+^TABLES[ ]*$
+^STSDAS[ ]*$
+^Warning, mkpkg line
+^-- creating a new uparm directory
+^Terminal types:
+^Enter terminal type
+^You may
+^setting terminal type
+^mH.
+^[ ]*NOAO/IRAF
+^[ ]*This is the EXPORT version
+^[ ]*Welcome to IRAF
+^[ ]*detailed information about
+^[ ]*command[ ]*or[ ]*load
+^[ ]*package, or `logout'
+^[ ]*what is new in
+^[ ]*Visit http://iraf.net
+^[ ]*The following commands
+^stsdas>
+^ analysis
+^ contrib
+^ catfits
+^ fits_exampl
+^ Fits_file
+^fitsio>
+^foc.fits
+^AFTER RFT_READ_FITS
+^STECF
+^Fits_file[ ]
+^[ ]*[A-Za-z0-9_.-]*[.]fits[ ]
+^[ ]*[A-Za-z0-9_.-]*[.]hhh[ ]
+^[ ]*hhh[ ]
+^[ ]*[.]{2}/scidata/
+^[ ]*renamed to
+^0a1$
+^\+ export
+^rm
+^unable to remove