summaryrefslogtreecommitdiff
path: root/parallel/sge/patches
diff options
context:
space:
mode:
Diffstat (limited to 'parallel/sge/patches')
-rw-r--r--parallel/sge/patches/patch-aa13
-rw-r--r--parallel/sge/patches/patch-ab21
-rw-r--r--parallel/sge/patches/patch-ac17
-rw-r--r--parallel/sge/patches/patch-ad17
-rw-r--r--parallel/sge/patches/patch-ae13
-rw-r--r--parallel/sge/patches/patch-af15
-rw-r--r--parallel/sge/patches/patch-ag13
-rw-r--r--parallel/sge/patches/patch-ah22
-rw-r--r--parallel/sge/patches/patch-ai10
-rw-r--r--parallel/sge/patches/patch-aj13
-rw-r--r--parallel/sge/patches/patch-ak13
-rw-r--r--parallel/sge/patches/patch-al13
-rw-r--r--parallel/sge/patches/patch-am124
-rw-r--r--parallel/sge/patches/patch-an13
-rw-r--r--parallel/sge/patches/patch-ao13
-rw-r--r--parallel/sge/patches/patch-ap31
-rw-r--r--parallel/sge/patches/patch-aq17
-rw-r--r--parallel/sge/patches/patch-ar22
-rw-r--r--parallel/sge/patches/patch-as26
-rw-r--r--parallel/sge/patches/patch-at25
-rw-r--r--parallel/sge/patches/patch-au13
-rw-r--r--parallel/sge/patches/patch-av13
-rw-r--r--parallel/sge/patches/patch-aw59
-rw-r--r--parallel/sge/patches/patch-ax53
-rw-r--r--parallel/sge/patches/patch-ay18
-rw-r--r--parallel/sge/patches/patch-az34
-rw-r--r--parallel/sge/patches/patch-ba13
-rw-r--r--parallel/sge/patches/patch-bb33
-rw-r--r--parallel/sge/patches/patch-bc13
-rw-r--r--parallel/sge/patches/patch-bd67
-rw-r--r--parallel/sge/patches/patch-be13
-rw-r--r--parallel/sge/patches/patch-bf31
32 files changed, 811 insertions, 0 deletions
diff --git a/parallel/sge/patches/patch-aa b/parallel/sge/patches/patch-aa
new file mode 100644
index 00000000000..bc97ae8c5b6
--- /dev/null
+++ b/parallel/sge/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+
+--- source/3rdparty/qmake/configure.orig 2001-07-18 11:05:54.000000000 +0000
++++ source/3rdparty/qmake/configure
+@@ -4457,7 +4457,7 @@ else
+ fi
+
+
+- REMOTE=stub
++ REMOTE=${REMOTE:-stub}
+ make_try_customs=no
+ # Check whether --with-customs or --without-customs was given.
+ if test "${with_customs+set}" = set; then
diff --git a/parallel/sge/patches/patch-ab b/parallel/sge/patches/patch-ab
new file mode 100644
index 00000000000..0e3621b62e4
--- /dev/null
+++ b/parallel/sge/patches/patch-ab
@@ -0,0 +1,21 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+
+--- source/3rdparty/qtcsh/Makefile.in.orig 2001-07-18 11:06:04.000000000 +0000
++++ source/3rdparty/qtcsh/Makefile.in
+@@ -25,7 +25,7 @@ CF=-c
+
+ CPPFLAGS=-I. -I$(srcdir)
+
+-LFLAGS=
++LFLAGS= $(SGE_LOPTS)
+ #LFLAGS= -Zn10000 # hpux lint
+
+
+@@ -627,3 +627,7 @@ ${EDOBJS} ${EDDINC}: ed.defns.h
+
+ # tc.defs.o
+ tc.defs.${SUF}: tc.defs.c sh.h
++
++depend:
++ echo "No depends target for qtsch yet"
++
diff --git a/parallel/sge/patches/patch-ac b/parallel/sge/patches/patch-ac
new file mode 100644
index 00000000000..dc77d37f311
--- /dev/null
+++ b/parallel/sge/patches/patch-ac
@@ -0,0 +1,17 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+
+--- source/3rdparty/qtcsh/configure.in.orig 2004-03-03 13:09:22.000000000 +0000
++++ source/3rdparty/qtcsh/configure.in
+@@ -259,9 +259,9 @@ AC_ARG_WITH(grd,
+ [ --with-grd=ARCH SGE/SGEEE ARCH (LINUX5/LINUX6...)],
+ [grd="$withval"], [grd=no])
+ if test "$grd" != no; then
+- GRDDEF="-I../../apilib"
+- GRDLIB="-L../../$grd -lcodine -L/home/codine/zlib/$grd -lz -lm"
+- CFLAGS="$CFLAGS -DPROG_NAME='\"qtcsh\"'"
++ GRDDEF="-I../../../libs/gdi"
++ GRDLIB="-L../../../$grd -R${SGE_ROOT}/lib/${SGE_ARCH} \$(SGE_LIBS) ${LDFLAGS}"
++ CFLAGS="$CFLAGS -DPROG_NAME='\"qtcsh\"' -D$grd"
+ fi
+ AC_SUBST(GRDDEF)
+ AC_SUBST(GRDLIB)
diff --git a/parallel/sge/patches/patch-ad b/parallel/sge/patches/patch-ad
new file mode 100644
index 00000000000..40ea30a702a
--- /dev/null
+++ b/parallel/sge/patches/patch-ad
@@ -0,0 +1,17 @@
+$NetBSD: patch-ad,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+
+--- source/3rdparty/qtcsh/configure.orig 2004-03-03 13:09:22.000000000 +0000
++++ source/3rdparty/qtcsh/configure
+@@ -1500,9 +1500,9 @@ else
+ fi
+
+ if test "$grd" != no; then
+- GRDDEF="-I../../apilib"
+- GRDLIB="-L../../$grd -lcodine -L/home/codine/zlib/$grd -lz -lm"
+- CFLAGS="$CFLAGS -DPROG_NAME='\"qtcsh\"'"
++ GRDDEF="-I../../../libs/gdi"
++ GRDLIB="-L../../../$grd -R${SGE_ROOT}/lib/${SGE_ARCH} \$(SGE_LIBS) ${LDFLAGS}"
++ CFLAGS="$CFLAGS -DPROG_NAME='\"qtcsh\"' -D$grd"
+ fi
+
+
diff --git a/parallel/sge/patches/patch-ae b/parallel/sge/patches/patch-ae
new file mode 100644
index 00000000000..2dd45b7861d
--- /dev/null
+++ b/parallel/sge/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+
+--- source/clients/qmon/Makefile.orig 2004-03-03 13:09:34.000000000 +0000
++++ source/clients/qmon/Makefile
+@@ -135,7 +135,7 @@ messages:
+ # rules to build binaries
+ ###############################################################################
+ qmon: $(QMON_OBJS) $(QMON_ADD_OBJS) $(QMON_LIB_DEPENDS)
+- $(LD_WRAPPER) $(CC) $(LFLAGS) $(XLFLAGS) -o $@ $(QMON_OBJS) $(QMON_ADD_OBJS) $(QMON_ADD_LIBS) $(XLIBS) $(SLIBS) $(LIBS)
++ $(LD_WRAPPER) $(CC) $(LFLAGS) $(LDFLAGS) $(XLFLAGS) -o $@ $(QMON_OBJS) $(QMON_ADD_OBJS) $(QMON_ADD_LIBS) $(XLIBS) $(SLIBS) $(LIBS)
+
+ ############################################################################
+ # ListTree Demo prog
diff --git a/parallel/sge/patches/patch-af b/parallel/sge/patches/patch-af
new file mode 100644
index 00000000000..7c22d2e771c
--- /dev/null
+++ b/parallel/sge/patches/patch-af
@@ -0,0 +1,15 @@
+$NetBSD: patch-af,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+
+--- source/3rdparty/qmon/iconlist/IconList.c 2003-10-02 14:25:24.000000000 +0200
++++ source/3rdparty/qmon/iconlist/IconList.c 2003-09-30 16:35:21.000000000 +0200
+@@ -50,6 +50,10 @@
+ #include <Xm/Traversal.h>
+ #endif
+
++#ifdef LesstifVersion
++#undef NeedWidePrototypes
++#endif
++
+ #if XmVersion >= 2000
+ extern void _XmResizeObject(
+ Widget g,
diff --git a/parallel/sge/patches/patch-ag b/parallel/sge/patches/patch-ag
new file mode 100644
index 00000000000..f8c7628ed94
--- /dev/null
+++ b/parallel/sge/patches/patch-ag
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+
+--- source/3rdparty/qmon/spinbox/Spinbox.c.orig 2004-03-03 13:09:21.000000000 +0000
++++ source/3rdparty/qmon/spinbox/Spinbox.c
+@@ -1796,7 +1796,7 @@ static Boolean long_get_value (
+ {
+ #ifdef CRAY
+ errno = 0;
+-#elif !defined(LINUX6) && !defined(SOLARIS) && !defined(ALINUX) && !defined(SLINUX) && !defined(DARWIN) && !defined(FREEBSD) && !defined(IA64LINUX) && !defined(LINUXAMD64)
++#elif !defined(LINUX6) && !defined(SOLARIS) && !defined(ALINUX) && !defined(SLINUX) && !defined(DARWIN) && !defined(FREEBSD) && !defined(NETBSD) && !defined(IA64LINUX) && !defined(LINUXAMD64)
+ int errno = 0;
+ #endif
+ *value = strtol ( buffer, NULL, 10 );
diff --git a/parallel/sge/patches/patch-ah b/parallel/sge/patches/patch-ah
new file mode 100644
index 00000000000..ba1e3634e0c
--- /dev/null
+++ b/parallel/sge/patches/patch-ah
@@ -0,0 +1,22 @@
+$NetBSD: patch-ah,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+
+--- source/aimk.site.orig 2004-04-22 13:37:59.000000000 +0000
++++ source/aimk.site
+@@ -34,7 +34,7 @@
+ # OPENSSL_HOME the directory where the include and lib directory of openssl
+ # is installed
+ #
+-set OPENSSL_HOME = /vol2/tools/SW/openssl-0.9.7d-static/$buildarch
++set OPENSSL_HOME = @ssl_prefix@
+
+ #
+ # KRB_HOME the directory where the include and lib directory of kerberos is
+@@ -63,7 +63,7 @@ set SWIG = /vol2/tools/SW/$buildarch/bin
+ #
+ # PERL path
+ #
+-set PERL = /vol2/tools/SW/$buildarch/bin/perl
++set PERL = @perl5@
+
+ #
+ # TCLSH path
diff --git a/parallel/sge/patches/patch-ai b/parallel/sge/patches/patch-ai
new file mode 100644
index 00000000000..9759678b32a
--- /dev/null
+++ b/parallel/sge/patches/patch-ai
@@ -0,0 +1,10 @@
+$NetBSD: patch-ai,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+
+--- source/scripts/distinst.site.orig 2004-04-22 13:39:12.000000000 +0000
++++ source/scripts/distinst.site
+@@ -34,4 +34,4 @@
+ BASEDIR=/dist/OS-SGEDIST
+
+ # Base directory where the openssl binary resides
+-OPENSSL_HOME=/vol2/tools/SW/openssl-0.9.7d-static
++OPENSSL_HOME=@ssl_prefix@
diff --git a/parallel/sge/patches/patch-aj b/parallel/sge/patches/patch-aj
new file mode 100644
index 00000000000..428322b2d07
--- /dev/null
+++ b/parallel/sge/patches/patch-aj
@@ -0,0 +1,13 @@
+$NetBSD: patch-aj,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/3rdparty/qtcsh/tc.alloc.c.orig 2004-03-03 13:09:22.000000000 +0000
++++ source/3rdparty/qtcsh/tc.alloc.c
+@@ -167,7 +167,7 @@ static void morecore __P((int));
+ #endif
+
+
+-#if defined(SOLARIS) || defined(SOLARIS64) || defined(SOLARIS86) || defined(SUN4) || defined (HP11) || defined(LINUX5) || defined(ALPHA5) || defined(ALPHA4) || defined(ALINUX) || defined(LINUX60) || defined(LINUX6) || defined(SLINUX) || defined(FREEBSD)|| defined(DARWIN) || defined(IA64LINUX) || defined(LINUXAMD64)
++#if defined(SOLARIS) || defined(SOLARIS64) || defined(SOLARIS86) || defined(SUN4) || defined (HP11) || defined(LINUX5) || defined(ALPHA5) || defined(ALPHA4) || defined(ALINUX) || defined(LINUX60) || defined(LINUX6) || defined(SLINUX) || defined(FREEBSD)|| defined(NETBSD) || defined(DARWIN) || defined(IA64LINUX) || defined(LINUXAMD64)
+ # ifdef const
+ # undef const
+ # endif
diff --git a/parallel/sge/patches/patch-ak b/parallel/sge/patches/patch-ak
new file mode 100644
index 00000000000..abe887e5182
--- /dev/null
+++ b/parallel/sge/patches/patch-ak
@@ -0,0 +1,13 @@
+$NetBSD: patch-ak,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/3rdparty/remote/rlogin.c 2003-10-02 14:25:26.000000000 +0200
++++ source/3rdparty/remote/rlogin.c 2003-09-30 16:36:41.000000000 +0200
+@@ -64,7 +64,7 @@
+ #include <string.h>
+ #include <unistd.h>
+
+-#if !defined(FREEBSD) && !defined(DARWIN)
++#if !defined(FREEBSD) && !defined(DARWIN) && !defined(NETBSD)
+ #include <values.h>
+ #endif
+
diff --git a/parallel/sge/patches/patch-al b/parallel/sge/patches/patch-al
new file mode 100644
index 00000000000..c82fa009c12
--- /dev/null
+++ b/parallel/sge/patches/patch-al
@@ -0,0 +1,13 @@
+$NetBSD: patch-al,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/3rdparty/remote/rsh.c 2003-10-02 14:25:27.000000000 +0200
++++ source/3rdparty/remote/rsh.c 2003-09-30 16:37:02.000000000 +0200
+@@ -85,7 +85,7 @@
+ int rcmd(char **, u_short, char *, char *, char *, int *);
+ #endif
+
+-#if !defined(FREEBSD) && !defined(DARWIN)
++#if !defined(FREEBSD) && !defined(DARWIN) && !defined(NETBSD)
+ #include <values.h>
+ #endif
+
diff --git a/parallel/sge/patches/patch-am b/parallel/sge/patches/patch-am
new file mode 100644
index 00000000000..70438f137ab
--- /dev/null
+++ b/parallel/sge/patches/patch-am
@@ -0,0 +1,124 @@
+$NetBSD: patch-am,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/aimk.orig 2004-04-22 13:37:59.000000000 +0000
++++ source/aimk
+@@ -122,6 +122,72 @@ case "hp11-64":
+ case "irix6":
+ set BUILDARCH = IRIX6
+ breaksw
++case "nbsd-alpha":
++ set BUILDARCH = NETBSD_ALPHA
++ breaksw
++case "nbsd-arm":
++ set BUILDARCH = NETBSD_ARM
++ breaksw
++case "nbsd-arm32":
++ set BUILDARCH = NETBSD_ARM32
++ breaksw
++case "nbsd-armeb":
++ set BUILDARCH = NETBSD_ARMEB
++ breaksw
++case "nbsd-hppa":
++ set BUILDARCH = NETBSD_HPPA
++ breaksw
++case "nbsd-i386":
++ set BUILDARCH = NETBSD_I386
++ breaksw
++case "nbsd-m68000":
++ set BUILDARCH = NETBSD_M68000
++ breaksw
++case "nbsd-m68k":
++ set BUILDARCH = NETBSD_M68K
++ breaksw
++case "nbsd-mipseb":
++ set BUILDARCH = NETBSD_MIPSEB
++ breaksw
++case "nbsd-mipsel":
++ set BUILDARCH = NETBSD_MIPSEL
++ breaksw
++case "nbsd-ns32k":
++ set BUILDARCH = NETBSD_NS32K
++ breaksw
++case "nbsd-pdp10":
++ set BUILDARCH = NETBSD_PDP10
++ breaksw
++case "nbsd-powerpc":
++ set BUILDARCH = NETBSD_POWERPC
++ breaksw
++case "nbsd-sh3":
++ set BUILDARCH = NETBSD_SH3
++ breaksw
++case "nbsd-sh3eb":
++ set BUILDARCH = NETBSD_SH3EB
++ breaksw
++case "nbsd-sh3el":
++ set BUILDARCH = NETBSD_SH3EL
++ breaksw
++case "nbsd-sh5eb":
++ set BUILDARCH = NETBSD_SH5EB
++ breaksw
++case "nbsd-sh5el":
++ set BUILDARCH = NETBSD_SH5EL
++ breaksw
++case "nbsd-sparc":
++ set BUILDARCH = NETBSD_SPARC
++ breaksw
++case "nbsd-sparc64":
++ set BUILDARCH = NETBSD_SPARC64
++ breaksw
++case "nbsd-vax":
++ set BUILDARCH = NETBSD_VAX
++ breaksw
++case "nbsd-x86_64":
++ set BUILDARCH = NETBSD_X86_64
++ breaksw
+ case "necsx4":
+ set BUILDARCH = NECSX4
+ breaksw
+@@ -1091,6 +1157,46 @@ case FREEBSD_*:
+ set RM = "rm -f"
+ breaksw
+
++case NETBSD_*:
++ set COMPILE_DC = 1
++ set MAKE = gmake
++ set OFLAG = "-O"
++ set ARFLAGS = rcv
++ set CC = gcc
++ set CXX = g++
++ set DLLIB = ""
++ set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
++ set PTHRDSFLAGS = "-D_REENTRANT -D__USE_REENTRANT"
++ set CFLAGS = "$OFLAG -Wall -DNETBSD -D$BUILDARCH $DEBUG_FLAG $CFLAGS -I${X11BASE}/include"
++ set CXXFLAGS = "$OFLAG -Wstrict-prototypes -DNETBSD -D$BUILDARCH $DEBUG_FLAG $CXXFLAGS"
++ set NOERR_CFLAG = "-Wno-error"
++ set GCC_NOERR_CFLAGS = "$CFLAGS -Wno-error"
++ set GCC_NOERR_CXXFLAGS = "$CXXFLAGS -Wno-error"
++ set LFLAGS = "$DEBUG_FLAG $LFLAGS -L${LOCALBASE}/lib -R${LOCALBASE}/lib"
++ set LIBS = "$LIBS -lkvm"
++ set SHAREDLD = $CC
++ set SHARED_CFLAGS = "-fPIC"
++ set SHARED_LFLAGS = "-L. -shared"
++
++ if ( $STATIC == 1 ) then
++ echo "STATITCS"
++ set CFLAGS = "-static $CFLAGS"
++ set CXXFLAGS = "-static $CXXFLAGS"
++ endif
++
++ set KLIBS = "-lcrypto"
++
++ set XMTDEF = ""
++ set XINCD = "$XMTINCD $XINCD -I${X11BASE}/include"
++ set XCFLAGS = "-Wno-strict-prototypes -Wno-error $XMTDEF $XINCD"
++ set XLIBD = "-L${X11BASE}/lib -R${X11BASE}/lib -L${LOCALBASE}/lib -R${LOCALBASE}/lib"
++ set XLFLAGS = "$XLIBD"
++ set XLIBS = " -lXm -lXpm -lXt -lXext -lX11 -lSM -lICE -lXp"
++
++ set SGE_NPROCS_CFLAGS = "$CFLAGS"
++ set RM = "rm -f"
++ breaksw
++
+ case IRIX6*:
+ set COMPILE_DC = 1
+ set ARCH = $IRIX_ARCHDEF
diff --git a/parallel/sge/patches/patch-an b/parallel/sge/patches/patch-an
new file mode 100644
index 00000000000..c334c4be27d
--- /dev/null
+++ b/parallel/sge/patches/patch-an
@@ -0,0 +1,13 @@
+$NetBSD: patch-an,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/clients/qevent/qevent.c 2003-10-02 14:25:29.000000000 +0200
++++ source/clients/qevent/qevent.c 2003-10-01 14:22:09.000000000 +0200
+@@ -35,7 +35,7 @@
+ #include <time.h>
+ #include <unistd.h>
+ #include <string.h>
+-#if defined(FREEBSD) || defined(DARWIN)
++#if defined(FREEBSD) || defined(DARWIN) || defined(NETBSD)
+ #include <sys/time.h>
+ #endif
+
diff --git a/parallel/sge/patches/patch-ao b/parallel/sge/patches/patch-ao
new file mode 100644
index 00000000000..1a971e591db
--- /dev/null
+++ b/parallel/sge/patches/patch-ao
@@ -0,0 +1,13 @@
+$NetBSD: patch-ao,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/daemons/execd/exec_job.c 2003-10-02 14:25:31.000000000 +0200
++++ source/daemons/execd/exec_job.c 2003-09-30 16:19:23.000000000 +0200
+@@ -472,7 +472,7 @@
+ return "LIBPATH";
+ #elif defined(HP10) || defined(HP11)
+ return "SHLIB_PATH";
+-#elif defined(ALPHA) || defined(IRIX6) || defined(IRIX65) || defined(LINUX) || defined(SOLARIS) || defined(FREEBSD)
++#elif defined(ALPHA) || defined(IRIX6) || defined(IRIX65) || defined(LINUX) || defined(SOLARIS) || defined(FREEBSD) || defined(NETBSD)
+ return "LD_LIBRARY_PATH";
+ #elif defined(DARWIN)
+ return "DYLD_LIBRARY_PATH";
diff --git a/parallel/sge/patches/patch-ap b/parallel/sge/patches/patch-ap
new file mode 100644
index 00000000000..a3f57592f08
--- /dev/null
+++ b/parallel/sge/patches/patch-ap
@@ -0,0 +1,31 @@
+$NetBSD: patch-ap,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/daemons/execd/ptf.c 2003-10-02 14:25:32.000000000 +0200
++++ source/daemons/execd/ptf.c 2003-09-30 16:20:33.000000000 +0200
+@@ -279,7 +279,7 @@
+ {
+ osjobid_t osjobid;
+
+-#if !defined(LINUX) && !defined(SOLARIS) && !defined(ALPHA5) && !defined(NECSX4) && !defined(NECSX5) && !defined(DARWIN) && !defined(FREEBSD)
++#if !defined(LINUX) && !defined(SOLARIS) && !defined(ALPHA5) && !defined(NECSX4) && !defined(NECSX5) && !defined(DARWIN) && !defined(FREEBSD) && !defined(NETBSD)
+
+ osjobid = lGetUlong(osjob, JO_OS_job_ID2);
+ osjobid = (osjobid << 32) + lGetUlong(osjob, JO_OS_job_ID);
+@@ -309,7 +309,7 @@
+ ******************************************************************************/
+ static void ptf_set_osjobid(lListElem *osjob, osjobid_t osjobid)
+ {
+-#if !defined(LINUX) && !defined(SOLARIS) && !defined(ALPHA5) && !defined(NECSX4) && !defined(NECSX5) && !defined(DARWIN) && !defined(FREEBSD)
++#if !defined(LINUX) && !defined(SOLARIS) && !defined(ALPHA5) && !defined(NECSX4) && !defined(NECSX5) && !defined(DARWIN) && !defined(FREEBSD) && !defined(NETBSD)
+
+ lSetUlong(osjob, JO_OS_job_ID2, ((u_osjobid_t) osjobid) >> 32);
+ lSetUlong(osjob, JO_OS_job_ID, osjobid & 0xffffffff);
+@@ -948,7 +948,7 @@
+
+ DENTER(TOP_LAYER, "ptf_get_job_os");
+
+-#if defined(LINUX) || defined(SOLARIS) || defined(ALPHA5) || defined(NECSX4) || defined(NECSX5) || defined(DARWIN) || defined(FREEBSD)
++#if defined(LINUX) || defined(SOLARIS) || defined(ALPHA5) || defined(NECSX4) || defined(NECSX5) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
+ where = lWhere("%T(%I == %u)", JO_Type, JO_OS_job_ID, (u_long32) os_job_id);
+ #else
+ where = lWhere("%T(%I == %u && %I == %u)", JO_Type,
diff --git a/parallel/sge/patches/patch-aq b/parallel/sge/patches/patch-aq
new file mode 100644
index 00000000000..d91f7b45581
--- /dev/null
+++ b/parallel/sge/patches/patch-aq
@@ -0,0 +1,17 @@
+$NetBSD: patch-aq,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/daemons/execd/ptf.h 2003-10-02 14:25:32.000000000 +0200
++++ source/daemons/execd/ptf.h 2003-09-30 16:21:00.000000000 +0200
+@@ -168,6 +168,12 @@
+ # define PTF_MAX_PRIORITY -10
+ # define PTF_OS_MIN_PRIORITY 20
+ # define PTF_OS_MAX_PRIORITY -20
++# elif defined(NETBSD)
++# define ENFORCE_PRI_RANGE 1
++# define PTF_MIN_PRIORITY 20
++# define PTF_MAX_PRIORITY -10
++# define PTF_OS_MIN_PRIORITY 20
++# define PTF_OS_MAX_PRIORITY -20
+ # endif
+ # define PTF_BACKGROUND_JOB_PROPORTION 0.015
+ # define PTF_BACKGROUND_JOB_PRIORITY NDPLOMAX
diff --git a/parallel/sge/patches/patch-ar b/parallel/sge/patches/patch-ar
new file mode 100644
index 00000000000..9dbef91552a
--- /dev/null
+++ b/parallel/sge/patches/patch-ar
@@ -0,0 +1,22 @@
+$NetBSD: patch-ar,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/daemons/shepherd/setrlimits.c.orig 2004-03-03 13:10:00.000000000 +0000
++++ source/daemons/shepherd/setrlimits.c
+@@ -34,7 +34,7 @@
+ #include <stdlib.h>
+ #include <errno.h>
+
+-#if defined(SUN4) || defined(DARWIN) || defined(FREEBSD)
++#if defined(SUN4) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
+ # include <sys/time.h>
+ #endif
+
+@@ -406,7 +406,7 @@ int trace_rlimit
+
+ #if defined(ALINUX) || defined(LINUX5) || ( defined(SOLARIS) && !defined(SOLARIS64) ) || defined(NECSX4) || defined(NECSX5)
+ # define limit_fmt "%ld"
+-#elif defined(LINUX6) || defined(IRIX6) || defined(HP11) || defined(HP10) || defined(DARWIN) || defined(FREEBSD)
++#elif defined(LINUX6) || defined(IRIX6) || defined(HP11) || defined(HP10) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
+ # define limit_fmt "%lld"
+ #elif defined(ALPHA) || defined(SOLARIS64) || defined(IA64LINUX) || defined(LINUXAMD64)
+ # define limit_fmt "%lu"
diff --git a/parallel/sge/patches/patch-as b/parallel/sge/patches/patch-as
new file mode 100644
index 00000000000..5050c0bc50f
--- /dev/null
+++ b/parallel/sge/patches/patch-as
@@ -0,0 +1,26 @@
+$NetBSD: patch-as,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/dist/util/arch 2003-10-02 14:25:34.000000000 +0200
++++ source/dist/util/arch 2003-09-30 15:53:29.000000000 +0200
+@@ -63,6 +63,9 @@
+ FreeBSD,*)
+ ARCH=fbsd-$ht
+ ;;
++ NetBSD,*)
++ ARCH=nbsd-$ht
++ ;;
+ esac
+ fi
+
+@@ -267,6 +270,11 @@
+ DEFAULTMANPATH=`/usr/bin/manpath -q`
+ PATH=$SAFE_PATH
+ ;;
++ nbsd-*)
++ PATH=$OLD_PATH
++ DEFAULTMANPATH=/usr/pkg/man:/usr/local/man:/usr/X11R6/man:/usr/share/man
++ PATH=$SAFE_PATH
++ ;;
+ darwin)
+ DEFAULTMANPATH=`/usr/bin/manpath -q`
+ SHARED_LIBRARY_PATH="DYLD_LIBRARY_PATH"
diff --git a/parallel/sge/patches/patch-at b/parallel/sge/patches/patch-at
new file mode 100644
index 00000000000..951f90bb841
--- /dev/null
+++ b/parallel/sge/patches/patch-at
@@ -0,0 +1,25 @@
+$NetBSD: patch-at,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/dist/util/arch_variables 2003-10-02 14:25:34.000000000 +0200
++++ source/dist/util/arch_variables 2003-09-30 16:30:23.000000000 +0200
+@@ -166,6 +166,20 @@
+ GETTEXT=/usr/local/bin/gettext
+ ROOTGROUP=wheel
+ ;;
++ nbsd-*)
++ AWK=/usr/bin/awk
++ ECHO="/bin/echo"
++ RC_FILE=netbsd
++ RC_PREFIX=@rcd_dir@
++ RC_SUFFIX=
++ XTERM=/usr/X11R6/bin/xterm
++ MAILER=/usr/bin/mail
++ QLOGIN_COMMAND=telnet
++ QLOGIN_DAEMON=/usr/libexec/telnetd
++ RLOGIN_DAEMON=/usr/libexec/rlogind
++ GETTEXT=/usr/bin/gettext
++ ROOTGROUP=wheel
++ ;;
+ darwin)
+ AWK=/usr/bin/awk
+ ECHO=/bin/echo
diff --git a/parallel/sge/patches/patch-au b/parallel/sge/patches/patch-au
new file mode 100644
index 00000000000..be42c7fc710
--- /dev/null
+++ b/parallel/sge/patches/patch-au
@@ -0,0 +1,13 @@
+$NetBSD: patch-au,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/libs/comm/commlib.c 2003-10-02 14:25:46.000000000 +0200
++++ source/libs/comm/commlib.c 2003-09-30 16:09:54.000000000 +0200
+@@ -63,7 +63,7 @@
+ int gethostname(char *name, int namelen);
+ #endif
+
+-#if defined(DARWIN) || defined(FREEBSD)
++#if defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
+ # define SIGCLD SIGCHLD
+ #endif
+
diff --git a/parallel/sge/patches/patch-av b/parallel/sge/patches/patch-av
new file mode 100644
index 00000000000..8c0b9f73b48
--- /dev/null
+++ b/parallel/sge/patches/patch-av
@@ -0,0 +1,13 @@
+$NetBSD: patch-av,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/libs/rmon/rmon_semaph.c 2003-10-02 14:25:47.000000000 +0200
++++ source/libs/rmon/rmon_semaph.c 2003-09-30 16:14:54.000000000 +0200
+@@ -56,7 +56,7 @@
+ /*
+ * Define the semaphore operation arrays for the semop() calls.
+ */
+-#if defined(bsd4_2) || defined(MACH) || defined(__hpux) || defined(_AIX) || defined(SOLARIS) || defined(SINIX) || (defined(LINUX) && defined(_SEM_SEMUN_UNDEFINED))
++#if defined(bsd4_2) || defined(MACH) || defined(__hpux) || defined(_AIX) || defined(SOLARIS) || defined(SINIX) || (defined(LINUX) && defined(_SEM_SEMUN_UNDEFINED)) || defined(NETBSD)
+ union semun {
+ int val; /* value for SETVAL */
+ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
diff --git a/parallel/sge/patches/patch-aw b/parallel/sge/patches/patch-aw
new file mode 100644
index 00000000000..b7ec64c3c4b
--- /dev/null
+++ b/parallel/sge/patches/patch-aw
@@ -0,0 +1,59 @@
+$NetBSD: patch-aw,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/libs/uti/sge_arch.c.orig 2004-03-03 13:11:00.000000000 +0000
++++ source/libs/uti/sge_arch.c
+@@ -129,6 +129,54 @@ const char *sge_get_arch()
+ # define ARCHBIN "darwin"
+ #elif defined(IA64LINUX)
+ # define ARCHBIN "ia64linux"
++#elif defined(NETBSD)
++# if defined(NETBSD_ALPHA)
++# define ARCHBIN "nbsd-alpha"
++# elif defined(NETBSD_ARM)
++# define ARCHBIN "nbsd-arm"
++# elif defined(NETBSD_ARM32)
++# define ARCHBIN "nbsd-arm32"
++# elif defined(NETBSD_ARMEB)
++# define ARCHBIN "nbsd-armeb"
++# elif defined(NETBSD_HPPA)
++# define ARCHBIN "nbsd-hppa"
++# elif defined(NETBSD_I386)
++# define ARCHBIN "nbsd-i386"
++# elif defined(NETBSD_M68000)
++# define ARCHBIN "nbsd-m68000"
++# elif defined(NETBSD_M68K)
++# define ARCHBIN "nbsd-m68k"
++# elif defined(NETBSD_MIPSEB)
++# define ARCHBIN "nbsd-mipseb"
++# elif defined(NETBSD_MIPSEL)
++# define ARCHBIN "nbsd-mipsel"
++# elif defined(NETBSD_NS32K)
++# define ARCHBIN "nbsd-ns32k"
++# elif defined(NETBSD_PDP10)
++# define ARCHBIN "nbsd-pdp10"
++# elif defined(NETBSD_POWERPC)
++# define ARCHBIN "nbsd-powerpc"
++# elif defined(NETBSD_SH3)
++# define ARCHBIN "nbsd-sh3"
++# elif defined(NETBSD_SH3EB)
++# define ARCHBIN "nbsd-sh3eb"
++# elif defined(NETBSD_SH3EL)
++# define ARCHBIN "nbsd-sh3el"
++# elif defined(NETBSD_SH5EB)
++# define ARCHBIN "nbsd-sh5eb"
++# elif defined(NETBSD_SH5EL)
++# define ARCHBIN "nbsd-sh5el"
++# elif defined(NETBSD_SPARC)
++# define ARCHBIN "nbsd-sparc"
++# elif defined(NETBSD_SPARC64)
++# define ARCHBIN "nbsd-sparc64"
++# elif defined(NETBSD_VAX)
++# define ARCHBIN "nbsd-vax"
++# elif defined(NETBSD_X86_64)
++# define ARCHBIN "nbsd-x86_64"
++# else
++# pragma "Define a NetBSD architecture for SGE"
++# endif
+ #else
+ # pragma "Define an architecture for SGE"
+ #endif
diff --git a/parallel/sge/patches/patch-ax b/parallel/sge/patches/patch-ax
new file mode 100644
index 00000000000..bff311c0c30
--- /dev/null
+++ b/parallel/sge/patches/patch-ax
@@ -0,0 +1,53 @@
+$NetBSD: patch-ax,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/libs/uti/sge_getloadavg.c 2003-10-02 14:25:49.000000000 +0200
++++ source/libs/uti/sge_getloadavg.c 2003-10-01 17:11:38.000000000 +0200
+@@ -185,6 +185,8 @@
+ # define KERNEL_AVG_TYPE double
+ # define VMUNIX "/stand/vmunix"
+ # define X_CP_TIME 0
++#elif defined(NETBSD)
++# include <sys/sched.h>
+ #endif
+
+ #if defined(SOLARIS) || defined(SOLARIS64) || defined(FREEBSD)
+@@ -827,6 +829,30 @@
+ return cpu_load;
+ }
+
++#elif defined(NETBSD)
++
++#include <sys/param.h>
++#include <sys/sysctl.h>
++
++double get_cpu_load() {
++ int mib[2];
++ static long cpu_time[CPUSTATES];
++ static long cpu_old[CPUSTATES];
++ static long cpu_diff[CPUSTATES];
++ double cpu_states[CPUSTATES];
++ double cpu_load;
++ size_t size;
++
++ mib[0] = CTL_KERN; mib[1] = KERN_CP_TIME;
++ size = sizeof(cpu_time);
++ sysctl(mib, 2, &cpu_time, &size, NULL, 0);
++ percentages(CPUSTATES, cpu_states, cpu_time, cpu_old, cpu_diff);
++ cpu_load = cpu_states[0] + cpu_states[1] + cpu_states[2];
++ if (cpu_load < 0.0) {
++ cpu_load = -1.0; }
++
++ return cpu_load; }
++
+ #endif
+
+ #if defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(HP10) || (defined(SOLARIS) && !defined(SOLARIS64))
+@@ -1150,7 +1176,7 @@
+ ) {
+ int elem = 0;
+
+-#if defined(SOLARIS64) || defined(FREEBSD) || defined(DARWIN)
++#if defined(SOLARIS64) || defined(FREEBSD) || defined(DARWIN) || defined(NETBSD)
+ elem = getloadavg(loadavg, nelem); /* <== library function */
+ #elif (defined(SOLARIS) && !defined(SOLARIS64)) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(HP10) || defined(HP11) || defined(CRAY) || defined(NECSX4) || defined(NECSX5) || defined(LINUX)
+ elem = get_load_avg(loadavg, nelem);
diff --git a/parallel/sge/patches/patch-ay b/parallel/sge/patches/patch-ay
new file mode 100644
index 00000000000..2cceae28808
--- /dev/null
+++ b/parallel/sge/patches/patch-ay
@@ -0,0 +1,18 @@
+$NetBSD: patch-ay,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/libs/uti/sge_getloadavg.h 2003-10-02 14:25:49.000000000 +0200
++++ source/libs/uti/sge_getloadavg.h 2003-10-01 17:12:19.000000000 +0200
+@@ -32,11 +32,11 @@
+ ************************************************************************/
+ /*___INFO__MARK_END__*/
+
+-#if defined(LINUX) || defined(SOLARIS) || defined(SOLARIS64) || defined(CRAY) || defined(NEXSX4) || defined(NECSX5) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(DARWIN) || defined(FREEBSD)
++#if defined(LINUX) || defined(SOLARIS) || defined(SOLARIS64) || defined(CRAY) || defined(NEXSX4) || defined(NECSX5) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
+ # define SGE_LOADAVG
+ #endif
+
+-#if defined(LINUX) || defined(SOLARIS) || defined(SOLARIS64) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(HP10) || defined(HP11) || defined(DARWIN) || defined(FREEBSD)
++#if defined(LINUX) || defined(SOLARIS) || defined(SOLARIS64) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(HP10) || defined(HP11) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
+ # define SGE_LOADCPU
+ #endif
+
diff --git a/parallel/sge/patches/patch-az b/parallel/sge/patches/patch-az
new file mode 100644
index 00000000000..4cffbaa89a5
--- /dev/null
+++ b/parallel/sge/patches/patch-az
@@ -0,0 +1,34 @@
+$NetBSD: patch-az,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/libs/uti/sge_loadmem.c 2003-10-02 14:25:50.000000000 +0200
++++ source/libs/uti/sge_loadmem.c 2003-10-01 16:36:46.000000000 +0200
+@@ -812,3 +812,29 @@
+ return 0;
+ }
+ #endif /* FREEBSD */
++
++#if defined(NETBSD)
++
++#include <sys/param.h>
++#include <sys/sysctl.h>
++
++int loadmem(sge_mem_info_t *mem_info) {
++ int mib[2];
++ size_t size;
++ struct uvmexp_sysctl uvmexp;
++
++ mib[0] = CTL_VM; mib[1] = VM_UVMEXP2;
++ size = sizeof(uvmexp);
++ sysctl(mib, 2, &uvmexp, &size, NULL, 0);
++
++ /* Memory */
++ mem_info->mem_total = (uvmexp.npages * uvmexp.pagesize) / (1024 * 1024);
++ mem_info->mem_free = (uvmexp.free * uvmexp.pagesize) / (1024 * 1024);
++
++ /* Swap */
++ mem_info->swap_total = (uvmexp.swpages * uvmexp.pagesize) / (1024 * 1024);
++ mem_info->swap_free = ((uvmexp.swpages - uvmexp.swpginuse) * uvmexp.pagesize) / (1024 * 1024);
++
++ return 0; }
++
++#endif /* NETBSD */
diff --git a/parallel/sge/patches/patch-ba b/parallel/sge/patches/patch-ba
new file mode 100644
index 00000000000..386951a325c
--- /dev/null
+++ b/parallel/sge/patches/patch-ba
@@ -0,0 +1,13 @@
+$NetBSD: patch-ba,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/libs/uti/sge_loadmem.h 2003-10-02 14:25:50.000000000 +0200
++++ source/libs/uti/sge_loadmem.h 2003-10-01 15:15:34.000000000 +0200
+@@ -32,7 +32,7 @@
+ ************************************************************************/
+ /*___INFO__MARK_END__*/
+
+-#if defined(CRAY) || defined(SOLARIS) || defined(HP10) || defined(HP11) || defined(ALPHA) || defined(LINUX) || defined(IRIX6) || defined(NECSX4) || defined(NECSX5) || defined(DARWIN) || defined(FREEBSD)
++#if defined(CRAY) || defined(SOLARIS) || defined(HP10) || defined(HP11) || defined(ALPHA) || defined(LINUX) || defined(IRIX6) || defined(NECSX4) || defined(NECSX5) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
+
+ #define SGE_LOADMEM
+
diff --git a/parallel/sge/patches/patch-bb b/parallel/sge/patches/patch-bb
new file mode 100644
index 00000000000..5616930ff6c
--- /dev/null
+++ b/parallel/sge/patches/patch-bb
@@ -0,0 +1,33 @@
+$NetBSD: patch-bb,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/libs/uti/sge_nprocs.c 2003-10-02 14:25:50.000000000 +0200
++++ source/libs/uti/sge_nprocs.c 2003-09-30 18:37:06.000000000 +0200
+@@ -89,6 +89,11 @@
+ # include <sys/sysctl.h>
+ #endif
+
++#if defined(NETBSD)
++# include <sys/param.h>
++# include <sys/sysctl.h>
++#endif
++
+ #ifdef NPROCS_TEST
+ # include <stdio.h>
+ # include <unistd.h>
+@@ -259,6 +264,16 @@
+ }
+ #endif
+
++#if defined(NETBSD)
++ int mib[2];
++ size_t nprocs_len;
++
++ nprocs_len = sizeof(nprocs);
++ mib[0] = CTL_HW; mib[1] = HW_NCPU;
++ if (sysctl(mib, 2, &nprocs, &nprocs_len, NULL, 0) == -1) {
++ nprocs = -1; }
++#endif
++
+
+ if (nprocs <= 0) {
+ nprocs = 1;
diff --git a/parallel/sge/patches/patch-bc b/parallel/sge/patches/patch-bc
new file mode 100644
index 00000000000..e0acd555b00
--- /dev/null
+++ b/parallel/sge/patches/patch-bc
@@ -0,0 +1,13 @@
+$NetBSD: patch-bc,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/libs/uti/sge_pids.h 2003-10-02 14:25:50.000000000 +0200
++++ source/libs/uti/sge_pids.h 2003-09-30 17:52:04.000000000 +0200
+@@ -32,7 +32,7 @@
+ ************************************************************************/
+ /*___INFO__MARK_END__*/
+
+-#if defined(SUN4) || defined(LINUX) || defined(DARWIN) || defined(FREEBSD)
++#if defined(SUN4) || defined(LINUX) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
+ # define PSCMD "/bin/ps -axc"
+ #elif defined(ALPHA)
+ # define PSCMD "/bin/ps axo pid,ucomm"
diff --git a/parallel/sge/patches/patch-bd b/parallel/sge/patches/patch-bd
new file mode 100644
index 00000000000..c03b7d7701b
--- /dev/null
+++ b/parallel/sge/patches/patch-bd
@@ -0,0 +1,67 @@
+$NetBSD: patch-bd,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/scripts/distinst.orig 2004-04-22 13:39:12.000000000 +0000
++++ source/scripts/distinst
+@@ -66,7 +66,10 @@ REMOTEBINARIES="rsh rshd rlogin"
+ SUPPORTEDARCHS="aix42 aix43 aix51 alinux cray crayts craytsieee glinux hp10 \
+ hp11 hp11-64 irix6 necsx4 sx slinux solaris solaris64 solaris86 osf4 tru64 \
+ darwin fbsd-alpha fbsd-amd64 fbsd-i386 fbsd-ia64 fbsd-ppc fbsd-sparc64 \
+-ia64linux lx24-amd64"
++nbsd-alpha nbsd-arm nbsd-arm32 nbsd-armeb nbsd-hppa nbsd-i386 nbsd-m68000 \
++nbsd-m68k nbsd-mipseb nbsd-mipsel nbsd-ns32k nbsd-pdp10 nbsd-powerpc nbsd-sh3 \
++nbsd-sh3eb nbsd-sh3el nbsd-sh5eb nbsd-sh5el nbsd-sparc nbsd-sparc64 nbsd-vax \
++nbsd-x86_64 ia64linux lx24-amd64"
+
+ #SGEEE_UTILITYBINARIES="sge_share_mon sge_host_mon"
+ SGEEE_UTILITYBINARIES="sge_share_mon"
+@@ -213,6 +216,50 @@ SetArchBin()
+ ARCHBIN=FREEBSD_PPC
+ elif [ $i = fbsd-sparc64 ]; then
+ ARCHBIN=FREEBSD_SPARC64
++ elif [ $i = nbsd-alpha ]; then
++ ARCHBIN=NETBSD_ALPHA
++ elif [ $i = nbsd-arm ]; then
++ ARCHBIN=NETBSD_ARM
++ elif [ $i = nbsd-arm32 ]; then
++ ARCHBIN=NETBSD_ARM32
++ elif [ $i = nbsd-armeb ]; then
++ ARCHBIN=NETBSD_ARMEB
++ elif [ $i = nbsd-hppa ]; then
++ ARCHBIN=NETBSD_HPPA
++ elif [ $i = nbsd-i386 ]; then
++ ARCHBIN=NETBSD_I386
++ elif [ $i = nbsd-m68000 ]; then
++ ARCHBIN=NETBSD_M68000
++ elif [ $i = nbsd-m68k ]; then
++ ARCHBIN=NETBSD_M68K
++ elif [ $i = nbsd-mipseb ]; then
++ ARCHBIN=NETBSD_MIPSEB
++ elif [ $i = nbsd-mipsel ]; then
++ ARCHBIN=NETBSD_MIPSEL
++ elif [ $i = nbsd-ns32k ]; then
++ ARCHBIN=NETBSD_NS32K
++ elif [ $i = nbsd-pdp10 ]; then
++ ARCHBIN=NETBSD_PDP10
++ elif [ $i = nbsd-powerpc ]; then
++ ARCHBIN=NETBSD_POWERPC
++ elif [ $i = nbsd-sh3 ]; then
++ ARCHBIN=NETBSD_SH3
++ elif [ $i = nbsd-sh3eb ]; then
++ ARCHBIN=NETBSD_SH3EB
++ elif [ $i = nbsd-sh3el ]; then
++ ARCHBIN=NETBSD_SH3EL
++ elif [ $i = nbsd-sh5eb ]; then
++ ARCHBIN=NETBSD_SH5EB
++ elif [ $i = nbsd-sh5el ]; then
++ ARCHBIN=NETBSD_SH5EL
++ elif [ $i = nbsd-sparc ]; then
++ ARCHBIN=NETBSD_SPARC
++ elif [ $i = nbsd-sparc64 ]; then
++ ARCHBIN=NETBSD_SPARC64
++ elif [ $i = nbsd-vax ]; then
++ ARCHBIN=NETBSD_VAX
++ elif [ $i = nbsd-x86_64 ]; then
++ ARCHBIN=NETBSD_X86_64
+ elif [ $i = ia64linux ]; then
+ ARCHBIN=IA64LINUX
+ elif [ $i = lx24-amd64 ]; then
diff --git a/parallel/sge/patches/patch-be b/parallel/sge/patches/patch-be
new file mode 100644
index 00000000000..cc4fda3f0a6
--- /dev/null
+++ b/parallel/sge/patches/patch-be
@@ -0,0 +1,13 @@
+$NetBSD: patch-be,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+
+--- source/dist/inst_sge.orig 2004-03-03 08:10:02.000000000 -0500
++++ source/dist/inst_sge
+@@ -738,7 +738,7 @@ AddConfiguration()
+
+ if [ $csp = true ]; then
+ X509_COUNT=`strings $V5BIN/sge_qmaster | grep X509 | wc -l`
+- if [ 50 -gt $X509_COUNT ]; then
++ if [ 10 -gt $X509_COUNT ]; then
+ $INFOTEXT "\n>sge_qmaster< binary is not compiled with >-secure< option!\n"
+ $INFOTEXT -wait -auto $autoinst -n "Hit <RETURN> to cancel the installation >> "
+ exit 1
diff --git a/parallel/sge/patches/patch-bf b/parallel/sge/patches/patch-bf
new file mode 100644
index 00000000000..2234376e353
--- /dev/null
+++ b/parallel/sge/patches/patch-bf
@@ -0,0 +1,31 @@
+$NetBSD: patch-bf,v 1.1.1.1 2004/05/03 00:38:36 dmcmahill Exp $
+
+--- source/utilbin/infotext.c.orig Wed Mar 3 13:11:17 2004
++++ source/utilbin/infotext.c
+@@ -64,7 +64,7 @@ static void sge_infotext_welcome(void);
+ static void sge_infotext_raw(char* format_string);
+ static void sge_infotext_usage(void);
+ static int sge_infotext_get_nr_of_substrings(char* buffer, char* substring);
+-#if defined(ALPHA) || defined(ALPHA5) || defined(ALINUX) || defined(HP11) || defined(HP10) || __GNUC__ == 3
++#if defined(ALPHA) || defined(ALPHA5) || defined(ALINUX) || defined(HP11) || defined(HP10) || __GNUC__ == 3 || defined(NETBSD)
+ static char* sge_infotext_string_replace(dstring* buf, char* arg, char* what, char* with, int only_first );
+ #endif
+ static char* sge_infotext_string_input_parsing(dstring* buf,char* string);
+@@ -536,7 +536,7 @@ static char* sge_infotext_string_output_
+ }
+
+
+-#if defined(ALPHA) || defined(ALPHA5) || defined(ALINUX) || defined(HP11) || defined(HP10) || __GNUC__ == 3
++#if defined(ALPHA) || defined(ALPHA5) || defined(ALINUX) || defined(HP11) || defined(HP10) || __GNUC__ == 3 || defined(NETBSD)
+ static char* sge_infotext_string_replace(dstring* tmp_buf, char* arg, char* what, char* with, int only_first) {
+ int i;
+ char* p1;
+@@ -1035,7 +1035,7 @@ int main( int argc, char* argv[] ) {
+ DPRINTF(("pass 4\n"));
+ {
+ if (real_args > 0) {
+-#if defined(ALPHA) || defined(ALPHA5) || defined(ALINUX) || defined(HP11) || defined(HP10) || __GNUC__ == 3
++#if defined(ALPHA) || defined(ALPHA5) || defined(ALINUX) || defined(HP11) || defined(HP10) || __GNUC__ == 3 || defined(NETBSD)
+ for(i=0;i<real_args;i++) {
+ /* printf("argument[%d]: \"%s\"\n",i,argv[first_arg +i]); */
+ sge_dstring_copy_string(&buffer, sge_infotext_string_replace(&tmp_buf, (char*)sge_dstring_get_string(&buffer2),"%s",argv[first_arg +i],1));