aboutsummaryrefslogtreecommitdiff
path: root/iraf
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-10-01 22:45:59 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-10-01 22:45:59 -0400
commit6ccf7a682493db0fb3f5ce7b680efe598d619523 (patch)
tree74fb180f23e656dbfbd9d23f3aa394742e2d0307 /iraf
parentede6dfcf3833bb5bfd59dbfa479162c62fb6d06a (diff)
downloadcbc-recipes-6ccf7a682493db0fb3f5ce7b680efe598d619523.tar.gz
Refactoring structure. Add "deprecated"
Diffstat (limited to 'iraf')
-rw-r--r--iraf/iraf.ini125
1 files changed, 106 insertions, 19 deletions
diff --git a/iraf/iraf.ini b/iraf/iraf.ini
index 0d6f77e..dde3a6a 100644
--- a/iraf/iraf.ini
+++ b/iraf/iraf.ini
@@ -11,38 +11,125 @@ summary: NOAO Image Reduction and Analysis Facility
# Remember, always 32-bit! Now feast upon my tears.
#fn: ${package:name}.lnux.x86.fixup.tar.gz
#url: ${cbc_cgi:url}/${fn}
-git_url: https://bitbucket.org/jhunkeler/${package:name}
+git_url: ssh://git@bitbucket.org/jhunkeler/${package:name}-combined
-# Tarball should be generated with:
-# git archive --format tar.gz --prefix iraf/ -o ../iraf.lnux.x86.fixup.tar.gz -v master
[build]
-number: 1
-detect_binary_files_with_prefix: True
+number: 3
+#detect_binary_files_with_prefix: True
[requirements]
build:
# Luck
+ purge_path
run:
+ purge_path
# Gallant effort
[cbc_build]
linux:
+ set -x
+ #always 32-bit... always
+ export IRAFARCH=''
+ export target=`uname`.32
+ case "$$target" in
+ Linux.32)
+ export IRAFARCH='linux'
+ export CFLAGS="-m32"
+ export LDFLAGS="-m32"
+ ;;
+ Darwin.32)
+ export IRAFARCH='macosx'
+ export CFLAGS="-m32 -arch i386"
+ export LDFLAGS="-m32 -arch i386"
+ ( cd vendor/x11iraf && ln -sf bin.macintel bin.macosx )
+ ( cd vendor/x11iraf && ln -sf lib.macintel lib.macosx )
+ ;;
+ *)
+ echo "UNSUPPORTED ARCHITECTURE (64-bit disabled, by the way...)"
+ exit 1
+ ;;
+ esac
+
+ echo "Purging non-architecture files from distribution:"
+ find \( -name "bin.*" \( -not -name "bin.$$IRAFARCH" \) -and \( -not -name "bin.generic" \) -and -not -path "*vendor/x11iraf/*" \) | xargs -n1 -I{} rm -rf "{}"
+
export TERM=xterm
- FAKEHOME=$$PREFIX/iraf/fakehome
- cp -a `pwd` $$PREFIX/iraf
- cd $$PREFIX/iraf
- ./install \
- --accept-defaults \
- --fakehome $$FAKEHOME \
- --term xterm \
- --mach linux \
- --bindir $$FAKEHOME/bin \
- --cache $$FAKEHOME/cache \
- --imdir $$FAKEHOME/imdir
- rm -f bin
- ln -s bin.linux bin
- ln -s bin.linux bin.linux64
+ export PATH=`purge_path /sw`
+ export iraf=$$PREFIX/iraf/
+ export FAKEHOME=$$PREFIX/iraf-runtime
+
+ mkdir -p $$iraf
+ mkdir -p $$FAKEHOME/{bin,cache,imdir}
+ rsync -aH `pwd`/ $$iraf
+ cd $$iraf
+
+ sed -i -e 's|$${HOME}/.iraf/|$${iraf_runtime} -I$${iraf}/include|g' $$iraf/unix/hlib/irafuser.*sh
+
+ yes '' | ./install_not_broken \
+ --bindir $$FAKEHOME/bin \
+ --cache $$FAKEHOME/cache \
+ --imdir $$FAKEHOME/imdir \
+ --root $$iraf \
+ --mach $$IRAFARCH
+
+ find . -lname '/iraf/iraf/*' \
+ -exec sh -c 'echo Re-linking "$$0" ;\
+ ln -snf "$$(readlink "$$0" \
+ | sed -e "s|/iraf/iraf|../..|" -e "s|/as/|/as.$$IRAFARCH/|")" "$$0"' {} \;
+
+ ln -sfn $$iraf/unix/hlib/libc/iraf.h include/
+ ln -sfn $$iraf/unix/bin.$$IRAFARCH/f2c.h include/
+ ln -sfn $$iraf/unix/hlib/libc/vosproto.h include/
+ ln -sfn $$iraf/unix/boot/xyacc/yaccpar.x include/
+ touch $$iraf/extern/.zzsetenv.def
+
+ gzip -9 unix/bin.macosx/sgi2ueps.e
+ rm -f unix/bin.macosx/sgi2ueps.e
+
+ gzip -9 unix/bin.macosx/sgi2uapl.e
+ rm -f unix/bin.macosx/sgi2uapl.e
+
+ mkdir -p $$PREFIX/etc/conda/{activate.d,deactivate.d}
+
+ echo "
+ export iraf=$$PREFIX/iraf/
+ export iraf_runtime=\$$iraf/../iraf-runtime
+ export IRAFARCH=$$IRAFARCH
+ source \$$iraf/unix/hlib/irafuser.sh
+ export PATH="\$$iraf_runtime/bin:\$$PATH"
+ export PATH="\$$iraf/bin.\$$IRAFARCH:\$$PATH"
+ " > $$PREFIX/etc/conda/activate.d/iraf.sh
+
+ echo '
+ export PATH=`purge_path $$iraf-runtime`
+ export PATH=`purge_path $$iraf/bin.$$IRAFARCH`
+ unset iraf
+ unset iraf_runtime
+ unset IRAFARCH
+ unset IMTOOLRC
+ unset F2C
+ unset F77
+ unset HSI_LIBS
+ unset hbin
+ unset hlib
+ unset host
+ unset CC
+ unset CC_f2c
+ unset HSI_CF
+ unset HSI_F77LIBS
+ unset HSI_FF
+ unset HSI_LF
+ unset HSI_LFLAGS
+ unset HSI_OSLIBS
+ unset HSI_XF
+ unset MACH
+ unset OS_MACH
+ unset RANLIB
+ unset hostid
+ unset tmp
+ unset GVBINDIR
+ ' > $$PREFIX/etc/conda/deactivate.d/iraf.sh
windows:
echo Not supported on Windows