summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2002-01-09 23:04:52 +0000
committerseb <seb@pkgsrc.org>2002-01-09 23:04:52 +0000
commit76aeaddfc5a17e6fa3fa7bcc0b048c61c257d868 (patch)
tree6adf20b5c147cbab7addbcf8a141c9d94c5fa760
parentff1a9aafdd5220c051e2802011b0e886ddf52c7e (diff)
downloadpkgsrc-76aeaddfc5a17e6fa3fa7bcc0b048c61c257d868.tar.gz
Synchronize package version with reality: 3.0.3.
Regen the patches files (one file per patch). Fix for NetBSD ELF platform: files/stab-elf.c and config/untested/elf-netbsd-cc (by way of patches/patch-af) adjusted. Thanks to Nick for the helping hand and to Alistair for the previous work. This should close PR 13527. Make X11 support conditional by way if the ELK_USE_X11 variable. I tried to enable Motif support: only Motif 1.X should work but even with the lesstif12 package it does not - it does compile though. So Motif support if commented out but leaved in case someone want to fix ELK.
-rw-r--r--lang/elk/Makefile65
-rw-r--r--lang/elk/PLIST.Motif29
-rw-r--r--lang/elk/PLIST.X1130
-rw-r--r--lang/elk/PLIST.base (renamed from lang/elk/PLIST)35
-rw-r--r--lang/elk/distinfo35
-rw-r--r--lang/elk/files/stab-elf.c7
-rw-r--r--lang/elk/patches/patch-aa68
-rw-r--r--lang/elk/patches/patch-ab384
-rw-r--r--lang/elk/patches/patch-ac483
-rw-r--r--lang/elk/patches/patch-ad450
-rw-r--r--lang/elk/patches/patch-ae390
-rw-r--r--lang/elk/patches/patch-af509
-rw-r--r--lang/elk/patches/patch-ag29
-rw-r--r--lang/elk/patches/patch-ah61
-rw-r--r--lang/elk/patches/patch-ai39
-rw-r--r--lang/elk/patches/patch-aj27
-rw-r--r--lang/elk/patches/patch-ak59
-rw-r--r--lang/elk/patches/patch-al395
-rw-r--r--lang/elk/patches/patch-am23
-rw-r--r--lang/elk/patches/patch-an16
-rw-r--r--lang/elk/patches/patch-ao31
-rw-r--r--lang/elk/patches/patch-ap32
-rw-r--r--lang/elk/patches/patch-aq27
-rw-r--r--lang/elk/patches/patch-ar13
-rw-r--r--lang/elk/patches/patch-as15
-rw-r--r--lang/elk/patches/patch-at13
-rw-r--r--lang/elk/patches/patch-au21
27 files changed, 1688 insertions, 1598 deletions
diff --git a/lang/elk/Makefile b/lang/elk/Makefile
index c96c82a81ba..63dacf9c262 100644
--- a/lang/elk/Makefile
+++ b/lang/elk/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.17 2001/02/17 09:07:05 agc Exp $
+# $NetBSD: Makefile,v 1.18 2002/01/09 23:04:52 seb Exp $
# FreeBSD Id: Makefile,v 1.15 1997/09/01 12:28:30 tg Exp
#
DISTNAME= elk-3.0
-PKGNAME= elk-3.0.2
+PKGNAME= elk-3.0.3
CATEGORIES= lang
MASTER_SITES= http://www-rn.informatik.uni-bremen.de/software/elk/dist/
@@ -14,7 +14,15 @@ COMMENT= Embeddable Scheme interpreter
NOT_FOR_PLATFORM= *-*-alpha *-*-mips* #elf loading problems, LP64
ALL_TARGET= default
-USE_X11= yes
+USE_BUILDLINK_ONLY= yes
+
+.include "../../mk/bsd.prefs.mk"
+
+# Even with ../../x11/lesstif12 ELK's motif module does not seem to
+# work - it does compile though. So for now Motif support is comment out.
+#.if defined(ELK_USE_MOTIF)
+#ELK_USE_X11= # defined
+#.endif
do-configure:
${MV} ${WRKSRC}/src/stab-elf.c ${WRKSRC}/src/stab-elf.c-dist
@@ -34,4 +42,55 @@ do-configure:
done; \
${LN} -s ${WRKSRC}/config/sites/$$exetype-${LOWER_OPSYS} ${WRKSRC}/config/site
+.if defined(ELK_USE_X11)
+. include "../../mk/x11.buildlink.mk"
+ELK_SUBDIRS+= lib/xlib
+ELK_SUBDIRS+= lib/xt
+PLIST_SRC+= ${PKGDIR}/PLIST.X11
+BUILD_DEFS+= ELK_USE_X11
+X11_LDFLAGS= -L${X11BASE}/lib
+. if ${_USE_RPATH} == "yes"
+X11_LDFLAGS+=-R${X11BASE}/lib
+. endif
+MAKE_ENV+= X11_LDFLAGS="${X11_LDFLAGS}"
+
+. include "../../mk/xaw.buildlink.mk"
+ELK_SUBDIRS+= lib/xaw
+BUILD_DEFS+= XAW_TYPE
+.if ${XAW_TYPE} == "xpm"
+EVAL_PREFIX+= LIBXAW_PREFIX=Xaw-Xpm
+.elif ${XAW_TYPE} == "3d"
+EVAL_PREFIX+= LIBXAW_PREFIX=Xaw3d
+.endif
+.if defined(LIBXAW_PREFIX)
+XAW_LDFLAGS+= -L${LIBXAW_PREFIX}/lib
+. if ${_USE_RPATH} == "yes"
+XAW_LDFLAGS+= -R${LIBXAW_PREFIX}/lib
+. endif
+.endif
+XAW_LIB= ${LIBXAW:M-l*}
+MAKE_ENV+= XAW_LDFLAGS="${XAW_LDFLAGS}"
+MAKE_ENV+= XAW_LIB="${XAW_LIB}"
+.endif
+
+#.if defined(ELK_USE_MOTIF)
+#USE_MOTIF12= # defined
+#. include "../../mk/motif.buildlink.mk"
+#ELK_SUBDIRS+= lib/xm
+#ELK_SUBDIRS+= lib/xm/xt
+#PLIST_SRC+= ${PKGDIR}/PLIST.Motif
+#BUILD_DEFS+= ELK_USE_MOTIF
+#MOTIF_LDFLAGS= -L${_MOTIFBASE}/lib
+#. if ${_USE_RPATH} == "yes"
+#MOTIF_LDFLAGS+= -R${_MOTIFBASE}/lib
+#. endif
+#MAKE_ENV+= MOTIF_LDFLAGS="${MOTIF_LDFLAGS}"
+#MOTIF_LIB= ${MOTIFLIB:M-l*}
+#MAKE_ENV+= MOTIF_LIB="${MOTIF_LIB}"
+#.endif
+
+PLIST_SRC+= ${PKGDIR}/PLIST.base
+
+MAKE_ENV+= ELK_SUBDIRS="${ELK_SUBDIRS}"
+
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/elk/PLIST.Motif b/lang/elk/PLIST.Motif
new file mode 100644
index 00000000000..5a7ecabf017
--- /dev/null
+++ b/lang/elk/PLIST.Motif
@@ -0,0 +1,29 @@
+@comment $NetBSD: PLIST.Motif,v 1.1 2002/01/09 23:04:53 seb Exp $
+lib/elk/runtime/obj/xm/ALIASES
+lib/elk/runtime/obj/xm/arrow-button.o
+lib/elk/runtime/obj/xm/bulletin-brd.o
+lib/elk/runtime/obj/xm/cascade-btn.o
+lib/elk/runtime/obj/xm/command.o
+lib/elk/runtime/obj/xm/drawing-area.o
+lib/elk/runtime/obj/xm/drawn-button.o
+lib/elk/runtime/obj/xm/file-selectn.o
+lib/elk/runtime/obj/xm/form.o
+lib/elk/runtime/obj/xm/frame.o
+lib/elk/runtime/obj/xm/label.o
+lib/elk/runtime/obj/xm/list.o
+lib/elk/runtime/obj/xm/main-window.o
+lib/elk/runtime/obj/xm/message-box.o
+lib/elk/runtime/obj/xm/paned-window.o
+lib/elk/runtime/obj/xm/push-button.o
+lib/elk/runtime/obj/xm/row-column.o
+lib/elk/runtime/obj/xm/scale.o
+lib/elk/runtime/obj/xm/scroll-bar.o
+lib/elk/runtime/obj/xm/scrolled-win.o
+lib/elk/runtime/obj/xm/selectn-box.o
+lib/elk/runtime/obj/xm/separator.o
+lib/elk/runtime/obj/xm/shell.o
+lib/elk/runtime/obj/xm/support.o
+lib/elk/runtime/obj/xm/text.o
+lib/elk/runtime/obj/xm/toggle-btn.o
+lib/elk/runtime/obj/xt-motif.o
+@dirrm lib/elk/runtime/obj/xm
diff --git a/lang/elk/PLIST.X11 b/lang/elk/PLIST.X11
new file mode 100644
index 00000000000..34dbcc73c37
--- /dev/null
+++ b/lang/elk/PLIST.X11
@@ -0,0 +1,30 @@
+@comment $NetBSD: PLIST.X11,v 1.1 2002/01/09 23:04:54 seb Exp $
+include/elk/extensions/xlib.h
+include/elk/extensions/xt.h
+lib/elk/runtime/obj/xaw/ALIASES
+lib/elk/runtime/obj/xaw/ascii.o
+lib/elk/runtime/obj/xaw/box.o
+lib/elk/runtime/obj/xaw/command.o
+lib/elk/runtime/obj/xaw/dialog.o
+lib/elk/runtime/obj/xaw/form.o
+lib/elk/runtime/obj/xaw/grip.o
+lib/elk/runtime/obj/xaw/label.o
+lib/elk/runtime/obj/xaw/list.o
+lib/elk/runtime/obj/xaw/menubutton.o
+lib/elk/runtime/obj/xaw/paned.o
+lib/elk/runtime/obj/xaw/panner.o
+lib/elk/runtime/obj/xaw/porthole.o
+lib/elk/runtime/obj/xaw/repeater.o
+lib/elk/runtime/obj/xaw/scrollbar.o
+lib/elk/runtime/obj/xaw/shell.o
+lib/elk/runtime/obj/xaw/simplemenu.o
+lib/elk/runtime/obj/xaw/sme.o
+lib/elk/runtime/obj/xaw/smebsb.o
+lib/elk/runtime/obj/xaw/smeline.o
+lib/elk/runtime/obj/xaw/stripchart.o
+lib/elk/runtime/obj/xaw/toggle.o
+lib/elk/runtime/obj/xaw/tree.o
+lib/elk/runtime/obj/xaw/viewport.o
+lib/elk/runtime/obj/xlib.o
+lib/elk/runtime/obj/xt.o
+@dirrm lib/elk/runtime/obj/xaw
diff --git a/lang/elk/PLIST b/lang/elk/PLIST.base
index 1be3a859848..37eefb9f299 100644
--- a/lang/elk/PLIST
+++ b/lang/elk/PLIST.base
@@ -1,9 +1,10 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:23:08 zuntum Exp $
+@comment $NetBSD: PLIST.base,v 1.1 2002/01/09 23:04:54 seb Exp $
bin/elk
include/elk/compat.h
include/elk/config.h
include/elk/cstring.h
include/elk/exception.h
+include/elk/extensions/unix.h
include/elk/extern.h
include/elk/funcproto.h
include/elk/gc.h
@@ -13,9 +14,6 @@ include/elk/param.h
include/elk/scheme.h
include/elk/stkmem.h
include/elk/type.h
-include/elk/extensions/unix.h
-include/elk/extensions/xlib.h
-include/elk/extensions/xt.h
lib/elk/lib/ldflags
lib/elk/lib/linkscheme
lib/elk/lib/makedl
@@ -31,32 +29,6 @@ lib/elk/runtime/obj/record.o
lib/elk/runtime/obj/regexp.o
lib/elk/runtime/obj/struct.o
lib/elk/runtime/obj/unix.o
-lib/elk/runtime/obj/xlib.o
-lib/elk/runtime/obj/xt.o
-lib/elk/runtime/obj/xaw/ALIASES
-lib/elk/runtime/obj/xaw/ascii.o
-lib/elk/runtime/obj/xaw/box.o
-lib/elk/runtime/obj/xaw/command.o
-lib/elk/runtime/obj/xaw/dialog.o
-lib/elk/runtime/obj/xaw/form.o
-lib/elk/runtime/obj/xaw/grip.o
-lib/elk/runtime/obj/xaw/label.o
-lib/elk/runtime/obj/xaw/list.o
-lib/elk/runtime/obj/xaw/menubutton.o
-lib/elk/runtime/obj/xaw/paned.o
-lib/elk/runtime/obj/xaw/panner.o
-lib/elk/runtime/obj/xaw/porthole.o
-lib/elk/runtime/obj/xaw/repeater.o
-lib/elk/runtime/obj/xaw/scrollbar.o
-lib/elk/runtime/obj/xaw/shell.o
-lib/elk/runtime/obj/xaw/simplemenu.o
-lib/elk/runtime/obj/xaw/sme.o
-lib/elk/runtime/obj/xaw/smebsb.o
-lib/elk/runtime/obj/xaw/smeline.o
-lib/elk/runtime/obj/xaw/stripchart.o
-lib/elk/runtime/obj/xaw/toggle.o
-lib/elk/runtime/obj/xaw/tree.o
-lib/elk/runtime/obj/xaw/viewport.o
lib/elk/runtime/scm/apropos.scm
lib/elk/runtime/scm/bitstring.scm
lib/elk/runtime/scm/cscheme.scm
@@ -82,7 +54,7 @@ lib/elk/runtime/scm/unix.scm
lib/elk/runtime/scm/xlib.scm
lib/elk/runtime/scm/xt.scm
lib/elk/runtime/scm/xwidgets.scm
-man/man1/elk.1.gz
+man/man1/elk.1
share/doc/elk/bitstring.ps
share/doc/elk/cprog.ps
share/doc/elk/kernel.ps
@@ -95,7 +67,6 @@ share/doc/elk/xlib.ps
share/doc/elk/xt.ps
@dirrm share/doc/elk
@dirrm lib/elk/runtime/scm
-@dirrm lib/elk/runtime/obj/xaw
@dirrm lib/elk/runtime/obj
@dirrm lib/elk/runtime
@dirrm lib/elk/lib
diff --git a/lang/elk/distinfo b/lang/elk/distinfo
index c9b769536e2..706fcc30e2f 100644
--- a/lang/elk/distinfo
+++ b/lang/elk/distinfo
@@ -1,16 +1,25 @@
-$NetBSD: distinfo,v 1.1 2001/04/17 09:56:50 agc Exp $
+$NetBSD: distinfo,v 1.2 2002/01/09 23:04:54 seb Exp $
SHA1 (elk-3.0.tar.gz) = d62ae8a88e3206a578195611ace50168e6078661
Size (elk-3.0.tar.gz) = 762484 bytes
-SHA1 (patch-aa) = 733bd15f80e0db6bb33d25c5d2d7cfb077f767bf
-SHA1 (patch-ab) = d706048c9ec5c174dd704c907ffe429e4033f1cd
-SHA1 (patch-ac) = 92f29cde2743da0eed433941ce5be06f027d3a98
-SHA1 (patch-ad) = d0470f748018841b22f577b9c0ee26f8cdd48e30
-SHA1 (patch-ae) = b2723fb52853c7eb636d72e339c43c602765ebf1
-SHA1 (patch-af) = 453ccedccbe78c9ed0c2240a46b8643f8699e760
-SHA1 (patch-ag) = 55aef77eadcc0266fc7d6a239a1a782aa9f4af5d
-SHA1 (patch-ah) = 3690beb3a65a0c9aa3200fa830594beb9e38ab2b
-SHA1 (patch-ai) = 83521d386c02b284c242c38b220ed416558582c0
-SHA1 (patch-aj) = a2281239a01f4f666005c12eb65d10976b80defd
-SHA1 (patch-ak) = 1a641ed3828983b4dbf08c9742d6a91a791a3eff
-SHA1 (patch-al) = f8289efd4f2eab38c4794f2ee7d1c7c3ac3b7fd3
+SHA1 (patch-aa) = 109e70fb6ba64b116c3b472b8586bf9c89c29348
+SHA1 (patch-ab) = 62cac0487bf259aa481fbc23fd34b168475062fe
+SHA1 (patch-ac) = 05c35684e7e2c8c97768bf6f3f07760ba6181a15
+SHA1 (patch-ad) = 421d3a738fa78db6c139331ca0d57987f94266bd
+SHA1 (patch-ae) = d1514bc0391f59adbd2591b361348a2baee118f4
+SHA1 (patch-af) = e3b2da075f099e7f3abff82afc255018c21639dd
+SHA1 (patch-ag) = 3aebf5f386e67c2a87cb549a6c6a7d4f332db1fe
+SHA1 (patch-ah) = 901fbd12b2d103cf1efe965d82c03b6790aa0282
+SHA1 (patch-ai) = 0a3569151de7d78706b5c5112bc260e880c25056
+SHA1 (patch-aj) = fc3294f5198caa7a91aafffaed9ec1b2e55c7696
+SHA1 (patch-ak) = 59fec6f3b2d00c75d3954ccb20237dd179ac0f81
+SHA1 (patch-al) = c17f9c1760bca6928f517bc9d2c64d1eba5b5756
+SHA1 (patch-am) = 1950af890ce6fc3acf2340630199dd8c375f9b0e
+SHA1 (patch-an) = a8eef0e5a1315cd5a0e3a4ce2b7ea80fd4e62db5
+SHA1 (patch-ao) = af0d66514fb2673388658d74246d9e83c174118e
+SHA1 (patch-ap) = 4c76aa4b44b2a3d2e2bcbed3c6d4d639c99e51a4
+SHA1 (patch-aq) = 0d10cc53d0284ce56bb6929579962c7b29afcbe6
+SHA1 (patch-ar) = a145d0b1aba3d201bda60b9c82eff8c642c5919f
+SHA1 (patch-as) = 69b51d90a4e34cd7b1c3a2a290343420ffee51eb
+SHA1 (patch-at) = 133495a41196a4017c232cf7d1de2c8283f36968
+SHA1 (patch-au) = 031585595a93d111f517befc35a4190ff45076c3
diff --git a/lang/elk/files/stab-elf.c b/lang/elk/files/stab-elf.c
index 4f1b8cd6dd2..ba6ededf2c9 100644
--- a/lang/elk/files/stab-elf.c
+++ b/lang/elk/files/stab-elf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: stab-elf.c,v 1.3 2000/10/22 20:42:48 agc Exp $ */
+/* $NetBSD: stab-elf.c,v 1.4 2002/01/09 23:04:55 seb Exp $ */
/*
* Copyright (c) 2000 Alistair G. Crooks. All rights reserved.
@@ -36,7 +36,7 @@
__COPYRIGHT(
"@(#) Copyright (c) 2000 \
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: stab-elf.c,v 1.3 2000/10/22 20:42:48 agc Exp $");
+__RCSID("$NetBSD: stab-elf.c,v 1.4 2002/01/09 23:04:55 seb Exp $");
#endif
#include <sys/types.h>
@@ -74,7 +74,7 @@ Open_File_And_Snarf_Symbols (name)
SYM **nextp;
SYM *sp;
- (void) snprintf(cmd, sizeof(cmd), "%s -g %s | %s '$2 == \"T\" { printf(\"%%s %%s\\n\", $1 $3) }'", NM, name, AWK);
+ (void) snprintf(cmd, sizeof(cmd), "%s -g %s | %s '$2 == \"T\" { printf(\"%%s %%s\\n\", $1, $3) }'", NM, name, AWK);
if ((pp = popen(cmd, "r")) == NULL) {
Primitive_Error("can't open a.out file");
}
@@ -85,6 +85,7 @@ Open_File_And_Snarf_Symbols (name)
while (fgets(buf, sizeof(buf), pp) != NULL) {
sp = (SYM *)Safe_Malloc(sizeof (SYM));
sp->name = Safe_Malloc(strlen(buf) + 1 - 8 - 1);
+ buf[strlen(buf) - 1] = '\0';
(void) strcpy(sp->name, &buf[8 + 1 + NAME_OFFSET]);
(void) sscanf(buf, "%08x", &sp->value);
*nextp = sp;
diff --git a/lang/elk/patches/patch-aa b/lang/elk/patches/patch-aa
index 6d466b576e4..2c8f3938331 100644
--- a/lang/elk/patches/patch-aa
+++ b/lang/elk/patches/patch-aa
@@ -1,34 +1,36 @@
-$NetBSD: patch-aa,v 1.3 1999/11/27 23:49:33 rh Exp $
+$NetBSD: patch-aa,v 1.4 2002/01/09 23:04:55 seb Exp $
---- doc/man/elk.1.orig Fri Aug 11 16:27:03 1995
-+++ doc/man/elk.1 Sun Nov 28 00:47:45 1999
-@@ -2,9 +2,9 @@
- .TH ELK 1 "15 January 1991"
- .UC 4
- .SH NAME
--elk, scheme \- extensible Scheme interpreter
-+elk \- extensible Scheme interpreter
- .SH SYNOPSIS
--.B scheme
-+.B elk
- [
- .B \-l \f2file\fP
- ] [
-@@ -20,8 +20,6 @@
- ] [[
- .B \-\^\-
- ] \f2args\fP]
--.LP
--.BR elk .\|.\|.
- .SH DESCRIPTION
- .I Elk
- (Extension Language Kit) is a Scheme implementation designed
-@@ -32,7 +30,7 @@
- is linked with the application it serves, but a stand-alone version
- of the Scheme interpreter is installed as well (usually under
- the name
--.BR scheme ).
-+.BR elk ).
- This interpreter, together with the standard Scheme toplevel,
- .I Elk
- can be used as an ordinary, stand-alone implementation of the
+--- Makefile.orig Mon Jul 31 14:56:26 1995
++++ Makefile
+@@ -13,12 +13,7 @@
+ src\
+ scm\
+ lib/misc\
+- lib/unix\
+- lib/xlib\
+- lib/xt\
+- lib/xaw\
+- lib/xm\
+- lib/xm/xt
++ lib/unix ${ELK_SUBDIRS}
+
+ # ----------------------------------------------------------------------
+
+@@ -37,10 +32,16 @@
+ done
+
+ install:
+- @for i in $(SUBDIRS) ;\
++ @for i in $(SUBDIRS) doc/man;\
+ do \
+ echo Installing $$i...; \
+ ( cd $$i ; $(MAKE) install ) || exit $$?; \
++ done
++ mkdir -p ${PREFIX}/share/doc/elk
++ @for i in bitstring cprog kernel oops record regexp unix usenix \
++ xlib xt; do \
++ echo "Installing postscript docs for $$i"; \
++ ${BSD_INSTALL_DATA} doc/$$i/*.ps ${PREFIX}/share/doc/elk; \
+ done
+
+ localize:
diff --git a/lang/elk/patches/patch-ab b/lang/elk/patches/patch-ab
index f46ea06e906..0c6510a8d2b 100644
--- a/lang/elk/patches/patch-ab
+++ b/lang/elk/patches/patch-ab
@@ -1,13 +1,16 @@
-$NetBSD: patch-ab,v 1.2 2000/07/07 17:52:04 dmcmahill Exp $
+$NetBSD: patch-ab,v 1.3 2002/01/09 23:04:55 seb Exp $
---- /dev/null Fri Mar 27 13:45:57 1998
-+++ config/untested/aout-netbsd-cc Tue Mar 31 10:03:57 1998
-@@ -0,0 +1,370 @@
+--- config/sites/386pc-freebsd2.1.orig Sat Jan 5 18:03:07 2002
++++ config/sites/386pc-freebsd2.1
+@@ -0,0 +1,80 @@
+# This is a shell script. It is sourced by the build scripts in the
-+# various subdirectories to gather system-, compiler-, and OS-specific
++# various subdirectories to gather site- and installation-specific
+# information required for building the Makefiles.
+#
-+# Most variables in this script are interpreted as boolean variables and
++# This script is read after the "system" file, therefore you can place
++# variable settings here to override those from "system".
++#
++# Some variables in this script are interpreted as boolean variables and
+# indicate presence or absence of one specific feature. The value "yes"
+# is regarded as "true", all other values (including no value or even
+# non-existence of the variable) are interpreted as "false".
@@ -17,359 +20,66 @@ $NetBSD: patch-ab,v 1.2 2000/07/07 17:52:04 dmcmahill Exp $
+# -----------------------------------------------------------------------
+
+
-+# $system should contain the name of this file. It may be used by some
-+# of the build scripts to do things that are specific to one single
-+# type of system.
-+
-+system=aout-netbsd-cc
-+
-+
-+# Does the system support the vprintf library function? If not,
-+# availability of the (non-portable) _doprnt function is assumed.
-+
-+vprintf=yes
-+
-+
-+# Does the directory(3) library follow the POSIX conventions (i.e.
-+# requires the <dirent.h> include file and uses "struct dirent")?
-+# If not, the (obsolete) BSD-style interface with <sys/dir.h> and
-+# "struct direct" is assumed.
-+
-+dirent=yes
-+
-+
-+# Does the system have the random/srandom library functions? If not,
-+# rand/srand will be used instead.
-+
-+random=yes
-+
-+
-+# Does the system have the index library function? If not, strchr
-+# will be used.
-+
-+index=yes
-+
-+
-+# Does the system have the bcopy, bzero, and bcmp library functions?
-+# If not, memcpy/memset/memcmp will be used.
-+
-+bstring=no
-+
-+
-+# Does using the access system call require <unistd.h> to be included?
-+# (Look into the manual page for access if in doubt.)
-+
-+include_unistd_h=yes
-+
-+
-+# If the FIONREAD ioctl command is defined, which file must be included?
-+
-+fionread_include='<sys/ioctl.h>'
-+
-+
-+# What is the name of the a.out include file?
-+
-+aout_h='<a.out.h>'
-+
-+
-+# The following variables control how certain system limits are obtained
-+# during runtime.
-+#
-+# If getdtablesize() is available to determine the maximum number of open
-+# files per process, set getdtablesize=yes.
-+# Alternatively, if POSIX-style sysconf() can be called with _SC_OPEN_MAX,
-+# set sysconf_open_max=yes.
-+# If neither is set to "yes", an educated guess will be made.
-+
-+getdtablesize=yes
-+sysconf_open_max=yes
-+
-+# If POSIX-style pathconf() can be invoked with _PC_PATH_MAX to determine
-+# the maximum pathname length, set pathconf_path_max=yes.
-+
-+pathconf_path_max=yes
-+
-+# If the system page size can be determined by calling getpagesize()
-+# set getpagesize=yes.
-+# Alternatively, if sysconf() can be invoked with _SC_PAGESIZE, set
-+# sysconf_pagesize=yes.
-+# These two variables are only required if the generational garbage
-+# collector is used.
-+
-+getpagesize=yes
-+sysconf_pagesize=no
-+
-+
-+# Set reliable_signals=bsd if your system supports BSD-style reliable
-+# signals (has sigblock and related functions); set reliable_signals=posix
-+# for POSIX-style signals (sigprocmask, sigsets); otherwise old V7/SysV
-+# signal semantics are assumed.
-+
-+reliable_signals=bsd
-+
-+
-+# To support dynamic loading of object files and "dump", the system's
-+# a.out format has to be known. Choose one of the following:
-+#
-+# coff ecoff xcoff elf macho hp9k convex
-+#
-+# Other values of "aout_format" are interpreted as BSD-style a.out format.
-+
-+aout_format=
-+
-+
-+# Which mechanism should be used to dynamically load object files?
-+# Possible values currently are:
-+#
-+# ld BSD-style incremental loading based on ld -A
-+# rld NeXT-style rld_load()
-+# shl HP-UX shl_load()
-+# dl SysVR4/SunOS5 dlopen()
-+#
-+# Leave load_obj empty if dynamic loading is not supported.
-+
-+load_obj=dl
-+
-+
-+ # The following variables are only relevant if load_obj is set.
-+
-+ # Linker options to produce a shared object from a .o file.
-+ # Only used if load_obj=dl.
-+
-+ ldflags_shared='-Bshareable'
-+
-+ # The libraries against which dynamically loaded files are resolved
-+ # at the time they are loaded.
-+
-+ load_libraries=
-+
-+ # Does the ld-option -x really do what the manual says it does (i.e.
-+ # omit local symbols), or does it somehow render the resulting object
-+ # file unsuitable for dynamic loading? If in doubt, leave it out
-+ # (which may result in somewhat larger object files).
-+
-+ incremental_ldflags=-x
-+
-+ # Systems with "aout_format=ecoff" may require a call to the cacheflush
-+ # system call after an object file has been loaded. Which include file
-+ # has to be included in this case?
-+
-+ cachectl_h=unused
-+
-+ # Is the ANSI-C atexit function supported to register an exit handler?
-+ # If not, the exit library function will be redefined and will end in
-+ # a call to _exit.
++# The directory where all files are installed by running "make install".
++# The subdirectories bin, lib, include, and runtime (with various
++# subdirectories) are created automatically, but $install_dir isn't.
++# Make sure $install_dir doesn't point to the top of the source tree
++# (i.e. choose a subdirectory or a directory outside the source tree).
+
-+ atexit=yes
++install_dir=${PREFIX}/share/elk
+
+
-+# Do the names of external functions in the symbol table always begin
-+# with a special character (such as underline)? If so, syms_begin_with
-+# should hold this character, otherwise leave it empty.
-+
-+syms_begin_with=_
-+
-+
-+# The symbol prefixes of extension initialization and finalization
-+# functions (without the initial $syms_begin_with). Do not change
-+# these unless the compiler or linker restricts the length of symbols!
-+
-+init_prefix=elk_init_
-+finit_prefix=elk_finit_
-+
-+
-+# Is the "dump" function supported?
-+
-+can_dump=no
-+
-+
-+# The following variables are only relevant if "can_dump=yes".
-+
-+ # Is the fchmod system call broken or unavailable?
-+
-+ fchmod_broken=no
-+
-+ # These four variables are only relevant if the system has the BSD-style
-+ # a.out format.
-+ # segment_size is the segment size of the system's memory management
-+ # unit, i.e. the number to a multiple of which the size of an a.out
-+ # segment (e.g. .text) is rounded up.
-+ # file_text_start is the file offset at which the text segment starts
-+ # in an a.out file.
-+ # mem_text_start is the starting address of the text segment in memory.
-+ # text_length_adj must be set to "sizeof (struct exec)" if the length of
-+ # the text segment stored in the a.out header includes the a.out header
-+ # itself.
-+
-+ segment_size=__LDPGSZ
-+ file_text_start='(N_TXTOFF(hdr) + sizeof(struct exec))'
-+ mem_text_start='(sizeof(struct exec) + getpagesize())'
-+ text_length_adj='(sizeof(struct exec))'
-+
-+ # Only relevant if "aout_format=coff": the system's pagesize.
-+
-+ coff_pagesize=
-+
-+ # Only relevant if "aout_format=hp9k" and "load_obj=shl"
-+
-+ hp_shared_libraries=yes
-+
-+ # Print debug messages when dumping
-+
-+ debug_dump=yes
-+
-+
-+# Is the "termio" terminal interface supported by the system? If not,
-+# BSD-style tty handling will be used.
-+
-+termio=yes
-+
-+
-+# flush_stdio and flush_tty indicate how clear-input/output-port can
-+# flush (purge) a FILE pointer and a TTY file descriptor.
-+# Possible values of flush_stdio:
-+# bsd assume old BSD-style FILE* (with _cnt, _ptr, _base)
-+# fpurge use 4.4BSD-style fpurge stdio library function
-+# linux use Linux-specific method
-+# Possible values of flush_tty:
-+# tiocflush use TIOCFLUSH ioctl from <sys/ioctl.h>
-+# tcflsh use TCFLSH ioctl from <termio.h>
-+# Leave the variable(s) empty if flushing is not supported.
-+
-+flush_stdio=fpurge
-+flush_tty=tiocflush
-+
-+
-+# The interpreter uses the getrlimit function to determine the maximum
-+# stack size of the running program. If this function is not supported,
-+# set max_stack_size to a (fixed) maximum stack size (in bytes).
-+
-+max_stack_size=
-+
-+
-+# Is the mprotect system call supported? The generational garbage collector
-+# requires mprotect to implement incremental GC. $mprotect is ignored if
-+# generational_gc is set to "no" in the site file. Set mprotect=mmap if
-+# mprotect is supported, but only for mmap()ed memory.
-+
-+mprotect=yes
-+
-+
-+# How can a SIGSEGV or SIGBUS signal handler find out the address of
-+# the faulting memory reference? This variable is only used if
-+# $mprotect is "yes" or "mmap". Possible values are:
++# Libraries against which to link the X11 extension (typically -lX11).
+#
-+# siginfo handler is called with siginfo_t structure (enabled
-+# by a call to sigaction)
-+# sigcontext address is in the sigcontext structure (3rd arg, sc_badvaddr)
-+# arg4 address is delivered to handler as argument #4
-+# aix use an AIX-specific hack to get hold of the bad address
-+# hpux use a HP-UX-specific hack
-+
-+sigsegv_addr=arg4
-+
-+
-+# Does the system support the alloca library function, and does this
-+# function actually extend the stack? If in doubt, extract alloca.o
-+# from the C library and check if it contains the symbols malloc and free.
-+# If this is the case, forget it.
-+
-+use_alloca=yes
-+
-+
-+# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
-+
-+include_alloca_h=no
-+pragma_alloca=no
-+
-+
-+# Does the system (or compiler) require certain objects (e.g. doubles)
-+# to be aligned at 8-byte boundaries? If not, 4-byte alignment will
-+# be assumed.
-+
-+align_8byte=yes
-+
-+
-+# The C compiler used to compile the source code.
-+
-+cc=cc
-+
-+
-+# The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
-+# in SVR4-based systems.
-+
-+ld=ld
-+
-+
-+# The C compiler flags used for all files.
-+
-+cflags='-O2 -pipe'
-+
-+
-+# Are extra C compiler flags (such as -D_NO_PROTO) required to compile
-+# Motif applications?
-+
-+motif_cflags=
-+
-+
-+# Are extra C compiler flags (such as -G 0) required to compile
-+# dynamically loadable files?
-+
-+obj_cflags='-fPIC -DPIC'
++# Any of the following library lists may be prefixed by something like
++# -L/usr/X11/lib if the X-libraries do not reside in a standard directory;
++# an additional -R/usr/X11/lib and -lsocket may be required in case of
++# SunOS 5.x/SysVR4).
+
++libxlib="-L${X11BASE}/lib -lX11"
+
-+# Are extra linker flags (such as -G 0) required to link several object
-+# files together to one dynamically loadable file?
++# Libraries against which to link the Xt extension (typically
++# -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11). -lXaw is needed to get the correct
++# definition of the vendor shell widget class
+
-+obj_ldflags=
++libxt="-L${X11BASE}/lib -lX11 -lXext -lICE -lSM -lXt -lXmu -lXaw"
+
+
-+# The linker flags used to link the interpreter.
++# Libraries against which to link the Athena widgets extension (typically
++# identical to libxt above)
+
-+ldflags='-lm'
++libxaw="-L${X11BASE}/lib -lX11 -lXext -lICE -lSM -lXt -lXmu -lXaw"
+
+
-+# The lint flags.
++# Libraries against which to link the Motif extension (typically like
++# libaw above with Xaw replaced by Xm)
+
-+lintflags='-abxh'
++libxmotif="-L${X11BASE}/lib -lX11 -lXext -lICE -lSM -lXt -lXmu -lXm"
+
+
-+# Are function prototypes in the header files required? If prototypes=yes,
-+# prototypes are used unconditionally; if prototypes=no, prototypes are
-+# not used; otherwise prototypes are only used if the source code is
-+# compiled with an ANSI-C- or C++-compiler.
++# Additional flags (typically -Isomething) to be supplied to the C
++# compiler when compiling an X11 application, or a Motif application,
++# respectively.
+
-+prototypes=yes
++x11_incl=-I${X11BASE}/include
++motif_incl=-I${X11BASE}/include
+
+
-+# Does your C preprocessor support the ANSI-C ## operator, although
-+# __STDC__ is not defined?
++# Set "gdbm" to "yes" if you have the GNU gdbm library installed and
++# want the gdbm extension to be compiled. "gdbm_inc" gives additional
++# C compiler flags required to compile a program using gdbm.
+
-+ansi_cpp=no
++gdbm=
++gdbm_incl=-I${PREFIX}/include/gdbm
+
+
-+# The UNIX extension likes to know which of the following system calls,
-+# library functions, and include files are supported by the system.
++# Do you want to use the generational garbage collector? If not, the
++# stop-and-copy garbage collector will be used.
+
-+gettimeofday=yes
-+ftime=
-+vfork=yes
-+gethostname=yes
-+uname=yes
-+mktemp=yes
-+tmpnam=yes
-+tempnam=yes
-+getcwd=yes
-+getwd=yes
-+rename=yes
-+waitpid=yes
-+wait3=yes
-+wait4=yes
-+utime_h=yes
-+regcomp=yes
++generational_gc=yes
+
+
-+# Element type of the gidset argument of getgroups(); typically int
-+# or gid_t. Only needed by the UNIX extension.
++# The default heap size of the Scheme interpreter in KBytes (if the
++# stop-and-copy garbage collector is used).
+
-+getgroups_type=gid_t
++default_heap_size=1024
diff --git a/lang/elk/patches/patch-ac b/lang/elk/patches/patch-ac
index b17f8263d2e..58be8b0d744 100644
--- a/lang/elk/patches/patch-ac
+++ b/lang/elk/patches/patch-ac
@@ -1,468 +1,8 @@
-$NetBSD: patch-ac,v 1.1 1999/08/17 11:18:41 agc Exp $
+$NetBSD: patch-ac,v 1.2 2002/01/09 23:04:55 seb Exp $
-*** config/sites/386pc-freebsd2.1 Thu Jan 1 01:00:00 1970
---- config/sites/386pc-freebsd2.1 Wed Mar 8 19:19:43 1995
-***************
-*** 0 ****
---- 1,80 ----
-+ # This is a shell script. It is sourced by the build scripts in the
-+ # various subdirectories to gather site- and installation-specific
-+ # information required for building the Makefiles.
-+ #
-+ # This script is read after the "system" file, therefore you can place
-+ # variable settings here to override those from "system".
-+ #
-+ # Some variables in this script are interpreted as boolean variables and
-+ # indicate presence or absence of one specific feature. The value "yes"
-+ # is regarded as "true", all other values (including no value or even
-+ # non-existence of the variable) are interpreted as "false".
-+ #
-+ # Do not forget to quote values that contain shell meta syntax.
-+ #
-+ # -----------------------------------------------------------------------
-+
-+
-+ # The directory where all files are installed by running "make install".
-+ # The subdirectories bin, lib, include, and runtime (with various
-+ # subdirectories) are created automatically, but $install_dir isn't.
-+ # Make sure $install_dir doesn't point to the top of the source tree
-+ # (i.e. choose a subdirectory or a directory outside the source tree).
-+
-+ install_dir=${PREFIX}/share/elk
-+
-+
-+ # Libraries against which to link the X11 extension (typically -lX11).
-+ #
-+ # Any of the following library lists may be prefixed by something like
-+ # -L/usr/X11/lib if the X-libraries do not reside in a standard directory;
-+ # an additional -R/usr/X11/lib and -lsocket may be required in case of
-+ # SunOS 5.x/SysVR4).
-+
-+ libxlib="-L${X11BASE}/lib -lX11"
-+
-+ # Libraries against which to link the Xt extension (typically
-+ # -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11). -lXaw is needed to get the correct
-+ # definition of the vendor shell widget class
-+
-+ libxt="-L${X11BASE}/lib -lX11 -lXext -lICE -lSM -lXt -lXmu -lXaw"
-+
-+
-+ # Libraries against which to link the Athena widgets extension (typically
-+ # identical to libxt above)
-+
-+ libxaw="-L${X11BASE}/lib -lX11 -lXext -lICE -lSM -lXt -lXmu -lXaw"
-+
-+
-+ # Libraries against which to link the Motif extension (typically like
-+ # libaw above with Xaw replaced by Xm)
-+
-+ libxmotif="-L${X11BASE}/lib -lX11 -lXext -lICE -lSM -lXt -lXmu -lXm"
-+
-+
-+ # Additional flags (typically -Isomething) to be supplied to the C
-+ # compiler when compiling an X11 application, or a Motif application,
-+ # respectively.
-+
-+ x11_incl=-I${X11BASE}/include
-+ motif_incl=-I${X11BASE}/include
-+
-+
-+ # Set "gdbm" to "yes" if you have the GNU gdbm library installed and
-+ # want the gdbm extension to be compiled. "gdbm_inc" gives additional
-+ # C compiler flags required to compile a program using gdbm.
-+
-+ gdbm=
-+ gdbm_incl=-I${PREFIX}/include/gdbm
-+
-+
-+ # Do you want to use the generational garbage collector? If not, the
-+ # stop-and-copy garbage collector will be used.
-+
-+ generational_gc=yes
-+
-+
-+ # The default heap size of the Scheme interpreter in KBytes (if the
-+ # stop-and-copy garbage collector is used).
-+
-+ default_heap_size=1024
-*** config/untested/386pc-freebsd2.1-cc Thu Jan 1 01:00:00 1970
---- config/untested/386pc-freebsd2.1-cc Wed Mar 8 19:19:21 1995
-***************
-*** 0 ****
---- 1,370 ----
-+ # This is a shell script. It is sourced by the build scripts in the
-+ # various subdirectories to gather system-, compiler-, and OS-specific
-+ # information required for building the Makefiles.
-+ #
-+ # Most variables in this script are interpreted as boolean variables and
-+ # indicate presence or absence of one specific feature. The value "yes"
-+ # is regarded as "true", all other values (including no value or even
-+ # non-existence of the variable) are interpreted as "false".
-+ #
-+ # Do not forget to quote values that contain shell meta syntax.
-+ #
-+ # -----------------------------------------------------------------------
-+
-+
-+ # $system should contain the name of this file. It may be used by some
-+ # of the build scripts to do things that are specific to one single
-+ # type of system.
-+
-+ system=386pc-freebsd2.1-cc
-+
-+
-+ # Does the system support the vprintf library function? If not,
-+ # availability of the (non-portable) _doprnt function is assumed.
-+
-+ vprintf=yes
-+
-+
-+ # Does the directory(3) library follow the POSIX conventions (i.e.
-+ # requires the <dirent.h> include file and uses "struct dirent")?
-+ # If not, the (obsolete) BSD-style interface with <sys/dir.h> and
-+ # "struct direct" is assumed.
-+
-+ dirent=yes
-+
-+
-+ # Does the system have the random/srandom library functions? If not,
-+ # rand/srand will be used instead.
-+
-+ random=yes
-+
-+
-+ # Does the system have the index library function? If not, strchr
-+ # will be used.
-+
-+ index=yes
-+
-+
-+ # Does the system have the bcopy, bzero, and bcmp library functions?
-+ # If not, memcpy/memset/memcmp will be used.
-+
-+ bstring=yes
-+
-+
-+ # Does using the access system call require <unistd.h> to be included?
-+ # (Look into the manual page for access if in doubt.)
-+
-+ include_unistd_h=yes
-+
-+
-+ # If the FIONREAD ioctl command is defined, which file must be included?
-+
-+ fionread_include='<sys/ioctl.h>'
-+
-+
-+ # What is the name of the a.out include file?
-+
-+ aout_h='<a.out.h>'
-+
-+
-+ # The following variables control how certain system limits are obtained
-+ # during runtime.
-+ #
-+ # If getdtablesize() is available to determine the maximum number of open
-+ # files per process, set getdtablesize=yes.
-+ # Alternatively, if POSIX-style sysconf() can be called with _SC_OPEN_MAX,
-+ # set sysconf_open_max=yes.
-+ # If neither is set to "yes", an educated guess will be made.
-+
-+ getdtablesize=yes
-+ sysconf_open_max=yes
-+
-+ # If POSIX-style pathconf() can be invoked with _PC_PATH_MAX to determine
-+ # the maximum pathname length, set pathconf_path_max=yes.
-+
-+ pathconf_path_max=yes
-+
-+ # If the system page size can be determined by calling getpagesize()
-+ # set getpagesize=yes.
-+ # Alternatively, if sysconf() can be invoked with _SC_PAGESIZE, set
-+ # sysconf_pagesize=yes.
-+ # These two variables are only required if the generational garbage
-+ # collector is used.
-+
-+ getpagesize=yes
-+ sysconf_pagesize=no
-+
-+
-+ # Set reliable_signals=bsd if your system supports BSD-style reliable
-+ # signals (has sigblock and related functions); set reliable_signals=posix
-+ # for POSIX-style signals (sigprocmask, sigsets); otherwise old V7/SysV
-+ # signal semantics are assumed.
-+
-+ reliable_signals=bsd
-+
-+
-+ # To support dynamic loading of object files and "dump", the system's
-+ # a.out format has to be known. Choose one of the following:
-+ #
-+ # coff ecoff xcoff elf macho hp9k convex
-+ #
-+ # Other values of "aout_format" are interpreted as BSD-style a.out format.
-+
-+ aout_format=
-+
-+
-+ # Which mechanism should be used to dynamically load object files?
-+ # Possible values currently are:
-+ #
-+ # ld BSD-style incremental loading based on ld -A
-+ # rld NeXT-style rld_load()
-+ # shl HP-UX shl_load()
-+ # dl SysVR4/SunOS5 dlopen()
-+ #
-+ # Leave load_obj empty if dynamic loading is not supported.
-+
-+ load_obj=dl
-+
-+
-+ # The following variables are only relevant if load_obj is set.
-+
-+ # Linker options to produce a shared object from a .o file.
-+ # Only used if load_obj=dl.
-+
-+ ldflags_shared='-Bshareable'
-+
-+ # The libraries against which dynamically loaded files are resolved
-+ # at the time they are loaded.
-+
-+ load_libraries=
-+
-+ # Does the ld-option -x really do what the manual says it does (i.e.
-+ # omit local symbols), or does it somehow render the resulting object
-+ # file unsuitable for dynamic loading? If in doubt, leave it out
-+ # (which may result in somewhat larger object files).
-+
-+ incremental_ldflags=-x
-+
-+ # Systems with "aout_format=ecoff" may require a call to the cacheflush
-+ # system call after an object file has been loaded. Which include file
-+ # has to be included in this case?
-+
-+ cachectl_h=unused
-+
-+ # Is the ANSI-C atexit function supported to register an exit handler?
-+ # If not, the exit library function will be redefined and will end in
-+ # a call to _exit.
-+
-+ atexit=yes
-+
-+
-+ # Do the names of external functions in the symbol table always begin
-+ # with a special character (such as underline)? If so, syms_begin_with
-+ # should hold this character, otherwise leave it empty.
-+
-+ syms_begin_with=_
-+
-+
-+ # The symbol prefixes of extension initialization and finalization
-+ # functions (without the initial $syms_begin_with). Do not change
-+ # these unless the compiler or linker restricts the length of symbols!
-+
-+ init_prefix=elk_init_
-+ finit_prefix=elk_finit_
-+
-+
-+ # Is the "dump" function supported?
-+
-+ can_dump=no
-+
-+
-+ # The following variables are only relevant if "can_dump=yes".
-+
-+ # Is the fchmod system call broken or unavailable?
-+
-+ fchmod_broken=no
-+
-+ # These four variables are only relevant if the system has the BSD-style
-+ # a.out format.
-+ # segment_size is the segment size of the system's memory management
-+ # unit, i.e. the number to a multiple of which the size of an a.out
-+ # segment (e.g. .text) is rounded up.
-+ # file_text_start is the file offset at which the text segment starts
-+ # in an a.out file.
-+ # mem_text_start is the starting address of the text segment in memory.
-+ # text_length_adj must be set to "sizeof (struct exec)" if the length of
-+ # the text segment stored in the a.out header includes the a.out header
-+ # itself.
-+
-+ segment_size=__LDPGSZ
-+ file_text_start='(N_TXTOFF(hdr) + sizeof(struct exec))'
-+ mem_text_start='(sizeof(struct exec) + getpagesize())'
-+ text_length_adj='(sizeof(struct exec))'
-+
-+ # Only relevant if "aout_format=coff": the system's pagesize.
-+
-+ coff_pagesize=
-+
-+ # Only relevant if "aout_format=hp9k" and "load_obj=shl"
-+
-+ hp_shared_libraries=yes
-+
-+ # Print debug messages when dumping
-+
-+ debug_dump=yes
-+
-+
-+ # Is the "termio" terminal interface supported by the system? If not,
-+ # BSD-style tty handling will be used.
-+
-+ termio=yes
-+
-+
-+ # flush_stdio and flush_tty indicate how clear-input/output-port can
-+ # flush (purge) a FILE pointer and a TTY file descriptor.
-+ # Possible values of flush_stdio:
-+ # bsd assume old BSD-style FILE* (with _cnt, _ptr, _base)
-+ # fpurge use 4.4BSD-style fpurge stdio library function
-+ # linux use Linux-specific method
-+ # Possible values of flush_tty:
-+ # tiocflush use TIOCFLUSH ioctl from <sys/ioctl.h>
-+ # tcflsh use TCFLSH ioctl from <termio.h>
-+ # Leave the variable(s) empty if flushing is not supported.
-+
-+ flush_stdio=fpurge
-+ flush_tty=tiocflush
-+
-+
-+ # The interpreter uses the getrlimit function to determine the maximum
-+ # stack size of the running program. If this function is not supported,
-+ # set max_stack_size to a (fixed) maximum stack size (in bytes).
-+
-+ max_stack_size=
-+
-+
-+ # Is the mprotect system call supported? The generational garbage collector
-+ # requires mprotect to implement incremental GC. $mprotect is ignored if
-+ # generational_gc is set to "no" in the site file. Set mprotect=mmap if
-+ # mprotect is supported, but only for mmap()ed memory.
-+
-+ mprotect=yes
-+
-+
-+ # How can a SIGSEGV or SIGBUS signal handler find out the address of
-+ # the faulting memory reference? This variable is only used if
-+ # $mprotect is "yes" or "mmap". Possible values are:
-+ #
-+ # siginfo handler is called with siginfo_t structure (enabled
-+ # by a call to sigaction)
-+ # sigcontext address is in the sigcontext structure (3rd arg, sc_badvaddr)
-+ # arg4 address is delivered to handler as argument #4
-+ # aix use an AIX-specific hack to get hold of the bad address
-+ # hpux use a HP-UX-specific hack
-+
-+ sigsegv_addr=arg4
-+
-+
-+ # Does the system support the alloca library function, and does this
-+ # function actually extend the stack? If in doubt, extract alloca.o
-+ # from the C library and check if it contains the symbols malloc and free.
-+ # If this is the case, forget it.
-+
-+ use_alloca=yes
-+
-+
-+ # Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
-+
-+ include_alloca_h=no
-+ pragma_alloca=no
-+
-+
-+ # Does the system (or compiler) require certain objects (e.g. doubles)
-+ # to be aligned at 8-byte boundaries? If not, 4-byte alignment will
-+ # be assumed.
-+
-+ align_8byte=yes
-+
-+
-+ # The C compiler used to compile the source code.
-+
-+ cc=cc
-+
-+
-+ # The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
-+ # in SVR4-based systems.
-+
-+ ld=ld
-+
-+
-+ # The C compiler flags used for all files.
-+
-+ cflags='-O2 -pipe -m486'
-+
-+
-+ # Are extra C compiler flags (such as -D_NO_PROTO) required to compile
-+ # Motif applications?
-+
-+ motif_cflags=
-+
-+
-+ # Are extra C compiler flags (such as -G 0) required to compile
-+ # dynamically loadable files?
-+
-+ obj_cflags='-fpic -DPIC'
-+
-+
-+ # Are extra linker flags (such as -G 0) required to link several object
-+ # files together to one dynamically loadable file?
-+
-+ obj_ldflags=
-+
-+
-+ # The linker flags used to link the interpreter.
-+
-+ ldflags='-lm'
-+
-+
-+ # The lint flags.
-+
-+ lintflags='-abxh'
-+
-+
-+ # Are function prototypes in the header files required? If prototypes=yes,
-+ # prototypes are used unconditionally; if prototypes=no, prototypes are
-+ # not used; otherwise prototypes are only used if the source code is
-+ # compiled with an ANSI-C- or C++-compiler.
-+
-+ prototypes=yes
-+
-+
-+ # Does your C preprocessor support the ANSI-C ## operator, although
-+ # __STDC__ is not defined?
-+
-+ ansi_cpp=no
-+
-+
-+ # The UNIX extension likes to know which of the following system calls,
-+ # library functions, and include files are supported by the system.
-+
-+ gettimeofday=yes
-+ ftime=
-+ vfork=yes
-+ gethostname=yes
-+ uname=yes
-+ mktemp=yes
-+ tmpnam=yes
-+ tempnam=yes
-+ getcwd=yes
-+ getwd=yes
-+ rename=yes
-+ waitpid=yes
-+ wait3=yes
-+ wait4=yes
-+ utime_h=yes
-+ regcomp=yes
-+
-+
-+ # Element type of the gidset argument of getgroups(); typically int
-+ # or gid_t. Only needed by the UNIX extension.
-+
-+ getgroups_type=gid_t
---- /dev/null Fri Mar 27 13:45:57 1998
-+++ config/sites/pkgsrc Tue Mar 31 10:24:13 1998
-@@ -0,0 +1,80 @@
+--- config/sites/pkgsrc.orig Sun Jan 6 13:39:38 2002
++++ config/sites/pkgsrc
+@@ -0,0 +1,79 @@
+# This is a shell script. It is sourced by the build scripts in the
+# various subdirectories to gather site- and installation-specific
+# information required for building the Makefiles.
@@ -496,33 +36,32 @@ $NetBSD: patch-ac,v 1.1 1999/08/17 11:18:41 agc Exp $
+# an additional -R/usr/X11/lib and -lsocket may be required in case of
+# SunOS 5.x/SysVR4).
+
-+libxlib="-L${X11BASE}/lib -lX11"
++libxlib="${X11_LDFLAGS} -lX11"
+
+# Libraries against which to link the Xt extension (typically
+# -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11). -lXaw is needed to get the correct
+# definition of the vendor shell widget class
+
-+libxt="-L${X11BASE}/lib -lX11 -lXext -lICE -lSM -lXt -lXmu -lXaw"
-+
++libxt="${X11_LDFLAGS} ${XAW_LDFLAGS} -lX11 -lXext -lICE -lSM -lXt -lXmu ${XAW_LIB}"
+
+# Libraries against which to link the Athena widgets extension (typically
+# identical to libxt above)
+
-+libxaw="-L${X11BASE}/lib -lX11 -lXext -lICE -lSM -lXt -lXmu -lXaw"
++libxaw="${X11_LDFLAGS} ${XAW_LDFLAGS} -lX11 -lXext -lICE -lSM -lXt -lXmu ${XAW_LIB}"
+
+
+# Libraries against which to link the Motif extension (typically like
+# libaw above with Xaw replaced by Xm)
+
-+libxmotif="-L${X11BASE}/lib -lX11 -lXext -lICE -lSM -lXt -lXmu -lXm"
++libxmotif="${X11_LDFLAGS} ${MOTIF_LDFLAGS} -lX11 -lXext -lICE -lSM -lXt -lXmu ${MOTIF_LIB}"
+
+
+# Additional flags (typically -Isomething) to be supplied to the C
+# compiler when compiling an X11 application, or a Motif application,
+# respectively.
+
-+x11_incl=-I${X11BASE}/include
-+motif_incl=-I${X11BASE}/include
++x11_incl=${CPPFLAGS}
++motif_incl=${CPPFLAGS}
+
+
+# Set "gdbm" to "yes" if you have the GNU gdbm library installed and
@@ -530,7 +69,7 @@ $NetBSD: patch-ac,v 1.1 1999/08/17 11:18:41 agc Exp $
+# C compiler flags required to compile a program using gdbm.
+
+gdbm=
-+gdbm_incl=-I${PREFIX}/include
++gdbm_incl=${CPPFLAGS}
+
+
+# Do you want to use the generational garbage collector? If not, the
diff --git a/lang/elk/patches/patch-ad b/lang/elk/patches/patch-ad
index e83159460a6..eaa308bcb73 100644
--- a/lang/elk/patches/patch-ad
+++ b/lang/elk/patches/patch-ad
@@ -1,77 +1,375 @@
-$NetBSD: patch-ad,v 1.1 1999/08/17 11:18:41 agc Exp $
+$NetBSD: patch-ad,v 1.2 2002/01/09 23:04:55 seb Exp $
-*** src/dump-vanilla.c.orig Thu Jun 29 13:55:51 1995
---- src/dump-vanilla.c Thu Sep 7 15:00:35 1995
-***************
-*** 12,17 ****
---- 12,21 ----
-
- extern void *sbrk();
-
-+ #if defined(__FreeBSD__) || defined(__NetBSD__)
-+ extern etext;
-+ #endif
-+
- #if defined(hp9000s300) || defined(__hp9000s300) || defined(__hp9000s300__)
- static int getpagesize () {
- return EXEC_PAGESIZE;
-***************
-*** 113,125 ****
- close (afd);
- #if defined(__bsdi__)
- data_start = N_DATADDR(hdr);
- #else
- data_start = hdr.a_text;
- #if defined(sun) || defined(__sun__)
- data_start += pagemask+1;
- #endif
- data_start = (data_start + SEG_SIZ-1) & ~(SEG_SIZ-1);
-- #endif
- data_end = (unsigned)sbrk (0);
- #if !defined(__bsdi__)
- data_end = (data_end + pagemask) & ~pagemask;
---- 117,131 ----
- close (afd);
- #if defined(__bsdi__)
- data_start = N_DATADDR(hdr);
-+ #elif defined (__FreeBSD__) || defined(__NetBSD__)
-+ data_start = (int) &etext;
- #else
- data_start = hdr.a_text;
-+ #endif
- #if defined(sun) || defined(__sun__)
- data_start += pagemask+1;
- #endif
- data_start = (data_start + SEG_SIZ-1) & ~(SEG_SIZ-1);
- data_end = (unsigned)sbrk (0);
- #if !defined(__bsdi__)
- data_end = (data_end + pagemask) & ~pagemask;
-*** src/print.c.orig Mon Aug 7 09:28:42 1995
---- src/print.c Thu Sep 7 14:58:28 1995
-***************
-*** 6,11 ****
---- 6,12 ----
- #include <errno.h>
- #include <ctype.h>
- #include <varargs.h>
-+ #include <sys/param.h>
-
- #ifdef FLUSH_TIOCFLUSH
- # include <sys/ioctl.h>
-***************
-*** 555,561 ****
- register c;
- char buf[256];
- extern sys_nerr;
-! #ifndef __bsdi__
- extern char *sys_errlist[];
- #endif
- GC_Node;
---- 556,562 ----
- register c;
- char buf[256];
- extern sys_nerr;
-! #if !(defined(BSD) && (BSD >= 199306))
- extern char *sys_errlist[];
- #endif
- GC_Node;
+--- config/untested/386pc-freebsd2.1-cc.orig Sat Jan 5 18:03:08 2002
++++ config/untested/386pc-freebsd2.1-cc
+@@ -0,0 +1,370 @@
++# This is a shell script. It is sourced by the build scripts in the
++# various subdirectories to gather system-, compiler-, and OS-specific
++# information required for building the Makefiles.
++#
++# Most variables in this script are interpreted as boolean variables and
++# indicate presence or absence of one specific feature. The value "yes"
++# is regarded as "true", all other values (including no value or even
++# non-existence of the variable) are interpreted as "false".
++#
++# Do not forget to quote values that contain shell meta syntax.
++#
++# -----------------------------------------------------------------------
++
++
++# $system should contain the name of this file. It may be used by some
++# of the build scripts to do things that are specific to one single
++# type of system.
++
++system=386pc-freebsd2.1-cc
++
++
++# Does the system support the vprintf library function? If not,
++# availability of the (non-portable) _doprnt function is assumed.
++
++vprintf=yes
++
++
++# Does the directory(3) library follow the POSIX conventions (i.e.
++# requires the <dirent.h> include file and uses "struct dirent")?
++# If not, the (obsolete) BSD-style interface with <sys/dir.h> and
++# "struct direct" is assumed.
++
++dirent=yes
++
++
++# Does the system have the random/srandom library functions? If not,
++# rand/srand will be used instead.
++
++random=yes
++
++
++# Does the system have the index library function? If not, strchr
++# will be used.
++
++index=yes
++
++
++# Does the system have the bcopy, bzero, and bcmp library functions?
++# If not, memcpy/memset/memcmp will be used.
++
++bstring=yes
++
++
++# Does using the access system call require <unistd.h> to be included?
++# (Look into the manual page for access if in doubt.)
++
++include_unistd_h=yes
++
++
++# If the FIONREAD ioctl command is defined, which file must be included?
++
++fionread_include='<sys/ioctl.h>'
++
++
++# What is the name of the a.out include file?
++
++aout_h='<a.out.h>'
++
++
++# The following variables control how certain system limits are obtained
++# during runtime.
++#
++# If getdtablesize() is available to determine the maximum number of open
++# files per process, set getdtablesize=yes.
++# Alternatively, if POSIX-style sysconf() can be called with _SC_OPEN_MAX,
++# set sysconf_open_max=yes.
++# If neither is set to "yes", an educated guess will be made.
++
++getdtablesize=yes
++sysconf_open_max=yes
++
++# If POSIX-style pathconf() can be invoked with _PC_PATH_MAX to determine
++# the maximum pathname length, set pathconf_path_max=yes.
++
++pathconf_path_max=yes
++
++# If the system page size can be determined by calling getpagesize()
++# set getpagesize=yes.
++# Alternatively, if sysconf() can be invoked with _SC_PAGESIZE, set
++# sysconf_pagesize=yes.
++# These two variables are only required if the generational garbage
++# collector is used.
++
++getpagesize=yes
++sysconf_pagesize=no
++
++
++# Set reliable_signals=bsd if your system supports BSD-style reliable
++# signals (has sigblock and related functions); set reliable_signals=posix
++# for POSIX-style signals (sigprocmask, sigsets); otherwise old V7/SysV
++# signal semantics are assumed.
++
++reliable_signals=bsd
++
++
++# To support dynamic loading of object files and "dump", the system's
++# a.out format has to be known. Choose one of the following:
++#
++# coff ecoff xcoff elf macho hp9k convex
++#
++# Other values of "aout_format" are interpreted as BSD-style a.out format.
++
++aout_format=
++
++
++# Which mechanism should be used to dynamically load object files?
++# Possible values currently are:
++#
++# ld BSD-style incremental loading based on ld -A
++# rld NeXT-style rld_load()
++# shl HP-UX shl_load()
++# dl SysVR4/SunOS5 dlopen()
++#
++# Leave load_obj empty if dynamic loading is not supported.
++
++load_obj=dl
++
++
++ # The following variables are only relevant if load_obj is set.
++
++ # Linker options to produce a shared object from a .o file.
++ # Only used if load_obj=dl.
++
++ ldflags_shared='-Bshareable'
++
++ # The libraries against which dynamically loaded files are resolved
++ # at the time they are loaded.
++
++ load_libraries=
++
++ # Does the ld-option -x really do what the manual says it does (i.e.
++ # omit local symbols), or does it somehow render the resulting object
++ # file unsuitable for dynamic loading? If in doubt, leave it out
++ # (which may result in somewhat larger object files).
++
++ incremental_ldflags=-x
++
++ # Systems with "aout_format=ecoff" may require a call to the cacheflush
++ # system call after an object file has been loaded. Which include file
++ # has to be included in this case?
++
++ cachectl_h=unused
++
++ # Is the ANSI-C atexit function supported to register an exit handler?
++ # If not, the exit library function will be redefined and will end in
++ # a call to _exit.
++
++ atexit=yes
++
++
++# Do the names of external functions in the symbol table always begin
++# with a special character (such as underline)? If so, syms_begin_with
++# should hold this character, otherwise leave it empty.
++
++syms_begin_with=_
++
++
++# The symbol prefixes of extension initialization and finalization
++# functions (without the initial $syms_begin_with). Do not change
++# these unless the compiler or linker restricts the length of symbols!
++
++init_prefix=elk_init_
++finit_prefix=elk_finit_
++
++
++# Is the "dump" function supported?
++
++can_dump=no
++
++
++# The following variables are only relevant if "can_dump=yes".
++
++ # Is the fchmod system call broken or unavailable?
++
++ fchmod_broken=no
++
++ # These four variables are only relevant if the system has the BSD-style
++ # a.out format.
++ # segment_size is the segment size of the system's memory management
++ # unit, i.e. the number to a multiple of which the size of an a.out
++ # segment (e.g. .text) is rounded up.
++ # file_text_start is the file offset at which the text segment starts
++ # in an a.out file.
++ # mem_text_start is the starting address of the text segment in memory.
++ # text_length_adj must be set to "sizeof (struct exec)" if the length of
++ # the text segment stored in the a.out header includes the a.out header
++ # itself.
++
++ segment_size=__LDPGSZ
++ file_text_start='(N_TXTOFF(hdr) + sizeof(struct exec))'
++ mem_text_start='(sizeof(struct exec) + getpagesize())'
++ text_length_adj='(sizeof(struct exec))'
++
++ # Only relevant if "aout_format=coff": the system's pagesize.
++
++ coff_pagesize=
++
++ # Only relevant if "aout_format=hp9k" and "load_obj=shl"
++
++ hp_shared_libraries=yes
++
++ # Print debug messages when dumping
++
++ debug_dump=yes
++
++
++# Is the "termio" terminal interface supported by the system? If not,
++# BSD-style tty handling will be used.
++
++termio=yes
++
++
++# flush_stdio and flush_tty indicate how clear-input/output-port can
++# flush (purge) a FILE pointer and a TTY file descriptor.
++# Possible values of flush_stdio:
++# bsd assume old BSD-style FILE* (with _cnt, _ptr, _base)
++# fpurge use 4.4BSD-style fpurge stdio library function
++# linux use Linux-specific method
++# Possible values of flush_tty:
++# tiocflush use TIOCFLUSH ioctl from <sys/ioctl.h>
++# tcflsh use TCFLSH ioctl from <termio.h>
++# Leave the variable(s) empty if flushing is not supported.
++
++flush_stdio=fpurge
++flush_tty=tiocflush
++
++
++# The interpreter uses the getrlimit function to determine the maximum
++# stack size of the running program. If this function is not supported,
++# set max_stack_size to a (fixed) maximum stack size (in bytes).
++
++max_stack_size=
++
++
++# Is the mprotect system call supported? The generational garbage collector
++# requires mprotect to implement incremental GC. $mprotect is ignored if
++# generational_gc is set to "no" in the site file. Set mprotect=mmap if
++# mprotect is supported, but only for mmap()ed memory.
++
++mprotect=yes
++
++
++# How can a SIGSEGV or SIGBUS signal handler find out the address of
++# the faulting memory reference? This variable is only used if
++# $mprotect is "yes" or "mmap". Possible values are:
++#
++# siginfo handler is called with siginfo_t structure (enabled
++# by a call to sigaction)
++# sigcontext address is in the sigcontext structure (3rd arg, sc_badvaddr)
++# arg4 address is delivered to handler as argument #4
++# aix use an AIX-specific hack to get hold of the bad address
++# hpux use a HP-UX-specific hack
++
++sigsegv_addr=arg4
++
++
++# Does the system support the alloca library function, and does this
++# function actually extend the stack? If in doubt, extract alloca.o
++# from the C library and check if it contains the symbols malloc and free.
++# If this is the case, forget it.
++
++use_alloca=yes
++
++
++# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
++
++include_alloca_h=no
++pragma_alloca=no
++
++
++# Does the system (or compiler) require certain objects (e.g. doubles)
++# to be aligned at 8-byte boundaries? If not, 4-byte alignment will
++# be assumed.
++
++align_8byte=yes
++
++
++# The C compiler used to compile the source code.
++
++cc=cc
++
++
++# The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
++# in SVR4-based systems.
++
++ld=ld
++
++
++# The C compiler flags used for all files.
++
++cflags='-O2 -pipe -m486'
++
++
++# Are extra C compiler flags (such as -D_NO_PROTO) required to compile
++# Motif applications?
++
++motif_cflags=
++
++
++# Are extra C compiler flags (such as -G 0) required to compile
++# dynamically loadable files?
++
++obj_cflags='-fpic -DPIC'
++
++
++# Are extra linker flags (such as -G 0) required to link several object
++# files together to one dynamically loadable file?
++
++obj_ldflags=
++
++
++# The linker flags used to link the interpreter.
++
++ldflags='-lm'
++
++
++# The lint flags.
++
++lintflags='-abxh'
++
++
++# Are function prototypes in the header files required? If prototypes=yes,
++# prototypes are used unconditionally; if prototypes=no, prototypes are
++# not used; otherwise prototypes are only used if the source code is
++# compiled with an ANSI-C- or C++-compiler.
++
++prototypes=yes
++
++
++# Does your C preprocessor support the ANSI-C ## operator, although
++# __STDC__ is not defined?
++
++ansi_cpp=no
++
++
++# The UNIX extension likes to know which of the following system calls,
++# library functions, and include files are supported by the system.
++
++gettimeofday=yes
++ftime=
++vfork=yes
++gethostname=yes
++uname=yes
++mktemp=yes
++tmpnam=yes
++tempnam=yes
++getcwd=yes
++getwd=yes
++rename=yes
++waitpid=yes
++wait3=yes
++wait4=yes
++utime_h=yes
++regcomp=yes
++
++
++# Element type of the gidset argument of getgroups(); typically int
++# or gid_t. Only needed by the UNIX extension.
++
++getgroups_type=gid_t
diff --git a/lang/elk/patches/patch-ae b/lang/elk/patches/patch-ae
index 42233818873..67a902c46a6 100644
--- a/lang/elk/patches/patch-ae
+++ b/lang/elk/patches/patch-ae
@@ -1,17 +1,375 @@
-$NetBSD: patch-ae,v 1.1 1999/08/17 11:18:41 agc Exp $
+$NetBSD: patch-ae,v 1.2 2002/01/09 23:04:55 seb Exp $
-*** src/load-dl.c Sun Dec 17 15:45:40 1995
---- src/load-dl.c Sun Dec 17 15:46:22 1995
-***************
-*** 4,9 ****
---- 4,13 ----
- extern char *strrchr();
- extern char *getenv();
-
-+ #ifndef RTLD_NOW
-+ #define RTLD_NOW 1
-+ #endif
-+
- Dlopen_File (fn) char *fn; {
- void *handle;
- SYM *sp;
+--- config/untested/aout-netbsd-cc.orig Sat Jan 5 18:03:08 2002
++++ config/untested/aout-netbsd-cc
+@@ -0,0 +1,370 @@
++# This is a shell script. It is sourced by the build scripts in the
++# various subdirectories to gather system-, compiler-, and OS-specific
++# information required for building the Makefiles.
++#
++# Most variables in this script are interpreted as boolean variables and
++# indicate presence or absence of one specific feature. The value "yes"
++# is regarded as "true", all other values (including no value or even
++# non-existence of the variable) are interpreted as "false".
++#
++# Do not forget to quote values that contain shell meta syntax.
++#
++# -----------------------------------------------------------------------
++
++
++# $system should contain the name of this file. It may be used by some
++# of the build scripts to do things that are specific to one single
++# type of system.
++
++system=aout-netbsd-cc
++
++
++# Does the system support the vprintf library function? If not,
++# availability of the (non-portable) _doprnt function is assumed.
++
++vprintf=yes
++
++
++# Does the directory(3) library follow the POSIX conventions (i.e.
++# requires the <dirent.h> include file and uses "struct dirent")?
++# If not, the (obsolete) BSD-style interface with <sys/dir.h> and
++# "struct direct" is assumed.
++
++dirent=yes
++
++
++# Does the system have the random/srandom library functions? If not,
++# rand/srand will be used instead.
++
++random=yes
++
++
++# Does the system have the index library function? If not, strchr
++# will be used.
++
++index=yes
++
++
++# Does the system have the bcopy, bzero, and bcmp library functions?
++# If not, memcpy/memset/memcmp will be used.
++
++bstring=no
++
++
++# Does using the access system call require <unistd.h> to be included?
++# (Look into the manual page for access if in doubt.)
++
++include_unistd_h=yes
++
++
++# If the FIONREAD ioctl command is defined, which file must be included?
++
++fionread_include='<sys/ioctl.h>'
++
++
++# What is the name of the a.out include file?
++
++aout_h='<a.out.h>'
++
++
++# The following variables control how certain system limits are obtained
++# during runtime.
++#
++# If getdtablesize() is available to determine the maximum number of open
++# files per process, set getdtablesize=yes.
++# Alternatively, if POSIX-style sysconf() can be called with _SC_OPEN_MAX,
++# set sysconf_open_max=yes.
++# If neither is set to "yes", an educated guess will be made.
++
++getdtablesize=yes
++sysconf_open_max=yes
++
++# If POSIX-style pathconf() can be invoked with _PC_PATH_MAX to determine
++# the maximum pathname length, set pathconf_path_max=yes.
++
++pathconf_path_max=yes
++
++# If the system page size can be determined by calling getpagesize()
++# set getpagesize=yes.
++# Alternatively, if sysconf() can be invoked with _SC_PAGESIZE, set
++# sysconf_pagesize=yes.
++# These two variables are only required if the generational garbage
++# collector is used.
++
++getpagesize=yes
++sysconf_pagesize=no
++
++
++# Set reliable_signals=bsd if your system supports BSD-style reliable
++# signals (has sigblock and related functions); set reliable_signals=posix
++# for POSIX-style signals (sigprocmask, sigsets); otherwise old V7/SysV
++# signal semantics are assumed.
++
++reliable_signals=bsd
++
++
++# To support dynamic loading of object files and "dump", the system's
++# a.out format has to be known. Choose one of the following:
++#
++# coff ecoff xcoff elf macho hp9k convex
++#
++# Other values of "aout_format" are interpreted as BSD-style a.out format.
++
++aout_format=
++
++
++# Which mechanism should be used to dynamically load object files?
++# Possible values currently are:
++#
++# ld BSD-style incremental loading based on ld -A
++# rld NeXT-style rld_load()
++# shl HP-UX shl_load()
++# dl SysVR4/SunOS5 dlopen()
++#
++# Leave load_obj empty if dynamic loading is not supported.
++
++load_obj=dl
++
++
++ # The following variables are only relevant if load_obj is set.
++
++ # Linker options to produce a shared object from a .o file.
++ # Only used if load_obj=dl.
++
++ ldflags_shared='-Bshareable'
++
++ # The libraries against which dynamically loaded files are resolved
++ # at the time they are loaded.
++
++ load_libraries=
++
++ # Does the ld-option -x really do what the manual says it does (i.e.
++ # omit local symbols), or does it somehow render the resulting object
++ # file unsuitable for dynamic loading? If in doubt, leave it out
++ # (which may result in somewhat larger object files).
++
++ incremental_ldflags=-x
++
++ # Systems with "aout_format=ecoff" may require a call to the cacheflush
++ # system call after an object file has been loaded. Which include file
++ # has to be included in this case?
++
++ cachectl_h=unused
++
++ # Is the ANSI-C atexit function supported to register an exit handler?
++ # If not, the exit library function will be redefined and will end in
++ # a call to _exit.
++
++ atexit=yes
++
++
++# Do the names of external functions in the symbol table always begin
++# with a special character (such as underline)? If so, syms_begin_with
++# should hold this character, otherwise leave it empty.
++
++syms_begin_with=_
++
++
++# The symbol prefixes of extension initialization and finalization
++# functions (without the initial $syms_begin_with). Do not change
++# these unless the compiler or linker restricts the length of symbols!
++
++init_prefix=elk_init_
++finit_prefix=elk_finit_
++
++
++# Is the "dump" function supported?
++
++can_dump=no
++
++
++# The following variables are only relevant if "can_dump=yes".
++
++ # Is the fchmod system call broken or unavailable?
++
++ fchmod_broken=no
++
++ # These four variables are only relevant if the system has the BSD-style
++ # a.out format.
++ # segment_size is the segment size of the system's memory management
++ # unit, i.e. the number to a multiple of which the size of an a.out
++ # segment (e.g. .text) is rounded up.
++ # file_text_start is the file offset at which the text segment starts
++ # in an a.out file.
++ # mem_text_start is the starting address of the text segment in memory.
++ # text_length_adj must be set to "sizeof (struct exec)" if the length of
++ # the text segment stored in the a.out header includes the a.out header
++ # itself.
++
++ segment_size=__LDPGSZ
++ file_text_start='(N_TXTOFF(hdr) + sizeof(struct exec))'
++ mem_text_start='(sizeof(struct exec) + getpagesize())'
++ text_length_adj='(sizeof(struct exec))'
++
++ # Only relevant if "aout_format=coff": the system's pagesize.
++
++ coff_pagesize=
++
++ # Only relevant if "aout_format=hp9k" and "load_obj=shl"
++
++ hp_shared_libraries=yes
++
++ # Print debug messages when dumping
++
++ debug_dump=yes
++
++
++# Is the "termio" terminal interface supported by the system? If not,
++# BSD-style tty handling will be used.
++
++termio=yes
++
++
++# flush_stdio and flush_tty indicate how clear-input/output-port can
++# flush (purge) a FILE pointer and a TTY file descriptor.
++# Possible values of flush_stdio:
++# bsd assume old BSD-style FILE* (with _cnt, _ptr, _base)
++# fpurge use 4.4BSD-style fpurge stdio library function
++# linux use Linux-specific method
++# Possible values of flush_tty:
++# tiocflush use TIOCFLUSH ioctl from <sys/ioctl.h>
++# tcflsh use TCFLSH ioctl from <termio.h>
++# Leave the variable(s) empty if flushing is not supported.
++
++flush_stdio=fpurge
++flush_tty=tiocflush
++
++
++# The interpreter uses the getrlimit function to determine the maximum
++# stack size of the running program. If this function is not supported,
++# set max_stack_size to a (fixed) maximum stack size (in bytes).
++
++max_stack_size=
++
++
++# Is the mprotect system call supported? The generational garbage collector
++# requires mprotect to implement incremental GC. $mprotect is ignored if
++# generational_gc is set to "no" in the site file. Set mprotect=mmap if
++# mprotect is supported, but only for mmap()ed memory.
++
++mprotect=yes
++
++
++# How can a SIGSEGV or SIGBUS signal handler find out the address of
++# the faulting memory reference? This variable is only used if
++# $mprotect is "yes" or "mmap". Possible values are:
++#
++# siginfo handler is called with siginfo_t structure (enabled
++# by a call to sigaction)
++# sigcontext address is in the sigcontext structure (3rd arg, sc_badvaddr)
++# arg4 address is delivered to handler as argument #4
++# aix use an AIX-specific hack to get hold of the bad address
++# hpux use a HP-UX-specific hack
++
++sigsegv_addr=arg4
++
++
++# Does the system support the alloca library function, and does this
++# function actually extend the stack? If in doubt, extract alloca.o
++# from the C library and check if it contains the symbols malloc and free.
++# If this is the case, forget it.
++
++use_alloca=yes
++
++
++# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
++
++include_alloca_h=no
++pragma_alloca=no
++
++
++# Does the system (or compiler) require certain objects (e.g. doubles)
++# to be aligned at 8-byte boundaries? If not, 4-byte alignment will
++# be assumed.
++
++align_8byte=yes
++
++
++# The C compiler used to compile the source code.
++
++cc=cc
++
++
++# The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
++# in SVR4-based systems.
++
++ld=ld
++
++
++# The C compiler flags used for all files.
++
++cflags='-O2 -pipe'
++
++
++# Are extra C compiler flags (such as -D_NO_PROTO) required to compile
++# Motif applications?
++
++motif_cflags=
++
++
++# Are extra C compiler flags (such as -G 0) required to compile
++# dynamically loadable files?
++
++obj_cflags='-fPIC -DPIC'
++
++
++# Are extra linker flags (such as -G 0) required to link several object
++# files together to one dynamically loadable file?
++
++obj_ldflags=
++
++
++# The linker flags used to link the interpreter.
++
++ldflags='-lm'
++
++
++# The lint flags.
++
++lintflags='-abxh'
++
++
++# Are function prototypes in the header files required? If prototypes=yes,
++# prototypes are used unconditionally; if prototypes=no, prototypes are
++# not used; otherwise prototypes are only used if the source code is
++# compiled with an ANSI-C- or C++-compiler.
++
++prototypes=yes
++
++
++# Does your C preprocessor support the ANSI-C ## operator, although
++# __STDC__ is not defined?
++
++ansi_cpp=no
++
++
++# The UNIX extension likes to know which of the following system calls,
++# library functions, and include files are supported by the system.
++
++gettimeofday=yes
++ftime=
++vfork=yes
++gethostname=yes
++uname=yes
++mktemp=yes
++tmpnam=yes
++tempnam=yes
++getcwd=yes
++getwd=yes
++rename=yes
++waitpid=yes
++wait3=yes
++wait4=yes
++utime_h=yes
++regcomp=yes
++
++
++# Element type of the gidset argument of getgroups(); typically int
++# or gid_t. Only needed by the UNIX extension.
++
++getgroups_type=gid_t
diff --git a/lang/elk/patches/patch-af b/lang/elk/patches/patch-af
index 87c1681178c..fd91e5c8b2f 100644
--- a/lang/elk/patches/patch-af
+++ b/lang/elk/patches/patch-af
@@ -1,132 +1,379 @@
-$NetBSD: patch-af,v 1.2 2000/02/07 01:58:26 wiz Exp $
+$NetBSD: patch-af,v 1.3 2002/01/09 23:04:56 seb Exp $
---- include/build 1998/03/31 09:49:53 1.1
-+++ include/build 1998/03/31 09:53:47
-@@ -21,18 +21,17 @@
- stkmem.h\\
- type.h
-
-+INCDIR= \${PREFIX}/include/elk
-+
- config.h: ../config/system ../config/site
- \$(SHELL) ./build-config
-
- install: \$(FILES)
-- -@if [ ! -d $install_dir/include ]; then \\
-- echo mkdir $install_dir/include; \\
-- mkdir $install_dir/include; \\
-- fi
-+ -@mkdir -p \${INCDIR}
- @for i in \$(FILES) ;\\
- do \\
-- echo cp \$\$i $install_dir/include; \\
-- cp \$\$i $install_dir/include; \\
-+ echo \${BSD_INSTALL_DATA} \$\$i \${INCDIR}; \\
-+ \${BSD_INSTALL_DATA} \$\$i \${INCDIR}; \\
- done
-
- localize: config.h
---- src/build 1998/03/31 09:58:17 1.1
-+++ src/build 1998/03/31 10:00:03
-@@ -181,11 +181,7 @@
- rm main3.c
-
- install: scheme standalone.o module.o
-- -@if [ ! -d $install_dir/bin ]; then \\
-- echo mkdir $install_dir/bin; \\
-- mkdir $install_dir/bin; \\
-- fi
-- cp scheme $install_dir/bin
-+ \${BSD_INSTALL_PROGRAM} scheme \${PREFIX}/bin/elk
- -@if [ ! -d $install_dir/lib ]; then \\
- echo mkdir $install_dir/lib; \\
- mkdir $install_dir/lib; \\
---- lib/xlib/build 1998/03/31 10:24:34 1.1
-+++ lib/xlib/build 1998/03/31 10:26:57
-@@ -117,15 +117,8 @@
- mkdir $install_dir/runtime/obj; \\
- fi
- cp xlib.pre $install_dir/runtime/obj/xlib.o
-- -@if [ ! -d $install_dir/include ]; then \\
-- echo mkdir $install_dir/include; \\
-- mkdir $install_dir/include; \\
-- fi
-- -@if [ ! -d $install_dir/include/extensions ]; then \\
-- echo mkdir $install_dir/include/extensions; \\
-- mkdir $install_dir/include/extensions; \\
-- fi
-- cp xlib.h $install_dir/include/extensions
-+ -@mkdir -p \${PREFIX}/include/elk/extensions
-+ \${BSD_INSTALL_DATA} xlib.h \${PREFIX}/include/elk/extensions
-
- lint:
- lint \$(LINTFLAGS) -I\$(INC) $x11_incl \$(C)
---- lib/unix/build 1998/03/31 10:28:09 1.1
-+++ lib/unix/build 1998/03/31 10:28:42
-@@ -87,15 +87,9 @@
- mkdir $install_dir/runtime/obj; \\
- fi
- cp unix.pre $install_dir/runtime/obj/unix.o
-- -@if [ ! -d $install_dir/include ]; then \\
-- echo mkdir $install_dir/include; \\
-- mkdir $install_dir/include; \\
-- fi
-- -@if [ ! -d $install_dir/include/extensions ]; then \\
-- echo mkdir $install_dir/include/extensions; \\
-- mkdir $install_dir/include/extensions; \\
-- fi
-- cp unix.h $install_dir/include/extensions
-+ -@mkdir -p \${PREFIX}/include/elk/extensions
-+ \${BSD_INSTALL_DATA} unix.h \${PREFIX}/include/elk/extensions
-+
-
- lint:
- lint \$(LINTFLAGS) -I\$(INC) \$(C)
---- lib/xt/build 1998/03/31 10:29:31 1.1
-+++ lib/xt/build 1998/03/31 10:30:02
-@@ -97,15 +97,9 @@
- mkdir $install_dir/runtime/obj; \\
- fi
- cp xt.pre $install_dir/runtime/obj/xt.o
-- -@if [ ! -d $install_dir/include ]; then \\
-- echo mkdir $install_dir/include; \\
-- mkdir $install_dir/include; \\
-- fi
-- -@if [ ! -d $install_dir/include/extensions ]; then \\
-- echo mkdir $install_dir/include/extensions; \\
-- mkdir $install_dir/include/extensions; \\
-- fi
-- cp xt.h $install_dir/include/extensions
-+ -@mkdir -p \${PREFIX}/include/elk/extensions
-+ \${BSD_INSTALL_DATA} xt.h \${PREFIX}/include/elk/extensions
-+
-
- lint:
- lint \$(LINTFLAGS) -I\$(INC) -I../xlib $x11_incl \$(C)
---- doc/man/Makefile 1998/03/31 10:42:41 1.1
-+++ doc/man/Makefile 1998/03/31 10:43:33
-@@ -7,5 +7,10 @@
- elk.1.html: elk.1
- $(UNROFF) $?
-
-+default: elk.1
-+
- clean:
- rm -f elk.ps elk.1.html
-+
-+install: elk.1
-+ ${BSD_INSTALL_MAN} elk.1 ${PREFIX}/man/man1
---- scripts/build 1998/03/31 11:15:29 1.1
-+++ scripts/build 1998/03/31 11:16:06
-@@ -30,10 +30,7 @@
- chmod +x \$@
-
- install: \$(FILES)
-- -@if [ ! -d $install_dir/lib ]; then \\
-- echo mkdir $install_dir/lib; \\
-- mkdir $install_dir/lib; \\
-- fi
-+ -@mkdir -p $install_dir/lib
- cp linkscheme $install_dir/lib
- cp makedl $install_dir/lib
- cp ldflags $install_dir/lib
+--- config/untested/elf-netbsd-cc.orig Sat Jan 5 18:03:08 2002
++++ config/untested/elf-netbsd-cc
+@@ -0,0 +1,374 @@
++# This is a shell script. It is sourced by the build scripts in the
++# various subdirectories to gather system-, compiler-, and OS-specific
++# information required for building the Makefiles.
++#
++# Most variables in this script are interpreted as boolean variables and
++# indicate presence or absence of one specific feature. The value "yes"
++# is regarded as "true", all other values (including no value or even
++# non-existence of the variable) are interpreted as "false".
++#
++# Do not forget to quote values that contain shell meta syntax.
++#
++# -----------------------------------------------------------------------
++
++
++# $system should contain the name of this file. It may be used by some
++# of the build scripts to do things that are specific to one single
++# type of system.
++
++system=elf-netbsd-cc
++
++
++# Does the system support the vprintf library function? If not,
++# availability of the (non-portable) _doprnt function is assumed.
++
++vprintf=yes
++
++
++# Does the directory(3) library follow the POSIX conventions (i.e.
++# requires the <dirent.h> include file and uses "struct dirent")?
++# If not, the (obsolete) BSD-style interface with <sys/dir.h> and
++# "struct direct" is assumed.
++
++dirent=yes
++
++
++# Does the system have the random/srandom library functions? If not,
++# rand/srand will be used instead.
++
++random=yes
++
++
++# Does the system have the index library function? If not, strchr
++# will be used.
++
++index=yes
++
++
++# Does the system have the bcopy, bzero, and bcmp library functions?
++# If not, memcpy/memset/memcmp will be used.
++
++bstring=no
++
++
++# Does using the access system call require <unistd.h> to be included?
++# (Look into the manual page for access if in doubt.)
++
++include_unistd_h=yes
++
++
++# If the FIONREAD ioctl command is defined, which file must be included?
++
++fionread_include='<sys/ioctl.h>'
++
++
++# What is the name of the a.out include file?
++
++aout_h='<a.out.h>'
++
++
++# The following variables control how certain system limits are obtained
++# during runtime.
++#
++# If getdtablesize() is available to determine the maximum number of open
++# files per process, set getdtablesize=yes.
++# Alternatively, if POSIX-style sysconf() can be called with _SC_OPEN_MAX,
++# set sysconf_open_max=yes.
++# If neither is set to "yes", an educated guess will be made.
++
++getdtablesize=yes
++sysconf_open_max=yes
++
++# If POSIX-style pathconf() can be invoked with _PC_PATH_MAX to determine
++# the maximum pathname length, set pathconf_path_max=yes.
++
++pathconf_path_max=yes
++
++# If the system page size can be determined by calling getpagesize()
++# set getpagesize=yes.
++# Alternatively, if sysconf() can be invoked with _SC_PAGESIZE, set
++# sysconf_pagesize=yes.
++# These two variables are only required if the generational garbage
++# collector is used.
++
++getpagesize=yes
++sysconf_pagesize=no
++
++
++# Set reliable_signals=bsd if your system supports BSD-style reliable
++# signals (has sigblock and related functions); set reliable_signals=posix
++# for POSIX-style signals (sigprocmask, sigsets); otherwise old V7/SysV
++# signal semantics are assumed.
++
++reliable_signals=bsd
++
++
++# To support dynamic loading of object files and "dump", the system's
++# a.out format has to be known. Choose one of the following:
++#
++# coff ecoff xcoff elf macho hp9k convex
++#
++# Other values of "aout_format" are interpreted as BSD-style a.out format.
++
++aout_format=elf
++
++
++# Which mechanism should be used to dynamically load object files?
++# Possible values currently are:
++#
++# ld BSD-style incremental loading based on ld -A
++# rld NeXT-style rld_load()
++# shl HP-UX shl_load()
++# dl SysVR4/SunOS5 dlopen()
++#
++# Leave load_obj empty if dynamic loading is not supported.
++
++load_obj=dl
++
++
++ # The following variables are only relevant if load_obj is set.
++
++ # Linker options to produce a shared object from a .o file.
++ # Only used if load_obj=dl.
++
++ ldflags_shared='-Bshareable'
++
++ # The libraries against which dynamically loaded files are resolved
++ # at the time they are loaded.
++
++ load_libraries=
++
++ # Does the ld-option -x really do what the manual says it does (i.e.
++ # omit local symbols), or does it somehow render the resulting object
++ # file unsuitable for dynamic loading? If in doubt, leave it out
++ # (which may result in somewhat larger object files).
++
++ incremental_ldflags=-x
++
++ # Systems with "aout_format=ecoff" may require a call to the cacheflush
++ # system call after an object file has been loaded. Which include file
++ # has to be included in this case?
++
++ cachectl_h=unused
++
++ # Is the ANSI-C atexit function supported to register an exit handler?
++ # If not, the exit library function will be redefined and will end in
++ # a call to _exit.
++
++ atexit=yes
++
++
++# Do the names of external functions in the symbol table always begin
++# with a special character (such as underline)? If so, syms_begin_with
++# should hold this character, otherwise leave it empty.
++
++syms_begin_with=
++
++
++# The symbol prefixes of extension initialization and finalization
++# functions (without the initial $syms_begin_with). Do not change
++# these unless the compiler or linker restricts the length of symbols!
++
++init_prefix=elk_init_
++finit_prefix=elk_finit_
++
++
++# Is the "dump" function supported?
++
++can_dump=no
++
++
++# The following variables are only relevant if "can_dump=yes".
++
++ # Is the fchmod system call broken or unavailable?
++
++ fchmod_broken=no
++
++ # These four variables are only relevant if the system has the BSD-style
++ # a.out format.
++ # segment_size is the segment size of the system's memory management
++ # unit, i.e. the number to a multiple of which the size of an a.out
++ # segment (e.g. .text) is rounded up.
++ # file_text_start is the file offset at which the text segment starts
++ # in an a.out file.
++ # mem_text_start is the starting address of the text segment in memory.
++ # text_length_adj must be set to "sizeof (struct exec)" if the length of
++ # the text segment stored in the a.out header includes the a.out header
++ # itself.
++
++ segment_size=__LDPGSZ
++ file_text_start='(N_TXTOFF(hdr) + sizeof(struct exec))'
++ mem_text_start='(sizeof(struct exec) + getpagesize())'
++ text_length_adj='(sizeof(struct exec))'
++
++ # Only relevant if "aout_format=coff": the system's pagesize.
++
++ coff_pagesize=
++
++ # Only relevant if "aout_format=hp9k" and "load_obj=shl"
++
++ hp_shared_libraries=yes
++
++ # Print debug messages when dumping
++
++ debug_dump=yes
++
++
++# Is the "termio" terminal interface supported by the system? If not,
++# BSD-style tty handling will be used.
++
++termio=yes
++
++
++# flush_stdio and flush_tty indicate how clear-input/output-port can
++# flush (purge) a FILE pointer and a TTY file descriptor.
++# Possible values of flush_stdio:
++# bsd assume old BSD-style FILE* (with _cnt, _ptr, _base)
++# fpurge use 4.4BSD-style fpurge stdio library function
++# linux use Linux-specific method
++# Possible values of flush_tty:
++# tiocflush use TIOCFLUSH ioctl from <sys/ioctl.h>
++# tcflsh use TCFLSH ioctl from <termio.h>
++# Leave the variable(s) empty if flushing is not supported.
++
++flush_stdio=fpurge
++flush_tty=tiocflush
++
++
++# The interpreter uses the getrlimit function to determine the maximum
++# stack size of the running program. If this function is not supported,
++# set max_stack_size to a (fixed) maximum stack size (in bytes).
++
++max_stack_size=
++
++
++# Is the mprotect system call supported? The generational garbage collector
++# requires mprotect to implement incremental GC. $mprotect is ignored if
++# generational_gc is set to "no" in the site file. Set mprotect=mmap if
++# mprotect is supported, but only for mmap()ed memory.
++
++mprotect=yes
++
++
++# How can a SIGSEGV or SIGBUS signal handler find out the address of
++# the faulting memory reference? This variable is only used if
++# $mprotect is "yes" or "mmap". Possible values are:
++#
++# siginfo handler is called with siginfo_t structure (enabled
++# by a call to sigaction)
++# sigcontext address is in the sigcontext structure (3rd arg, sc_badvaddr)
++# arg4 address is delivered to handler as argument #4
++# aix use an AIX-specific hack to get hold of the bad address
++# hpux use a HP-UX-specific hack
++
++sigsegv_addr=arg4
++
++
++# Does the system support the alloca library function, and does this
++# function actually extend the stack? If in doubt, extract alloca.o
++# from the C library and check if it contains the symbols malloc and free.
++# If this is the case, forget it.
++
++use_alloca=yes
++
++
++# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
++
++include_alloca_h=no
++pragma_alloca=no
++
++
++# Does the system (or compiler) require certain objects (e.g. doubles)
++# to be aligned at 8-byte boundaries? If not, 4-byte alignment will
++# be assumed.
++
++align_8byte=yes
++
++
++# The C compiler used to compile the source code.
++
++cc=cc
++
++
++# The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
++# in SVR4-based systems.
++
++ld=ld
++
++
++# The C compiler flags used for all files.
++
++cflags='-O2 -pipe'
++
++
++# Are extra C compiler flags (such as -D_NO_PROTO) required to compile
++# Motif applications?
++
++motif_cflags=
++
++
++# Are extra C compiler flags (such as -G 0) required to compile
++# dynamically loadable files?
++
++obj_cflags='-fPIC -DPIC'
++
++
++# Are extra linker flags (such as -G 0) required to link several object
++# files together to one dynamically loadable file?
++
++obj_ldflags=
++
++
++# The linker flags used to link the interpreter.
++
++ldflags='-lm'
++
++
++# The lint flags.
++
++lintflags='-abxh'
++
++
++# Are function prototypes in the header files required? If prototypes=yes,
++# prototypes are used unconditionally; if prototypes=no, prototypes are
++# not used; otherwise prototypes are only used if the source code is
++# compiled with an ANSI-C- or C++-compiler.
++
++prototypes=yes
++
++
++# Does your C preprocessor support the ANSI-C ## operator, although
++# __STDC__ is not defined?
++
++ansi_cpp=no
++
++
++# The UNIX extension likes to know which of the following system calls,
++# library functions, and include files are supported by the system.
++
++gettimeofday=yes
++ftime=
++vfork=yes
++gethostname=yes
++uname=yes
++mktemp=yes
++tmpnam=yes
++tempnam=yes
++getcwd=yes
++getwd=yes
++rename=yes
++waitpid=yes
++wait3=yes
++wait4=yes
++utime_h=yes
++regcomp=yes
++
++
++# Element type of the gidset argument of getgroups(); typically int
++# or gid_t. Only needed by the UNIX extension.
++
++getgroups_type=gid_t
++
++# which flags - if any - need to be passed to cc so a binary have all its
++# symbols added top the dynamic symbol table
++exportflags=-Wl,--export-dynamic
diff --git a/lang/elk/patches/patch-ag b/lang/elk/patches/patch-ag
index 82f28f9c6cc..02b605658ac 100644
--- a/lang/elk/patches/patch-ag
+++ b/lang/elk/patches/patch-ag
@@ -1,18 +1,15 @@
-$NetBSD: patch-ag,v 1.1 1999/08/17 11:18:41 agc Exp $
+$NetBSD: patch-ag,v 1.2 2002/01/09 23:04:56 seb Exp $
-Avoid conflicts with the definition in <sys/param.h>
-
---- include/misc.h 1999/08/17 08:00:50 1.1
-+++ include/misc.h 1999/08/17 08:01:01
-@@ -38,9 +38,9 @@
-
- /* Align heap addresses */
- #ifdef ALIGN_8BYTE
--# define ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 7) & ~7))
-+# define ELK_ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 7) & ~7))
- #else
--# define ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 3) & ~3))
-+# define ELK_ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 3) & ~3))
- #endif
+--- doc/man/Makefile.orig Tue Jul 25 16:20:17 1995
++++ doc/man/Makefile
+@@ -7,5 +7,10 @@
+ elk.1.html: elk.1
+ $(UNROFF) $?
- /* Normalize stack addresses */
++default: elk.1
++
+ clean:
+ rm -f elk.ps elk.1.html
++
++install: elk.1
++ ${BSD_INSTALL_MAN} elk.1 ${PREFIX}/man/man1
diff --git a/lang/elk/patches/patch-ah b/lang/elk/patches/patch-ah
index 4a6cf7df5c4..a588a73dc48 100644
--- a/lang/elk/patches/patch-ah
+++ b/lang/elk/patches/patch-ah
@@ -1,29 +1,34 @@
-$NetBSD: patch-ah,v 1.1 1999/08/17 11:18:41 agc Exp $
+$NetBSD: patch-ah,v 1.2 2002/01/09 23:04:56 seb Exp $
-Avoid conflicts with the definition in <sys/param.h>
-
---- src/heap-sc.c 1999/08/17 08:01:56 1.1
-+++ src/heap-sc.c 1999/08/17 08:02:34
-@@ -37,11 +37,11 @@
- (void)P_Collect ();
- p = Hp;
- }
-- ALIGN(p);
-+ ELK_ALIGN(p);
- if (p + size > Heap_End) {
- (void)P_Collect ();
- p = Hp;
-- ALIGN(p);
-+ ELK_ALIGN(p);
- if (p + size > Heap_End - HEAP_MARGIN)
- Uncatchable_Error ("Out of heap space");
- }
-@@ -108,7 +108,7 @@
- SETPOINTER(*p, POINTER(*tag));
- return;
- }
-- ALIGN(To);
-+ ELK_ALIGN(To);
- switch (t) {
- case T_Bignum:
- size = sizeof (struct S_Bignum) - sizeof (gran_t)
+--- doc/man/elk.1.orig Fri Aug 11 16:27:03 1995
++++ doc/man/elk.1
+@@ -2,9 +2,9 @@
+ .TH ELK 1 "15 January 1991"
+ .UC 4
+ .SH NAME
+-elk, scheme \- extensible Scheme interpreter
++elk \- extensible Scheme interpreter
+ .SH SYNOPSIS
+-.B scheme
++.B elk
+ [
+ .B \-l \f2file\fP
+ ] [
+@@ -20,8 +20,6 @@
+ ] [[
+ .B \-\^\-
+ ] \f2args\fP]
+-.LP
+-.BR elk .\|.\|.
+ .SH DESCRIPTION
+ .I Elk
+ (Extension Language Kit) is a Scheme implementation designed
+@@ -32,7 +30,7 @@
+ is linked with the application it serves, but a stand-alone version
+ of the Scheme interpreter is installed as well (usually under
+ the name
+-.BR scheme ).
++.BR elk ).
+ This interpreter, together with the standard Scheme toplevel,
+ .I Elk
+ can be used as an ordinary, stand-alone implementation of the
diff --git a/lang/elk/patches/patch-ai b/lang/elk/patches/patch-ai
index 9e806e3468a..a378d4a76eb 100644
--- a/lang/elk/patches/patch-ai
+++ b/lang/elk/patches/patch-ai
@@ -1,15 +1,28 @@
-$NetBSD: patch-ai,v 1.1 1999/08/17 11:18:41 agc Exp $
+$NetBSD: patch-ai,v 1.2 2002/01/09 23:04:56 seb Exp $
-Avoid conflicts with the definition in <sys/param.h>
-
---- src/list.c 1999/08/17 08:01:56 1.1
-+++ src/list.c 1999/08/17 08:02:37
-@@ -23,7 +23,7 @@
- register char *p;
+--- include/build.orig Thu Jun 22 19:18:14 1995
++++ include/build
+@@ -21,18 +21,17 @@
+ stkmem.h\\
+ type.h
+
++INCDIR= \${PREFIX}/include/elk
++
+ config.h: ../config/system ../config/site
+ \$(SHELL) ./build-config
+
+ install: \$(FILES)
+- -@if [ ! -d $install_dir/include ]; then \\
+- echo mkdir $install_dir/include; \\
+- mkdir $install_dir/include; \\
+- fi
++ -@mkdir -p \${INCDIR}
+ @for i in \$(FILES) ;\\
+ do \\
+- echo cp \$\$i $install_dir/include; \\
+- cp \$\$i $install_dir/include; \\
++ echo \${BSD_INSTALL_DATA} \$\$i \${INCDIR}; \\
++ \${BSD_INSTALL_DATA} \$\$i \${INCDIR}; \\
+ done
- p = Hp;
-- ALIGN(p);
-+ ELK_ALIGN(p);
- if (p + sizeof (struct S_Pair) <= Heap_End && !GC_Debug) {
- Hp = p + sizeof (struct S_Pair);
- SET(cell, T_Pair, (struct S_Pair *)p);
+ localize: config.h
diff --git a/lang/elk/patches/patch-aj b/lang/elk/patches/patch-aj
index c54e29d991b..b368b860519 100644
--- a/lang/elk/patches/patch-aj
+++ b/lang/elk/patches/patch-aj
@@ -1,15 +1,16 @@
-$NetBSD: patch-aj,v 1.1 1999/08/17 11:18:41 agc Exp $
+$NetBSD: patch-aj,v 1.2 2002/01/09 23:04:56 seb Exp $
-Avoid conflicts with the definition in <sys/param.h>
-
---- src/main.c 1999/08/17 08:01:56 1.1
-+++ src/main.c 1999/08/17 08:02:42
-@@ -196,7 +196,7 @@
+--- include/misc.h.orig Wed Aug 2 18:16:09 1995
++++ include/misc.h
+@@ -38,9 +38,9 @@
+
+ /* Align heap addresses */
+ #ifdef ALIGN_8BYTE
+-# define ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 7) & ~7))
++# define ELK_ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 7) & ~7))
+ #else
+-# define ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 3) & ~3))
++# define ELK_ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 3) & ~3))
+ #endif
- stkbase = &foo;
- Stack_Grows_Down = Check_Stack_Grows_Down ();
-- ALIGN(stkbase);
-+ ELK_ALIGN(stkbase);
- Make_Heap (heap);
- Init_Everything ();
- #ifdef ATEXIT
+ /* Normalize stack addresses */
diff --git a/lang/elk/patches/patch-ak b/lang/elk/patches/patch-ak
index b01cd0d13f7..edf0d5f245a 100644
--- a/lang/elk/patches/patch-ak
+++ b/lang/elk/patches/patch-ak
@@ -1,40 +1,23 @@
-$NetBSD: patch-ak,v 1.1 1999/08/19 10:51:23 agc Exp $
+$NetBSD: patch-ak,v 1.2 2002/01/09 23:04:56 seb Exp $
-+ Don't mess with Motif, as there's a trong possibility it won't be
-installed.
-
-+ install postscript documentation whilst we're here.
-
---- Makefile.orig Mon Jul 31 13:56:26 1995
-+++ Makefile Thu Aug 19 11:35:35 1999
-@@ -16,9 +16,9 @@
- lib/unix\
- lib/xlib\
- lib/xt\
-- lib/xaw\
-- lib/xm\
-- lib/xm/xt
-+ lib/xaw
-+# lib/xm\
-+# lib/xm/xt
-
- # ----------------------------------------------------------------------
-
-@@ -37,10 +37,16 @@
- done
-
- install:
-- @for i in $(SUBDIRS) ;\
-+ @for i in $(SUBDIRS) doc/man;\
- do \
- echo Installing $$i...; \
- ( cd $$i ; $(MAKE) install ) || exit $$?; \
-+ done
-+ mkdir -p ${PREFIX}/share/doc/elk
-+ @for i in bitstring cprog kernel oops record regexp unix usenix \
-+ xlib xt; do \
-+ echo "Installing postscript docs for $$i"; \
-+ ${BSD_INSTALL_DATA} doc/$$i/*.ps ${PREFIX}/share/doc/elk; \
- done
+--- lib/unix/build.orig Tue Jul 18 13:07:06 1995
++++ lib/unix/build
+@@ -87,15 +87,9 @@
+ mkdir $install_dir/runtime/obj; \\
+ fi
+ cp unix.pre $install_dir/runtime/obj/unix.o
+- -@if [ ! -d $install_dir/include ]; then \\
+- echo mkdir $install_dir/include; \\
+- mkdir $install_dir/include; \\
+- fi
+- -@if [ ! -d $install_dir/include/extensions ]; then \\
+- echo mkdir $install_dir/include/extensions; \\
+- mkdir $install_dir/include/extensions; \\
+- fi
+- cp unix.h $install_dir/include/extensions
++ -@mkdir -p \${PREFIX}/include/elk/extensions
++ \${BSD_INSTALL_DATA} unix.h \${PREFIX}/include/elk/extensions
++
- localize:
+ lint:
+ lint \$(LINTFLAGS) -I\$(INC) \$(C)
diff --git a/lang/elk/patches/patch-al b/lang/elk/patches/patch-al
index 24f7865c4a4..c31118397cf 100644
--- a/lang/elk/patches/patch-al
+++ b/lang/elk/patches/patch-al
@@ -1,375 +1,22 @@
-$NetBSD: patch-al,v 1.2 2000/07/09 02:55:42 dmcmahill Exp $
+$NetBSD: patch-al,v 1.3 2002/01/09 23:04:56 seb Exp $
---- /dev/null Fri Jul 7 13:36:28 2000
-+++ config/untested/elf-netbsd-cc Fri Jul 7 13:47:43 2000
-@@ -0,0 +1,370 @@
-+# This is a shell script. It is sourced by the build scripts in the
-+# various subdirectories to gather system-, compiler-, and OS-specific
-+# information required for building the Makefiles.
-+#
-+# Most variables in this script are interpreted as boolean variables and
-+# indicate presence or absence of one specific feature. The value "yes"
-+# is regarded as "true", all other values (including no value or even
-+# non-existence of the variable) are interpreted as "false".
-+#
-+# Do not forget to quote values that contain shell meta syntax.
-+#
-+# -----------------------------------------------------------------------
-+
-+
-+# $system should contain the name of this file. It may be used by some
-+# of the build scripts to do things that are specific to one single
-+# type of system.
-+
-+system=elf-netbsd-cc
-+
-+
-+# Does the system support the vprintf library function? If not,
-+# availability of the (non-portable) _doprnt function is assumed.
-+
-+vprintf=yes
-+
-+
-+# Does the directory(3) library follow the POSIX conventions (i.e.
-+# requires the <dirent.h> include file and uses "struct dirent")?
-+# If not, the (obsolete) BSD-style interface with <sys/dir.h> and
-+# "struct direct" is assumed.
-+
-+dirent=yes
-+
-+
-+# Does the system have the random/srandom library functions? If not,
-+# rand/srand will be used instead.
-+
-+random=yes
-+
-+
-+# Does the system have the index library function? If not, strchr
-+# will be used.
-+
-+index=yes
-+
-+
-+# Does the system have the bcopy, bzero, and bcmp library functions?
-+# If not, memcpy/memset/memcmp will be used.
-+
-+bstring=no
-+
-+
-+# Does using the access system call require <unistd.h> to be included?
-+# (Look into the manual page for access if in doubt.)
-+
-+include_unistd_h=yes
-+
-+
-+# If the FIONREAD ioctl command is defined, which file must be included?
-+
-+fionread_include='<sys/ioctl.h>'
-+
-+
-+# What is the name of the a.out include file?
-+
-+aout_h='<a.out.h>'
-+
-+
-+# The following variables control how certain system limits are obtained
-+# during runtime.
-+#
-+# If getdtablesize() is available to determine the maximum number of open
-+# files per process, set getdtablesize=yes.
-+# Alternatively, if POSIX-style sysconf() can be called with _SC_OPEN_MAX,
-+# set sysconf_open_max=yes.
-+# If neither is set to "yes", an educated guess will be made.
-+
-+getdtablesize=yes
-+sysconf_open_max=yes
-+
-+# If POSIX-style pathconf() can be invoked with _PC_PATH_MAX to determine
-+# the maximum pathname length, set pathconf_path_max=yes.
-+
-+pathconf_path_max=yes
-+
-+# If the system page size can be determined by calling getpagesize()
-+# set getpagesize=yes.
-+# Alternatively, if sysconf() can be invoked with _SC_PAGESIZE, set
-+# sysconf_pagesize=yes.
-+# These two variables are only required if the generational garbage
-+# collector is used.
-+
-+getpagesize=yes
-+sysconf_pagesize=no
-+
-+
-+# Set reliable_signals=bsd if your system supports BSD-style reliable
-+# signals (has sigblock and related functions); set reliable_signals=posix
-+# for POSIX-style signals (sigprocmask, sigsets); otherwise old V7/SysV
-+# signal semantics are assumed.
-+
-+reliable_signals=bsd
-+
-+
-+# To support dynamic loading of object files and "dump", the system's
-+# a.out format has to be known. Choose one of the following:
-+#
-+# coff ecoff xcoff elf macho hp9k convex
-+#
-+# Other values of "aout_format" are interpreted as BSD-style a.out format.
-+
-+aout_format=elf
-+
-+
-+# Which mechanism should be used to dynamically load object files?
-+# Possible values currently are:
-+#
-+# ld BSD-style incremental loading based on ld -A
-+# rld NeXT-style rld_load()
-+# shl HP-UX shl_load()
-+# dl SysVR4/SunOS5 dlopen()
-+#
-+# Leave load_obj empty if dynamic loading is not supported.
-+
-+load_obj=dl
-+
-+
-+ # The following variables are only relevant if load_obj is set.
-+
-+ # Linker options to produce a shared object from a .o file.
-+ # Only used if load_obj=dl.
-+
-+ ldflags_shared='-Bshareable'
-+
-+ # The libraries against which dynamically loaded files are resolved
-+ # at the time they are loaded.
-+
-+ load_libraries=
-+
-+ # Does the ld-option -x really do what the manual says it does (i.e.
-+ # omit local symbols), or does it somehow render the resulting object
-+ # file unsuitable for dynamic loading? If in doubt, leave it out
-+ # (which may result in somewhat larger object files).
-+
-+ incremental_ldflags=-x
-+
-+ # Systems with "aout_format=ecoff" may require a call to the cacheflush
-+ # system call after an object file has been loaded. Which include file
-+ # has to be included in this case?
-+
-+ cachectl_h=unused
-+
-+ # Is the ANSI-C atexit function supported to register an exit handler?
-+ # If not, the exit library function will be redefined and will end in
-+ # a call to _exit.
-+
-+ atexit=yes
-+
-+
-+# Do the names of external functions in the symbol table always begin
-+# with a special character (such as underline)? If so, syms_begin_with
-+# should hold this character, otherwise leave it empty.
-+
-+syms_begin_with=
-+
-+
-+# The symbol prefixes of extension initialization and finalization
-+# functions (without the initial $syms_begin_with). Do not change
-+# these unless the compiler or linker restricts the length of symbols!
-+
-+init_prefix=elk_init_
-+finit_prefix=elk_finit_
-+
-+
-+# Is the "dump" function supported?
-+
-+can_dump=no
-+
-+
-+# The following variables are only relevant if "can_dump=yes".
-+
-+ # Is the fchmod system call broken or unavailable?
-+
-+ fchmod_broken=no
-+
-+ # These four variables are only relevant if the system has the BSD-style
-+ # a.out format.
-+ # segment_size is the segment size of the system's memory management
-+ # unit, i.e. the number to a multiple of which the size of an a.out
-+ # segment (e.g. .text) is rounded up.
-+ # file_text_start is the file offset at which the text segment starts
-+ # in an a.out file.
-+ # mem_text_start is the starting address of the text segment in memory.
-+ # text_length_adj must be set to "sizeof (struct exec)" if the length of
-+ # the text segment stored in the a.out header includes the a.out header
-+ # itself.
-+
-+ segment_size=__LDPGSZ
-+ file_text_start='(N_TXTOFF(hdr) + sizeof(struct exec))'
-+ mem_text_start='(sizeof(struct exec) + getpagesize())'
-+ text_length_adj='(sizeof(struct exec))'
-+
-+ # Only relevant if "aout_format=coff": the system's pagesize.
-+
-+ coff_pagesize=
-+
-+ # Only relevant if "aout_format=hp9k" and "load_obj=shl"
-+
-+ hp_shared_libraries=yes
-+
-+ # Print debug messages when dumping
-+
-+ debug_dump=yes
-+
-+
-+# Is the "termio" terminal interface supported by the system? If not,
-+# BSD-style tty handling will be used.
-+
-+termio=yes
-+
-+
-+# flush_stdio and flush_tty indicate how clear-input/output-port can
-+# flush (purge) a FILE pointer and a TTY file descriptor.
-+# Possible values of flush_stdio:
-+# bsd assume old BSD-style FILE* (with _cnt, _ptr, _base)
-+# fpurge use 4.4BSD-style fpurge stdio library function
-+# linux use Linux-specific method
-+# Possible values of flush_tty:
-+# tiocflush use TIOCFLUSH ioctl from <sys/ioctl.h>
-+# tcflsh use TCFLSH ioctl from <termio.h>
-+# Leave the variable(s) empty if flushing is not supported.
-+
-+flush_stdio=fpurge
-+flush_tty=tiocflush
-+
-+
-+# The interpreter uses the getrlimit function to determine the maximum
-+# stack size of the running program. If this function is not supported,
-+# set max_stack_size to a (fixed) maximum stack size (in bytes).
-+
-+max_stack_size=
-+
-+
-+# Is the mprotect system call supported? The generational garbage collector
-+# requires mprotect to implement incremental GC. $mprotect is ignored if
-+# generational_gc is set to "no" in the site file. Set mprotect=mmap if
-+# mprotect is supported, but only for mmap()ed memory.
-+
-+mprotect=yes
-+
-+
-+# How can a SIGSEGV or SIGBUS signal handler find out the address of
-+# the faulting memory reference? This variable is only used if
-+# $mprotect is "yes" or "mmap". Possible values are:
-+#
-+# siginfo handler is called with siginfo_t structure (enabled
-+# by a call to sigaction)
-+# sigcontext address is in the sigcontext structure (3rd arg, sc_badvaddr)
-+# arg4 address is delivered to handler as argument #4
-+# aix use an AIX-specific hack to get hold of the bad address
-+# hpux use a HP-UX-specific hack
-+
-+sigsegv_addr=arg4
-+
-+
-+# Does the system support the alloca library function, and does this
-+# function actually extend the stack? If in doubt, extract alloca.o
-+# from the C library and check if it contains the symbols malloc and free.
-+# If this is the case, forget it.
-+
-+use_alloca=yes
-+
-+
-+# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
-+
-+include_alloca_h=no
-+pragma_alloca=no
-+
-+
-+# Does the system (or compiler) require certain objects (e.g. doubles)
-+# to be aligned at 8-byte boundaries? If not, 4-byte alignment will
-+# be assumed.
-+
-+align_8byte=yes
-+
-+
-+# The C compiler used to compile the source code.
-+
-+cc=cc
-+
-+
-+# The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
-+# in SVR4-based systems.
-+
-+ld=ld
-+
-+
-+# The C compiler flags used for all files.
-+
-+cflags='-O2 -pipe'
-+
-+
-+# Are extra C compiler flags (such as -D_NO_PROTO) required to compile
-+# Motif applications?
-+
-+motif_cflags=
-+
-+
-+# Are extra C compiler flags (such as -G 0) required to compile
-+# dynamically loadable files?
-+
-+obj_cflags='-fPIC -DPIC'
-+
-+
-+# Are extra linker flags (such as -G 0) required to link several object
-+# files together to one dynamically loadable file?
-+
-+obj_ldflags=
-+
-+
-+# The linker flags used to link the interpreter.
-+
-+ldflags='-lm'
-+
-+
-+# The lint flags.
-+
-+lintflags='-abxh'
-+
-+
-+# Are function prototypes in the header files required? If prototypes=yes,
-+# prototypes are used unconditionally; if prototypes=no, prototypes are
-+# not used; otherwise prototypes are only used if the source code is
-+# compiled with an ANSI-C- or C++-compiler.
-+
-+prototypes=yes
-+
-+
-+# Does your C preprocessor support the ANSI-C ## operator, although
-+# __STDC__ is not defined?
-+
-+ansi_cpp=no
-+
-+
-+# The UNIX extension likes to know which of the following system calls,
-+# library functions, and include files are supported by the system.
-+
-+gettimeofday=yes
-+ftime=
-+vfork=yes
-+gethostname=yes
-+uname=yes
-+mktemp=yes
-+tmpnam=yes
-+tempnam=yes
-+getcwd=yes
-+getwd=yes
-+rename=yes
-+waitpid=yes
-+wait3=yes
-+wait4=yes
-+utime_h=yes
-+regcomp=yes
-+
-+
-+# Element type of the gidset argument of getgroups(); typically int
-+# or gid_t. Only needed by the UNIX extension.
-+
-+getgroups_type=gid_t
+--- lib/xlib/build.orig Tue Jul 18 13:19:11 1995
++++ lib/xlib/build
+@@ -117,15 +117,8 @@
+ mkdir $install_dir/runtime/obj; \\
+ fi
+ cp xlib.pre $install_dir/runtime/obj/xlib.o
+- -@if [ ! -d $install_dir/include ]; then \\
+- echo mkdir $install_dir/include; \\
+- mkdir $install_dir/include; \\
+- fi
+- -@if [ ! -d $install_dir/include/extensions ]; then \\
+- echo mkdir $install_dir/include/extensions; \\
+- mkdir $install_dir/include/extensions; \\
+- fi
+- cp xlib.h $install_dir/include/extensions
++ -@mkdir -p \${PREFIX}/include/elk/extensions
++ \${BSD_INSTALL_DATA} xlib.h \${PREFIX}/include/elk/extensions
+
+ lint:
+ lint \$(LINTFLAGS) -I\$(INC) $x11_incl \$(C)
diff --git a/lang/elk/patches/patch-am b/lang/elk/patches/patch-am
new file mode 100644
index 00000000000..fb8e87688e6
--- /dev/null
+++ b/lang/elk/patches/patch-am
@@ -0,0 +1,23 @@
+$NetBSD: patch-am,v 1.1 2002/01/09 23:04:57 seb Exp $
+
+--- lib/xt/build.orig Tue Jul 18 13:21:52 1995
++++ lib/xt/build
+@@ -97,15 +97,9 @@
+ mkdir $install_dir/runtime/obj; \\
+ fi
+ cp xt.pre $install_dir/runtime/obj/xt.o
+- -@if [ ! -d $install_dir/include ]; then \\
+- echo mkdir $install_dir/include; \\
+- mkdir $install_dir/include; \\
+- fi
+- -@if [ ! -d $install_dir/include/extensions ]; then \\
+- echo mkdir $install_dir/include/extensions; \\
+- mkdir $install_dir/include/extensions; \\
+- fi
+- cp xt.h $install_dir/include/extensions
++ -@mkdir -p \${PREFIX}/include/elk/extensions
++ \${BSD_INSTALL_DATA} xt.h \${PREFIX}/include/elk/extensions
++
+
+ lint:
+ lint \$(LINTFLAGS) -I\$(INC) -I../xlib $x11_incl \$(C)
diff --git a/lang/elk/patches/patch-an b/lang/elk/patches/patch-an
new file mode 100644
index 00000000000..99640e5056d
--- /dev/null
+++ b/lang/elk/patches/patch-an
@@ -0,0 +1,16 @@
+$NetBSD: patch-an,v 1.1 2002/01/09 23:04:57 seb Exp $
+
+--- scripts/build.orig Mon Jun 26 16:04:26 1995
++++ scripts/build
+@@ -30,10 +30,7 @@
+ chmod +x \$@
+
+ install: \$(FILES)
+- -@if [ ! -d $install_dir/lib ]; then \\
+- echo mkdir $install_dir/lib; \\
+- mkdir $install_dir/lib; \\
+- fi
++ -@mkdir -p $install_dir/lib
+ cp linkscheme $install_dir/lib
+ cp makedl $install_dir/lib
+ cp ldflags $install_dir/lib
diff --git a/lang/elk/patches/patch-ao b/lang/elk/patches/patch-ao
new file mode 100644
index 00000000000..6d3991027fc
--- /dev/null
+++ b/lang/elk/patches/patch-ao
@@ -0,0 +1,31 @@
+$NetBSD: patch-ao,v 1.1 2002/01/09 23:04:57 seb Exp $
+
+--- src/build.orig Mon Jan 24 17:12:31 1994
++++ src/build
+@@ -115,10 +115,12 @@
+ O2= \$(OCOMMON) main2.o stab2.o
+ O3= \$(OCOMMON) main3.o stab2.o
+
++EXPORTFLAGS= $exportflags
++
+ all: scheme standalone.o module.o
+
+ scheme: \$(O1)
+- \$(CC) -o \$@ \$(CFLAGS) \$(O1) \$(LDFLAGS)
++ \$(CC) \${EXPORTFLAGS} -o \$@ \$(CFLAGS) \$(O1) \$(LDFLAGS)
+
+ standalone.o: \$(O2)
+ ld -r -o \$@ \$(O2)
+@@ -181,11 +183,7 @@
+ rm main3.c
+
+ install: scheme standalone.o module.o
+- -@if [ ! -d $install_dir/bin ]; then \\
+- echo mkdir $install_dir/bin; \\
+- mkdir $install_dir/bin; \\
+- fi
+- cp scheme $install_dir/bin
++ \${BSD_INSTALL_PROGRAM} scheme \${PREFIX}/bin/elk
+ -@if [ ! -d $install_dir/lib ]; then \\
+ echo mkdir $install_dir/lib; \\
+ mkdir $install_dir/lib; \\
diff --git a/lang/elk/patches/patch-ap b/lang/elk/patches/patch-ap
new file mode 100644
index 00000000000..777d9e19d32
--- /dev/null
+++ b/lang/elk/patches/patch-ap
@@ -0,0 +1,32 @@
+$NetBSD: patch-ap,v 1.1 2002/01/09 23:04:57 seb Exp $
+
+--- src/dump-vanilla.c.orig Thu Jun 29 13:55:51 1995
++++ src/dump-vanilla.c
+@@ -12,6 +12,10 @@
+
+ extern void *sbrk();
+
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++extern etext;
++#endif
++
+ #if defined(hp9000s300) || defined(__hp9000s300) || defined(__hp9000s300__)
+ static int getpagesize () {
+ return EXEC_PAGESIZE;
+@@ -113,13 +117,15 @@
+ close (afd);
+ #if defined(__bsdi__)
+ data_start = N_DATADDR(hdr);
++#elif defined (__FreeBSD__) || defined(__NetBSD__)
++ data_start = (int) &etext;
+ #else
+ data_start = hdr.a_text;
++#endif
+ #if defined(sun) || defined(__sun__)
+ data_start += pagemask+1;
+ #endif
+ data_start = (data_start + SEG_SIZ-1) & ~(SEG_SIZ-1);
+-#endif
+ data_end = (unsigned)sbrk (0);
+ #if !defined(__bsdi__)
+ data_end = (data_end + pagemask) & ~pagemask;
diff --git a/lang/elk/patches/patch-aq b/lang/elk/patches/patch-aq
new file mode 100644
index 00000000000..1740863632f
--- /dev/null
+++ b/lang/elk/patches/patch-aq
@@ -0,0 +1,27 @@
+$NetBSD: patch-aq,v 1.1 2002/01/09 23:04:58 seb Exp $
+
+--- src/heap-sc.c.orig Thu Apr 4 14:55:43 1996
++++ src/heap-sc.c
+@@ -37,11 +37,11 @@
+ (void)P_Collect ();
+ p = Hp;
+ }
+- ALIGN(p);
++ ELK_ALIGN(p);
+ if (p + size > Heap_End) {
+ (void)P_Collect ();
+ p = Hp;
+- ALIGN(p);
++ ELK_ALIGN(p);
+ if (p + size > Heap_End - HEAP_MARGIN)
+ Uncatchable_Error ("Out of heap space");
+ }
+@@ -108,7 +108,7 @@
+ SETPOINTER(*p, POINTER(*tag));
+ return;
+ }
+- ALIGN(To);
++ ELK_ALIGN(To);
+ switch (t) {
+ case T_Bignum:
+ size = sizeof (struct S_Bignum) - sizeof (gran_t)
diff --git a/lang/elk/patches/patch-ar b/lang/elk/patches/patch-ar
new file mode 100644
index 00000000000..5ec5c1e3c41
--- /dev/null
+++ b/lang/elk/patches/patch-ar
@@ -0,0 +1,13 @@
+$NetBSD: patch-ar,v 1.1 2002/01/09 23:04:58 seb Exp $
+
+--- src/list.c.orig Sun Aug 6 16:34:10 1995
++++ src/list.c
+@@ -23,7 +23,7 @@
+ register char *p;
+
+ p = Hp;
+- ALIGN(p);
++ ELK_ALIGN(p);
+ if (p + sizeof (struct S_Pair) <= Heap_End && !GC_Debug) {
+ Hp = p + sizeof (struct S_Pair);
+ SET(cell, T_Pair, (struct S_Pair *)p);
diff --git a/lang/elk/patches/patch-as b/lang/elk/patches/patch-as
new file mode 100644
index 00000000000..10ef4efcab8
--- /dev/null
+++ b/lang/elk/patches/patch-as
@@ -0,0 +1,15 @@
+$NetBSD: patch-as,v 1.1 2002/01/09 23:04:58 seb Exp $
+
+--- src/load-dl.c.orig Fri Dec 22 15:46:24 1995
++++ src/load-dl.c
+@@ -4,6 +4,10 @@
+ extern char *strrchr();
+ extern char *getenv();
+
++#ifndef RTLD_NOW
++#define RTLD_NOW 1
++#endif
++
+ Dlopen_File (fn) char *fn; {
+ void *handle;
+ SYM *sp;
diff --git a/lang/elk/patches/patch-at b/lang/elk/patches/patch-at
new file mode 100644
index 00000000000..62c21b1a975
--- /dev/null
+++ b/lang/elk/patches/patch-at
@@ -0,0 +1,13 @@
+$NetBSD: patch-at,v 1.1 2002/01/09 23:04:58 seb Exp $
+
+--- src/main.c.orig Thu Mar 28 10:31:30 1996
++++ src/main.c
+@@ -196,7 +196,7 @@
+
+ stkbase = &foo;
+ Stack_Grows_Down = Check_Stack_Grows_Down ();
+- ALIGN(stkbase);
++ ELK_ALIGN(stkbase);
+ Make_Heap (heap);
+ Init_Everything ();
+ #ifdef ATEXIT
diff --git a/lang/elk/patches/patch-au b/lang/elk/patches/patch-au
new file mode 100644
index 00000000000..8eae08b0c1a
--- /dev/null
+++ b/lang/elk/patches/patch-au
@@ -0,0 +1,21 @@
+$NetBSD: patch-au,v 1.1 2002/01/09 23:04:59 seb Exp $
+
+--- src/print.c.orig Thu Apr 4 15:25:04 1996
++++ src/print.c
+@@ -6,6 +6,7 @@
+ #include <errno.h>
+ #include <ctype.h>
+ #include <varargs.h>
++#include <sys/param.h>
+
+ #ifdef FLUSH_TIOCFLUSH
+ # include <sys/ioctl.h>
+@@ -556,7 +557,7 @@
+ register c;
+ char buf[256];
+ extern sys_nerr;
+-#ifndef __bsdi__
++#if !(defined(BSD) && (BSD >= 199306))
+ extern char *sys_errlist[];
+ #endif
+ GC_Node;