diff options
author | James Turner <jturner@gemini.edu> | 2018-01-07 04:14:39 -0500 |
---|---|---|
committer | James Turner <jturner@gemini.edu> | 2018-01-07 04:14:39 -0500 |
commit | 539137d66b6574eb75df94617ff0403f4a07496e (patch) | |
tree | f960a957dbb291e3c235c9d8a1391fb43ac13015 | |
parent | c176c5423e63b0804a9a32266d901fc75468e32e (diff) | |
download | astroconda-iraf-539137d66b6574eb75df94617ff0403f4a07496e.tar.gz |
Add IRAF & STSDAS as aXe build deps so files go in bin.$IRAFARCH/, not bin/.
-rw-r--r-- | iraf.axe/build.sh | 38 | ||||
-rw-r--r-- | iraf.axe/meta.yaml | 6 |
2 files changed, 31 insertions, 13 deletions
diff --git a/iraf.axe/build.sh b/iraf.axe/build.sh index 5222b17..58b8259 100644 --- a/iraf.axe/build.sh +++ b/iraf.axe/build.sh @@ -1,6 +1,31 @@ # Install aXe binaries into STSDAS in the same way as the Ureka pkg-install. # This must be built on CentOS >=6, for compatibility with the cfitsio build. +set -e + +# Get the target stsdas/bin.$IRAFARCH installation path from IRAF. +# The aXe build does not actually rely on IRAF apart from this. +. setup_iraf.sh +rm -rf irafdir +mkdir irafdir +cd irafdir +echo xterm | mkiraf > tmp +touch .hushiraf +cl > tmp << ARF +cd stsdas +cd bin +pwd -P +logout +ARF +stbindir=$(sed -Ee 's|e?cl>[ \t]*||g' tmp) +stdir=$(dirname "$stbindir") +cd .. + +if ! echo "$stbindir" | grep -q 'stsdas/bin'; then + echo "Failed to determine stsdas/bin path from IRAF" >&2 + exit 1 +fi + # I'd have thought conda-build would take care of this but it appears not to: export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIX/lib" export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$PREFIX/lib" @@ -9,15 +34,6 @@ export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$PREFIX/lib" # deprecated C usage, as when building IRAF: export CFLAGS="$CFLAGS -Wno-return-type" -set -e - -# Creating a dummy STSDAS directory as the install target avoids having IRAF -# as a heavyweight build dependency when it's not needed (at the cost of this -# script having to know the IRAF directory structure in the env, but that's -# not likely to change): -stdir=$PREFIX/iraf_extern/stsdas -mkdir -p "$stdir/bin" - echo "Build static GSL (old version needed by aXe)" # Put static GSL in a temporary location, because we don't need to distribute @@ -38,8 +54,8 @@ cd ../aXe/ccc --with-gsl-prefix="${SRC_DIR}/gsl_build" make -echo "Install aXe into STSDAS path" -cp -p bin/* "$stdir/bin/" +echo "Install aXe into $stbindir/" +cp -p bin/* "$stbindir/" # Install obligatory licensing information (best kept in pkg with binaries): cp -p "$RECIPE_DIR/copyright.aXe" "$stdir/" diff --git a/iraf.axe/meta.yaml b/iraf.axe/meta.yaml index f8f6e11..835cb56 100644 --- a/iraf.axe/meta.yaml +++ b/iraf.axe/meta.yaml @@ -7,7 +7,7 @@ about: summary: STScI/STECF aXe add-on for the STSDAS IRAF package build: binary_relocation: True - number: '1' + number: '2' package: name: iraf.axe version: "2.6" @@ -23,11 +23,13 @@ source: requirements: build: # is pkgconfig also needed here, as per Joe's email? + - iraf !=2.16.1,>=2.16.UR # IRAF is just used to determine install paths + - iraf.stsdas # just to install into; not a real build dep. - cfitsio >=3.35 - wcstools >=3.8.4 run: - iraf !=2.16.1,>=2.16.UR - - iraf.stsdas >=3.18 # need 3.18 versions of Python files in "slitless" + - iraf.stsdas >=3.18.1 # need v3.18.1 of python files in "slitless" - cfitsio >=3.35 - wcstools >=3.8.4 |