[Debian-astro-commits] [iraf] 02/03: Rediff patches
Ole Streicher
olebole at moszumanska.debian.org
Wed Nov 22 15:44:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
olebole pushed a commit to branch master
in repository iraf.
commit f12d72f8f8057062b94fca84d92e499f4041ee2d
Author: Ole Streicher <olebole at debian.org>
Date: Wed Nov 22 13:32:59 2017 +0100
Rediff patches
Add Make-the-installation-FHS-and-Free-Desktop-conform.patch: <REASON>
Add Use-system-libraries-when-possible.patch: <REASON>
Drop shared-xmlrpc.patch: <REASON>
Drop fortran.patch: <REASON>
Drop unop_int.patch: <REASON>
Drop fhs.patch: <REASON>
Drop fix_fncache.patch: <REASON>
Drop fix_compiler_errors.patch: <REASON>
Drop mksys.patch: <REASON>
Drop irafuser_csh.patch: <REASON>
Drop libc.patch: <REASON>
Drop link_executables.patch: <REASON>
Drop compiler-flags.patch: <REASON>
Drop add_other_archs.patch: <REASON>
Drop voclient.patch: <REASON>
Drop shared-readline.patch: <REASON>
Drop xc.patch: <REASON>
---
debian/patches/Allow-in-build-path.patch | 25 +
debian/patches/Fix-f77-script.patch | 21 +
...installation-FHS-and-Free-Desktop-conform.patch | 155 ++
.../Use-system-libraries-when-possible.patch | 54 +
debian/patches/add_other_archs.patch | 463 ------
debian/patches/compiler-flags.patch | 417 -----
debian/patches/fhs.patch | 162 --
debian/patches/fix_compiler_errors.patch | 24 -
debian/patches/fix_fncache.patch | 13 -
debian/patches/fortran.patch | 204 ---
debian/patches/irafuser_csh.patch | 136 --
debian/patches/libc.patch | 1715 --------------------
debian/patches/link_executables.patch | 11 -
debian/patches/mksys.patch | 92 --
debian/patches/series | 19 +-
debian/patches/shared-readline.patch | 152 --
debian/patches/shared-xmlrpc.patch | 78 -
debian/patches/unop_int.patch | 33 -
debian/patches/voclient.patch | 290 ----
debian/patches/vodata.patch | 11 -
debian/patches/xc.patch | 81 -
21 files changed, 259 insertions(+), 3897 deletions(-)
diff --git a/debian/patches/Allow-in-build-path.patch b/debian/patches/Allow-in-build-path.patch
new file mode 100644
index 0000000..553a15f
--- /dev/null
+++ b/debian/patches/Allow-in-build-path.patch
@@ -0,0 +1,25 @@
+From: Ole Streicher <olebole at debian.org>
+Date: Wed, 22 Nov 2017 14:45:10 +0100
+Subject: Allow '+' in build path
+
+---
+ install | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/install b/install
+index d087912..55cc8c9 100755
+--- a/install
++++ b/install
+@@ -1023,9 +1023,9 @@ for i in ${PATHFILES[@]}; do
+ if [ -e "$iraf/unix/hlib/$i" ]; then
+ RM $TEMP >> /dev/null 2>&1
+ cat $iraf/unix/hlib/$i | \
+- sed -e "s+$o_iraf+$iraf+" | \
+- sed -e "s+$o_cache+$cache+" | \
+- sed -e "s+$o_imdir+$imdir+" > $TEMP
++ sed -e "s;$o_iraf;$iraf;" | \
++ sed -e "s;$o_cache;$cache;" | \
++ sed -e "s;$o_imdir;$imdir;" > $TEMP
+ cmp -s $iraf/unix/hlib/$i $TEMP
+ if (( $?==1 )); then
+ if [ "$exec"=="yes" ]; then
diff --git a/debian/patches/Fix-f77-script.patch b/debian/patches/Fix-f77-script.patch
new file mode 100644
index 0000000..943fa27
--- /dev/null
+++ b/debian/patches/Fix-f77-script.patch
@@ -0,0 +1,21 @@
+From: Ole Streicher <olebole at debian.org>
+Date: Wed, 22 Nov 2017 14:58:16 +0100
+Subject: Fix f77 script
+
+---
+ unix/hlib/f77.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/unix/hlib/f77.sh b/unix/hlib/f77.sh
+index e990e90..6ec5ddd 100755
+--- a/unix/hlib/f77.sh
++++ b/unix/hlib/f77.sh
+@@ -44,7 +44,7 @@ s=/tmp/stderr_$$
+ t=/tmp/f77_$$
+ #CC=${CC_f2c:-'/usr/bin/cc -m486'}
+ CC=${CC_f2c:-'gcc'}
+-CFLAGS=${CFLAGS:-"-I${iraf}unix/f2c/libf2c"}
++CFLAGS+=" -I${iraf}unix/f2c/libf2c"
+ EFL=${EFL:-/v/bin/efl}
+ EFLFLAGS=${EFLFLAGS:-'system=portable deltastno=10'}
+ F2C=${F2C:-/usr/bin/f2c}
diff --git a/debian/patches/Make-the-installation-FHS-and-Free-Desktop-conform.patch b/debian/patches/Make-the-installation-FHS-and-Free-Desktop-conform.patch
new file mode 100644
index 0000000..5475584
--- /dev/null
+++ b/debian/patches/Make-the-installation-FHS-and-Free-Desktop-conform.patch
@@ -0,0 +1,155 @@
+From: Ole Streicher <olebole at debian.org>
+Date: Wed, 22 Nov 2017 13:32:15 +0100
+Subject: Make the installation FHS and Free Desktop conform
+
+This moves the IRAF installation from /iraf/iraf/ to /usr/share/iraf/, with
+the system dependent files (binaries) in /usr/lib/iraf. Since the binaries
+now cannot be found anymore under iraf$, we need to introduce a new variable
+iraf_b$, which points to /usr/lib/iraf/.
+
+Also, according to freedesktop.org, the user cache and data paths are moved
+to their home directories.
+---
+ unix/hlib/cl.sh | 30 +++++++++++++++++++++++-------
+ unix/hlib/mkiraf.sh | 16 +++++++++++-----
+ unix/hlib/zzsetenv.def | 4 ++--
+ 3 files changed, 36 insertions(+), 14 deletions(-)
+
+diff --git a/unix/hlib/cl.sh b/unix/hlib/cl.sh
+index 945ec4d..4f3c13b 100755
+--- a/unix/hlib/cl.sh
++++ b/unix/hlib/cl.sh
+@@ -45,7 +45,7 @@ case "$nm" in
+ esac
+
+ # Determine IRAF root directory (value set in install script).
+-d_iraf="/iraf/iraf/"
++d_iraf="/usr/share/iraf/"
+ if [ -n $iraf ]; then
+ if [ ! -e $iraf ]; then
+ echo "Warning: iraf=$iraf does not exist \(check .cshrc or .login\)"
+@@ -57,6 +57,22 @@ if [ -z $iraf ]; then
+ export iraf="$d_iraf"
+ fi
+
++export iraf_b=/usr/lib/iraf/
++
++if [ -z $host ]; then
++ export host="${iraf}unix/"
++endif
++
++# Determine the temporary dir, using standard variable from The Open Group
++# Base Specifications. Default to FHS.
++if [ -z $tmp ]; then
++ if [ -n "$TMPDIR" ]; then
++ export tmp=$(echo $TMPDIR | sed s'-/$--')/
++ else
++ export tmp="/tmp/"
++ endif
++endif
++
+ # Check for a version query.
+ if (( $# > 1 )); then
+ case "$1" in
+@@ -78,10 +94,10 @@ else
+ fi
+
+ if [ -n "$IRAFARCH" ]; then
+- if [ -e $iraf/bin.${IRAFARCH}/${cl_binary} ]; then
++ if [ -e $iraf_b/bin.${IRAFARCH}/${cl_binary} ]; then
+ MACH=$IRAFARCH
+ else
+- echo "ERROR: No $iraf/bin.${IRAFARCH}/${cl_binary} binary found."
++ echo "ERROR: No $iraf_b/bin.${IRAFARCH}/${cl_binary} binary found."
+ if [ "$ACTUAL_ARCH" != "$IRAFARCH" ]; then
+ echo "ERROR: IRAFARCH set to '$IRAFARCH', should be '$ACTUAL_ARCH'"
+ fi
+@@ -121,8 +137,8 @@ else
+ export IRAFARCH="$MACH"
+ fi
+
+- if [ ! -e $iraf/bin.${MACH}/${cl_binary} ]; then
+- echo "ERROR: No $iraf/bin.${IRAFARCH}/${cl_binary} binary found."
++ if [ ! -e $iraf_b/bin.${MACH}/${cl_binary} ]; then
++ echo "ERROR: No $iraf_b/bin.${IRAFARCH}/${cl_binary} binary found."
+ exit 1
+ fi
+ fi
+@@ -136,7 +152,7 @@ if [ -n "$IRAFARCH" ]; then
+ export arch=".$IRAFARCH"
+ fi
+
+- export IRAFBIN=${iraf}bin$arch/
++ export IRAFBIN=${iraf_b}bin$arch/
+ file=${IRAFBIN}$cl_binary
+ if [ -e $file ]; then
+ exec $file
+@@ -149,7 +165,7 @@ fi
+ # Set the architecture to be used.
+ export IRAFARCH=$MACH
+ export arch=.$IRAFARCH
+-export IRAFBIN=${iraf}bin$arch/
++export IRAFBIN=${iraf_b}bin$arch/
+
+ # Run the desired CL.
+ exec ${IRAFBIN}$cl_binary
+diff --git a/unix/hlib/mkiraf.sh b/unix/hlib/mkiraf.sh
+index e62072c..b710ba2 100755
+--- a/unix/hlib/mkiraf.sh
++++ b/unix/hlib/mkiraf.sh
+@@ -25,9 +25,9 @@ def=0
+ defterm="xgterm"
+
+ # Paths edited by the install script.
+-iraf="/iraf/iraf/"
+-imdir="/iraf/imdir/"
+-cachedir="/iraf/cache/"
++iraf="/usr/share/iraf/"
++imdir="/var/lib/imdirs/"
++cachedir="/var/cache/iraf/"
+
+
+ # ------------- (end of site dependent definitions) ------------------------
+@@ -147,7 +147,10 @@ if [ "$myterm" == "none" ]; then
+ fi
+
+ # Initialize the 'imdir' and 'cachedir' paths.
+-IDIR="${imdir}$USER"
++if [ "$XDG_DATA_HOME" = 0 ]; then
++ export XDG_DATA_HOME=${HOME}/.local/share
++fi
++IDIR=${XDG_DATA_HOME}/iraf/imdir/
+ if [ -d $imdir ]; then
+ mkdir -p $IDIR &> /dev/null
+ fi
+@@ -155,7 +158,10 @@ if [ ! -d $IDIR -o ! -w $IDIR ]; then
+ IDIR="HDR$"
+ fi
+
+-CDIR="${cachedir}$USER"
++if [ "$XDG_CACHE_HOME" = 0 ]; then
++ export XDG_CACHE_HOME=${HOME}/.cache
++fi
++CDIR=${XDG_CACHE_HOME}/iraf/
+ if [ -d $cachedir ]; then
+ mkdir -p $CDIR &> /dev/null
+ fi
+diff --git a/unix/hlib/zzsetenv.def b/unix/hlib/zzsetenv.def
+index 881d9c7..8be2dde 100644
+--- a/unix/hlib/zzsetenv.def
++++ b/unix/hlib/zzsetenv.def
+@@ -54,12 +54,12 @@ set terminal = xgterm
+ set ttybaud = 9600
+ set ttyncols = 80
+ set ttynlines = 40
+-set version = "NOAO/IRAF V2.16.1"
++set version = "Debian IRAF V2.16.1+"
+
+ # System directories.
+
+ set as = "host$as/"
+-set bin = "iraf$bin(arch)/"
++set bin = "iraf$bin(arch)/"
+ set boot = "host$boot/"
+ set dev = "iraf$dev/"
+ set doc = "iraf$doc/"
diff --git a/debian/patches/Use-system-libraries-when-possible.patch b/debian/patches/Use-system-libraries-when-possible.patch
new file mode 100644
index 0000000..c1a7522
--- /dev/null
+++ b/debian/patches/Use-system-libraries-when-possible.patch
@@ -0,0 +1,54 @@
+From: Ole Streicher <olebole at debian.org>
+Date: Wed, 22 Nov 2017 13:13:12 +0100
+Subject: Use system libraries when possible
+
+This includes lapack, cfitsio, readline.
+curl and expat are already handled upstream.
+---
+ math/mkpkg | 1 -
+ unix/boot/spp/xc.c | 4 ++--
+ vendor/mklibs | 4 ++--
+ 3 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/math/mkpkg b/math/mkpkg
+index 403aa1f..69c7716 100644
+--- a/math/mkpkg
++++ b/math/mkpkg
+@@ -22,7 +22,6 @@ mathgen:
+ $call nlfit
+ $call slalib
+ $call surfit
+- $call lapack
+ $call fftpack
+ $purge lib$
+ ;
+diff --git a/unix/boot/spp/xc.c b/unix/boot/spp/xc.c
+index 61a3145..09b075f 100644
+--- a/unix/boot/spp/xc.c
++++ b/unix/boot/spp/xc.c
+@@ -70,8 +70,8 @@
+ #define IRAFLIB3 "libvops.a"
+ #define IRAFLIB4 "libos.a"
+ #define IRAFLIB5 "libVOTable.a"
+-#define IRAFLIB6 "libcfitsio.a"
+-#define IRAFLIB7 "liblapack.a"
++#define IRAFLIB6 "-lcfitsio"
++#define IRAFLIB7 "-llapack"
+
+ char *fortlib[] = { "-lf2c", /* 0 (host progs) */
+ "-lf2c", /* 1 */
+diff --git a/vendor/mklibs b/vendor/mklibs
+index 286468e..a73dac0 100755
+--- a/vendor/mklibs
++++ b/vendor/mklibs
+@@ -5,8 +5,8 @@ top=`cd ..; pwd`
+ export CC=gcc
+ export CXX=g++
+
+-build_cfitsio=1
+-build_readline=1 # not needed in v2.16.1 and beyond
++build_cfitsio=0
++build_readline=0
+ build_libvotable=1
+
+ if [ "$IRAFARCH" = "linux" ] ; then
diff --git a/debian/patches/add_other_archs.patch b/debian/patches/add_other_archs.patch
deleted file mode 100644
index a9b2870..0000000
--- a/debian/patches/add_other_archs.patch
+++ /dev/null
@@ -1,463 +0,0 @@
---- a/unix/hlib/irafarch.csh
-+++ b/unix/hlib/irafarch.csh
-@@ -158,6 +158,8 @@
-
- case redhat:
- case linux:
-+ case linuxarm:
-+ case linuxppc:
- case linux64:
- if ($?IRAFARCH) then
- set mach = "$IRAFARCH"
-@@ -170,6 +172,14 @@
- set mach = "linux64"
- set hmach = "linux64"
- set nbits = 64
-+ else if ($MNAME_M =~ arm*) then # Linux arm
-+ set mach = "linuxarm"
-+ set hmach = "linuxarm"
-+ set nbits = 32
-+ else if ($MNAME_M =~ ppc*) then # Linux arm
-+ set mach = "linuxppc"
-+ set hmach = "linuxppc"
-+ set nbits = 32
- else # Linux
- set mach = "linux"
- set hmach = "linux"
---- /dev/null
-+++ b/unix/as.linuxarm/zsvjmp.s
-@@ -0,0 +1,38 @@
-+ .file "zsvjmp.s"
-+
-+@ Copyright (c) 2013 Ole Streicher <debian at liska.ath.cx>
-+@
-+@ This file contains the Linux armel/armhf version of ZSVJMP for Debian.
-+
-+ .arch armv6
-+ .text
-+ .global zsvjmp_
-+ .type zsvjmp_, %function
-+
-+zsvjmp_:
-+ mov r2, #0 @
-+ str r2, [r1, #0] @ *status = 0
-+ str r1, [r0, #0] @ buf[0] = status
-+ add r0, r0, #4 @ &buf[1] --> 1st arg for sigsetjmp
-+ mov r1, #0 @ 0 --> 2nd arg for sigsetjmp
-+ b __sigsetjmp @ call sigsetjmp
-+
-+@ This is a precompiled version from unix/os/zwhen.c
-+@ .align 2
-+@ .global gfpucw_
-+@ .type gfpucw_, %function
-+ at gfpucw_:
-+@ mrc p10, 7, r3, cr1, cr0, 0
-+@ str r3, [r0, #0]
-+@ mov r0, r3
-+@ bx lr
-+@ .size gfpucw_, .-gfpucw_
-+
-+@ .align 2
-+@ .global sfpucw_
-+@ .type sfpucw_, %function
-+ at sfpucw_:
-+@ ldr r0, [r0, #0]
-+@ mcr p10, 7, r0, cr1, cr0, 0
-+@ bx lr
-+@ .size sfpucw_, .-sfpucw_
---- a/unix/hlib/sysinfo
-+++ b/unix/hlib/sysinfo
-@@ -128,6 +128,14 @@
- set LIBFILES = ""
- set LS = "/bin/ls -s"
- set LSDF = "-lLt"
-+ else if (`$uname_cmd -m` =~ arm*) then # LinuxPPC
-+ set mach = "linuxarm"
-+ set hmach = "linuxarm"
-+ set TAPES = "/dev/*st[0-7]"
-+ set shlib = "no"
-+ set LIBFILES = ""
-+ set LS = "/bin/ls -s"
-+ set LSDF = "-lLt"
- else
- if (-f /etc/redhat-release) then # RedHat Linux
- set mach = "redhat"
---- a/unix/os/irafpath.c
-+++ b/unix/os/irafpath.c
-@@ -71,66 +71,7 @@
- /* Look first in HBIN.
- */
- strcpy (pathname, (char *)hostdir);
-- strcat (pathname, "bin.");
--
--#ifdef LINUXPPC
-- strcat (pathname, "linuxppc");
--#else
--#ifdef CYGWIN
-- strcat (pathname, "cygwin");
--#else
--#ifdef LINUX64
-- strcat (pathname, "linux64");
--#else
--#ifdef REDHAT
-- strcat (pathname, "redhat");
--#else
--#ifdef LINUX
-- strcat (pathname, "linux");
--#else
--#ifdef BSD
-- strcat (pathname, "freebsd");
--#else
--#ifdef IPAD
-- strcat (pathname, "ipad");
--#else
--#ifdef MACOSX
-- /* Setup for cross-compilation.
-- */
-- { char *irafpath;
--
-- if ((irafarch = getenv("IRAFARCH"))) {
-- if (strcmp (irafarch, "macosx") == 0)
-- strcat (pathname, "macosx");
-- else if (strcmp (irafarch, "macintel") == 0)
-- strcat (pathname, "macintel");
-- else
-- strcat (pathname, "macosx");
-- }
-- }
--#else
--#ifdef SOLARIS
--#ifdef X86
-- strcat (pathname, "sunos");
--#else
-- strcat (pathname, "ssol");
--#endif
--#else
--#ifdef sparc
-- strcat (pathname, "sparc");
--#else
--#endif
--#endif
--#endif
--#endif
--#endif
--#endif
--#endif
--#endif
--#endif
--#endif
--
-- strcat (pathname, "/");
-+ strcat (pathname, "bin/");
- strcat (pathname, fname);
- if (access (pathname, 0) == 0)
- return (pathname);
---- a/unix/hlib/irafuser.csh
-+++ b/unix/hlib/irafuser.csh
-@@ -86,6 +86,8 @@
- breaksw
-
- case linux:
-+case linuxppc:
-+case linuxarm:
- case redhat:
- setenv HSI_CF "${CFLAGS} -I/usr/include -I${hlib}libc -DLINUX -DPOSIX -DSYSV -DHOST_F2C -DHOST_CURL -DHOST_EXPAT -DHOST_XMLRPC -DHOST_CFITSIO"
- setenv HSI_XF "-Inolibc -I${hlib}libc -w -/Wunused"
---- a/unix/hlib/install
-+++ b/unix/hlib/install
-@@ -166,13 +166,17 @@
- set shlib = "no"
- set LIBFILES = ""
- else if (`$uname_cmd -m` == "ppc") then # LinuxPPC
-- if (-f /etc/redhat-release) then
- set mach = "linuxppc"
- set hmach = "linuxppc"
- set TAPES = "/dev/*st[0-7]"
- set shlib = "no"
- set LIBFILES = ""
-- endif
-+ else if (`$uname_cmd -m` =~ arm*) then # LinuxARM
-+ set mach = "linuxarm"
-+ set hmach = "linuxarm"
-+ set TAPES = "/dev/*st[0-7]"
-+ set shlib = "no"
-+ set LIBFILES = ""
- else
- if (-f /etc/redhat-release) then # RedHat/Fedora
- set mach = "redhat"
---- a/unix/hlib/cl.csh
-+++ b/unix/hlib/cl.csh
-@@ -103,7 +103,11 @@
- if ("$os_mach" == "linux") then # handle linux systems
- if (`uname -m` == "x86_64") then
- setenv mach linux64
-- else
-+ else if (`uname -m` == "ppc") then
-+ setenv mach linuxppc
-+ else if (`uname -m` == arm*) then
-+ setenv mach linuxarm
-+ else
- setenv mach linux
- endif
- else if ("$os_mach" == "darwin") then # handle Mac systems
---- a/unix/hlib/mkpkg.inc
-+++ b/unix/hlib/mkpkg.inc
-@@ -38,6 +38,10 @@
- $set XFLAGS = "-c -w" # default XC compile flags
- $set XVFLAGS = "-c -w" # VOPS XC compile flags
- $set LFLAGS = "-Nz" # default XC link flags
-+$else $ifeq (MACH, linuxarm) then
-+$set XFLAGS = "-c -w" # default XC compile flags
-+$set XVFLAGS = "-c -w" # VOPS XC compile flags
-+$set LFLAGS = "-Nz" # default XC link flags
- $else $ifeq (MACH, sunos) then
- $set XFLAGS = "-c -w" # default XC compile flags
- $set XVFLAGS = "-c -w" # VOPS XC compile flags
-@@ -64,7 +68,7 @@
-
- $ifeq (MACH, linux, redhat, macosx, macintel, ipad) then
- $include "hlib$mkpkg.sf.MACX"
--$else $ifeq (MACH, linux, redhat, linuxppc) then
-+$else $ifeq (MACH, linux, redhat, linuxarm, linuxppc) then
- $include "hlib$mkpkg.sf.LNUX"
- $else $ifeq (MACH, linux64) then
- $include "hlib$mkpkg.sf.LNUX64"
---- a/pkg/ecl/mkpkg
-+++ b/pkg/ecl/mkpkg
-@@ -6,7 +6,7 @@
- update: # make ecl.e and install in bin$
- $ifeq (MACH, sparc) then
- $set XFLAGS = "$(XFLAGS) -/DNO_READLINE"
-- $else $ifneq (MACH, linux, linux64) then
-+ $else $ifneq (MACH, linux, linux64, linuxppc, linuxarm) then
- $call libs at readline
- $endif
- $endif
-@@ -27,7 +27,7 @@
- $endif
- $ifolder (ytab.c, grammar.y)
- $echo "rebuilding ytab.c"
-- $ifeq (MACH, linux, linux64, redhat, suse)
-+ $ifeq (MACH, linux, linux64, linuxppc, linuxarm)
- !yacc -vd grammar.y;
- !egrep -v "\<stdlib.h\>" y.tab.c > ytab.c;
- !egrep -v "\<stdio.h\>" ytab.c > ntab.c; mv ntab.c ytab.c
-@@ -54,7 +54,7 @@
-
- $ifeq (MACH, sparc) then
- $set XFLAGS = "$(XFLAGS) -/DNO_READLINE"
-- $else $ifneq (MACH, linux, linux64) then
-+ $else $ifneq (MACH, linux, linux64, linuxppc, linuxarm) then
- $call libs at readline
- $endif
- $endif
-@@ -72,9 +72,7 @@
- link:
- $set LIBS = "-lc -lcur -lds -lstg"
- $ifneq (MACH, sparc) then
-- $ifeq (MACH, linux) then
-- $set LIBS2 = "-lreadline -/L/usr/lib32 -lncurses"
-- $else $ifeq (MACH, linux64) then
-+ $ifeq (MACH, linux, linux64, linuxppc, linuxarm) then
- $set LIBS2 = "-lreadline -lncurses"
- $else
- $set LIBS2 = "libreadline.a -lncurses"
---- a/pkg/vocl/mkpkg
-+++ b/pkg/vocl/mkpkg
-@@ -6,7 +6,7 @@
- update: # make vocl.e and install in bin$
- $ifeq (MACH, sparc) then
- $set XFLAGS = "$(XFLAGS) -/DNO_READLINE"
-- $else $ifneq (MACH, linux, linux64) then
-+ $else $ifneq (MACH, linux, linux64, linuxppc, linuxarm) then
- $call libs at readline
- $endif
- $endif
-@@ -27,7 +27,7 @@
- $endif
- $ifolder (ytab.c, grammar.y)
- $echo "rebuilding ytab.c"
-- $ifeq (MACH, linux, linux64, redhat, suse)
-+ $ifeq (MACH, linux, linux64, linuxppc, linuxarm)
- !yacc -vd grammar.y;
- !egrep -v "\<stdlib.h\>" y.tab.c > ytab.c;
- !egrep -v "\<stdio.h\>" ytab.c > ntab.c; mv ntab.c ytab.c
-@@ -54,7 +54,7 @@
-
- $ifeq (MACH, sparc) then
- $set XFLAGS = "$(XFLAGS) -/DNO_READLINE"
-- $else $ifneq (MACH, linux, linux64) then
-+ $else $ifneq (MACH, linux, linux64, linuxppc, linuxarm) then
- $call libs at readline
- $endif
- $endif
-@@ -72,9 +72,7 @@
- link:
- $set LIBS = "-lc -lcur -lds -lstg"
- $ifneq (MACH, sparc) then
-- $ifeq (MACH, linux) then
-- $set LIBS2 = "-lreadline -/L/usr/lib32 -lncurses"
-- $else $ifeq (MACH, linux64) then
-+ $ifeq (MACH, linux, linux64, linuxppc, linuxarm) then
- $set LIBS2 = "-lreadline -lncurses"
- $else
- $set LIBS2 = "libreadline.a -lncurses"
---- a/vendor/voclient/getarch
-+++ b/vendor/voclient/getarch
-@@ -132,6 +132,8 @@
-
- case redhat:
- case linux:
-+ case linuxppc:
-+ case linuxarm:
- case linux64:
- if ($?VOCARCH) then
- set mach = "$VOCARCH"
-@@ -142,6 +144,12 @@
- if ($MNAME_M == "x86_64") then # Linux x86_64
- set mach = "linux64"
- set nbits = 64
-+ else if ($MNAME_M == "ppc") then # Linux PPC
-+ set mach = "linuxppc"
-+ set nbits = 32
-+ else if ($MNAME_M == "arm") then # Linux PPC
-+ set mach = "linuxarm"
-+ set nbits = 32
- else # Linux
- set mach = "linux"
- set nbits = 32
---- a/Makefile
-+++ b/Makefile
-@@ -111,6 +111,10 @@
- (util/mkarch linux)
- linux64::
- (util/mkarch linux64)
-+linuxppc::
-+ (util/mkarch linuxppc)
-+linuxarm::
-+ (util/mkarch linuxarm)
- freebsd::
- (util/mkarch freebsd)
- cygwin::
---- a/vo/mkpkg
-+++ b/vo/mkpkg
-@@ -61,6 +61,22 @@
- $set DIRS = "lib src"
- !$(hlib)/mkfloat.csh linux -d $(DIRS)
- ;
-+linuxppc: # install Linux binaries
-+ $ifnfile (bin.linuxppc)
-+ !mkdir bin.linuxppc
-+ $endif
-+ $verbose off
-+ $set DIRS = "lib src"
-+ !$(hlib)/mkfloat.csh linuxppc -d $(DIRS)
-+ ;
-+linuxarm: # install Linux binaries
-+ $ifnfile (bin.linuxarm)
-+ !mkdir bin.linuxarm
-+ $endif
-+ $verbose off
-+ $set DIRS = "lib src"
-+ !$(hlib)/mkfloat.csh linuxarm -d $(DIRS)
-+ ;
- linux64: # install x86_64 binaries
- $ifnfile (bin.linux64)
- !mkdir bin.linux64
---- a/mkpkg
-+++ b/mkpkg
-@@ -145,6 +145,16 @@
- !$(hlib)/mkfloat.csh linux
- !(cd ./unix; setenv MACH linux; sh setarch.sh)
- ;
-+linuxppc: # install linux (32-bit) binaries
-+ $verbose off
-+ !$(hlib)/mkfloat.csh linuxppc
-+ !(cd ./unix; setenv MACH linuxppc; sh setarch.sh)
-+ ;
-+linuxarm: # install linux (32-bit) binaries
-+ $verbose off
-+ !$(hlib)/mkfloat.csh linuxarm
-+ !(cd ./unix; setenv MACH linuxarm; sh setarch.sh)
-+ ;
- linux64: # install linux (64-bit) binaries
- $verbose off
- !$(hlib)/mkfloat.csh linux64
---- a/noao/mkpkg
-+++ b/noao/mkpkg
-@@ -260,6 +260,18 @@
- nproto nobsolete rv surfphot twodspec obsutil"
- !$(hlib)/mkfloat.csh linux -d $(DIRS)
- ;
-+linuxppc: # install Linux binaries
-+ $verbose off
-+ $set DIRS = "lib artdata astcat astutil digiphot imred mtlocal onedspec\
-+ nproto nobsolete rv surfphot twodspec obsutil"
-+ !$(hlib)/mkfloat.csh linuxppc -d $(DIRS)
-+ ;
-+linuxarm: # install Linux binaries
-+ $verbose off
-+ $set DIRS = "lib artdata astcat astutil digiphot imred mtlocal onedspec\
-+ nproto nobsolete rv surfphot twodspec obsutil"
-+ !$(hlib)/mkfloat.csh linuxppc -d $(DIRS)
-+ ;
- linux64: # install Linux x86_64 binaries
- $verbose off
- $set DIRS = "lib artdata astcat astutil digiphot imred mtlocal onedspec\
---- a/unix/os/zxwhen.c
-+++ b/unix/os/zxwhen.c
-@@ -453,7 +453,6 @@
- }
-
-
--#ifdef LINUX64
-
- int
- gfpucw_ (XINT *xcw)
-@@ -472,4 +471,3 @@
- return cw;
- }
-
--#endif
---- a/unix/boot/spp/xc.c
-+++ b/unix/boot/spp/xc.c
-@@ -787,9 +787,6 @@
- }
- }
- #endif
--#if (defined(LINUX) && !defined(MACH64))
-- arglist[nargs++] = "-m32";
--#endif
- #if (defined(BSD))
- arglist[nargs++] = "-m32";
- #endif
-@@ -868,9 +865,6 @@
- }
- }
- #endif
--#if (defined(LINUX) && !defined(MACH64))
-- arglist[nargs++] = "-m32";
--#endif
- #if (defined(BSD))
- arglist[nargs++] = "-m32";
- #endif
-@@ -939,9 +933,6 @@
- #ifdef LINUX64
- arglist[nargs++] = "-DLINUX64"; /* needed for zmain.c */
- #endif
--#if (defined(LINUX) && !defined(MACH64))
-- arglist[nargs++] = "-m32";
--#endif
- #ifdef LINUX
- arglist[nargs++] = "-DLINUX";
- #ifdef REDHAT
-@@ -1067,9 +1058,6 @@
- #if (defined(LINUX) && !defined(MACH64))
- arglist[nargs++] = "-Wl,--defsym,mem_=0";
- #endif
--#if (defined(LINUX) && !defined(MACH64))
-- arglist[nargs++] = "-m32";
--#endif
- #if (defined(BSD))
- arglist[nargs++] = "-m32";
- arglist[nargs++] = "-L/usr/lib32";
diff --git a/debian/patches/compiler-flags.patch b/debian/patches/compiler-flags.patch
deleted file mode 100644
index 4e74028..0000000
--- a/debian/patches/compiler-flags.patch
+++ /dev/null
@@ -1,417 +0,0 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Propagate compiler flags CFLAGS and CC to Makefiles.
- This allows to use hardening flags in Debian.
---- a/vendor/voclient/libsamp/libxrpc/Makefile
-+++ b/vendor/voclient/libsamp/libxrpc/Makefile
-@@ -26,7 +26,7 @@
- # includes, flags and libraries
- CINCS = -I./ -I./include -I../include -Ixmlrpc-c/lib/abyss/src
- #CFLAGS = -O2 -m32 -g $(CINCS)
--CFLAGS = -g -Wall $(CINCS)
-+CFLAGS := $(CFLAGS) $(CINCS)
-
-
- # list of source and include files
-@@ -73,7 +73,7 @@
- cp -rp $(INCS) ./include/x* ../../include
-
- %.o: %.c $(INCS)
-- /usr/bin/gcc -Wall $(CINCS) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CFLAGS) -c $< -o $@
-
-
- #=======================
-@@ -83,7 +83,7 @@
- $(STATICLIB): $(SRCS:%.c=Static/%.o)
- /usr/bin/ar rv $@ $?
- Static/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CFLAGS) -c $< -o $@
- Static:
- /bin/mkdir $@
- chmod 777 $@
-@@ -91,7 +91,7 @@
- $(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
- /usr/bin/ld -shared -o $@ $? -lc -ldl
- Shared/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
-+ $(CC) $(CFLAGS) -fpic -shared -c $< -o $@
- Shared:
- /bin/mkdir $@
- chmod 777 $@
---- a/vendor/voclient/libvoclient/Makefile
-+++ b/vendor/voclient/libvoclient/Makefile
-@@ -35,7 +35,6 @@
- CINCS = -I$(HERE)
- #CFLAGS = -O2 -DDEBUG -D$(PLATFORM)
- #CFLAGS = -arch i386 -arch ppc -g -Wall -D$(PLATFORM)
--CFLAGS = -g -Wall -D$(PLATFORM)
-
-
- # list of source and include files
---- a/vendor/voclient/libsamp/cfitsio/Makefile
-+++ b/vendor/voclient/libsamp/cfitsio/Makefile
-@@ -29,10 +29,9 @@
-
- SHELL = /bin/sh
- RANLIB = ranlib
--CC = gcc
--CFLAGS = -g -O2 -Dg77Fortran -fPIC -fno-common
-+CFLAGS := $(CFLAGS) -Dg77Fortran -fPIC -fno-common
- FC = gfortran
--LDFLAGS = $(CFLAGS)
-+#LDFLAGS = $(CFLAGS)
- DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MATH_H=1 -DHAVE_LIMITS_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DHAVE_FTRUNCATE=1 -DHAVE_LONGLONG=1 -DHAVE_SHMEM [...]
- LIBS =
- FLEX = flex
---- a/vendor/voclient/libvotable/Makefile
-+++ b/vendor/voclient/libvotable/Makefile
-@@ -35,7 +35,7 @@
- CARCH =
- endif
-
--CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./ -DHAVE_CFITSIO
-+CFLAGS := $(CFLAGS) -DHAVE_CFITSIO
- CLIBS = -lm -lc -lpthread -lcfitsio
-
-
-@@ -205,7 +205,7 @@
- $(STATICLIB): $(SRCS:%.c=Static/%.o)
- /usr/bin/ar rv $@ $?
- Static/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -c $< -o $@
- Static/%.o: %.x $(SPP_INCS)
- xc -c $< -o $@
- Static:
-@@ -215,7 +215,7 @@
- $(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
- /usr/bin/ld -shared -o $@ $? -lc -ldl
- Shared/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
- Shared:
- /bin/mkdir $@
- chmod 777 $@
---- a/vendor/voclient/voapps/Makefile
-+++ b/vendor/voclient/voapps/Makefile
-@@ -43,7 +43,7 @@
- endif
-
- CLIBS = -lm -lc -lcurl -lpthread -lm
--CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./
-+CFLAGS := $(CFLAGS) $(CARCH) -D$(PLATFORM) $(CINCS) -L./
-
-
-
-@@ -54,7 +54,7 @@
-
- #F77 = g77
- F77 = gfortran
--FFLAGS = -g -Wall
-+#FFLAGS = -g -Wall
-
-
- # list of source and include files
-@@ -198,7 +198,7 @@
- $(STATICLIB): $(C_SRCS:%.c=Static/%.o)
- /usr/bin/ar rv $@ $?
- Static/%.o: %.c $(C_INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -c $< -o $@
- Static:
- /bin/mkdir $@
- chmod 777 $@
-@@ -206,7 +206,7 @@
- $(SHAREDLIB): $(C_SRCS:%.c=Shared/%.o)
- /usr/bin/ld -shared -o $@ $? -lc -ldl
- Shared/%.o: %.c $(C_INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
- Shared:
- /bin/mkdir $@
- chmod 777 $@
---- a/vendor/Makefile
-+++ b/vendor/Makefile
-@@ -17,8 +17,7 @@
-
-
- # includes, flags and libraries
--CC = gcc
--CINCS = -I$(INCDIR) -I./
-+CINCS = -I$(INCDIR) -I./ -I${host}f2c/libf2c
- ifeq ($(PLATFORM), "Darwin")
- ifeq ($(PLATFORM), "x86_64")
- CARCH = -m64 -mmacosx-version-min=10.5
-@@ -29,7 +28,7 @@
- CARCH =
- endif
-
--CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./
-+CFLAGS := $(CFLAGS) $(CARCH) -D$(PLATFORM) $(CINCS) -L./
- LIBS = -lm -lc -lpthread
-
-
-@@ -61,7 +60,7 @@
- $(STATICLIB): $(SRCS:%.c=Static/%.o)
- /usr/bin/ar rv $@ $?
- Static/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -c $< -o $@
- Static:
- /bin/mkdir $@
- chmod 777 $@
-@@ -69,7 +68,7 @@
- $(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
- /usr/bin/ld -shared -o $@ $? -lc -ldl
- Shared/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
- Shared:
- /bin/mkdir $@
- chmod 777 $@
---- a/Makefile
-+++ b/Makefile
-@@ -6,7 +6,6 @@
- # Compiler Flags.
-
- RELEASE = v2.16
--CFLAGS =
- CDEBUGFLAGS = -O2 -Wall
- BOOTSTRAPCFLAGS =
-
---- a/vendor/voclient/Makefile
-+++ b/vendor/voclient/Makefile
-@@ -20,7 +20,6 @@
-
-
- # includes, flags and libraries
--CC = gcc
- CINCS = -I$(INCDIR) -I./
- ifeq ($(PLATFORM), "Darwin")
- ifeq ($(PLATFORM), "x86_64")
-@@ -32,7 +31,6 @@
- CARCH =
- endif
-
--CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./
- LIBS = -lm -lc -lpthread
-
-
-@@ -100,7 +98,7 @@
- $(STATICLIB): $(SRCS:%.c=Static/%.o)
- /usr/bin/ar rv $@ $?
- Static/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -c $< -o $@
- Static:
- /bin/mkdir $@
- chmod 777 $@
-@@ -108,7 +106,7 @@
- $(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
- /usr/bin/ld -shared -o $@ $? -lc -ldl
- Shared/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
- Shared:
- /bin/mkdir $@
- chmod 777 $@
---- a/vendor/voclient/libsamp/Makefile
-+++ b/vendor/voclient/libsamp/Makefile
-@@ -25,7 +25,6 @@
-
-
- # includes, flags and libraries
--CC = gcc
- CINCS = -I$(INCDIR) -I. -Ilibxrpc/include -Ilibxrpc
-
- ifeq ("$(PLATFORM)", "Darwin")
-@@ -40,7 +39,7 @@
- endif
-
- CLIBS = -lm -lc -lcurl -lpthread
--CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./
-+CFLAGS := $(CFLAGS) $(CINCS)
-
-
-
-@@ -203,7 +202,7 @@
- $(STATICLIB): $(SRCS:%.c=Static/%.o)
- /usr/bin/ar r $@ $?
- Static/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -c $< -o $@
- Static:
- /bin/mkdir $@
- chmod 777 $@
-@@ -211,7 +210,7 @@
- $(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
- /usr/bin/ld -shared -o $@ $? -lc -ldl
- Shared/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
- Shared:
- /bin/mkdir $@
- chmod 777 $@
---- a/vendor/voclient/common/Makefile
-+++ b/vendor/voclient/common/Makefile
-@@ -17,7 +17,6 @@
-
-
- # includes, flags and libraries
--CC = gcc
- CINCS = -I$(INCDIR) -I./
- ifeq ($(PLATFORM), "Darwin")
- ifeq ($(PLATFORM), "x86_64")
-@@ -31,8 +30,6 @@
- LIBS = -lm -lc -lpthread
- endif
-
--CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./
--
-
- all:: curl expat
-
-@@ -70,7 +67,7 @@
- $(STATICLIB): $(SRCS:%.c=Static/%.o)
- /usr/bin/ar rv $@ $?
- Static/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -c $< -o $@
- Static:
- /bin/mkdir $@
- chmod 777 $@
-@@ -78,7 +75,7 @@
- $(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
- /usr/bin/ld -shared -o $@ $? -lc -ldl
- Shared/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
- Shared:
- /bin/mkdir $@
- chmod 777 $@
---- a/vendor/voclient/common/mklibs
-+++ b/vendor/voclient/common/mklibs
-@@ -4,7 +4,6 @@
- set p = `pwd`
- set top = $p:h
-
--setenv CC "gcc"
- setenv CXX "g++"
-
- set build_curl = 0
---- a/vendor/voclient/libsamp/Makefile.src
-+++ b/vendor/voclient/libsamp/Makefile.src
-@@ -25,9 +25,7 @@
-
-
- # includes, flags and libraries
--CC = gcc
- CINCS = -I$(HERE) -I../include -I./
--CFLAGS = -g -D$(PLATFORM) -m32 -Wall $(CINCS)
- LFLAGS = -L. -L../lib
-
- DBG_LIB =
---- a/vendor/voclient/libsamp/apps/Makefile
-+++ b/vendor/voclient/libsamp/apps/Makefile
-@@ -38,14 +38,9 @@
- CARCH =
- endif
-
--CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./
--
--
-
- # includes, flags and libraries
--CC = gcc
- CINCS = -I$(HERE) -I../ -I../../include -L../ -L../../lib/ -L../
--CFLAGS = -g -Wall -D$(PLATFORM) $(CINCS)
-
- #F77 = g77
- F77 = gfortran
---- a/vendor/voclient/libvo/Makefile
-+++ b/vendor/voclient/libvo/Makefile
-@@ -24,15 +24,11 @@
-
-
- # includes, flags and libraries
--CC = gcc
- CINCS = -I$(INCDIR) -I.
-
- CLIBS = -lm -lc -lcurl -lpthread
- CARCH = -m64 -mmacosx-version-min=10.5
-
--CFLAGS = -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./
--
--
-
- # list of source and include files
- SRCS =
-@@ -92,7 +88,7 @@
- $(STATICLIB): $(SRCS:%.c=Static/%.o)
- /usr/bin/ar r $@ $?
- Static/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -c $< -o $@
- Static:
- /bin/mkdir $@
- chmod 777 $@
-@@ -100,7 +96,7 @@
- $(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
- /usr/bin/ld -shared -o $@ $? -lc -ldl
- Shared/%.o: %.c $(INCS)
-- /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
-+ $(CC) $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
- Shared:
- /bin/mkdir $@
- chmod 777 $@
---- a/vendor/voclient/libsamp/libxrpc/mklibs
-+++ b/vendor/voclient/libsamp/libxrpc/mklibs
-@@ -3,7 +3,6 @@
- #set top = `(chdir .. ; pwd)`
- set top = `pwd`
-
--setenv CC "gcc"
- setenv CXX "g++"
-
- set build_curl = 0
-@@ -66,7 +65,6 @@
-
-
-
--setenv CC "gcc -g -ggdb -O0"
- setenv CXX "g++ -g -ggdb -O0"
-
- if ($build_xmlrpc == 1) then
---- a/vendor/voclient/libsamp/cfitsio/mklibs
-+++ b/vendor/voclient/libsamp/cfitsio/mklibs
-@@ -3,7 +3,6 @@
- #set top = `(chdir .. ; pwd)`
- set top = `pwd`
-
--setenv CC "gcc"
- setenv CXX "g++"
-
-
---- a/vendor/mklibs
-+++ b/vendor/mklibs
-@@ -3,7 +3,6 @@
- set p = `pwd`
- set top = $p:h
-
--setenv CC "gcc"
- setenv CXX "g++"
-
- set build_cfitsio = 1
---- a/unix/f2c/libf2c/makefile.u
-+++ b/unix/f2c/libf2c/makefile.u
-@@ -13,9 +13,7 @@
- # to the CFLAGS = line below.
-
- .SUFFIXES: .c .o
--CC = cc
- SHELL = /bin/sh
--CFLAGS = -O
-
- # compile, then strip unnecessary symbols
- .c.o:
diff --git a/debian/patches/fhs.patch b/debian/patches/fhs.patch
deleted file mode 100644
index fcbd8b1..0000000
--- a/debian/patches/fhs.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Make the installation FHS conform.
- This moves the IRAF installation from /iraf/iraf/ to /usr/share/iraf/, with
- the system dependent files (binaries) in /usr/lib/iraf. Since the binaries
- now cannot be found anymore under iraf$, we need to introduce a new variable
- iraf_b$, which points to /usr/lib/iraf/.
- .
- Also, according to freedesktop.org, the user cache and data paths are moved
- to their home directories.
---- a/unix/hlib/cl.csh
-+++ b/unix/hlib/cl.csh
-@@ -33,9 +33,8 @@
- endif
- endif
-
--
- # Determine IRAF root directory (value set in install script).
--set d_iraf = "/iraf/iraf/"
-+set d_iraf = "/usr/share/iraf/"
- if ($?iraf) then
- if (! -e $iraf) then
- echo "Warning: iraf=$iraf does not exist (check .cshrc or .login)"
-@@ -47,6 +46,22 @@
- setenv iraf "$d_iraf"
- endif
-
-+setenv iraf_b /usr/lib/iraf/
-+
-+if (! $?host) then
-+ setenv host "${iraf}unix/"
-+endif
-+
-+# Determine the temporary dir, using standard variable from The Open Group
-+# Base Specifications. Default to FHS.
-+if (! $?tmp) then
-+ if ($?TMPDIR) then
-+ setenv tmp `echo $TMPDIR | sed s-/\$--`/
-+ else
-+ setenv tmp /tmp/
-+ endif
-+endif
-+
- # Check for a version query.
- if ($#argv > 0) then
- if ("$argv[1]" == "-v" || "$argv[1]" == "-version" || \
-@@ -65,10 +80,10 @@
- endif
-
- if ($?IRAFARCH) then
-- if (-e $iraf/bin.${IRAFARCH}/${cl_binary}) then
-+ if (-e ${iraf_b}bin/${cl_binary}) then
- set MACH = $IRAFARCH
- else
-- echo "ERROR: No $iraf/bin.${IRAFARCH}/${cl_binary} binary found."
-+ echo "ERROR: No ${iraf_b}bin/${cl_binary} binary found."
- if ("$ACTUAL_ARCH" != "$IRAFARCH") then
- echo "ERROR: IRAFARCH set to '$IRAFARCH', should be '$ACTUAL_ARCH'"
- endif
-@@ -108,8 +123,8 @@
- setenv IRAFARCH "$MACH"
- endif
-
-- if (! (-e $iraf/bin.${MACH}/${cl_binary}) ) then
-- echo "ERROR: No $iraf/bin.${IRAFARCH}/${cl_binary} binary found."
-+ if (! (-e ${iraf_b}bin/${cl_binary}) ) then
-+ echo "ERROR: No ${iraf_b}bin/${cl_binary} binary found."
- exit 1
- endif
- endif
-@@ -132,7 +147,7 @@
- setenv arch ".$IRAFARCH"
- endif
-
-- setenv IRAFBIN ${iraf}bin$arch/
-+ setenv IRAFBIN ${iraf_b}bin/
- set file = ${IRAFBIN}$cl_binary
- if (-e $file) then
- exec $file
-@@ -147,7 +162,7 @@
-
-
- setenv arch .$IRAFARCH
--setenv IRAFBIN ${iraf}bin$arch/
-+setenv IRAFBIN ${iraf_b}bin/
-
- # Run the desired CL.
- exec ${IRAFBIN}$cl_binary
---- a/unix/hlib/libc/iraf.h
-+++ b/unix/hlib/libc/iraf.h
-@@ -9,8 +9,8 @@
-
- #ifndef D_iraf
- /* ### Start of run time definitions */
--#define HOST "/iraf/iraf/unix/"
--#define IRAF "/iraf/iraf/"
-+#define HOST "/usr/share/iraf/unix/"
-+#define IRAF "/usr/share/iraf/"
- #define TMP "/tmp/"
- /* ### End of run time definitions */
-
-@@ -107,7 +107,7 @@
- #ifndef D_knames
- #include "knames.h"
- /*
--#include "/iraf/iraf/unix/hlib/libc/kproto.h"
-+#include "/usr/share/iraf/unix/hlib/libc/kproto.h"
- */
- #endif
- #undef import_knames
---- a/unix/hlib/mkiraf.csh
-+++ b/unix/hlib/mkiraf.csh
-@@ -4,9 +4,9 @@
-
- # The following definitions are site dependent. [SITEDEP]
-
--set iraf = "/iraf/iraf"
--set imdir = "/iraf/imdirs"
--set cachedir = "/iraf/cache"
-+set iraf = "/usr/share/iraf"
-+set imdir = "/var/lib/imdirs"
-+set cachedir = "/var/cache/iraf"
- set ttymsg =\
- "Terminal types: xgterm,xterm,gterm,vt640,vt100,etc."
-
-@@ -93,16 +93,22 @@
- pwd | sed -e "s;.*;s+U_UPARM+&/uparm/+;" >> _sed
-
- if (! (-e "$imdir" && -w "$imdir") ) then
-- set imdir = HDR$
-- whoami | sed -e "s;.*;s+U_IMDIR+${imdir}/+;" >> _sed
-+ if ( ${?XDG_DATA_HOME} == 0 ) then
-+ setenv XDG_DATA_HOME ${HOME}/.local/share
-+ endif
-+ echo "s+U_IMDIR+${XDG_DATA_HOME}/iraf/imdir/+" >> _sed
-+ mkdir -p ${XDG_DATA_HOME}/iraf/imdir/
- else
- whoami | sed -e "s;.*;s+U_IMDIR+${imdir}/&/+;" >> _sed
- whoami | sed -e "s;.*;mkdir $imdir/& 2> /dev/null;" | sh
- endif
-
- if (! (-e "$cachedir" && -w "$cachedir") ) then
-- set cachedir = /tmp/
-- whoami | sed -e "s;.*;s+U_CACHEDIR+${cachedir}/+;" >> _sed
-+ if ( ${?XDG_CACHE_HOME} == 0 ) then
-+ setenv XDG_CACHE_HOME ${HOME}/.cache
-+ endif
-+ echo "s+U_CACHEDIR+${XDG_CACHE_HOME}/iraf/+" >> _sed
-+ mkdir -p ${XDG_CACHE_HOME}/iraf/
- else
- whoami | sed -e "s;.*;s+U_CACHEDIR+${cachedir}/&/+;" >> _sed
- whoami | sed -e "s;.*;mkdir $cachedir/& 2> /dev/null;" | sh
---- a/unix/hlib/zzsetenv.def
-+++ b/unix/hlib/zzsetenv.def
-@@ -59,7 +59,7 @@
- # System directories.
-
- set as = "host$as/"
--set bin = "iraf$bin(arch)/"
-+set bin = "iraf_b$bin/"
- set boot = "host$boot/"
- set dev = "iraf$dev/"
- set doc = "iraf$doc/"
diff --git a/debian/patches/fix_compiler_errors.patch b/debian/patches/fix_compiler_errors.patch
deleted file mode 100644
index e6fa0b4..0000000
--- a/debian/patches/fix_compiler_errors.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Fix compiler errors that appear when compiled with Debian CFLAGS
---- a/unix/boot/spp/xpp/xppcode.c
-+++ b/unix/boot/spp/xpp/xppcode.c
-@@ -690,7 +690,7 @@
- } else {
- /* UNREACHABLE when in declarations section of a procedure.
- */
-- fprintf (yyout, type_decl[type]);
-+ fprintf (yyout, "%s", type_decl[type]);
- }
- }
-
---- a/unix/os/zfioks.c
-+++ b/unix/os/zfioks.c
-@@ -1391,7 +1391,7 @@
- int pid;
- if (debug_ks) {
- fprintf (debug_fp, "[%5d] ", (pid = getpid())); dbgsp(pid);
-- fprintf (debug_fp, msg);
-+ fprintf (debug_fp, "%s", msg);
- }
- }
- static void
diff --git a/debian/patches/fix_fncache.patch b/debian/patches/fix_fncache.patch
deleted file mode 100644
index 5fd5912..0000000
--- a/debian/patches/fix_fncache.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Author: Joseph Wang <joequant at gmail.com>
-Description: Fix a nasty bug in fncache.
---- a/unix/boot/mkpkg/fncache.c
-+++ b/unix/boot/mkpkg/fncache.c
-@@ -68,7 +68,7 @@
- */
- fn_misses++;
- fnlen = os_sysfile (lname, fname, maxch);
-- if (fnlen > SZ_FNAME || strlen(lname) > SZ_LNAME)
-+ if (strlen(fname) > SZ_FNAME || strlen(lname) > SZ_LNAME)
- return (fnlen);
-
- /* Put fname in the cache. Reuse slot at tail of list.
diff --git a/debian/patches/fortran.patch b/debian/patches/fortran.patch
deleted file mode 100644
index ce7d570..0000000
--- a/debian/patches/fortran.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-Author: Joseph Wang <joequant at gmail.com>
-Description: Change Fortran arrays to use abstract pointers
---- a/unix/boot/spp/rpp/ratlibf/delete.f
-+++ b/unix/boot/spp/rpp/ratlibf/delete.f
-@@ -1,7 +1,7 @@
- subroutine delete (symbol, st)
- integer symbol (100)
- integer st
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer stlu
- integer node, pred
---- a/unix/boot/spp/rpp/ratlibf/dsdbiu.f
-+++ b/unix/boot/spp/rpp/ratlibf/dsdbiu.f
-@@ -1,7 +1,7 @@
- subroutine dsdbiu (b, form)
- integer b
- integer form
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer l, s, lmax
- integer blanks(6)
---- a/unix/boot/spp/rpp/ratlibf/dsdump.f
-+++ b/unix/boot/spp/rpp/ratlibf/dsdump.f
-@@ -1,6 +1,6 @@
- subroutine dsdump (form)
- integer form
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer p, t, q
- t = 2
---- a/unix/boot/spp/rpp/ratlibf/dsfree.f
-+++ b/unix/boot/spp/rpp/ratlibf/dsfree.f
-@@ -1,6 +1,6 @@
- subroutine dsfree (block)
- integer block
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer p0, p, q
- integer n, junk
---- a/unix/boot/spp/rpp/ratlibf/dsget.f
-+++ b/unix/boot/spp/rpp/ratlibf/dsget.f
-@@ -1,6 +1,6 @@
- integer function dsget (w)
- integer w
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer p, q, l
- integer n, k, junk
---- a/unix/boot/spp/rpp/ratlibf/dsinit.f
-+++ b/unix/boot/spp/rpp/ratlibf/dsinit.f
-@@ -1,6 +1,6 @@
- subroutine dsinit (w)
- integer w
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer t
- if (.not.(w .lt. 2 * 2 + 2))goto 23000
---- a/unix/boot/spp/rpp/ratlibf/enter.f
-+++ b/unix/boot/spp/rpp/ratlibf/enter.f
-@@ -2,7 +2,7 @@
- integer symbol (100)
- integer info (100)
- integer st
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer i, nodsiz, j
- integer stlu, length
---- a/unix/boot/spp/rpp/ratlibf/length.f
-+++ b/unix/boot/spp/rpp/ratlibf/length.f
-@@ -1,5 +1,5 @@
- integer function length (str)
-- integer str (100)
-+ integer str (*)
- length = 0
- 23000 if (.not.(str (length+1) .ne. -2))goto 23002
- 23001 length = length + 1
---- a/unix/boot/spp/rpp/ratlibf/lookup.f
-+++ b/unix/boot/spp/rpp/ratlibf/lookup.f
-@@ -2,7 +2,7 @@
- integer symbol (100)
- integer info (100)
- integer st
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer i, nodsiz, kluge
- integer stlu
---- a/unix/boot/spp/rpp/ratlibf/mktabl.f
-+++ b/unix/boot/spp/rpp/ratlibf/mktabl.f
-@@ -1,6 +1,6 @@
- integer function mktabl (nodsiz)
- integer nodsiz
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer st
- integer dsget
---- a/unix/boot/spp/rpp/ratlibf/rmtabl.f
-+++ b/unix/boot/spp/rpp/ratlibf/rmtabl.f
-@@ -1,6 +1,6 @@
- subroutine rmtabl (st)
- integer st
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer i
- integer walker, bucket, node
---- a/unix/boot/spp/rpp/ratlibf/scopy.f
-+++ b/unix/boot/spp/rpp/ratlibf/scopy.f
-@@ -1,5 +1,5 @@
- subroutine scopy (from, i, to, j)
-- integer from (100), to (100)
-+ integer from (*), to (*)
- integer i, j
- integer k1, k2
- k2 = j
---- a/unix/boot/spp/rpp/ratlibf/sctabl.f
-+++ b/unix/boot/spp/rpp/ratlibf/sctabl.f
-@@ -2,7 +2,7 @@
- integer table, posn
- integer sym (100)
- integer info (100)
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer bucket, walker
- integer dsget
---- a/unix/boot/spp/rpp/ratlibf/stlu.f
-+++ b/unix/boot/spp/rpp/ratlibf/stlu.f
-@@ -1,7 +1,7 @@
- integer function stlu (symbol, node, pred, st)
- integer symbol (100)
- integer node, pred, st
-- integer mem( 1)
-+ integer mem( 60000)
- common/cdsmem/mem
- integer hash, i, j, nodsiz
- nodsiz = mem (st)
---- a/unix/boot/spp/rpp/rppfor/ludef.f
-+++ b/unix/boot/spp/rpp/rppfor/ludef.f
-@@ -1,5 +1,5 @@
- integer function ludef (id, defn, table)
-- integer id (100), defn (100)
-+ integer id (*), defn (*)
- integer table
- common /cdefio/ bp, buf (4096)
- integer bp
---- a/unix/boot/spp/rpp/rppfor/pbstr.f
-+++ b/unix/boot/spp/rpp/rppfor/pbstr.f
-@@ -1,8 +1,11 @@
- subroutine pbstr (s)
-- integer s(100)
-+ integer s(*)
- integer lenstr, i
- integer length
- lenstr = length (s)
-+ if (lenstr .eq. 0) then
-+ return
-+ endif
- if (.not.(s(1) .eq. 46 .and. s(lenstr) .eq. 46))goto 23000
- if (.not.(lenstr .eq. 4))goto 23002
- if (.not.(s(2) .eq. 103))goto 23004
---- a/unix/boot/spp/rpp/rppfor/puttok.f
-+++ b/unix/boot/spp/rpp/rppfor/puttok.f
-@@ -1,5 +1,5 @@
- subroutine puttok (str)
-- integer str (100)
-+ integer str (*)
- integer i
- i = 1
- 23000 if (.not.(str (i) .ne. -2))goto 23002
---- a/unix/boot/spp/rpp/rppfor/sdupl.f
-+++ b/unix/boot/spp/rpp/rppfor/sdupl.f
-@@ -1,5 +1,5 @@
- integer function sdupl (str)
-- integer str (100)
-+ integer str (*)
- integer mem( 60000)
- common/cdsmem/mem
- integer i
---- a/unix/os/zzstrt.c
-+++ b/unix/os/zzstrt.c
-@@ -101,7 +101,12 @@
-
- void ready_ (void);
-
--
-+#ifdef HOST_F2C
-+extern int MAIN__();
-+int MAIN__() {
-+ exit(0);
-+}
-+#endif
-
- /* ZZSTRT -- Initialize the IRAF kernel at process startup time.
- */
diff --git a/debian/patches/irafuser_csh.patch b/debian/patches/irafuser_csh.patch
deleted file mode 100644
index e89dc68..0000000
--- a/debian/patches/irafuser_csh.patch
+++ /dev/null
@@ -1,136 +0,0 @@
---- a/unix/hlib/irafuser.csh
-+++ b/unix/hlib/irafuser.csh
-@@ -1,59 +1,8 @@
- # IRAF definitions for the UNIX/csh user. The additional variables iraf$ and
- # home$ should be defined in the user's .login file.
-
--
--set old_method = 0
--
--if ($old_method == 1) then
--
--setenv OS_MACH `uname -s | tr '[A-Z]' '[a-z]' | cut -c1-6`
--
--if (`uname -m` == "x86_64") then
-- if ($OS_MACH == "darwin") then
-- setenv MACH darwin
-- setenv IRAFARCH darwin
-- else
-- setenv MACH linux64
-- setenv IRAFARCH linux64
-- endif
--else if (-f /etc/redhat-release) then
-- setenv MACH redhat
--else
-- setenv MACH `uname -s | tr '[A-Z]' '[a-z]'`
--endif
--
--if ($MACH == "darwin") then
-- # Let the IRAFARCH override the machine to support cross compilation.
-- if ($?IRAFARCH) then
-- if ("$IRAFARCH" == "macosx") then
-- setenv MACH macosx
-- else if ("$IRAFARCH" == "macintel") then
-- setenv MACH macintel
-- endif
-- else
-- if ("`uname -m`" == "i386") then
-- setenv MACH macosx
-- setenv IRAFARCH macosx
-- else if ("`uname -m`" == "x86_64") then
-- setenv MACH macintel
-- setenv IRAFARCH macintel
-- else
-- setenv MACH ipad
-- setenv IRAFARCH ipad
-- endif
-- endif
--else if ($OS_MACH == "cygwin") then
-- setenv MACH cygwin
--endif
--
--else # old_method
--
-- setenv MACH `$iraf/unix/hlib/irafarch.csh`
-- setenv IRAFARCH `$iraf/unix/hlib/irafarch.csh`
--
--endif # old_method
--
--
-+setenv MACH `$iraf/unix/hlib/irafarch.csh`
-+setenv IRAFARCH `$iraf/unix/hlib/irafarch.csh`
-
- setenv hostid unix
- setenv host ${iraf}unix/
-@@ -64,7 +13,7 @@
- # Default to GCC for compilation.
- setenv CC gcc
- setenv F77 $hlib/f77.sh
--setenv F2C $hbin/f2c.e
-+setenv F2C /usr/bin/f2c
- setenv RANLIB ranlib
-
- switch ($MACH)
-@@ -123,24 +72,27 @@
- breaksw
-
- case linux64:
-- setenv HSI_CF "-g -DLINUX -DREDHAT -DPOSIX -DSYSV -DLINUX64 -DMACH64 -w -m64"
-- setenv HSI_XF "-g -Inolibc -w -/m64 -/Wunused"
-- setenv HSI_FF "-g -m64 -DBLD_KERNEL"
-- setenv HSI_LF "-m64 "
-+ setenv XC_CFLAGS "${CFLAGS} -I${host}f2c/libf2c"
-+ setenv XC_FFLAGS "${FFLAGS} -I${host}f2c/libf2c"
-+ setenv XC_LFLAGS "${FFLAGS} -L${host}f2c/libf2c"
-+ setenv HSI_CF "${CFLAGS} -I${host}f2c/libf2c -I/usr/include -I${hlib}libc -DLINUX -DPOSIX -DSYSV -DLINUX64 -DMACH64 -DNOLIBCNAMES -DHOST_F2C -DHOST_CURL -DHOST_EXPAT -DHOST_CFITSIO"
-+ setenv HSI_XF "-I${host}f2c/libf2c -g -Inolibc -I${hlib}libc -w -/Wunused"
-+ setenv HSI_FF "${FFLAGS} -I${host}f2c/libf2c -DBLD_KERNEL"
-+ setenv HSI_LF "${LDFLAGS} -L${host}f2c/libf2c"
- setenv HSI_F77LIBS ""
-- setenv HSI_LFLAGS ""
-+ setenv HSI_LFLAGS "${LDFLAGS} -L${host}f2c/libf2c"
- setenv HSI_OSLIBS ""
- set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'"
- breaksw
-
- case linux:
- case redhat:
-- setenv HSI_CF "-O -DLINUX -DREDHAT -DPOSIX -DSYSV -w -m32 -Wunused"
-- setenv HSI_XF "-Inolibc -w -/Wunused -/m32"
-- setenv HSI_FF "-O -DBLD_KERNEL -m32"
-- setenv HSI_LF "-m32"
-+ setenv HSI_CF "${CFLAGS} -I/usr/include -I${hlib}libc -DLINUX -DPOSIX -DSYSV -DHOST_F2C -DHOST_CURL -DHOST_EXPAT -DHOST_XMLRPC -DHOST_CFITSIO"
-+ setenv HSI_XF "-Inolibc -I${hlib}libc -w -/Wunused"
-+ setenv HSI_FF "${FFLAGS} -DBLD_KERNEL"
-+ setenv HSI_LF "${LDFLAGS}"
- setenv HSI_F77LIBS ""
-- setenv HSI_LFLAGS ""
-+ setenv HSI_LFLAGS "${LDFLAGS}"
- setenv HSI_OSLIBS ""
- set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'"
- breaksw
-@@ -179,22 +131,13 @@
- endsw
-
-
--# Prepend a user <iraf.h> file to the compile flags in case we don't
--# install as root.
--#
--setenv HSI_CF "-I${HOME}/.iraf/ $HSI_CF"
--setenv HSI_FF "-I${HOME}/.iraf/ $HSI_FF"
--setenv HSI_LF "-I${HOME}/.iraf/ $HSI_LF"
--setenv HSI_XF "-I${HOME}/.iraf/ $HSI_XF"
--
--
- # The following determines whether or not the VOS is used for filename mapping.
- if (-f ${iraf}lib/libsys.a) then
- setenv HSI_LIBS\
-- "${hlib}libboot.a ${iraf}lib/libsys.a ${iraf}lib/libvops.a ${hlib}libos.a ${hbin}libf2c.a -lm"
-+ "${hbin}libboot.a ${iraf}lib/libsys.a ${iraf}lib/libvops.a -lf2c -lm ${hbin}libos.a"
- else
- setenv HSI_CF "$HSI_CF -DNOVOS"
-- setenv HSI_LIBS "${hlib}libboot.a ${hlib}libos.a"
-+ setenv HSI_LIBS "${hbin}libboot.a ${hbin}libos.a"
- endif
-
- setenv HSI_LIBS "$HSI_LIBS $HSI_OSLIBS"
diff --git a/debian/patches/libc.patch b/debian/patches/libc.patch
deleted file mode 100644
index 25aec67..0000000
--- a/debian/patches/libc.patch
+++ /dev/null
@@ -1,1715 +0,0 @@
-Author: Joseph Wang <joequant at gmail.com>
-Description: Reorganize libc directories
-Url: https://github.com/joequant/iraf/commit/bae72ee3b7ab1a05fbf5b7
---- a/unix/hlib/libc/ctype.h
-+++ /dev/null
-@@ -1,32 +0,0 @@
--#define _U 01
--#define _L 02
--#define _N 04
--#define _S 010
--#define _P 020
--#define _C 040
--#define _X 0100
--
--#ifdef vms
--globalvalue vms_ctype_defs;
--#endif
--extern char u_ctype_[];
--
--#define isalpha(c) ((u_ctype_+1)[(unsigned int)(c)]&(_U|_L))
--#define isupper(c) ((u_ctype_+1)[(unsigned int)(c)]&_U)
--#define islower(c) ((u_ctype_+1)[(unsigned int)(c)]&_L)
--#define isdigit(c) ((u_ctype_+1)[(unsigned int)(c)]&_N)
--#define isxdigit(c) ((u_ctype_+1)[(unsigned int)(c)]&(_N|_X))
--#define isspace(c) ((u_ctype_+1)[(unsigned int)(c)]&_S)
--#define ispunct(c) ((u_ctype_+1)[(unsigned int)(c)]&_P)
--#define isalnum(c) ((u_ctype_+1)[(unsigned int)(c)]&(_U|_L|_N))
--#define isprint(c) ((u_ctype_+1)[(unsigned int)(c)]&(_P|_U|_L|_N))
--#define iscntrl(c) ((u_ctype_+1)[(unsigned int)(c)]&_C)
--#define isascii(c) ((unsigned)((int)(c))<=0177)
--
--#define toupper(c) ((c)-'a'+'A')
--#define tolower(c) ((c)-'A'+'a')
--#define toascii(c) ((c)&0177)
--#define tointeg(c) ((c)-'0')
--#define todigit(c) ((c)+'0')
--
--#define D_ctype
---- a/unix/hlib/libc/iraf.h
-+++ b/unix/hlib/libc/iraf.h
-@@ -5,6 +5,8 @@
- * scans this file at run time to get the logical directory definitions.
- */
-
-+#undef abs
-+
- #ifndef D_iraf
- /* ### Start of run time definitions */
- #define HOST "/iraf/iraf/unix/"
-@@ -25,84 +27,85 @@
- */
- #ifdef import_libc
- #ifndef D_libc
--#include "/iraf/iraf/unix/hlib/libc/libc.h"
-+#include "libc.h"
- #endif
- #undef import_libc
- #endif
-
- #ifdef import_spp
- #ifndef D_spp
--#include "/iraf/iraf/unix/hlib/libc/spp.h"
-+#include "spp.h"
- #endif
- #undef import_spp
- #endif
-
- #ifdef import_main
- #ifndef D_main
--#include "/iraf/iraf/unix/hlib/libc/main.h"
-+#include "main.h"
- #endif
- #undef import_main
- #endif
-
- #ifdef import_stdio
- #ifndef D_stdio
--#include "/iraf/iraf/unix/hlib/libc/stdio.h"
-+
-+#include "iraf/stdio.h"
- #endif
- #undef import_stdio
- #endif
-
- #ifdef import_error
- #ifndef D_error
--#include "/iraf/iraf/unix/hlib/libc/error.h"
-+#include "error.h"
- #endif
- #undef import_error
- #endif
-
- #ifdef import_ctype
- #ifndef D_ctype
--#include "/iraf/iraf/unix/hlib/libc/ctype.h"
-+#include "iraf/ctype.h"
- #endif
- #undef import_ctype
- #endif
-
- #ifdef import_finfo
- #ifndef D_finfo
--#include "/iraf/iraf/unix/hlib/libc/finfo.h"
-+#include "finfo.h"
- #endif
- #undef import_finfo
- #endif
-
- #ifdef import_fset
- #ifndef D_fset
--#include "/iraf/iraf/unix/hlib/libc/fset.h"
-+#include "fset.h"
- #endif
- #undef import_fset
- #endif
-
- #ifdef import_fpoll
- #ifndef D_fpoll
--#include "/iraf/iraf/unix/hlib/libc/fpoll.h"
-+#include "fpoll.h"
- #endif
- #undef import_fpoll
- #endif
-
- #ifdef import_kernel
- #ifndef D_kernel
--#include "/iraf/iraf/unix/hlib/libc/kernel.h"
-+#include "kernel.h"
- #endif
- #undef import_kernel
- #endif
-
- #ifdef import_xnames
- #ifndef D_xnames
--#include "/iraf/iraf/unix/hlib/libc/xnames.h"
-+#include "xnames.h"
- #endif
- #undef import_xnames
- #endif
-
- #ifdef import_knames
- #ifndef D_knames
--#include "/iraf/iraf/unix/hlib/libc/knames.h"
-+#include "knames.h"
- /*
- #include "/iraf/iraf/unix/hlib/libc/kproto.h"
- */
-@@ -112,77 +115,77 @@
-
- #ifdef import_setjmp
- #ifndef D_setjmp
--#include "/iraf/iraf/unix/hlib/libc/setjmp.h"
-+#include <setjmp.h>
- #endif
- #undef import_setjmp
- #endif
-
- #ifdef import_xwhen
- #ifndef D_xwhen
--#include "/iraf/iraf/unix/hlib/libc/xwhen.h"
-+#include "xwhen.h"
- #endif
- #undef import_xwhen
- #endif
-
- #ifdef import_protect
- #ifndef D_protect
--#include "/iraf/iraf/unix/hlib/libc/protect.h"
-+#include "protect.h"
- #endif
- #undef import_protect
- #endif
-
- #ifdef import_prtype
- #ifndef D_prtype
--#include "/iraf/iraf/unix/hlib/libc/prtype.h"
-+#include "prtype.h"
- #endif
- #undef import_prtype
- #endif
-
- #ifdef import_zfstat
- #ifndef D_zfstat
--#include "/iraf/iraf/unix/hlib/libc/zfstat.h"
-+#include "zfstat.h"
- #endif
- #undef import_zfstat
- #endif
-
- #ifdef import_alloc
- #ifndef D_alloc
--#include "/iraf/iraf/unix/hlib/libc/alloc.h"
-+#include "alloc.h"
- #endif
- #undef import_alloc
- #endif
-
- #ifdef import_math
- #ifndef D_math
--#include "/iraf/iraf/unix/hlib/libc/math.h"
-+#include <math.h>
- #endif
- #undef import_math
- #endif
-
- #ifdef import_prstat
- #ifndef D_prstat
--#include "/iraf/iraf/unix/hlib/libc/prstat.h"
-+#include "prstat.h"
- #endif
- #undef import_prstat
- #endif
-
- #ifdef import_lexnum
- #ifndef D_lexnum
--#include "/iraf/iraf/unix/hlib/libc/lexnum.h"
-+#include "lexnum.h"
- #endif
- #undef import_lexnum
- #endif
-
- #ifdef import_ttset
- #ifndef D_ttset
--#include "/iraf/iraf/unix/hlib/libc/ttset.h"
-+#include "ttset.h"
- #endif
- #undef import_ttset
- #endif
-
- #ifdef import_stdarg
- #ifndef D_stdarg
--#include "/iraf/iraf/unix/hlib/libc/stdarg.h"
-+#include <stdarg.h>
- #endif
- #undef import_stdarg
- #endif
---- a/unix/hlib/libc/kproto.h
-+++ /dev/null
-@@ -1,496 +0,0 @@
--/*
-- * KPROTO.H -- IRAF Kernel prototype definitions.
-- */
--
--#include <stdio.h>
--#include <time.h> /* for time_t */
--#include <signal.h> /* for siginfo_t */
--
--#ifndef MACH64
--
--
--/* alloc.c */
--extern int main(int argc, char *argv[]);
--extern int alloc(char *argv[], int statonly);
--extern int dealloc(char *argv[]);
--extern int findsfs(char *argv[]);
--/* dio.c */
--extern int directio(int fd, int advice);
--/* getproc.c */
--extern int uid_executing(int uid);
--/* gmttolst.c */
--extern time_t gmt_to_lst(time_t gmt);
--/* irafpath.c */
--extern char *irafpath(char *fname);
--/* prwait.c */
--extern void pr_enter(int pid, int inchan, int outchan);
--extern int pr_wait(int pid);
--extern int pr_getipc(int pid, int *inchan, int *outchan);
--extern struct proctable *pr_findpid(int pid);
--extern void pr_release(int pid);
--/* tape.c */
--extern int main(int argc, char *argv[]);
--extern void mtop(int op, int count);
--extern char *nextcmd(FILE *in);
--extern char *gettok(void);
--extern char *prompt(void);
--extern void pstatus(void);
--extern void output(char *text);
--extern void phelp(void);
--/* zalloc.c */
--extern int zdvall_(shortint *aliases, int *allflg, int *status);
--extern int zdvown_(shortint *device, shortint *owner, int *maxch, int *status);
--extern int loggedin(int uid);
--/* zawset.c */
--extern int zawset_(int *best_size, int *new_size, int *old_size, int *max_size);
--/* zcall.c */
--extern int zcall0_(int *proc);
--extern int zcall1_(int *proc, void *arg1);
--extern int zcall2_(int *proc, void *arg1, void *arg2);
--extern int zcall3_(int *proc, void *arg1, void *arg2, void *arg3);
--extern int zcall4_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4);
--extern int zcall5_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5);
--extern int zcall6_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6);
--extern int zcall7_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7);
--extern int zcall8_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8);
--extern int zcall9_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9);
--extern int zcalla_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9, void *arg10);
--/* zdojmp.c */
--extern void zdojmp_(int *jmpbuf, int *status);
--/* zfacss.c */
--extern int zfacss_(shortint *fname, int *mode, int *type, int *status);
--/* zfaloc.c */
--extern int zfaloc_(shortint *fname, int *nbytes, int *status);
--/* zfchdr.c */
--extern int zfchdr_(shortint *newdir, int *status);
--/* zfdele.c */
--extern int zfdele_(shortint *fname, int *status);
--/* zfgcwd.c */
--extern int zfgcwd_(shortint *outstr, int *maxch, int *status);
--/* zfinfo.c */
--extern int zfinfo_(shortint *fname, int *finfo_struct, int *status);
--/* zfiobf.c */
--extern int zopnbf_(shortint *osfn, int *mode, int *chan);
--extern int zclsbf_(int *fd, int *status);
--extern int zardbf_(int *chan, shortint *buf, int *maxbytes, int *offset);
--extern int zawrbf_(int *chan, shortint *buf, int *nbytes, int *offset);
--extern int zawtbf_(int *fd, int *status);
--extern int zsttbf_(int *fd, int *param, int *lvalue);
--extern int _u_fmode(int mode);
--extern int vm_access(char *fname, int mode);
--extern int vm_delete(char *fname, int force);
--extern int vm_reservespace(long nbytes);
--extern int vm_largefile(long nbytes);
--extern int vm_directio(int fd, int flag);
--/* zfioks.c */
--extern int zopnks_(shortint *x_server, int *mode, int *chan);
--extern int zclsks_(int *chan, int *status);
--extern int zardks_(int *chan, shortint *buf, int *totbytes, int *loffset);
--extern int zawrks_(int *chan, shortint *buf, int *totbytes, int *loffset);
--extern int zawtks_(int *chan, int *status);
--extern int zsttks_(int *chan, int *param, int *lvalue);
--extern void pr_mask(char *str);
--/* zfiolp.c */
--extern int zopnlp_(shortint *printer, int *mode, int *chan);
--extern int zclslp_(int *chan, int *status);
--extern int zardlp_(int *chan, shortint *buf, int *maxbytes, int *offset);
--extern int zawrlp_(int *chan, shortint *buf, int *nbytes, int *offset);
--extern int zawtlp_(int *chan, int *status);
--extern int zsttlp_(int *chan, int *param, int *lvalue);
--/* zfiomt.c */
--extern int zzopmt_(shortint *device, int *acmode, shortint *devcap, int *devpos, int *newfile, int *chan);
--extern int zzclmt_(int *chan, int *devpos, int *o_status);
--extern int zzrdmt_(int *chan, shortint *buf, int *maxbytes, int *offset);
--extern int zzwrmt_(int *chan, shortint *buf, int *nbytes, int *offset);
--extern int zzwtmt_(int *chan, int *devpos, int *o_status);
--extern int zzstmt_(int *chan, int *param, int *lvalue);
--extern int zzrwmt_(shortint *device, shortint *devcap, int *o_status);
--/* zfiond.c */
--extern int zopnnd_(shortint *pk_osfn, int *mode, int *chan);
--extern int zclsnd_(int *fd, int *status);
--extern int zardnd_(int *chan, shortint *buf, int *maxbytes, int *offset);
--extern int zawrnd_(int *chan, shortint *buf, int *nbytes, int *offset);
--extern int zawtnd_(int *fd, int *status);
--extern int zsttnd_(int *fd, int *param, int *lvalue);
--/* zfiopl.c */
--extern int zopnpl_(shortint *plotter, int *mode, int *chan);
--extern int zclspl_(int *chan, int *status);
--extern int zardpl_(int *chan, shortint *buf, int *maxbytes, int *offset);
--extern int zawrpl_(int *chan, shortint *buf, int *nbytes, int *offset);
--extern int zawtpl_(int *chan, int *status);
--extern int zsttpl_(int *chan, int *param, int *lvalue);
--/* zfiopr.c */
--extern int zopcpr_(shortint *osfn, int *inchan, int *outchan, int *pid);
--extern int zclcpr_(int *pid, int *exit_status);
--extern int zardpr_(int *chan, shortint *buf, int *maxbytes, int *loffset);
--extern int zawrpr_(int *chan, shortint *buf, int *nbytes, int *loffset);
--extern int zawtpr_(int *chan, int *status);
--extern int zsttpr_(int *chan, int *param, int *lvalue);
--/* zfiosf.c */
--extern int zopnsf_(shortint *osfn, int *mode, int *chan);
--extern int zclssf_(int *fd, int *status);
--extern int zardsf_(int *chan, shortint *buf, int *maxbytes, int *offset);
--extern int zawrsf_(int *chan, shortint *buf, int *nbytes, int *offset);
--extern int zawtsf_(int *fd, int *status);
--extern int zsttsf_(int *fd, int *param, int *lvalue);
--/* zfiotx.c */
--extern int zopntx_(shortint *osfn, int *mode, int *chan);
--extern int zclstx_(int *fd, int *status);
--extern int zflstx_(int *fd, int *status);
--extern int zgettx_(int *fd, shortint *buf, int *maxchars, int *status);
--extern int znottx_(int *fd, int *offset);
--extern int zputtx_(int *fd, shortint *buf, int *nchars, int *status);
--extern int zsektx_(int *fd, int *znottx_offset, int *status);
--extern int zstttx_(int *fd, int *param, int *value);
--/* zfioty.c */
--extern int zopnty_(shortint *osfn, int *mode, int *chan);
--extern int zclsty_(int *fd, int *status);
--extern int zflsty_(int *fd, int *status);
--extern int zgetty_(int *fd, shortint *buf, int *maxchars, int *status);
--extern int znotty_(int *fd, int *offset);
--extern int zputty_(int *fd, shortint *buf, int *nchars, int *status);
--extern int zsekty_(int *fd, int *znotty_offset, int *status);
--extern int zsttty_(int *fd, int *param, int *value);
--/* zfmkcp.c */
--extern int zfmkcp_(shortint *osfn, shortint *new_osfn, int *status);
--/* zfmkdr.c */
--extern int zfmkdr_(shortint *newdir, int *status);
--/* zfnbrk.c */
--extern int zfnbrk_(shortint *vfn, int *uroot_offset, int *uextn_offset);
--/* zfpath.c */
--extern int zfpath_(shortint *osfn, shortint *pathname, int *maxch, int *nchars);
--/* zfpoll.c */
--extern int zfpoll_(int *pfds, int *nfds, int *timeout, int *npoll, int *status);
--/* zfprot.c */
--extern int zfprot_(shortint *fname, int *action, int *status);
--/* zfrnam.c */
--extern int zfrnam_(shortint *oldname, shortint *newname, int *status);
--/* zfrmdr.c */
--extern int zfrmdr_(shortint *dir, int *status);
--/* zfsubd.c */
--extern int zfsubd_(shortint *osdir, int *maxch, shortint *subdir, int *nchars);
--/* zfunc.c */
--extern int zfunc0_(int *proc);
--extern int zfunc1_(int *proc, void *arg1);
--extern int zfunc2_(int *proc, void *arg1, void *arg2);
--extern int zfunc3_(int *proc, void *arg1, void *arg2, void *arg3);
--extern int zfunc4_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4);
--extern int zfunc5_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5);
--extern int zfunc6_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6);
--extern int zfunc7_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7);
--extern int zfunc8_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8);
--extern int zfunc9_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9);
--extern int zfunca_(int *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9, void *arg10);
--/* zfutim.c */
--extern int zfutim_(shortint *fname, int *atime, int *mtime, int *status);
--/* zfxdir.c */
--extern int zfxdir_(shortint *osfn, shortint *osdir, int *maxch, int *nchars);
--/* zgcmdl.c */
--extern int zgcmdl_(shortint *cmd, int *maxch, int *status);
--/* zghost.c */
--extern int zghost_(shortint *outstr, int *maxch);
--/* zglobl.c */
--/* zgmtco.c */
--extern int zgmtco_(int *gmtcor);
--/* zgtenv.c */
--extern int zgtenv_(shortint *envvar, shortint *outstr, int *maxch, int *status);
--/* zgtime.c */
--extern int zgtime_(int *clock_time, int *cpu_time);
--/* zgtpid.c */
--extern int zgtpid_(int *pid);
--/* zintpr.c */
--extern int zintpr_(int *pid, int *exception, int *status);
--/* zlocpr.c
--extern int zlocpr_(PFI proc, int *o_epa);
--*/
--/* zlocva.c */
--extern int zlocva_(shortint *variable, int *location);
--/* zmain.c */
--extern int main(int argc, char *argv[]);
--/* zmaloc.c */
--extern int zmaloc_(int *buf, int *nbytes, int *status);
--/* zmfree.c */
--extern int zmfree_(int *buf, int *status);
--/* zopdir.c */
--extern int zopdir_(shortint *fname, int *chan);
--extern int zcldir_(int *chan, int *status);
--extern int zgfdir_(int *chan, shortint *outstr, int *maxch, int *status);
--/* zopdpr.c */
--extern int zopdpr_(shortint *osfn, shortint *bkgfile, shortint *queue, int *jobcode);
--extern int zcldpr_(int *jobcode, int *killflag, int *exit_status);
--/* zoscmd.c */
--extern int zoscmd_(shortint *oscmd, shortint *stdin_file, shortint *stdout_file, shortint *stderr_file, int *status);
--extern int pr_onint(int usig, int *hwcode, int *scp);
--/* zpanic.c */
--extern int zpanic_(int *errcode, shortint *errmsg);
--extern int kernel_panic(char *errmsg);
--/* zraloc.c */
--extern int zraloc_(int *buf, int *nbytes, int *status);
--/* zshlib.c */
--extern void vlibinit_(void);
--/* zwmsec.c */
--extern int zwmsec_(int *msec);
--/* zxwhen.c */
--extern int zxwhen_(int *sig_code, int *epa, int *old_epa);
--extern void ex_handler(int unix_signal, siginfo_t *info, void *ucp);
--extern int zxgmes_(int *os_exception, shortint *errmsg, int *maxch);
--/* zzepro.c */
--extern int zzepro_(void);
--/* zzexit.c */
--extern int exit_(int *code);
--/* zzpstr.c */
--extern int spp_debug(void);
--extern int zzpstr_(shortint *s1, shortint *s2);
--extern int zzlstr_(shortint *s1, shortint *s2);
--extern void spp_printstr(shortint *s);
--extern void spp_printmemc(int memc_ptr);
--/* zzsetk.c */
--extern int zzsetk_(char *ospn, char *osbfn, int prtype, int isatty, int in, int out);
--/* zzstrt.c */
--extern int zzstrt_(void);
--extern int zzstop_(void);
--extern void ready_(void);
--extern void mdump_(int *buf, int *nbytes);
--
--
--
--#else
--
--
--
--/* dio.c */
--extern int directio(int fd, int advice);
--/* getproc.c */
--extern int uid_executing(int uid);
--/* gmttolst.c */
--extern time_t gmt_to_lst(time_t gmt);
--/* irafpath.c */
--extern char *irafpath(char *fname);
--/* prwait.c */
--extern void pr_enter(int pid, int inchan, int outchan);
--extern int pr_wait(int pid);
--extern int pr_getipc(int pid, int *inchan, int *outchan);
--extern struct proctable *pr_findpid(int pid);
--extern void pr_release(int pid);
--/* zalloc.c */
--extern int zdvall_(shortint *aliases, long *allflg, long *status);
--extern int zdvown_(shortint *device, shortint *owner, long *maxch, long *status);
--extern int loggedin(int uid);
--/* zawset.c */
--extern int zawset_(long *best_size, long *new_size, long *old_size, long *max_size);
--/* zcall.c */
--/*
--extern int zcall0_(long *proc);
--extern int zcall1_(long *proc, void *arg1);
--extern int zcall2_(long *proc, void *arg1, void *arg2);
--extern int zcall3_(long *proc, void *arg1, void *arg2, void *arg3);
--extern int zcall4_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4);
--extern int zcall5_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5);
--extern int zcall6_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6);
--extern int zcall7_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7);
--extern int zcall8_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8);
--extern int zcall9_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9);
--extern int zcalla_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9, void *arg10);
--*/
--/* zdojmp.c */
--extern void zdojmp_(long *jmpbuf, long *status);
--/* zfacss.c */
--extern int zfacss_(shortint *fname, long *mode, long *type, long *status);
--/* zfaloc.c */
--extern int zfaloc_(shortint *fname, long *nbytes, long *status);
--/* zfchdr.c */
--extern int zfchdr_(shortint *newdir, long *status);
--/* zfdele.c */
--extern int zfdele_(shortint *fname, long *status);
--/* zfgcwd.c */
--extern int zfgcwd_(shortint *outstr, long *maxch, long *status);
--/* zfinfo.c */
--extern int zfinfo_(shortint *fname, long *finfo_struct, long *status);
--/* zfiobf.c */
--extern int zopnbf_(shortint *osfn, long *mode, long *chan);
--extern int zclsbf_(long *fd, long *status);
--extern int zardbf_(long *chan, shortint *buf, long *maxbytes, long *offset);
--extern int zawrbf_(long *chan, shortint *buf, long *nbytes, long *offset);
--extern int zawtbf_(long *fd, long *status);
--extern int zsttbf_(long *fd, long *param, long *lvalue);
--extern int _u_fmode(int mode);
--extern int vm_access(char *fname, int mode);
--extern int vm_delete(char *fname, int force);
--extern int vm_reservespace(long nbytes);
--extern int vm_largefile(long nbytes);
--extern int vm_directio(int fd, int flag);
--/* zfioks.c */
--extern int zopnks_(shortint *x_server, long *mode, long *chan);
--extern int zclsks_(long *chan, long *status);
--extern int zardks_(long *chan, shortint *buf, long *totbytes, long *loffset);
--extern int zawrks_(long *chan, shortint *buf, long *totbytes, long *loffset);
--extern int zawtks_(long *chan, long *status);
--extern int zsttks_(long *chan, long *param, long *lvalue);
--extern void pr_mask(char *str);
--/* zfiolp.c */
--extern int zopnlp_(shortint *printer, long *mode, long *chan);
--extern int zclslp_(long *chan, long *status);
--extern int zardlp_(long *chan, shortint *buf, long *maxbytes, long *offset);
--extern int zawrlp_(long *chan, shortint *buf, long *nbytes, long *offset);
--extern int zawtlp_(long *chan, long *status);
--extern int zsttlp_(long *chan, long *param, long *lvalue);
--/* zfiomt.c */
--extern int zzopmt_(shortint *device, long *acmode, shortint *devcap, long *devpos, long *newfile, long *chan);
--extern int zzclmt_(long *chan, long *devpos, long *o_status);
--extern int zzrdmt_(long *chan, shortint *buf, long *maxbytes, long *offset);
--extern int zzwrmt_(long *chan, shortint *buf, long *nbytes, long *offset);
--extern int zzwtmt_(long *chan, long *devpos, long *o_status);
--extern int zzstmt_(long *chan, long *param, long *lvalue);
--extern int zzrwmt_(shortint *device, shortint *devcap, long *o_status);
--/* zfiond.c */
--extern int zopnnd_(shortint *pk_osfn, long *mode, long *chan);
--extern int zclsnd_(long *fd, long *status);
--extern int zardnd_(long *chan, shortint *buf, long *maxbytes, long *offset);
--extern int zawrnd_(long *chan, shortint *buf, long *nbytes, long *offset);
--extern int zawtnd_(long *fd, long *status);
--extern int zsttnd_(long *fd, long *param, long *lvalue);
--/* zfiopl.c */
--extern int zopnpl_(shortint *plotter, long *mode, long *chan);
--extern int zclspl_(long *chan, long *status);
--extern int zardpl_(long *chan, shortint *buf, long *maxbytes, long *offset);
--extern int zawrpl_(long *chan, shortint *buf, long *nbytes, long *offset);
--extern int zawtpl_(long *chan, long *status);
--extern int zsttpl_(long *chan, long *param, long *lvalue);
--/* zfiopr.c */
--extern int zopcpr_(shortint *osfn, long *inchan, long *outchan, long *pid);
--extern int zclcpr_(long *pid, long *exit_status);
--extern int zardpr_(long *chan, shortint *buf, long *maxbytes, long *loffset);
--extern int zawrpr_(long *chan, shortint *buf, long *nbytes, long *loffset);
--extern int zawtpr_(long *chan, long *status);
--extern int zsttpr_(long *chan, long *param, long *lvalue);
--/* zfiosf.c */
--extern int zopnsf_(shortint *osfn, long *mode, long *chan);
--extern int zclssf_(long *fd, long *status);
--extern int zardsf_(long *chan, shortint *buf, long *maxbytes, long *offset);
--extern int zawrsf_(long *chan, shortint *buf, long *nbytes, long *offset);
--extern int zawtsf_(long *fd, long *status);
--extern int zsttsf_(long *fd, long *param, long *lvalue);
--/* zfiotx.c */
--extern int zopntx_(shortint *osfn, long *mode, long *chan);
--extern int zclstx_(long *fd, long *status);
--extern int zflstx_(long *fd, long *status);
--extern int zgettx_(long *fd, shortint *buf, long *maxchars, long *status);
--extern int znottx_(long *fd, long *offset);
--extern int zputtx_(long *fd, shortint *buf, long *nchars, long *status);
--extern int zsektx_(long *fd, long *znottx_offset, long *status);
--extern int zstttx_(long *fd, long *param, long *value);
--/* zfioty.c */
--extern int zopnty_(shortint *osfn, long *mode, long *chan);
--extern int zclsty_(long *fd, long *status);
--extern int zflsty_(long *fd, long *status);
--extern int zgetty_(long *fd, shortint *buf, long *maxchars, long *status);
--extern int znotty_(long *fd, long *offset);
--extern int zputty_(long *fd, shortint *buf, long *nchars, long *status);
--extern int zsekty_(long *fd, long *znotty_offset, long *status);
--extern int zsttty_(long *fd, long *param, long *value);
--/* zfmkcp.c */
--extern int zfmkcp_(shortint *osfn, shortint *new_osfn, long *status);
--/* zfmkdr.c */
--extern int zfmkdr_(shortint *newdir, long *status);
--/* zfnbrk.c */
--extern int zfnbrk_(shortint *vfn, long *uroot_offset, long *uextn_offset);
--/* zfpath.c */
--extern int zfpath_(shortint *osfn, shortint *pathname, long *maxch, long *nchars);
--/* zfpoll.c */
--extern int zfpoll_(long *pfds, long *nfds, long *timeout, long *npoll, long *status);
--/* zfprot.c */
--extern int zfprot_(shortint *fname, long *action, long *status);
--/* zfrnam.c */
--extern int zfrnam_(shortint *oldname, shortint *newname, long *status);
--/* zfsubd.c */
--extern int zfsubd_(shortint *osdir, long *maxch, shortint *subdir, long *nchars);
--/* zfunc.c */
--extern long zfunc0_(long *proc);
--extern long zfunc1_(long *proc, void *arg1);
--extern long zfunc2_(long *proc, void *arg1, void *arg2);
--extern long zfunc3_(long *proc, void *arg1, void *arg2, void *arg3);
--extern long zfunc4_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4);
--extern long zfunc5_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5);
--extern long zfunc6_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6);
--extern long zfunc7_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7);
--extern long zfunc8_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8);
--extern long zfunc9_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9);
--extern long zfunca_(long *proc, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9, void *arg10);
--/* zfutim.c */
--extern int zfutim_(shortint *fname, long *atime, long *mtime, long *status);
--/* zfxdir.c */
--extern int zfxdir_(shortint *osfn, shortint *osdir, long *maxch, long *nchars);
--/* zgcmdl.c */
--extern int zgcmdl_(shortint *cmd, long *maxch, long *status);
--/* zghost.c */
--extern int zghost_(shortint *outstr, long *maxch);
--/* zglobl.c */
--/* zgmtco.c */
--extern int zgmtco_(long *gmtcor);
--/* zgtenv.c */
--extern int zgtenv_(shortint *envvar, shortint *outstr, long *maxch, long *status);
--/* zgtime.c */
--extern int zgtime_(long *clock_time, long *cpu_time);
--/* zgtpid.c */
--extern int zgtpid_(long *pid);
--/* zintpr.c */
--extern int zintpr_(long *pid, long *exception, long *status);
--/* zlocpr.c */
--/*
--extern int zlocpr_(PFI proc, long *o_epa);
--*/
--/* zlocva.c */
--extern int zlocva_(shortint *variable, long *location);
--/* zmain.c */
--extern int main(int argc, char *argv[]);
--/* zmaloc.c */
--extern int zmaloc_(long *buf, long *nbytes, long *status);
--/* zmfree.c */
--extern int zmfree_(long *buf, long *status);
--/* zopdir.c */
--extern int zopdir_(shortint *fname, long *chan);
--extern int zcldir_(long *chan, long *status);
--extern int zgfdir_(long *chan, shortint *outstr, long *maxch, long *status);
--/* zopdpr.c */
--extern int zopdpr_(shortint *osfn, shortint *bkgfile, shortint *queue, long *jobcode);
--extern int zcldpr_(long *jobcode, long *killflag, long *exit_status);
--/* zoscmd.c */
--extern int zoscmd_(shortint *oscmd, shortint *stdin_file, shortint *stdout_file, shortint *stderr_file, long *status);
--extern int pr_onint(int usig, int *hwcode, int *scp);
--/* zpanic.c */
--extern int zpanic_(long *errcode, shortint *errmsg);
--extern int kernel_panic(char *errmsg);
--/* zraloc.c */
--extern int zraloc_(long *buf, long *nbytes, long *status);
--/* zshlib.c */
--extern void vlibinit_(void);
--/* zwmsec.c */
--extern int zwmsec_(long *msec);
--/* zxwhen.c */
--extern int zxwhen_(long *sig_code, long *epa, long *old_epa);
--extern void ex_handler(int unix_signal, siginfo_t *info, void *ucp);
--extern int zxgmes_(long *os_exception, shortint *errmsg, long *maxch);
--extern int gfpucw_(long *xcw);
--extern int sfpucw_(long *xcw);
--/* zzepro.c */
--/*
--extern int zzepro_(void);
--*/
--/* zzexit.c */
--extern int exit_(long *code);
--/* zzpstr.c */
--extern int spp_debug(void);
--extern int zzpstr_(shortint *s1, shortint *s2);
--extern int zzlstr_(shortint *s1, shortint *s2);
--extern void spp_printstr(shortint *s);
--extern void spp_printmemc(int memc_ptr);
--/* zzsetk.c */
--extern int zzsetk_(char *ospn, char *osbfn, int prtype, int isatty, int in, int out);
--/* zzstrt.c */
--extern int zzstrt_(void);
--extern int zzstop_(void);
--extern void ready_(void);
--extern void mdump_(long *buf, long *nbytes);
--
--
--#endif
---- a/unix/hlib/libc/libc.h
-+++ b/unix/hlib/libc/libc.h
-@@ -320,8 +320,9 @@
-
- /*
- */
--#include "/iraf/iraf/unix/bin/f2c.h"
--#include "/iraf/iraf/unix/hlib/libc/vosproto.h"
-+#include "f2c.h"
-+#undef abs
-+#include "vosproto.h"
-
- #define D_libc
- #define D_libc_proto
---- a/unix/hlib/libc/setjmp.h
-+++ /dev/null
-@@ -1,25 +0,0 @@
--/* SETJMP, LONGJMP -- Non local goto. Requires libc.h and knames.h.
-- * Note that jmp_buf must be at least one int larger than necessary to
-- */
--#ifndef D_libc
--#ifndef import_libc
--#include "libc.h"
--#endif
--#ifndef import_knames
--#include "knames.h"
--#endif
--#endif
--
--typedef int jmp_buf[LEN_JUMPBUF];
--static int u_jmpstat;
--
--#define setjmp(e) (ZSVJMP((e),&u_jmpstat),u_jmpstat)
--#define longjmp(e,v) (u_jmpstat=(v),ZDOJMP((e),&u_jmpstat))
--
--/* The following is necessary to prevent to prevent the optimizer from
-- * doing unwise things with setjmp on a Sun-4.
-- */
--extern int zsvjmp_();
--#pragma unknown_control_flow(zsvjmp_)
--
--#define D_setjmp
---- a/unix/hlib/libc/stdarg.h
-+++ /dev/null
-@@ -1,40 +0,0 @@
--/* STDARG.H -- Interface to the Unix variable argument-list interface.
-- * This version replaces <varargs.h>, but is NOT backwards compatible.
-- *
-- * We pick up the local UNIX definitions for dealing with a variable
-- * number of arguments. This is done via indirection through this file so
-- * that any problems can be dealt with by changing only this file.
-- *
-- * Usage: Include this file using import_stdarg. If USE_STDARG is
-- * defined use the stdarg interface, otherwise use the varargs
-- * interface (ifdef the code accordingly). Old code which uses
-- * varargs directly is unaffected.
-- */
--#ifndef D_stdarg
--
--
--#ifdef MACOSX
--#include "stdarg-osx.h"
--#else
--#ifdef __CYGWIN__
--#include "stdarg-cygwin.h"
--#else
--#ifdef LINUX
--#include "stdarg-linux.h"
--#else
--#ifdef SOLARIS
--#include "stdarg-solaris.h"
--#else
--#ifdef BSD
--#include "stdarg-freebsd.h"
--#else
--#include <stdarg.h>
--#endif
--#endif
--#endif
--#endif
--#endif
--
--
--#define D_stdarg
--#endif
---- a/unix/hlib/libc/stdio.h
-+++ /dev/null
-@@ -1,99 +0,0 @@
--/*
-- * U_STDIO.H -- C defines used to emulate the UNIX standard i/o package upon
-- * IRAF file i/o. These definitions are portable, but highly dependent on
-- * the guts of IRAF FIO.
-- */
--
--#ifndef D_libc
--#ifndef import_libc
--#include "libc.h"
--#endif
--#endif
--
--#define BUFSIZ SZ_DEFIOBUF
--#define _NFILE FIO_MAXFD
--#define FILE struct _iobuf
--
--# ifndef NULL
--#define NULL 0
--# endif
--# ifndef EOF
--#define EOF (-1)
--# endif
--
--/* Filler space is defined here to reduce clutter in the struct def below.
-- */
--#define _F1 _filler1[_NFILE-1]
--#define _F2 _filler2[_NFILE-1]
--#define _F3 _filler3[_NFILE-1]
--#define _F4 _filler4[_NFILE-1]
--#define _F5 _filler5[_NFILE-1]
--#define _F6 _filler6[_NFILE-1]
--#define _F7 _filler7[_NFILE-1]
--
--/* The _iobuf structure is the C version of the FIO common /fiocom/, which
-- * contains all the FIO buffer and i/o pointers. Each structure field is
-- * maintained in the common as an array of length _NFILE, hence in terms of
-- * C the structures are interleaved. The file pointers are indices into
-- * the array Memc, an array of XCHAR.
-- */
--struct _iobuf {
-- XLONG _boffset, _F1; /* XCHAR file offset of buffer */
-- XINT _bufptr, _F2; /* buffer pointer */
-- XINT _buftop, _F3; /* pointer to top of buffer + 1 */
-- XINT _iop, _F4; /* pointer to next XCHAR */
-- XINT _itop, _F5; /* call filbuf when _iop >= */
-- XINT _otop, _F6; /* call flsbuf when _iop >= */
-- XINT _fiodes, _F7; /* FIO file descriptor */
-- XINT _fflags; /* bit flags */
--};
--
--extern XINT FIOCOM[]; /* the FIO common */
--
--#define _FFLUSHNL 01 /* flush buffer on newline */
--#define _FREAD 02 /* read perm on file */
--#define _FWRITE 04 /* read perm on file */
--#define _FEOF 010 /* file positioned to EOF */
--#define _FERR 020 /* i/o error on file */
--#define _FKEEP 040 /* keep file open at exit */
--#define _FFLUSH 0100 /* write to device on newline */
--#define _FRAW 0200 /* raw input mode */
--#define _FNDELAY 0400 /* nonblocking i/o */
--#define _FPUSH 01000 /* data is pushed back */
--#define _FIPC 02000 /* file is an IPC channel */
--
--/* Convert FILE pointers to and from FIO integer file descriptors.
-- */
--#define FDTOFP(fd) ((FILE *)(&FIOCOM[(fd)-1]))
--#define FPTOFD(fp) ((XINT)((XINT *)(fp) - FIOCOM + 1))
--
--#define stdin (FDTOFP(3))
--#define stdout (FDTOFP(4))
--#define stderr (FDTOFP(5))
--
--
--/* I/O macro defines. I/O is assumed to be sequential, i.e., we do not check
-- * for _iop < _bufptr. This is consistent with UNIX usage. The getc and putc
-- * macros are quite efficient despite their complex appearance.
-- */
--#define getchar() fgetc(stdin)
--#define getc(fp) \
--(((fp)->_iop >= (fp)->_itop) ? c_filbuf((fp)) : Memc[(fp)->_iop++] & 0377)
--
--#define putchar(ch) fputc((ch),stdout)
--#define putc(ch,fp) \
--(((fp)->_iop >= (fp)->_otop || ((ch) == '\n' && (fp)->_fflags&_FFLUSH)) ? \
--c_flsbuf((unsigned)(ch),(fp)) : ((int)(Memc[(fp)->_iop++] = (unsigned)(ch))))
--
--#define fileno(fp) (FPTOFD((fp)))
--#define feof(fp) ((fp)->_fflags & _FEOF)
--#define ferror(fp) ((fp)->_fflags & _FERR)
--#define clearerr(fp) ((fp)->_fflags &= ~_FERR)
--
--
--FILE *fopen();
--FILE *fdopen();
--char *fgets();
--char *gets();
--
--#define D_stdio
---- /dev/null
-+++ b/unix/hlib/libc/iraf/ctype.h
-@@ -0,0 +1,32 @@
-+#define _U 01
-+#define _L 02
-+#define _N 04
-+#define _S 010
-+#define _P 020
-+#define _C 040
-+#define _X 0100
-+
-+#ifdef vms
-+globalvalue vms_ctype_defs;
-+#endif
-+extern char u_ctype_[];
-+
-+#define isalpha(c) ((u_ctype_+1)[(unsigned int)(c)]&(_U|_L))
-+#define isupper(c) ((u_ctype_+1)[(unsigned int)(c)]&_U)
-+#define islower(c) ((u_ctype_+1)[(unsigned int)(c)]&_L)
-+#define isdigit(c) ((u_ctype_+1)[(unsigned int)(c)]&_N)
-+#define isxdigit(c) ((u_ctype_+1)[(unsigned int)(c)]&(_N|_X))
-+#define isspace(c) ((u_ctype_+1)[(unsigned int)(c)]&_S)
-+#define ispunct(c) ((u_ctype_+1)[(unsigned int)(c)]&_P)
-+#define isalnum(c) ((u_ctype_+1)[(unsigned int)(c)]&(_U|_L|_N))
-+#define isprint(c) ((u_ctype_+1)[(unsigned int)(c)]&(_P|_U|_L|_N))
-+#define iscntrl(c) ((u_ctype_+1)[(unsigned int)(c)]&_C)
-+#define isascii(c) ((unsigned)((int)(c))<=0177)
-+
-+#define toupper(c) ((c)-'a'+'A')
-+#define tolower(c) ((c)-'A'+'a')
-+#define toascii(c) ((c)&0177)
-+#define tointeg(c) ((c)-'0')
-+#define todigit(c) ((c)+'0')
-+
-+#define D_ctype
---- /dev/null
-+++ b/unix/hlib/libc/iraf/stdio.h
-@@ -0,0 +1,99 @@
-+/*
-+ * U_STDIO.H -- C defines used to emulate the UNIX standard i/o package upon
-+ * IRAF file i/o. These definitions are portable, but highly dependent on
-+ * the guts of IRAF FIO.
-+ */
-+
-+#ifndef D_libc
-+#ifndef import_libc
-+#include "libc.h"
-+#endif
-+#endif
-+
-+#define BUFSIZ SZ_DEFIOBUF
-+#define _NFILE FIO_MAXFD
-+#define FILE struct _iobuf
-+
-+# ifndef NULL
-+#define NULL 0
-+# endif
-+# ifndef EOF
-+#define EOF (-1)
-+# endif
-+
-+/* Filler space is defined here to reduce clutter in the struct def below.
-+ */
-+#define _F1 _filler1[_NFILE-1]
-+#define _F2 _filler2[_NFILE-1]
-+#define _F3 _filler3[_NFILE-1]
-+#define _F4 _filler4[_NFILE-1]
-+#define _F5 _filler5[_NFILE-1]
-+#define _F6 _filler6[_NFILE-1]
-+#define _F7 _filler7[_NFILE-1]
-+
-+/* The _iobuf structure is the C version of the FIO common /fiocom/, which
-+ * contains all the FIO buffer and i/o pointers. Each structure field is
-+ * maintained in the common as an array of length _NFILE, hence in terms of
-+ * C the structures are interleaved. The file pointers are indices into
-+ * the array Memc, an array of XCHAR.
-+ */
-+struct _iobuf {
-+ XLONG _boffset, _F1; /* XCHAR file offset of buffer */
-+ XINT _bufptr, _F2; /* buffer pointer */
-+ XINT _buftop, _F3; /* pointer to top of buffer + 1 */
-+ XINT _iop, _F4; /* pointer to next XCHAR */
-+ XINT _itop, _F5; /* call filbuf when _iop >= */
-+ XINT _otop, _F6; /* call flsbuf when _iop >= */
-+ XINT _fiodes, _F7; /* FIO file descriptor */
-+ XINT _fflags; /* bit flags */
-+};
-+
-+extern XINT FIOCOM[]; /* the FIO common */
-+
-+#define _FFLUSHNL 01 /* flush buffer on newline */
-+#define _FREAD 02 /* read perm on file */
-+#define _FWRITE 04 /* read perm on file */
-+#define _FEOF 010 /* file positioned to EOF */
-+#define _FERR 020 /* i/o error on file */
-+#define _FKEEP 040 /* keep file open at exit */
-+#define _FFLUSH 0100 /* write to device on newline */
-+#define _FRAW 0200 /* raw input mode */
-+#define _FNDELAY 0400 /* nonblocking i/o */
-+#define _FPUSH 01000 /* data is pushed back */
-+#define _FIPC 02000 /* file is an IPC channel */
-+
-+/* Convert FILE pointers to and from FIO integer file descriptors.
-+ */
-+#define FDTOFP(fd) ((FILE *)(&FIOCOM[(fd)-1]))
-+#define FPTOFD(fp) ((XINT)((XINT *)(fp) - FIOCOM + 1))
-+
-+#define stdin (FDTOFP(3))
-+#define stdout (FDTOFP(4))
-+#define stderr (FDTOFP(5))
-+
-+
-+/* I/O macro defines. I/O is assumed to be sequential, i.e., we do not check
-+ * for _iop < _bufptr. This is consistent with UNIX usage. The getc and putc
-+ * macros are quite efficient despite their complex appearance.
-+ */
-+#define getchar() fgetc(stdin)
-+#define getc(fp) \
-+(((fp)->_iop >= (fp)->_itop) ? c_filbuf((fp)) : Memc[(fp)->_iop++] & 0377)
-+
-+#define putchar(ch) fputc((ch),stdout)
-+#define putc(ch,fp) \
-+(((fp)->_iop >= (fp)->_otop || ((ch) == '\n' && (fp)->_fflags&_FFLUSH)) ? \
-+c_flsbuf((unsigned)(ch),(fp)) : ((int)(Memc[(fp)->_iop++] = (unsigned)(ch))))
-+
-+#define fileno(fp) (FPTOFD((fp)))
-+#define feof(fp) ((fp)->_fflags & _FEOF)
-+#define ferror(fp) ((fp)->_fflags & _FERR)
-+#define clearerr(fp) ((fp)->_fflags &= ~_FERR)
-+
-+
-+FILE *fopen();
-+FILE *fdopen();
-+char *fgets();
-+char *gets();
-+
-+#define D_stdio
---- a/sys/libc/mkpkg
-+++ b/sys/libc/mkpkg
-@@ -12,10 +12,10 @@
- libc.a:
- $set XFLAGS = "$(XFLAGS) -/Wall"
-
-- atof.c <libc/ctype.h> <libc/libc.h> <libc/spp.h>\
-+ atof.c <libc/iraf/ctype.h> <libc/libc.h> <libc/spp.h>\
- <libc/xnames.h>
-- atoi.c <libc/ctype.h> <libc/libc.h> <libc/spp.h>
-- atol.c <libc/ctype.h> <libc/libc.h> <libc/spp.h>
-+ atoi.c <libc/iraf/ctype.h> <libc/libc.h> <libc/spp.h>
-+ atol.c <libc/iraf/ctype.h> <libc/libc.h> <libc/spp.h>
- caccess.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- calloc.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- callocate.c <libc/spp.h> <libc/libc.h> <libc/xnames.h>
-@@ -34,11 +34,11 @@
- cerrget.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- cerror.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- cfchdir.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
-- cfilbuf.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>\
-+ cfilbuf.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>\
- <libc/xnames.h>
- cfinfo.c <libc/libc.h> <libc/xnames.h> <libc/finfo.h>\
- <libc/spp.h>
-- cflsbuf.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>\
-+ cflsbuf.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>\
- <libc/xnames.h>
- cflush.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- cfmapfn.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
-@@ -56,7 +56,7 @@
- cimaccess.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- cimdrcur.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- ckimapc.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
-- clexnum.c <libc/ctype.h> <libc/lexnum.h> <libc/spp.h>\
-+ clexnum.c <libc/iraf/ctype.h> <libc/lexnum.h> <libc/spp.h>\
- <libc/xnames.h> <libc/libc.h>
- cmktemp.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- cnote.c <libc/libc.h> <libc/xnames.h> <libc/fset.h> <libc/spp.h>
-@@ -65,14 +65,14 @@
- cndopen.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- cpoll.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>\
- <libc/fpoll.h>
-- cprcon.c <libc/libc.h> <libc/prstat.h> <libc/stdio.h>\
-+ cprcon.c <libc/libc.h> <libc/prstat.h> <libc/iraf/stdio.h>\
- <libc/xnames.h> <libc/spp.h>
- cprdet.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- cprintf.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- crcursor.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- crdukey.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- cread.c <libc/libc.h> <libc/xnames.h> <libc/error.h>\
-- <libc/fset.h> <libc/spp.h> <libc/stdio.h>
-+ <libc/fset.h> <libc/spp.h> <libc/iraf/stdio.h>
- crename.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- creopen.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- csalloc.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
-@@ -99,12 +99,12 @@
- cttyseti.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- cttyso.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- cttystati.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
-- ctype.c <libc/ctype.h>
-+ ctype.c <libc/iraf/ctype.h>
- cungetc.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- cungetl.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- cvfnbrk.c <libc/libc.h> <libc/spp.h> <libc/knames.h>
- cwrite.c <libc/libc.h> <libc/xnames.h> <libc/error.h>\
-- <libc/fset.h> <libc/spp.h> <libc/stdio.h>
-+ <libc/fset.h> <libc/spp.h> <libc/iraf/stdio.h>
- cxgmes.c <libc/knames.h> <libc/libc.h> <libc/spp.h>\
- <libc/xnames.h>
- cxonerr.c <libc/libc.h> <libc/xnames.h>
-@@ -112,43 +112,43 @@
- cxwhen.c <libc/xwhen.h> <libc/knames.h> <libc/libc.h>\
- <libc/spp.h> <libc/xnames.h>
- cwmsec.c <libc/libc.h> <libc/spp.h> <libc/knames.h>
-- eprintf.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- fclose.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>\
-+ eprintf.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ fclose.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>\
- <libc/xnames.h>
-- fdopen.c <libc/fset.h> <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- fflush.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>\
-+ fdopen.c <libc/fset.h> <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ fflush.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>\
- <libc/xnames.h>
-- fgetc.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- fgets.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- fopen.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>\
-- <libc/xnames.h>
-- fputc.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- fputs.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- fread.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-+ fgetc.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ fgets.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ fopen.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>\
-+ <libc/xnames.h>
-+ fputc.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ fputs.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ fread.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
- free.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
-- freopen.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- fseek.c <libc/fset.h> <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- ftell.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- fwrite.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- gets.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- getw.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-+ freopen.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ fseek.c <libc/fset.h> <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ ftell.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ fwrite.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ gets.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ getw.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
- index.c <libc/libc.h> <libc/spp.h>
- isatty.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- malloc.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
- mathf.f
- mktemp.c <libc/libc.h> <libc/spp.h>
-- perror.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>\
-+ perror.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>\
- <libc/xnames.h>
-- printf.c <libc/ctype.h> <libc/libc.h> <libc/spp.h>\
-- <libc/stdio.h> <libc/xnames.h>
-- puts.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- putw.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-+ printf.c <libc/iraf/ctype.h> <libc/libc.h> <libc/spp.h>\
-+ <libc/iraf/stdio.h> <libc/xnames.h>
-+ puts.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ putw.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
- qsort.c <libc/libc.h>
- realloc.c <libc/libc.h> <libc/xnames.h> <libc/spp.h>
-- rewind.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-+ rewind.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
- rindex.c <libc/libc.h> <libc/spp.h>
-- scanf.c <libc/ctype.h> <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-- setbuf.c <libc/fset.h> <libc/libc.h> <libc/spp.h> <libc/stdio.h>
-+ scanf.c <libc/iraf/ctype.h> <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
-+ setbuf.c <libc/fset.h> <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>
- stgio.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
- strcat.c <libc/libc.h>
- strcmp.c <libc/libc.h>
-@@ -159,9 +159,9 @@
- strncmp.c <libc/libc.h>
- strncpy.c <libc/libc.h>
- spf.c <libc/libc.h> <libc/spp.h> <libc/xnames.h>
-- sprintf.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>\
-+ sprintf.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>\
- <libc/xnames.h>
- system.c <libc/knames.h> <libc/libc.h> <libc/spp.h>
-- ungetc.c <libc/libc.h> <libc/spp.h> <libc/stdio.h>\
-+ ungetc.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h>\
- <libc/xnames.h>
- ;
---- a/pkg/cl/mkpkg
-+++ b/pkg/cl/mkpkg
-@@ -43,9 +43,9 @@
-
- #$set xflags = "$(xflags) -x"
- $omake cl.x
-- $omake globals.c <libc/libc.h> <libc/stdio.h> <libc/spp.h>\
-+ $omake globals.c <libc/libc.h> <libc/iraf/stdio.h> <libc/spp.h>\
- construct.h eparam.h operand.h param.h task.h
-- $omake opcodes.c <libc/libc.h> <libc/spp.h> <libc/stdio.h> config.h\
-+ $omake opcodes.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h> config.h\
- construct.h errs.h grammar.h mem.h opcodes.h operand.h\
- param.h task.h
- link:
-@@ -61,120 +61,120 @@
- #$set xflags = "$(xflags) -qx"
-
- binop.c <libc/spp.h> <libc/libc.h> <libc/xnames.h>\
-- <libc/math.h> <libc/ctype.h> config.h\
-+ <libc/math.h> <libc/iraf/ctype.h> config.h\
- operand.h errs.h
-
-- bkg.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-- <libc/knames.h> <libc/xwhen.h> <libc/ctype.h>\
-+ bkg.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
-+ <libc/knames.h> <libc/xwhen.h> <libc/iraf/ctype.h>\
- clmodes.h config.h operand.h clmodes.h\
- mem.h errs.h param.h task.h
-
- builtin.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
-- <libc/error.h> <libc/ctype.h> <libc/stdio.h>\
-+ <libc/error.h> <libc/iraf/ctype.h> <libc/iraf/stdio.h>\
- <libc/alloc.h> <libc/ttset.h> clmodes.h\
- config.h mem.h operand.h param.h task.h errs.h
-
-- clprintf.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ clprintf.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h\
- task.h errs.h
-
-- clsystem.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ clsystem.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- errs.h
-
- compile.c <libc/spp.h> <libc/libc.h> config.h\
- operand.h opcodes.h mem.h errs.h
-
-- debug.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ debug.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- operand.h mem.h grammar.h opcodes.h config.h param.h\
- task.h
-
-- decl.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ decl.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- clmodes.h operand.h mem.h grammar.h opcodes.h config.h\
- param.h task.h errs.h construct.h ytab.h
-
-- edcap.c <libc/stdio.h> <libc/libc.h> <libc/ctype.h>\
-+ edcap.c <libc/iraf/stdio.h> <libc/libc.h> <libc/iraf/ctype.h>\
- <libc/fset.h> <libc/spp.h> config.h operand.h\
- param.h task.h eparam.h
-
-- eparam.c <libc/stdio.h> <libc/libc.h> <libc/error.h>\
-- <libc/ctype.h> <libc/ttset.h> <libc/fset.h>\
-+ eparam.c <libc/iraf/stdio.h> <libc/libc.h> <libc/error.h>\
-+ <libc/iraf/ctype.h> <libc/ttset.h> <libc/fset.h>\
- <libc/spp.h> config.h mem.h operand.h\
- errs.h param.h grammar.h task.h eparam.h
-
- errs.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
-- <libc/stdio.h> <libc/setjmp.h> <libc/knames.h>\
-+ <libc/iraf/stdio.h> <libc/knames.h>\
- <libc/xnames.h> clmodes.h\
- config.h operand.h param.h task.h mem.h errs.h\
- grammar.h construct.h
-
-- exec.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ exec.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- <libc/xwhen.h> clmodes.h config.h mem.h\
- opcodes.h operand.h param.h task.h errs.h\
- grammar.h
-
-- gquery.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ gquery.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h grammar.h\
- task.h clmodes.h
-
-- gram.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ gram.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- clmodes.h operand.h mem.h grammar.h\
- opcodes.h config.h param.h task.h errs.h construct.h\
- ytab.h
-
-- history.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-- <libc/fset.h> <libc/ctype.h> config.h errs.h\
-+ history.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
-+ <libc/fset.h> <libc/iraf/ctype.h> config.h errs.h\
- mem.h operand.h param.h task.h clmodes.h grammar.h
-
-- lists.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ lists.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h mem.h operand.h param.h\
- task.h errs.h
-
- main.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
-- <libc/main.h> <libc/stdio.h> <libc/error.h>\
-- <libc/setjmp.h> <libc/knames.h> <libc/prtype.h>\
-+ <libc/main.h> <libc/iraf/stdio.h> <libc/error.h>\
-+ <libc/knames.h> <libc/prtype.h>\
- <libc/xwhen.h> <libc/xnames.h> grammar.h\
- opcodes.h operand.h param.h config.h clmodes.h task.h\
- errs.h mem.h
-
- modes.c <libc/spp.h> <libc/libc.h>\
-- <libc/stdio.h> <libc/ctype.h> clmodes.h\
-+ <libc/iraf/stdio.h> <libc/iraf/ctype.h> clmodes.h\
- config.h construct.h operand.h param.h grammar.h\
- mem.h task.h errs.h
-
-- operand.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ operand.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- errs.h config.h operand.h param.h grammar.h\
- mem.h task.h construct.h eparam.h
-
-- param.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ param.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h grammar.h mem.h\
- task.h errs.h clmodes.h construct.h
-
- pfiles.c <libc/spp.h> <libc/libc.h> <libc/finfo.h>\
-- <libc/stdio.h> <libc/ctype.h> config.h\
-+ <libc/iraf/stdio.h> <libc/iraf/ctype.h> config.h\
- errs.h operand.h mem.h param.h task.h grammar.h
-
-- prcache.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ prcache.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- <libc/error.h> <libc/finfo.h> <libc/prstat.h>\
- config.h errs.h task.h
-
-- scan.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ scan.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h grammar.h\
- task.h errs.h
-
-- stack.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ stack.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- mem.h operand.h config.h param.h task.h\
- errs.h
-
-- task.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ task.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h mem.h task.h\
- errs.h clmodes.h
-
-- unop.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ unop.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- <libc/xnames.h> <libc/math.h> config.h\
- operand.h errs.h task.h param.h
-
-- ytab.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-- <libc/ctype.h> config.h mem.h operand.h\
-+ ytab.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
-+ <libc/iraf/ctype.h> config.h mem.h operand.h\
- param.h grammar.h opcodes.h clmodes.h task.h\
- construct.h errs.h lexyy.c lexicon.c
- ;
---- a/pkg/ecl/mkpkg
-+++ b/pkg/ecl/mkpkg
-@@ -62,9 +62,9 @@
- #$set xflags = "$(xflags) -x -/DYYDEBUG"
- $set xflags = "$(xflags) -x"
- $omake ecl.x
-- $omake globals.c <libc/libc.h> <libc/stdio.h> <libc/spp.h>\
-+ $omake globals.c <libc/libc.h> <libc/iraf/stdio.h> <libc/spp.h>\
- construct.h eparam.h operand.h param.h task.h
-- $omake opcodes.c <libc/libc.h> <libc/spp.h> <libc/stdio.h> config.h\
-+ $omake opcodes.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h> config.h\
- construct.h errs.h grammar.h mem.h opcodes.h operand.h\
- param.h task.h
- link:
-@@ -90,120 +90,120 @@
- $set xflags = "$(xflags) -qx"
-
- binop.c <libc/spp.h> <libc/libc.h> <libc/xnames.h>\
-- <libc/math.h> <libc/ctype.h> config.h\
-+ <libc/math.h> <libc/iraf/ctype.h> config.h\
- operand.h errs.h
-
-- bkg.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-- <libc/knames.h> <libc/xwhen.h> <libc/ctype.h>\
-+ bkg.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
-+ <libc/knames.h> <libc/xwhen.h> <libc/iraf/ctype.h>\
- clmodes.h config.h operand.h clmodes.h\
- mem.h errs.h param.h task.h
-
- builtin.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
-- <libc/error.h> <libc/ctype.h> <libc/stdio.h>\
-+ <libc/error.h> <libc/iraf/ctype.h> <libc/iraf/stdio.h>\
- <libc/alloc.h> <libc/ttset.h> clmodes.h\
- config.h mem.h operand.h param.h task.h errs.h
-
-- clprintf.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ clprintf.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h\
- task.h errs.h
-
-- clsystem.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ clsystem.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- errs.h
-
- compile.c <libc/spp.h> <libc/libc.h> config.h\
- operand.h opcodes.h mem.h errs.h
-
-- debug.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ debug.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- operand.h mem.h grammar.h opcodes.h config.h param.h\
- task.h
-
-- decl.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ decl.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- clmodes.h operand.h mem.h grammar.h opcodes.h config.h\
- param.h task.h errs.h construct.h ytab.h
-
-- edcap.c <libc/stdio.h> <libc/libc.h> <libc/ctype.h>\
-+ edcap.c <libc/iraf/stdio.h> <libc/libc.h> <libc/iraf/ctype.h>\
- <libc/fset.h> <libc/spp.h> config.h operand.h\
- param.h task.h eparam.h
-
-- eparam.c <libc/stdio.h> <libc/libc.h> <libc/error.h>\
-- <libc/ctype.h> <libc/ttset.h> <libc/fset.h>\
-+ eparam.c <libc/iraf/stdio.h> <libc/libc.h> <libc/error.h>\
-+ <libc/iraf/ctype.h> <libc/ttset.h> <libc/fset.h>\
- <libc/spp.h> config.h mem.h operand.h\
- errs.h param.h grammar.h task.h eparam.h
-
- errs.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
-- <libc/stdio.h> <libc/setjmp.h> <libc/knames.h>\
-+ <libc/iraf/stdio.h> <libc/knames.h>\
- <libc/xnames.h> clmodes.h\
- config.h operand.h param.h task.h mem.h errs.h\
- grammar.h construct.h
-
-- exec.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ exec.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- <libc/xwhen.h> clmodes.h config.h mem.h\
- opcodes.h operand.h param.h task.h errs.h\
- grammar.h
-
-- gquery.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ gquery.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h grammar.h\
- task.h clmodes.h
-
-- gram.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ gram.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- clmodes.h operand.h mem.h grammar.h\
- opcodes.h config.h param.h task.h errs.h construct.h\
- ytab.h
-
-- history.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-- <libc/fset.h> <libc/ctype.h> config.h errs.h\
-+ history.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
-+ <libc/fset.h> <libc/iraf/ctype.h> config.h errs.h\
- mem.h operand.h param.h task.h clmodes.h grammar.h
-
-- lists.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ lists.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h mem.h operand.h param.h\
- task.h errs.h
-
- main.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
-- <libc/main.h> <libc/stdio.h> <libc/error.h>\
-- <libc/setjmp.h> <libc/knames.h> <libc/prtype.h>\
-+ <libc/main.h> <libc/iraf/stdio.h> <libc/error.h>\
-+ <libc/knames.h> <libc/prtype.h>\
- <libc/xwhen.h> <libc/xnames.h> grammar.h\
- opcodes.h operand.h param.h config.h clmodes.h task.h\
- errs.h mem.h
-
- modes.c <libc/spp.h> <libc/libc.h>\
-- <libc/stdio.h> <libc/ctype.h> clmodes.h\
-+ <libc/iraf/stdio.h> <libc/iraf/ctype.h> clmodes.h\
- config.h construct.h operand.h param.h grammar.h\
- mem.h task.h errs.h
-
-- operand.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ operand.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- errs.h config.h operand.h param.h grammar.h\
- mem.h task.h construct.h eparam.h
-
-- param.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ param.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h grammar.h mem.h\
- task.h errs.h clmodes.h construct.h
-
- pfiles.c <libc/spp.h> <libc/libc.h> <libc/finfo.h>\
-- <libc/stdio.h> <libc/ctype.h> config.h\
-+ <libc/iraf/stdio.h> <libc/iraf/ctype.h> config.h\
- errs.h operand.h mem.h param.h task.h grammar.h
-
-- prcache.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ prcache.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- <libc/error.h> <libc/finfo.h> <libc/prstat.h>\
- config.h errs.h task.h
-
-- scan.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ scan.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h grammar.h\
- task.h errs.h
-
-- stack.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ stack.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- mem.h operand.h config.h param.h task.h\
- errs.h
-
-- task.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ task.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h mem.h task.h\
- errs.h clmodes.h
-
-- unop.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ unop.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- <libc/xnames.h> <libc/math.h> config.h\
- operand.h errs.h task.h param.h
-
-- ytab.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-- <libc/ctype.h> config.h mem.h operand.h\
-+ ytab.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
-+ <libc/iraf/ctype.h> config.h mem.h operand.h\
- param.h grammar.h opcodes.h clmodes.h task.h\
- construct.h errs.h lexyy.c lexicon.c
- ;
---- a/pkg/vocl/mkpkg
-+++ b/pkg/vocl/mkpkg
-@@ -62,9 +62,9 @@
- #$set xflags = "$(xflags) -x -/DYYDEBUG"
- $set xflags = "$(xflags) -x -/I../include -/I./readline/ -I./"
- $omake vocl.x
-- $omake globals.c <libc/libc.h> <libc/stdio.h> <libc/spp.h>\
-+ $omake globals.c <libc/libc.h> <libc/iraf/stdio.h> <libc/spp.h>\
- construct.h eparam.h operand.h param.h task.h
-- $omake opcodes.c <libc/libc.h> <libc/spp.h> <libc/stdio.h> config.h\
-+ $omake opcodes.c <libc/libc.h> <libc/spp.h> <libc/iraf/stdio.h> config.h\
- construct.h errs.h grammar.h mem.h opcodes.h operand.h\
- param.h task.h
- link:
-@@ -90,125 +90,125 @@
- $set xflags = "$(xflags) -x -/I../include -/I./readline/ -I./"
-
- binop.c <libc/spp.h> <libc/libc.h> <libc/xnames.h>\
-- <libc/math.h> <libc/ctype.h> config.h\
-+ <libc/math.h> <libc/iraf/ctype.h> config.h\
- operand.h errs.h
-
-- bkg.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-- <libc/knames.h> <libc/xwhen.h> <libc/ctype.h>\
-+ bkg.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
-+ <libc/knames.h> <libc/xwhen.h> <libc/iraf/ctype.h>\
- clmodes.h config.h operand.h clmodes.h\
- mem.h errs.h param.h task.h
-
- builtin.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
-- <libc/error.h> <libc/ctype.h> <libc/stdio.h>\
-+ <libc/error.h> <libc/iraf/ctype.h> <libc/iraf/stdio.h>\
- <libc/alloc.h> <libc/ttset.h> clmodes.h\
- config.h mem.h operand.h param.h task.h errs.h
-
-- clprintf.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ clprintf.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h\
- task.h errs.h
-
-- clsystem.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ clsystem.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- errs.h
-
- compile.c <libc/spp.h> <libc/libc.h> config.h\
- operand.h opcodes.h mem.h errs.h
-
-- debug.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ debug.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- operand.h mem.h grammar.h opcodes.h config.h param.h\
- task.h
-
-- decl.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ decl.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- clmodes.h operand.h mem.h grammar.h opcodes.h config.h\
- param.h task.h errs.h construct.h ytab.h
-
-- edcap.c <libc/stdio.h> <libc/libc.h> <libc/ctype.h>\
-+ edcap.c <libc/iraf/stdio.h> <libc/libc.h> <libc/iraf/ctype.h>\
- <libc/fset.h> <libc/spp.h> config.h operand.h\
- param.h task.h eparam.h
-
-- eparam.c <libc/stdio.h> <libc/libc.h> <libc/error.h>\
-- <libc/ctype.h> <libc/ttset.h> <libc/fset.h>\
-+ eparam.c <libc/iraf/stdio.h> <libc/libc.h> <libc/error.h>\
-+ <libc/iraf/ctype.h> <libc/ttset.h> <libc/fset.h>\
- <libc/spp.h> config.h mem.h operand.h\
- errs.h param.h grammar.h task.h eparam.h
-
- errs.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
-- <libc/stdio.h> <libc/setjmp.h> <libc/knames.h>\
-+ <libc/iraf/stdio.h> <libc/knames.h>\
- <libc/xnames.h> clmodes.h\
- config.h operand.h param.h task.h mem.h errs.h\
- grammar.h construct.h
-
-- exec.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ exec.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- <libc/xwhen.h> clmodes.h config.h mem.h\
- opcodes.h operand.h param.h task.h errs.h\
- grammar.h
-
-- gquery.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ gquery.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h grammar.h\
- task.h clmodes.h
-
-- gram.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ gram.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- clmodes.h operand.h mem.h grammar.h\
- opcodes.h config.h param.h task.h errs.h construct.h\
- ytab.h
-
-- history.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-- <libc/fset.h> <libc/ctype.h> config.h errs.h\
-+ history.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
-+ <libc/fset.h> <libc/iraf/ctype.h> config.h errs.h\
- mem.h operand.h param.h task.h clmodes.h grammar.h
-
-- lists.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ lists.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h mem.h operand.h param.h\
- task.h errs.h
-
- main.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
-- <libc/main.h> <libc/stdio.h> <libc/error.h>\
-- <libc/setjmp.h> <libc/knames.h> <libc/prtype.h>\
-+ <libc/main.h> <libc/iraf/stdio.h> <libc/error.h>\
-+ <libc/knames.h> <libc/prtype.h>\
- <libc/xwhen.h> <libc/xnames.h> grammar.h\
- opcodes.h operand.h param.h config.h clmodes.h task.h\
- errs.h mem.h
-
- modes.c <libc/spp.h> <libc/libc.h>\
-- <libc/stdio.h> <libc/ctype.h> clmodes.h\
-+ <libc/iraf/stdio.h> <libc/iraf/ctype.h> clmodes.h\
- config.h construct.h operand.h param.h grammar.h\
- mem.h task.h errs.h
-
-- multop.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ multop.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- clmodes.h operand.h mem.h grammar.h\
- opcodes.h config.h param.h task.h errs.h construct.h\
- ytab.h
-
-- operand.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ operand.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- errs.h config.h operand.h param.h grammar.h\
- mem.h task.h construct.h eparam.h
-
-- param.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ param.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h grammar.h mem.h\
- task.h errs.h clmodes.h construct.h
-
- pfiles.c <libc/spp.h> <libc/libc.h> <libc/finfo.h>\
-- <libc/stdio.h> <libc/ctype.h> config.h\
-+ <libc/iraf/stdio.h> <libc/iraf/ctype.h> config.h\
- errs.h operand.h mem.h param.h task.h grammar.h
-
-- prcache.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ prcache.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- <libc/error.h> <libc/finfo.h> <libc/prstat.h>\
- config.h errs.h task.h
-
-- scan.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ scan.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h grammar.h\
- task.h errs.h
-
-- stack.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ stack.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- mem.h operand.h config.h param.h task.h\
- errs.h
-
-- task.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ task.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- config.h operand.h param.h mem.h task.h\
- errs.h clmodes.h
-
-- unop.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-+ unop.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
- <libc/xnames.h> <libc/math.h> config.h\
- operand.h errs.h task.h param.h
-
-- ytab.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
-- <libc/ctype.h> config.h mem.h operand.h\
-+ ytab.c <libc/spp.h> <libc/libc.h> <libc/iraf/stdio.h>\
-+ <libc/iraf/ctype.h> config.h mem.h operand.h\
- param.h grammar.h opcodes.h clmodes.h task.h\
- construct.h errs.h lexyy.c lexicon.c
-
diff --git a/debian/patches/link_executables.patch b/debian/patches/link_executables.patch
deleted file mode 100644
index bdbf9e7..0000000
--- a/debian/patches/link_executables.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/unix/mkpkg.sh
-+++ b/unix/mkpkg.sh
-@@ -22,3 +22,8 @@
- # Install the newly created executables.
- echo "install HSI executables in $host/bin.$MACH"
- mv -f hlib/*.e bin.$MACH
-+cd bin.$MACH
-+for i in *.e
-+do ln -sf $i ${i%.*}
-+done
-+cd ..
diff --git a/debian/patches/mksys.patch b/debian/patches/mksys.patch
deleted file mode 100644
index 0866f80..0000000
--- a/debian/patches/mksys.patch
+++ /dev/null
@@ -1,92 +0,0 @@
---- a/unix/gdev/sgidev/mkpkg.sh
-+++ b/unix/gdev/sgidev/mkpkg.sh
-@@ -1,7 +1,7 @@
- # Make the SGI translators and install them in hlib.
-
- $CC -c $HSI_CF sgidispatch.c
--$CC $HSI_LF sgidispatch.o ../../hlib/libos.a $HSI_LIBS -o sgidispatch.e
-+$CC $HSI_LF sgidispatch.o $HSI_LIBS -o sgidispatch.e
- mv -f sgidispatch.e ../../hlib
- rm sgidispatch.o
-
---- /dev/null
-+++ b/util/mksysnovos
-@@ -0,0 +1,34 @@
-+#!/bin/csh -f
-+#
-+
-+if (! $?iraf) then
-+ #echo ""
-+ #echo "Error: You must have the iraf env variable defined !"
-+ #echo ""
-+ #exit 1
-+
-+ set iraf = $cwd/
-+endif
-+
-+
-+set c_start = `date`
-+/bin/rm -f spool */spool
-+
-+
-+#$iraf/util/mkclean # clean old binaries
-+
-+echo "=== NOVOS bootstrap ==="
-+cd $iraf/unix # NOVOS bootstrap
-+source hlib/irafuser.csh
-+sh -x mkpkg.sh |& tee -a spool
-+
-+echo "=== NOVOS build ==="
-+cd $iraf/sys # build NOVOS
-+mkpkg |& tee -a spool
-+set c_end = `date`
-+
-+echo ""
-+echo ""
-+echo ""
-+echo "Start: $c_start"
-+echo " End: $c_end"
---- /dev/null
-+++ b/util/mksysvos
-@@ -0,0 +1,41 @@
-+#!/bin/csh -f
-+#
-+
-+if (! $?iraf) then
-+ #echo ""
-+ #echo "Error: You must have the iraf env variable defined !"
-+ #echo ""
-+ #exit 1
-+
-+ set iraf = $cwd/
-+endif
-+
-+
-+set c_start = `date`
-+/bin/rm -f spool */spool
-+
-+
-+#$iraf/util/mkclean # clean old binaries
-+
-+echo "=== VOS bootstrap ==="
-+cd $iraf/unix # VOS bootstrap
-+source hlib/irafuser.csh
-+sh -x mkpkg.sh |& tee -a spool
-+
-+echo "=== VOS core ==="
-+cd $iraf/ # build core system
-+mkpkg |& tee -a spool
-+
-+echo "=== NOAO ==="
-+cd $iraf/noao # build NOAO package
-+setenv noao $cwd/
-+mkpkg -p noao |& tee -a spool
-+
-+set c_end = `date`
-+
-+
-+echo ""
-+echo ""
-+echo ""
-+echo "Start: $c_start"
-+echo " End: $c_end"
diff --git a/debian/patches/series b/debian/patches/series
index 0c4c057..bb7b43c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,15 +1,4 @@
-mksys.patch
-irafuser_csh.patch
-libc.patch
-xc.patch
-voclient.patch
-shared-readline.patch
-shared-xmlrpc.patch
-fhs.patch
-link_executables.patch
-fix_fncache.patch
-fortran.patch
-unop_int.patch
-compiler-flags.patch
-fix_compiler_errors.patch
-add_other_archs.patch
+Use-system-libraries-when-possible.patch
+Make-the-installation-FHS-and-Free-Desktop-conform.patch
+Allow-in-build-path.patch
+Fix-f77-script.patch
diff --git a/debian/patches/shared-readline.patch b/debian/patches/shared-readline.patch
deleted file mode 100644
index 69632d1..0000000
--- a/debian/patches/shared-readline.patch
+++ /dev/null
@@ -1,152 +0,0 @@
---- a/pkg/ecl/mkpkg
-+++ b/pkg/ecl/mkpkg
-@@ -6,9 +6,10 @@
- update: # make ecl.e and install in bin$
- $ifeq (MACH, sparc) then
- $set XFLAGS = "$(XFLAGS) -/DNO_READLINE"
-- $else
-+ $else $ifneq (MACH, linux, linux64) then
- $call libs at readline
- $endif
-+ $endif
- $call relink
- $call install
- ;
-@@ -26,7 +27,7 @@
- $endif
- $ifolder (ytab.c, grammar.y)
- $echo "rebuilding ytab.c"
-- $ifeq (MACH, linux, redhat, suse)
-+ $ifeq (MACH, linux, linux64, redhat, suse)
- !yacc -vd grammar.y;
- !egrep -v "\<stdlib.h\>" y.tab.c > ytab.c;
- !egrep -v "\<stdio.h\>" ytab.c > ntab.c; mv ntab.c ytab.c
-@@ -53,8 +54,9 @@
-
- $ifeq (MACH, sparc) then
- $set XFLAGS = "$(XFLAGS) -/DNO_READLINE"
-- $else
-+ $else $ifneq (MACH, linux, linux64) then
- $call libs at readline
-+ $endif
- $endif
-
- $update libpkg.a
-@@ -71,10 +73,13 @@
- $set LIBS = "-lc -lcur -lds -lstg"
- $ifneq (MACH, sparc) then
- $ifeq (MACH, linux) then
-- $set LIBS2 = "libreadline.a -/L/usr/lib32 -lncurses"
-- $else
-+ $set LIBS2 = "-lreadline -/L/usr/lib32 -lncurses"
-+ $else $ifeq (MACH, linux64) then
-+ $set LIBS2 = "-lreadline -lncurses"
-+ $else
- $set LIBS2 = "libreadline.a -lncurses"
- $endif
-+ $endif
- $else
- $set LIBS2 = ""
- $endif
---- a/pkg/vocl/mkpkg
-+++ b/pkg/vocl/mkpkg
-@@ -6,9 +6,10 @@
- update: # make vocl.e and install in bin$
- $ifeq (MACH, sparc) then
- $set XFLAGS = "$(XFLAGS) -/DNO_READLINE"
-- $else
-+ $else $ifneq (MACH, linux, linux64) then
- $call libs at readline
- $endif
-+ $endif
- $call relink
- $call install
- ;
-@@ -26,7 +27,7 @@
- $endif
- $ifolder (ytab.c, grammar.y)
- $echo "rebuilding ytab.c"
-- $ifeq (MACH, linux, redhat, suse)
-+ $ifeq (MACH, linux, linux64, redhat, suse)
- !yacc -vd grammar.y;
- !egrep -v "\<stdlib.h\>" y.tab.c > ytab.c;
- !egrep -v "\<stdio.h\>" ytab.c > ntab.c; mv ntab.c ytab.c
-@@ -53,8 +54,9 @@
-
- $ifeq (MACH, sparc) then
- $set XFLAGS = "$(XFLAGS) -/DNO_READLINE"
-- $else
-+ $else $ifneq (MACH, linux, linux64) then
- $call libs at readline
-+ $endif
- $endif
-
- $update libpkg.a
-@@ -71,10 +73,13 @@
- $set LIBS = "-lc -lcur -lds -lstg"
- $ifneq (MACH, sparc) then
- $ifeq (MACH, linux) then
-- $set LIBS2 = "libreadline.a -/L/usr/lib32 -lncurses"
-- $else
-+ $set LIBS2 = "-lreadline -/L/usr/lib32 -lncurses"
-+ $else $ifeq (MACH, linux64) then
-+ $set LIBS2 = "-lreadline -lncurses"
-+ $else
- $set LIBS2 = "libreadline.a -lncurses"
- $endif
-+ $endif
- $else
- $set LIBS2 = ""
- $endif
---- a/vendor/voclient/common/mklibs
-+++ b/vendor/voclient/common/mklibs
-@@ -7,7 +7,7 @@
- setenv CC "gcc"
- setenv CXX "g++"
-
--set build_curl = 1
-+set build_curl = 0
-
-
-
---- a/pkg/vocl/samp.c
-+++ b/pkg/vocl/samp.c
-@@ -20,7 +20,7 @@
- #define import_xwhen
- #include <iraf.h>
-
--#include "readline.h" /* to install rl_event_hook */
-+extern int (*rl_event_hook)(void);
- #include "config.h" /* CL declarations */
- #include "clmodes.h"
- #include "operand.h"
---- a/pkg/vocl/sampCmd.c
-+++ b/pkg/vocl/sampCmd.c
-@@ -18,7 +18,6 @@
- #define import_stdio
- #include <iraf.h>
-
--#include "readline.h" /* to install rl_event_hook */
- #include "config.h" /* CL declarations */
- #include "operand.h"
- #include "task.h"
---- a/pkg/vocl/sampFuncs.c
-+++ b/pkg/vocl/sampFuncs.c
-@@ -20,7 +20,6 @@
- #define import_xwhen
- #include <iraf.h>
-
--#include "readline.h" /* to install rl_event_hook */
- #include "config.h" /* CL declarations */
- #include "clmodes.h"
- #include "operand.h"
---- a/pkg/vocl/sampHandlers.c
-+++ b/pkg/vocl/sampHandlers.c
-@@ -18,7 +18,6 @@
- #define import_xwhen
- #include <iraf.h>
-
--#include "readline.h" /* to install rl_event_hook */
- #include "config.h" /* CL declarations */
- #include "clmodes.h"
- #include "operand.h"
diff --git a/debian/patches/shared-xmlrpc.patch b/debian/patches/shared-xmlrpc.patch
deleted file mode 100644
index eda27a7..0000000
--- a/debian/patches/shared-xmlrpc.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Use shared libxmlrpc, and wprkaround missing xmlrpc_refcount()
---- a/vendor/voclient/libsamp/Makefile
-+++ b/vendor/voclient/libsamp/Makefile
-@@ -35,7 +35,7 @@
- CARCH = -arch i386 -arch ppc -m32 -mmacosx-version-min=10.4
- endif
- else
-- CLIBS = -lm -lc -lpthread -lcurl
-+ CLIBS = -lm -lc -lpthread -lcurl -lxmlrpc -lxmlrpc_server_abyss
- CARCH = -D$(PLATFORM)
- endif
-
---- a/vendor/voclient/libsamp/libxrpc/mklibs
-+++ b/vendor/voclient/libsamp/libxrpc/mklibs
-@@ -7,7 +7,7 @@
- setenv CXX "g++"
-
- set build_curl = 0
--set build_xmlrpc = 1
-+set build_xmlrpc = 0
-
-
-
---- a/vendor/voclient/libsamp/libxrpc/xrClient.c
-+++ b/vendor/voclient/libsamp/libxrpc/xrClient.c
-@@ -857,8 +857,6 @@
- xr_freeParam (int cnum)
- {
- ClientP client = &clientArray[cnum];
-- int refcount = 0;
-- extern int xmlrpc_refcount();
-
- assert (cnum < MAX_CLIENTS); /* validate the client number */
-
-@@ -873,14 +871,13 @@
- xmlrpc_DECREF (v);
- }
- */
-- refcount = xmlrpc_refcount (client->param) - 1;
- xmlrpc_DECREF (client->param);
- #ifdef CLEAN_ENV
- xmlrpc_env_clean(&client->env);
- #endif
- }
-
-- if (refcount == 0)
-+ if (xmlrpc_value_type(client->result) == XMLRPC_TYPE_DEAD)
- client->param = (xmlrpc_value *) NULL;
- }
-
-@@ -892,8 +889,6 @@
- xr_freeResult (int cnum)
- {
- ClientP client = &clientArray[cnum];
-- int refcount = 0;
-- extern int xmlrpc_refcount();
-
- assert (cnum < MAX_CLIENTS); /* validate the client number */
-
-@@ -908,15 +903,14 @@
- xmlrpc_DECREF (v);
- }
- */
-- refcount = xmlrpc_refcount (client->result) - 1;
-- if (refcount)
-+ if (xmlrpc_value_type(client->result) != XMLRPC_TYPE_DEAD)
- xmlrpc_DECREF (client->result);
- #ifdef CLEAN_ENV
- xmlrpc_env_clean(&client->env);
- #endif
- }
-
-- if (refcount == 0)
-+ if (xmlrpc_value_type(client->result) == XMLRPC_TYPE_DEAD)
- client->result = (xmlrpc_value *) NULL;
- }
-
diff --git a/debian/patches/unop_int.patch b/debian/patches/unop_int.patch
deleted file mode 100644
index 256a15b..0000000
--- a/debian/patches/unop_int.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/pkg/cl/unop.c
-+++ b/pkg/cl/unop.c
-@@ -260,7 +260,7 @@
- break;
- case OP_NINT:
- if (in_type == OT_REAL)
-- iresult = nint (rval);
-+ iresult = (int)(rval + 0.5);
- else
- iresult = ival;
- break;
---- a/pkg/ecl/unop.c
-+++ b/pkg/ecl/unop.c
-@@ -294,7 +294,7 @@
- break;
- case OP_NINT:
- if (in_type == OT_REAL)
-- iresult = nint (rval);
-+ iresult = (int)(rval + 0.5);
- else
- iresult = ival;
- break;
---- a/pkg/vocl/unop.c
-+++ b/pkg/vocl/unop.c
-@@ -294,7 +294,7 @@
- break;
- case OP_NINT:
- if (in_type == OT_REAL)
-- iresult = nint (rval);
-+ iresult = (int)(rval + 0.5);
- else
- iresult = ival;
- break;
diff --git a/debian/patches/voclient.patch b/debian/patches/voclient.patch
deleted file mode 100644
index f0c193a..0000000
--- a/debian/patches/voclient.patch
+++ /dev/null
@@ -1,290 +0,0 @@
---- a/vendor/voclient/Makefile
-+++ b/vendor/voclient/Makefile
-@@ -37,50 +37,57 @@
-
-
- all:
-- (cd common ; make all ; make install)
-- (cd libvotable ; make all ; make install)
-- (cd libsamp ; make all ; make install)
-- (cd libvoclient ; make all ; make install)
-- (cd voapps ; make all ; make install)
-- (cd libvo ; make all ; make install)
-+ (cd common ; ${MAKE} all ; ${MAKE} install)
-+ (cd libvotable ; ${MAKE} all ; ${MAKE} install)
-+ (cd libsamp ; ${MAKE} all ; ${MAKE} install)
-+ (cd libvoclient ; ${MAKE} all ; ${MAKE} install)
-+ (cd voapps ; ${MAKE} all ; ${MAKE} install)
-+ (cd libvo ; ${MAKE} all ; ${MAKE} install)
-
- libs:
-- (cd common ; make libs)
-- (cd libvotable ; make libs)
-- (cd libsamp ; make libs)
-- (cd libvoclient ; make libs)
-- (cd voapps ; make libs)
-- (cd libvo ; make libs)
-+
-+mylib:
-+# (cd common ; ${MAKE} )
-+ mkdir -p include lib
-+ mkdir -p libsamp/libxrpc/lib/build
-+ (cd libsamp ; ${MAKE} .BASE lib ; cp *.h ../include ; cp *.a ../lib )
-+ (cd libvoclient ; ${MAKE} install )
-+ cp libsamp/cfitsio/*.h include
-+ (cd libvotable ; ${MAKE} install)
-+ (cd voapps ; ${MAKE} lib ; cp *.a ../lib )
-+ (rm -f *.o ; cd libvo ; ${MAKE} HOST_CURL=1 lib)
-
- apps:
-- (cd common ; make apps)
-- (cd libvotable ; make apps)
-- (cd libsamp ; make apps)
-- (cd libvoclient ; make apps)
-- (cd voapps ; make apps)
-+ (cd common ; ${MAKE} apps)
-+ (cd libvotable ; ${MAKE} apps)
-+ (cd libsamp ; ${MAKE} apps)
-+ (cd libvoclient ; ${MAKE} apps)
-+ (cd voapps ; ${MAKE} apps)
-
- examples:
-- (cd common ; make examples)
-- (cd libvotable ; make examples)
-- (cd libsamp ; make examples)
-- (cd libvoclient ; make examples)
-- (cd voapps ; make examples)
-+ (cd common ; ${MAKE} examples)
-+ (cd libvotable ; ${MAKE} examples)
-+ (cd libsamp ; ${MAKE} examples)
-+ (cd libvoclient ; ${MAKE} examples)
-+ (cd voapps ; ${MAKE} examples)
-
- install:
-- (cd common ; make install)
-- (cd libvotable ; make install)
-- (cd libsamp ; make install)
-- (cd libvoclient ; make install)
-- (cd voapps ; make install)
-- (cd libvo ; make install)
-+ (cd common ; ${MAKE} install)
-+ (cd libvotable ; ${MAKE} install)
-+ (cd libsamp ; ${MAKE} install)
-+ (cd libvoclient ; ${MAKE} install)
-+ (cd voapps ; ${MAKE} install)
-+ (cd libvo ; ${MAKE} install)
-
- clean:
-- (cd common ; make clean)
-- (cd libvotable ; make clean)
-- (cd libsamp ; make clean)
-- (cd libvoclient ; make clean)
-- (cd voapps ; make clean)
-- (cd libvo ; make clean)
-+ifndef HOST_CURL
-+ (cd common ; ${MAKE} clean)
-+endif
-+ (cd libvotable ; ${MAKE} clean)
-+ (cd libsamp ; ${MAKE} clean)
-+ (cd libvoclient ; ${MAKE} clean)
-+ (cd voapps ; ${MAKE} clean)
-+ (cd libvo ; ${MAKE} clean)
- /bin/rm -rf voclient/lib/libvoclient.*
- /bin/rm -rf bin/* lib/* include/* spool
-
---- a/vendor/voclient/common/Makefile
-+++ b/vendor/voclient/common/Makefile
-@@ -38,28 +38,28 @@
-
- libs::
- (/bin/csh -f mklibs)
-- (cd expat ; ./configure --prefix=${HERE}/../; \ make ; make installlib)
-+ (cd expat ; ./configure --prefix=${HERE}/.. ; $(MAKE) ; $(MAKE) installlib)
-
- curl::
- (/bin/csh -f mklibs)
-
- expat::
-- (cd expat ; ./configure --prefix=${HERE}/../; \ make ; make installlib)
-+ (cd expat ; ./configure --prefix=${HERE}/.. ; $(MAKE) ; $(MAKE) installlib)
-
- apps:
-
- install:
-- (cd curl ; make install)
-- #(cd expat ; make install)
-+ (cd curl ; $(MAKE) install)
-+ #(cd expat ; $(MAKE) install)
- (/bin/rm -rf ../man ../share)
-
- clean:
-- (cd curl ; make clean)
-- (cd expat ; make clean)
-+ (cd curl ; $(MAKE) clean)
-+ (cd expat ; $(MAKE) clean)
-
- distclean:
-- (cd curl ; make distclean)
-- (cd expat ; make distclean)
-+ (cd curl ; $(MAKE) distclean)
-+ (cd expat ; $(MAKE) distclean)
-
-
-
---- a/vendor/voclient/libsamp/Makefile
-+++ b/vendor/voclient/libsamp/Makefile
-@@ -26,7 +26,7 @@
-
- # includes, flags and libraries
- CC = gcc
--CINCS = -I$(INCDIR) -I.
-+CINCS = -I$(INCDIR) -I. -Ilibxrpc/include -Ilibxrpc
-
- ifeq ("$(PLATFORM)", "Darwin")
- ifeq ("$(PLMACH)", "macintel")
-@@ -71,8 +71,8 @@
- /bin/rm -f *.o *.a *.e *.so .BASE $(APPS)
- (cd examples ; make clean)
- (cd libxrpc ; make clean)
-- (cd cfitsio ; make clean)
- /bin/rm -rf libxrpc/lib/build/* libxrpc/lib/*.dylib
-+ (cd cfitsio ; make clean)
- /bin/rm -f SWIG* libvot* php_libvot.h
- /bin/rm -f sampJava.[co]
- /bin/rm -f sampPerl.[co]
---- a/vendor/voclient/libvo/Makefile
-+++ b/vendor/voclient/libvo/Makefile
-@@ -70,11 +70,14 @@
- ####################################
-
- lib: objs $(INCS)
-+ rm -f *.o
- ar x ../lib/libsamp.a
- ar x ../lib/libVOTable.a
- ar x ../lib/libVOClient.a
- ar x ../lib/libVOApps.a
-+ifndef HOST_CURL
- ar x ../lib/libcurl.a
-+endif
- chmod 644 *.o
- ar rv libVO.a *.o
- /bin/rm -f *.o __*
---- a/vendor/voclient/libvotable/Makefile
-+++ b/vendor/voclient/libvotable/Makefile
-@@ -15,7 +15,6 @@
- LIBDIR := ../lib/
- INCDIR := ../include/
-
--
- # secondary dependencies
-
- LIBBASE = lib$(NAME)
-@@ -48,9 +47,11 @@
- votExpatCB.o votElement.o votAttr.o votStack.o votHandle.o
- INCS = votParse.h
-
-+ifneq ($(NOVOS),1)
- SPP_SRCS = votUtil_spp.x
- SPP_OBJS = votUtil_spp.o
- SPP_INCS = votParse_spp.h
-+endif
-
- INCS_PRIV = votParseP.h
- LIBS = lib$(NAME).a
-@@ -92,7 +93,9 @@
- ####################################
-
- .BASE:
-+ifndef HOST_EXPAT
- (./mkbase $(HERE)/lib$(NAME).a)
-+endif
- touch .BASE
-
- lib: objs
-@@ -105,7 +108,7 @@
- ###############################################################################
-
- votUtil_spp.o: votUtil_spp.x votParse_spp.h
-- xc -c votUtil_spp.x
-+ xc -I${host}f2c/libf2c -c votUtil_spp.x
-
-
- ###############################################################################
---- a/vendor/voclient/libvotable/votParse.c
-+++ b/vendor/voclient/libvotable/votParse.c
-@@ -18,7 +18,6 @@
- #include <sys/stat.h>
-
- #include <curl/curl.h>
--#include <curl/types.h>
- #include <curl/easy.h>
-
- #include "votParseP.h"
---- a/vendor/voclient/voapps/voInv.c
-+++ b/vendor/voclient/voapps/voInv.c
-@@ -14,7 +14,6 @@
-
- #ifdef VO_INVENTORY
- #include <curl/curl.h>
--#include <curl/types.h>
- #include <curl/easy.h>
- #include "VOClient.h"
- #include "voAppsP.h"
---- a/vendor/voclient/voapps/votget.c
-+++ b/vendor/voclient/voapps/votget.c
-@@ -52,7 +52,6 @@
- #include <pthread.h>
-
- #include <curl/curl.h>
--#include <curl/types.h>
- #include <curl/easy.h>
-
- #include "votParse.h"
---- a/vendor/voclient/libsamp/libxrpc/Makefile
-+++ b/vendor/voclient/libsamp/libxrpc/Makefile
-@@ -50,7 +50,7 @@
-
- install: xrpc
- (cp libxrpc.a ../libsamp.a)
-- cp -rp $(INCS) ./include/* ../../include
-+ cp -rp $(INCS) ./include/x* ../../include
-
- World:
- everything:
-@@ -70,7 +70,7 @@
- cp $(OBJS) lib/build/
- /usr/bin/ar rv libxrpc.a $?
- (cp libxrpc.a ../libsamp.a)
-- cp -rp $(INCS) ./include/* ../../include
-+ cp -rp $(INCS) ./include/x* ../../include
-
- %.o: %.c $(INCS)
- /usr/bin/gcc -Wall $(CINCS) $(CFLAGS) -c $< -o $@
---- a/vendor/voclient/libsamp/libxrpc/mkclean
-+++ b/vendor/voclient/libsamp/libxrpc/mkclean
-@@ -8,25 +8,6 @@
- /bin/rm -f */_spool >& /dev/null
-
-
--echo -n " Cleaning CURL libs ...."
--foreach i (curl-*)
-- (chdir $i ; \
-- find . -name .libs -exec /bin/rm -rf {} \; >& /dev/null ; \
-- find . -name .deps -exec /bin/rm -rf {} \; >& /dev/null ; \
-- find . -name curl.list -exec rm -rf {} \; >& /dev/null ; \
-- find . -name Makefile -exec rm -rf {} \; >& /dev/null ; \
-- find . -name libcurl.la -exec rm -rf {} \; >& /dev/null ; \
-- /bin/rm -f config.status curl-config libcurl.pc ;\
-- make clean maintainer-clean-am >>& _spool )
--end
--echo "done"
--
--echo -n " Cleaning XMLRPC-C libs ...."
--foreach i (xmlrpc-c-1*)
-- (chdir $i ; make clean distclean >>& _spool )
--end
--echo "done"
--
- # Real clean
- find . -name \*.a -print -exec /bin/rm -f {} \; >& /dev/null
- find . -name \*.o -print -exec /bin/rm -f {} \; >& /dev/null
diff --git a/debian/patches/vodata.patch b/debian/patches/vodata.patch
deleted file mode 100644
index bdb1996..0000000
--- a/debian/patches/vodata.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/vo/votools/t_vodata.x
-+++ b/vo/votools/t_vodata.x
-@@ -308,7 +308,7 @@
- int i, j, ip, sfd, nch, nfound, nrows, ncols, stat
-
- int access(), stridx(), strldx(), getline(), open(), ctoi()
--int vot_convert(), vod_tinfo()
-+int vot_convert()
- bool streq()
-
- begin
diff --git a/debian/patches/xc.patch b/debian/patches/xc.patch
deleted file mode 100644
index dac5cea..0000000
--- a/debian/patches/xc.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Author: Joseph Wang <joequant at gmail.com>
-Description: Link xc to the needed shared libs, and adjust compile flags
---- a/unix/boot/spp/xc.c
-+++ b/unix/boot/spp/xc.c
-@@ -67,7 +67,11 @@
- #define IRAFLIB3 "libvops.a"
- #define IRAFLIB4 "libos.a"
- #define IRAFLIB5 "libVO.a"
-+#ifndef HOST_CFITSIO
- #define IRAFLIB6 "libcfitsio.a"
-+#else
-+#define IRAFLIB6 "-lcfitsio"
-+#endif
-
- #ifdef LINUX
- char *fortlib[] = { "-lf2c", /* 0 (host progs) */
-@@ -1213,6 +1217,18 @@
- arglist[nargs++] = mkfname (IRAFLIB6);
- }
- }
-+#ifdef HOST_CURL
-+ arglist[nargs++] = "-lcurl";
-+#endif
-+#ifdef HOST_EXPAT
-+ arglist[nargs++] = "-lexpat";
-+#endif
-+ arglist[nargs++] = "-lxmlrpc";
-+ arglist[nargs++] = "-lxmlrpc_util";
-+ arglist[nargs++] = "-lxmlrpc_client";
-+ arglist[nargs++] = "-lxmlrpc_server";
-+ arglist[nargs++] = "-lxmlrpc_abyss";
-+ arglist[nargs++] = "-lxmlrpc_server_abyss";
-
- /* Host libraries, searched after iraf libraries. */
- for (i=0; i < nhlibs; i++)
-@@ -1360,6 +1376,7 @@
- link_static = 1;
- } else if (strcmp (lflag, F_SHARED) == 0) {
- link_static = 0;
-+#ifndef HOST_F2C
- #if defined(LINUX) || defined(BSD) || defined(X86) || defined(MACOSX)
- } else if ((strcmp (lflag, "-lf2c") == 0) ||
- (strcmp (lflag, "-lcompat") == 0)) {
-@@ -1369,8 +1386,10 @@
- arglist[nargs++] = mkfname (lflag);
- *p_nargs = nargs;
- return (1);
-- }
- #endif
-+#endif
-+ }
-+
- #ifdef SOLARIS
- else if (strcmp (lflag, "-ldl") == 0) {
- /* This beastie has to be linked dynamic on Solaris, but
---- a/unix/hlib/mkpkg.inc
-+++ b/unix/hlib/mkpkg.inc
-@@ -7,17 +7,17 @@
- $set SITEID = noao # site name
-
- $ifeq (MACH, freebsd) then
--$set XFLAGS = "-c -w -/m32" # default XC compile flags
--$set XVFLAGS = "-c -w" -/m32 # VOPS XC compile flags
--$set LFLAGS = "-z -/static -/m32" # default XC link flags
-+$set XFLAGS = "-c -w" # default XC compile flags
-+$set XVFLAGS = "-c -w" # VOPS XC compile flags
-+$set LFLAGS = "-z -/static" # default XC link flags
- $else $ifeq (MACH, linux) then
- $set XFLAGS = "-c -w" # default XC compile flags
- $set XVFLAGS = "-c -w" # VOPS XC compile flags
- $set LFLAGS = "-Nz" # default XC link flags
- $else $ifeq (MACH, linux64) then
--$set XFLAGS = "-c -w -/g -/m64" # default XC compile flags
--$set XVFLAGS = "-c -w -/g -/m64" # VOPS XC compile flags
--$set LFLAGS = "-Nz -/g -/m64" # default XC link flags
-+$set XFLAGS = "-c -w" # default XC compile flags
-+$set XVFLAGS = "-c -w" # VOPS XC compile flags
-+$set LFLAGS = "-Nz" # default XC link flags
- $else $ifeq (MACH, redhat) then
- $set XFLAGS = "-c -w" # default XC compile flags
- $set XVFLAGS = "-c -w" # VOPS XC compile flags
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/iraf.git
More information about the Debian-astro-commits
mailing list