diff options
-rw-r--r-- | iraf.tables/ac.iraf.stsci.patch | 100 | ||||
-rw-r--r-- | iraf.tables/bld.bat | 3 | ||||
-rw-r--r-- | iraf.tables/build.sh | 17 | ||||
-rw-r--r-- | iraf.tables/meta.yaml | 28 | ||||
-rw-r--r-- | iraf.tables/post-link.sh | 4 | ||||
-rw-r--r-- | iraf.tables/ur_extern.pkg | 7 | ||||
-rw-r--r-- | iraf.tables/ur_manifest | 11 | ||||
-rw-r--r-- | iraf.tables/ur_mkpkg_cmd | 36 | ||||
-rw-r--r-- | iraf.tables/ur_mkpkg_patterns | 58 |
9 files changed, 264 insertions, 0 deletions
diff --git a/iraf.tables/ac.iraf.stsci.patch b/iraf.tables/ac.iraf.stsci.patch new file mode 100644 index 0000000..355d347 --- /dev/null +++ b/iraf.tables/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.tables/bld.bat b/iraf.tables/bld.bat new file mode 100644 index 0000000..fa5316a --- /dev/null +++ b/iraf.tables/bld.bat @@ -0,0 +1,3 @@ + +echo Not supported on Windows +exit 1
\ No newline at end of file diff --git a/iraf.tables/build.sh b/iraf.tables/build.sh new file mode 100644 index 0000000..58cd9c8 --- /dev/null +++ b/iraf.tables/build.sh @@ -0,0 +1,17 @@ +name=tables + +# 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 + +# 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.tables/meta.yaml b/iraf.tables/meta.yaml new file mode 100644 index 0000000..cf775af --- /dev/null +++ b/iraf.tables/meta.yaml @@ -0,0 +1,28 @@ +about: + home: http://www.stsci.edu/institute/software_hardware/stsdas + license: US government notice (and third-party licenses) + summary: STScI TABLES package for IRAF +build: + binary_relocation: False + number: '0' + # These must be copied from astroconda-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.tables + version: 3.17 +source: + fn: stsci_iraf-3.17-local.tar.gz # quirky requirement in addition to url + # Need to figure out a site-agnostic way to specify this (conda-build #567): + url: file:///rtfperm/ur_packages/stsci_iraf-3.17-local.tar.gz + patches: + - ac.iraf.stsci.patch +requirements: + build: + - iraf ==2.16_UR + - astroconda-utils + run: + - iraf ==2.16_UR + diff --git a/iraf.tables/post-link.sh b/iraf.tables/post-link.sh new file mode 100644 index 0000000..6165d02 --- /dev/null +++ b/iraf.tables/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" tables + diff --git a/iraf.tables/ur_extern.pkg b/iraf.tables/ur_extern.pkg new file mode 100644 index 0000000..b092f30 --- /dev/null +++ b/iraf.tables/ur_extern.pkg @@ -0,0 +1,7 @@ +reset tables = UR_VDIR +task tables.pkg = tables$tables.cl +if (access("tables$lib")) { + reset helpdb= ( envget("helpdb") + ",tables$lib/helpdb.mip" ) + reset aproposdb= ( envget("aproposdb") + ",tables$lib/apropos.db" ) +} + diff --git a/iraf.tables/ur_manifest b/iraf.tables/ur_manifest new file mode 100644 index 0000000..6cd6f55 --- /dev/null +++ b/iraf.tables/ur_manifest @@ -0,0 +1,11 @@ +bin/libdisplay.a +bin/libgflib.a +bin/libgilib.a +bin/libstxtools.a +bin/libtbtables.a +bin/libuttables.a +bin/trename.e +bin/x_fitsio.e +bin/x_tbplot.e +bin/x_threed.e +bin/x_ttools.e diff --git a/iraf.tables/ur_mkpkg_cmd b/iraf.tables/ur_mkpkg_cmd new file mode 100644 index 0000000..16f9e19 --- /dev/null +++ b/iraf.tables/ur_mkpkg_cmd @@ -0,0 +1,36 @@ +# 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 + +# (JT: I think stsci_iraf just does this to log the path to the version that +# gets picked up, for troubleshooting purposes:) +( +( +env | sort + +cl << ARF +tables +cd tables$ +! pwd +logout +ARF +) 2>&1 +) | sed 's/^/report: /' || status=1 + +# Execute the build. We probably don't need a subshell now that we're working +# directly in the tables subdirectory: +echo report: TABLES +mkpkg $IRAFARCH || status=1 +mkpkg -p tables update || status=1 +chmod g+r */*.e || 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. + +exit $status + diff --git a/iraf.tables/ur_mkpkg_patterns b/iraf.tables/ur_mkpkg_patterns new file mode 100644 index 0000000..c540e81 --- /dev/null +++ b/iraf.tables/ur_mkpkg_patterns @@ -0,0 +1,58 @@ +^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> +^ [+]-*[+][ ]*$ +^ [|].*[|][ ]*$ +^ [+]-*[+][ ]*$ +^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 |