Re: Revised IRAF RPM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joseph and all,

Joseph Wang <joequant@xxxxxxxxx> writes:
> At https://dl.dropboxusercontent.com/u/1025783/iraf-2.16-3test.src.rpm

I used this as a base to get IRAF compiled. Although I did this under
Debian, I'd like to share the experiences here:

* Removing pkg/vocl/readline/ leaves vocl uncompilable. To fix this,
apply shared-readline.patch.

* Newer xmlrpc don't have a function xmlrpc_refcount(), which breaks
vendor/voclient/libsamp/librxpc compilation. shared-xmlrpc.patch fixes this.

* VO is not build. This is fixed with the build-vo.patch.

* I patched the build system to consequently use CC and CFLAGS.
  This is done with compiler-flags.patch. This allows to propagate
  the default flags set by the build system. Debian likes some
  hardening flags here, and takes some warnings as errors. The fixes
  for these errors are in fix_compiler_errors.patch.

* Moving the libc header files caused some dependency warnings. They
  are fixed with the fix-libc-deps.patch.

So far, IRAF compiles without errors. For the setup, I have set the
$iraf variable to /usr/share/iraf/. This leads to the problem that the
executables are not found since they are searched in the same directory.
The patch fhs.patch fixes this, together with the compliance to
freedesktop.org that I already mentioned.

So far, I can start cl, ecl, and vocl and do some of the tests in the
"Preliminary Test Procedure for IRAF" from 1997. Due to the lack of
xgterm, I couldn' test the graphical output (ds9 works, however).

What doesn't work is imcopy. Repeatedly running "imcopy dev$pix
image.short" results in

ecl> imcopy dev$pix image.short
dev$pix -> image.short
ERROR: No write permission on file (String_File)
ecl> imcopy dev$pix image.short
dev$pix -> image.short
ERROR: FXF: EOF encountered while reading FITS file (image.short)

A file "image.short.fits" is created, however it is an invalid fits file.

Can you check whether this works on Fedora, or with a binary
installation of IRAF?

Best regards

Ole

P.S. My git Repository can be found at
<http://anonscm.debian.org/gitweb/?p=debian-science/packages/iraf.git>
The Patches are in the subdir debian/patches/.
--- 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"
--- 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;
 }
 
--- a/util/mksysvos
+++ b/util/mksysvos
@@ -31,6 +31,12 @@
 setenv noao $cwd/
 mkpkg -p noao |& tee -a spool
 
+echo "=== VO ==="
+cd $iraf/vo				# build VO package
+setenv vo $cwd/
+cd votools				# build VOTOOLS package
+mkpkg -p vo update
+
 set  c_end	= `date`
 
 
Author: Ole Streicher <debian@xxxxxxxxxxxx>
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_SERVICES=1 -DHAVE_UNION_SEMUN=1 -DHAVE_NET_SERVICES=1
 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,7 +17,6 @@
 
 
 # includes, flags and libraries
-CC 	  	= gcc
 CINCS  	  	= -I$(INCDIR) -I./
 ifeq  ($(PLATFORM), "Darwin")
     ifeq  ($(PLATFORM), "x86_64")
@@ -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
Author: Ole Streicher <debian@xxxxxxxxxxxx>
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
--- 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
 
Author: Ole Streicher <debian@xxxxxxxxxxxx>
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
@@ -35,7 +35,7 @@
 
 
 # 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 +47,8 @@
     setenv iraf "$d_iraf"
 endif
 
+setenv iraf_b /usr/lib/iraf/
+
 # Check for a version query.
 if ($#argv > 0) then
     if ("$argv[1]" == "-v" || "$argv[1]" == "-version" || \
@@ -65,10 +67,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 +110,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 +134,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 +149,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/"
_______________________________________________
Fedora astronomy mailing list
astronomy@xxxxxxxxxxxxxxxxxxxxxxx
http://fedoraproject.org/wiki/SIGs/Astronomy
https://admin.fedoraproject.org/mailman/listinfo/astronomy

[Index of Archives]     [Fedora Users]     [Fedora Scitech]     [ARM Kernel]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Triage]     [Coolkey]     [Yum Users]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [NASA]

  Powered by Linux