summaryrefslogtreecommitdiff
path: root/parallel/sge/patches
diff options
context:
space:
mode:
authormarkd <markd>2006-10-19 11:51:27 +0000
committermarkd <markd>2006-10-19 11:51:27 +0000
commit6f59fe7879180945ae1e8ce60f98c6a9d53cf912 (patch)
tree3a37a4f16638c89afb6ae0990db03b3fd2dbde77 /parallel/sge/patches
parent8111e1e57ffe5dd26ce34ce197cf715d3f7df611 (diff)
downloadpkgsrc-6f59fe7879180945ae1e8ce60f98c6a9d53cf912.tar.gz
Update sge to 6.0.8.
Several years worth of bug fixes and features.
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-af8
-rw-r--r--parallel/sge/patches/patch-ag10
-rw-r--r--parallel/sge/patches/patch-ah25
-rw-r--r--parallel/sge/patches/patch-ai18
-rw-r--r--parallel/sge/patches/patch-aj22
-rw-r--r--parallel/sge/patches/patch-ak13
-rw-r--r--parallel/sge/patches/patch-al13
-rw-r--r--parallel/sge/patches/patch-am170
-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-ar24
-rw-r--r--parallel/sge/patches/patch-as34
-rw-r--r--parallel/sge/patches/patch-at34
-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-bf22
-rw-r--r--parallel/sge/patches/patch-bg54
-rw-r--r--parallel/sge/patches/patch-bh22
-rw-r--r--parallel/sge/patches/patch-bj13
-rw-r--r--parallel/sge/patches/patch-bk13
-rw-r--r--parallel/sge/patches/patch-bl55
36 files changed, 240 insertions, 781 deletions
diff --git a/parallel/sge/patches/patch-aa b/parallel/sge/patches/patch-aa
deleted file mode 100644
index bc97ae8c5b6..00000000000
--- a/parallel/sge/patches/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index 0e3621b62e4..00000000000
--- a/parallel/sge/patches/patch-ab
+++ /dev/null
@@ -1,21 +0,0 @@
-$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
deleted file mode 100644
index dc77d37f311..00000000000
--- a/parallel/sge/patches/patch-ac
+++ /dev/null
@@ -1,17 +0,0 @@
-$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
deleted file mode 100644
index 40ea30a702a..00000000000
--- a/parallel/sge/patches/patch-ad
+++ /dev/null
@@ -1,17 +0,0 @@
-$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-af b/parallel/sge/patches/patch-af
index 7c22d2e771c..4c3182310e4 100644
--- a/parallel/sge/patches/patch-af
+++ b/parallel/sge/patches/patch-af
@@ -1,7 +1,7 @@
-$NetBSD: patch-af,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+$NetBSD: patch-af,v 1.2 2006/10/19 11:51:27 markd 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
+--- source/3rdparty/qmon/iconlist/IconList.c.orig 2005-05-03 21:18:02.000000000 +1200
++++ source/3rdparty/qmon/iconlist/IconList.c
@@ -50,6 +50,10 @@
#include <Xm/Traversal.h>
#endif
@@ -10,6 +10,6 @@ $NetBSD: patch-af,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+#undef NeedWidePrototypes
+#endif
+
+ #ifndef SOLARIS
#if XmVersion >= 2000
extern void _XmResizeObject(
- Widget g,
diff --git a/parallel/sge/patches/patch-ag b/parallel/sge/patches/patch-ag
index f8c7628ed94..79870a193e1 100644
--- a/parallel/sge/patches/patch-ag
+++ b/parallel/sge/patches/patch-ag
@@ -1,13 +1,13 @@
-$NetBSD: patch-ag,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+$NetBSD: patch-ag,v 1.2 2006/10/19 11:51:27 markd Exp $
---- source/3rdparty/qmon/spinbox/Spinbox.c.orig 2004-03-03 13:09:21.000000000 +0000
+--- source/3rdparty/qmon/spinbox/Spinbox.c.orig 2005-07-27 23:54:52.000000000 +1200
+++ 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)
+-#elif !defined(LINUX) && !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD) && \
++#elif !defined(LINUX) && !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD) && !defined(NETBSD) && \
+ !defined(AIX51) && !defined(AIX43) && !defined(ALPHA) && !defined(HP1164) && !defined(HPUX) && !defined(IRIX)
int errno = 0;
#endif
- *value = strtol ( buffer, NULL, 10 );
diff --git a/parallel/sge/patches/patch-ah b/parallel/sge/patches/patch-ah
index ba1e3634e0c..62669dfc475 100644
--- a/parallel/sge/patches/patch-ah
+++ b/parallel/sge/patches/patch-ah
@@ -1,17 +1,32 @@
-$NetBSD: patch-ah,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+$NetBSD: patch-ah,v 1.2 2006/10/19 11:51:27 markd Exp $
---- source/aimk.site.orig 2004-04-22 13:37:59.000000000 +0000
+--- source/aimk.site.orig 2005-11-24 07:14:52.000000000 +1300
+++ source/aimk.site
-@@ -34,7 +34,7 @@
+@@ -54,7 +54,7 @@ setenv TMPDIR /tmp
# 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 = /vol2/tools/SW/openssl-0.9.7e/$buildarch
+set OPENSSL_HOME = @ssl_prefix@
#
+ # POSTGRES_HOME the directory where the include and lib directory of
+@@ -66,11 +66,11 @@ set POSTGRES_HOME = /vol2/tools/SW/postg
+ # BERKELEYDB_HOME the directory where the include and lib directory of
+ # Berkeley DB is installed
+ #
+-set BERKELEYDB_HOME = /vol2/SW/db-4.2.52/$buildarch
++set BERKELEYDB_HOME = @db4_prefix@
+ #set BERKELEYDB_HOME = /vol2/SW/db-4.3.3/$buildarch
+-set BDB_INCLUDE_SUBDIR =
++set BDB_INCLUDE_SUBDIR = db4
+ set BDB_LIB_SUBDIR =
+-set BDB_LIB_SUFFIX =
++set BDB_LIB_SUFFIX = 4
+
+ #
# KRB_HOME the directory where the include and lib directory of kerberos is
-@@ -63,7 +63,7 @@ set SWIG = /vol2/tools/SW/$buildarch/bin
+@@ -99,7 +99,7 @@ set SWIG = /vol2/tools/SW/swig-1.3.22/$b
#
# PERL path
#
diff --git a/parallel/sge/patches/patch-ai b/parallel/sge/patches/patch-ai
index 9759678b32a..61c9ecc8146 100644
--- a/parallel/sge/patches/patch-ai
+++ b/parallel/sge/patches/patch-ai
@@ -1,10 +1,14 @@
-$NetBSD: patch-ai,v 1.1.1.1 2004/05/03 00:38:34 dmcmahill Exp $
+$NetBSD: patch-ai,v 1.2 2006/10/19 11:51:27 markd Exp $
---- source/scripts/distinst.site.orig 2004-04-22 13:39:12.000000000 +0000
+--- source/scripts/distinst.site.orig 2005-09-14 18:56:02.000000000 +1200
+++ source/scripts/distinst.site
-@@ -34,4 +34,4 @@
- BASEDIR=/dist/OS-SGEDIST
+@@ -31,7 +31,7 @@
+ #___INFO__MARK_END__
- # Base directory where the openssl binary resides
--OPENSSL_HOME=/vol2/tools/SW/openssl-0.9.7d-static
-+OPENSSL_HOME=@ssl_prefix@
+ # Base directory where the openssl binary and libraries reside
+-OPENSSLBASE=/vol2/tools/SW/openssl-0.9.7e
++OPENSSLBASE=@ssl_prefix@
+
+ # Base directory where BDB resides
+-BERKELEYDBBASE=/vol2/SW/db-4.2.52
++BERKELEYDBBASE=@db4_prefix@
diff --git a/parallel/sge/patches/patch-aj b/parallel/sge/patches/patch-aj
index 428322b2d07..5cd767789e3 100644
--- a/parallel/sge/patches/patch-aj
+++ b/parallel/sge/patches/patch-aj
@@ -1,13 +1,13 @@
-$NetBSD: patch-aj,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+$NetBSD: patch-aj,v 1.2 2006/10/19 11:51:27 markd 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
+--- source/libs/uti/sge_uidgid.c.orig 2006-09-26 13:02:53.000000000 +1200
++++ source/libs/uti/sge_uidgid.c
+@@ -1532,7 +1532,7 @@ copygrp(struct group *tgrp, struct group
+ for (i = 0; tgrp->gr_mem[i] != NULL; i++) {
+ strcpy(grp->gr_mem[i], tgrp->gr_mem[i]);
+ }
+- *(grp->gr_mem[i]) = NULL;
++ (grp->gr_mem[i]) = NULL;
-
--#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
+ return 0;
+ }
diff --git a/parallel/sge/patches/patch-ak b/parallel/sge/patches/patch-ak
deleted file mode 100644
index abe887e5182..00000000000
--- a/parallel/sge/patches/patch-ak
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index c82fa009c12..00000000000
--- a/parallel/sge/patches/patch-al
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
index 70438f137ab..6e206c3ec2b 100644
--- a/parallel/sge/patches/patch-am
+++ b/parallel/sge/patches/patch-am
@@ -1,124 +1,56 @@
-$NetBSD: patch-am,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+$NetBSD: patch-am,v 1.2 2006/10/19 11:51:27 markd Exp $
---- source/aimk.orig 2004-04-22 13:37:59.000000000 +0000
+--- source/aimk.orig 2006-04-20 00:23:24.000000000 +1200
+++ 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
+@@ -529,7 +529,7 @@ set SPOOLING_DEPS = "spoolloaderlib sp
+ # we generate a berkeley db shared lib, so we need bdb include and lib path
+ set CFLAGS = "-I$BERKELEYDB_HOME/include/${BDB_INCLUDE_SUBDIR} $CFLAGS"
+ set LFLAGS = "-L$BERKELEYDB_HOME/lib/${BDB_LIB_SUBDIR} $LFLAGS"
+-set SHARED_LFLAGS = "$SHARED_LFLAGS -L$BERKELEYDB_HOME/lib"
++set SHARED_LFLAGS = "$SHARED_LFLAGS -L$BERKELEYDB_HOME/lib -R$BERKELEYDB_HOME/lib"
-+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 = ""
+ # Compile with gettext and libintl - we have platform dependent defaults
+ switch ($BUILDARCH)
+@@ -1184,11 +1184,11 @@ case FREEBSD_*:
+ set PTHRDSFLAGS = "-D_REENTRANT -D__USE_REENTRANT"
+ set CFLAGS = "$OFLAG -Wall -DFREEBSD -D$BUILDARCH -DGETHOSTBYNAME_M -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS -I/usr/X11R6/include"
+ set NOERR_CFLAG = "-Wno-error"
+- set LFLAGS = "$DEBUG_FLAG $LFLAGS"
++ set LFLAGS = "$DEBUG_FLAG $LFLAGS -export-dynamic"
+ set LIBS = "$LIBS -lkvm"
+ set SHAREDLD = $CC
+ set SHARED_CFLAGS = "-fPIC"
+- set SHARED_LFLAGS = "$SHARED_LFLAGS -L. -shared"
++ set SHARED_LFLAGS = "$SHARED_LFLAGS -L. -shared -export-dynamic"
+
+ set XMTDEF = ""
+ set XINCD = "$XMTINCD $XINCD -I/usr/X11/include"
+@@ -1212,18 +1212,23 @@ case NETBSD_*:
+ set DLLIB = ""
+ set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
+ set PTHRDSFLAGS = "-D_REENTRANT -D__USE_REENTRANT"
+- set CFLAGS = "$OFLAG -Wall -DNETBSD -D$BUILDARCH -DGETHOSTBYNAME_M -DGETHOSTBYADDR_M -DSGE_THREADSAFE_UTIL $DEBUG_FLAG $CFLAGS -I/usr/X11R6/include"
++ set CFLAGS = "$OFLAG -Wall -DNETBSD -D$BUILDARCH -DGETHOSTBYNAME_M -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS -I${X11BASE}/include"
+ set NOERR_CFLAG = "-Wno-error"
+- set LFLAGS = "$DEBUG_FLAG $LFLAGS"
++ switch (`/usr/bin/uname -r`)
++ case "[1-2].*":
++ set CFLAGS = "$CFLAGS -DSGE_THREADSAFE_UTIL"
++ breaksw
++ endsw
++ set LFLAGS = "$DEBUG_FLAG $LFLAGS -export-dynamic -L${LOCALBASE}/lib -R${LOCALBASE}/lib"
+ set LIBS = "$LIBS -lkvm"
+ set SHAREDLD = $CC
+ set SHARED_CFLAGS = "-fPIC"
+- set SHARED_LFLAGS = "$SHARED_LFLAGS -L. -shared"
++ set SHARED_LFLAGS = "$SHARED_LFLAGS -L. -shared -export-dynamic"
+
+ set XMTDEF = ""
+- set XINCD = "$XMTINCD $XINCD -I/usr/X11/include"
+ set XINCD = "$XMTINCD $XINCD -I${X11BASE}/include"
-+ set XCFLAGS = "-Wno-strict-prototypes -Wno-error $XMTDEF $XINCD"
+ set XCFLAGS = "-Wno-strict-prototypes -Wno-error $XMTDEF $XINCD"
+- set XLIBD = "-L/usr/X11R6/lib -R/usr/X11R6/lib"
+ 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
+ set XLFLAGS = "$XLIBD"
+ set XLIBS = " -lXm -lXpm -lXt -lXext -lX11 -lSM -lICE -lXp"
+ set RM = "rm -f"
diff --git a/parallel/sge/patches/patch-an b/parallel/sge/patches/patch-an
deleted file mode 100644
index c334c4be27d..00000000000
--- a/parallel/sge/patches/patch-an
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index 1a971e591db..00000000000
--- a/parallel/sge/patches/patch-ao
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index a3f57592f08..00000000000
--- a/parallel/sge/patches/patch-ap
+++ /dev/null
@@ -1,31 +0,0 @@
-$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
deleted file mode 100644
index d91f7b45581..00000000000
--- a/parallel/sge/patches/patch-aq
+++ /dev/null
@@ -1,17 +0,0 @@
-$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
index e7540913883..f103715aa55 100644
--- a/parallel/sge/patches/patch-ar
+++ b/parallel/sge/patches/patch-ar
@@ -1,25 +1,13 @@
-$NetBSD: patch-ar,v 1.2 2004/06/15 00:26:07 dmcmahill Exp $
+$NetBSD: patch-ar,v 1.3 2006/10/19 11:51:27 markd Exp $
---- source/daemons/shepherd/setrlimits.c.orig Wed Mar 3 13:10:00 2004
+--- source/daemons/shepherd/setrlimits.c.orig 2005-11-23 04:35:03.000000000 +1300
+++ 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
-
-@@ -404,9 +404,9 @@ int trace_rlimit
+@@ -437,7 +437,7 @@ static void pushlimit(int resource, stru
if (rlp->rlim_max < rlp->rlim_cur)
rlp->rlim_cur = rlp->rlim_max;
--#if defined(ALINUX) || defined(LINUX5) || ( defined(SOLARIS) && !defined(SOLARIS64) ) || defined(NECSX4) || defined(NECSX5)
-+#if defined(ALINUX) || defined(LINUX5) || ( defined(SOLARIS) && !defined(SOLARIS64) ) || defined(NECSX4) || defined(NECSX5) || defined(NETBSD_ALPHA) || defined(NETBSD_X86_64) || defined(NETBSD_SPARC64)
+-#if defined(NECSX4) || defined(NECSX5)
++#if defined(NECSX4) || defined(NECSX5) || defined(NETBSD_ALPHA) || defined(NETBSD_X86_64) || defined(NETBSD_SPARC64)
# 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)
+ #elif defined(IRIX) || defined(HPUX) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD) || defined(INTERIX)
# 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
index 119807c4c17..3338305143a 100644
--- a/parallel/sge/patches/patch-as
+++ b/parallel/sge/patches/patch-as
@@ -1,28 +1,14 @@
-$NetBSD: patch-as,v 1.2 2004/05/19 06:53:38 dmcmahill Exp $
+$NetBSD: patch-as,v 1.3 2006/10/19 11:51:27 markd Exp $
---- source/dist/util/arch.orig Thu Apr 22 13:41:08 2004
-+++ source/dist/util/arch Wed May 19 06:37:17 2004
-@@ -56,4 +56,5 @@
- os="`/usr/bin/uname -s`"
- ht="`/usr/bin/uname -m`"
-+ ha="`/usr/bin/uname -p`"
- osht="$os,$ht"
- case $osht in
-@@ -64,4 +65,7 @@
- ARCH=fbsd-$ht
- ;;
-+ NetBSD,*)
-+ ARCH=nbsd-$ha
-+ ;;
- esac
- fi
-@@ -272,4 +276,9 @@
- PATH=$OLD_PATH
+--- source/dist/util/arch.orig 2005-06-21 00:25:11.000000000 +1200
++++ source/dist/util/arch
+@@ -309,6 +309,9 @@ if [ "$1" = "-m" -o "$1" = "-mt" -o "$1"
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
;;
++ nbsd-*)
++ DEFAULTMANPATH=/usr/pkg/man:/usr/local/man:/usr/X11R6/man:/usr/share/man
++ ;;
+ hp*)
+ DEFAULTMANPATH=/usr/man:/usr/contrib/man:/usr/local/man
+ SHARED_LIBRARY_PATH="SHLIB_PATH"
diff --git a/parallel/sge/patches/patch-at b/parallel/sge/patches/patch-at
index 951f90bb841..9f14e7af52b 100644
--- a/parallel/sge/patches/patch-at
+++ b/parallel/sge/patches/patch-at
@@ -1,25 +1,15 @@
-$NetBSD: patch-at,v 1.1.1.1 2004/05/03 00:38:35 dmcmahill Exp $
+$NetBSD: patch-at,v 1.2 2006/10/19 11:51:27 markd 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
+--- source/dist/util/arch_variables.orig 2005-11-11 03:53:15.000000000 +1300
++++ source/dist/util/arch_variables
+@@ -197,8 +197,8 @@ case $ARCH in
+ AWK=/usr/bin/awk
+ ECHO="/bin/echo"
+ RC_FILE=netbsd
+- RC_PREFIX=/etc/rc.d
+- RC_SUFFIX=.sh
+ 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
+ XTERM=/usr/X11R6/bin/xterm
+ MAILER=/usr/bin/mail
+ QLOGIN_COMMAND=telnet
diff --git a/parallel/sge/patches/patch-au b/parallel/sge/patches/patch-au
deleted file mode 100644
index be42c7fc710..00000000000
--- a/parallel/sge/patches/patch-au
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index 8c0b9f73b48..00000000000
--- a/parallel/sge/patches/patch-av
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index b7ec64c3c4b..00000000000
--- a/parallel/sge/patches/patch-aw
+++ /dev/null
@@ -1,59 +0,0 @@
-$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
deleted file mode 100644
index bff311c0c30..00000000000
--- a/parallel/sge/patches/patch-ax
+++ /dev/null
@@ -1,53 +0,0 @@
-$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
deleted file mode 100644
index 2cceae28808..00000000000
--- a/parallel/sge/patches/patch-ay
+++ /dev/null
@@ -1,18 +0,0 @@
-$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
deleted file mode 100644
index 4cffbaa89a5..00000000000
--- a/parallel/sge/patches/patch-az
+++ /dev/null
@@ -1,34 +0,0 @@
-$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
deleted file mode 100644
index 386951a325c..00000000000
--- a/parallel/sge/patches/patch-ba
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index 5616930ff6c..00000000000
--- a/parallel/sge/patches/patch-bb
+++ /dev/null
@@ -1,33 +0,0 @@
-$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
deleted file mode 100644
index e0acd555b00..00000000000
--- a/parallel/sge/patches/patch-bc
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index c03b7d7701b..00000000000
--- a/parallel/sge/patches/patch-bd
+++ /dev/null
@@ -1,67 +0,0 @@
-$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
deleted file mode 100644
index cc4fda3f0a6..00000000000
--- a/parallel/sge/patches/patch-be
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
index 2234376e353..f74672b364a 100644
--- a/parallel/sge/patches/patch-bf
+++ b/parallel/sge/patches/patch-bf
@@ -1,31 +1,31 @@
-$NetBSD: patch-bf,v 1.1.1.1 2004/05/03 00:38:36 dmcmahill Exp $
+$NetBSD: patch-bf,v 1.2 2006/10/19 11:51:27 markd Exp $
---- source/utilbin/infotext.c.orig Wed Mar 3 13:11:17 2004
+--- source/utilbin/infotext.c.orig 2005-10-25 04:58:07.000000000 +1300
+++ source/utilbin/infotext.c
-@@ -64,7 +64,7 @@ static void sge_infotext_welcome(void);
+@@ -66,7 +66,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)
+-#if defined(ALPHA) || defined(SOLARISAMD64) || defined(ALPHA5) || defined(ALINUX) || defined(HPUX) || __GNUC__ >= 3
++#if defined(ALPHA) || defined(SOLARISAMD64) || defined(ALPHA5) || defined(ALINUX) || defined(HPUX) || __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_
+@@ -545,7 +545,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)
+-#if defined(ALPHA) || defined(SOLARISAMD64) || defined(ALPHA5) || defined(ALINUX) || defined(HPUX) || defined(IRIX65) || __GNUC__ >= 3
++#if defined(ALPHA) || defined(SOLARISAMD64) || defined(ALPHA5) || defined(ALINUX) || defined(HPUX) || defined(IRIX65) || __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[] ) {
+@@ -1050,7 +1050,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)
+-#if defined(SOLARISAMD64) || defined(ALPHA) || defined(ALPHA5) || defined(ALINUX) || defined(HPUX) || defined(IRIX65) || __GNUC__ >= 3
++#if defined(SOLARISAMD64) || defined(ALPHA) || defined(ALPHA5) || defined(ALINUX) || defined(HPUX) || defined(IRIX65) || __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));
diff --git a/parallel/sge/patches/patch-bg b/parallel/sge/patches/patch-bg
index 5b6f8e36b89..f82b79c286c 100644
--- a/parallel/sge/patches/patch-bg
+++ b/parallel/sge/patches/patch-bg
@@ -1,17 +1,8 @@
-$NetBSD: patch-bg,v 1.1 2004/06/15 00:26:07 dmcmahill Exp $
+$NetBSD: patch-bg,v 1.2 2006/10/19 11:51:27 markd Exp $
---- source/common/basis_types.h.orig Wed Mar 3 13:09:42 2004
+--- source/common/basis_types.h.orig 2005-07-18 22:25:31.000000000 +1200
+++ source/common/basis_types.h
-@@ -52,7 +52,7 @@
-
-
-
--#if defined(FREEBSD)
-+#if defined(FREEBSD) || defined(NETBSD)
- # define U32CFormat "%u"
- # define u32c(x) (unsigned int)(x)
-
-@@ -92,7 +92,7 @@ extern "C" {
+@@ -110,7 +110,7 @@ extern "C" {
# define u_long32 u_int
#elif defined(WIN32NATIVE)
# define u_long32 unsigned long
@@ -20,39 +11,30 @@ $NetBSD: patch-bg,v 1.1 2004/06/15 00:26:07 dmcmahill Exp $
# define u_long32 uint32_t
#else
# define u_long32 u_long
-@@ -100,7 +100,7 @@ extern "C" {
+@@ -120,7 +120,7 @@ extern "C" {
- /* set u32 and x32 for 64 or 32 bit machines */
- /* uu32 for strictly unsigned, not nice, but did I use %d for an unsigned? */
--#if defined(ALPHA) || defined(IRIX6) || defined(CRAY) || defined(SOLARIS64) || defined(NECSX4) || defined(NECSX5) || defined(ALINUX) || defined(IA64LINUX) || defined(LINUXAMD64) ||defined(FREEBSD)
-+#if defined(ALPHA) || defined(IRIX6) || defined(CRAY) || defined(SOLARIS64) || defined(NECSX4) || defined(NECSX5) || defined(ALINUX) || defined(IA64LINUX) || defined(LINUXAMD64) ||defined(FREEBSD) || defined(NETBSD)
- # define u32 "%d"
- # define uu32 "%u"
- # define x32 "%x"
-@@ -116,7 +116,7 @@ extern "C" {
+ /* set sge_u32 and sge_x32 for 64 or 32 bit machines */
+ /* sge_uu32 for strictly unsigned, not nice, but did I use %d for an unsigned? */
+-#if defined(TARGET_64BIT) || defined(FREEBSD)
++#if defined(TARGET_64BIT) || defined(FREEBSD) || defined(NETBSD)
+ # define sge_u32 "%d"
+ # define sge_uu32 "%u"
+ # define sge_x32 "%x"
+@@ -136,7 +136,7 @@ extern "C" {
solaris (who else - it's IRIX?) uses long
variables for uid_t, gid_t and pid_t
*/
-#if defined(FREEBSD)
+#if defined(FREEBSD) || defined(NETBSD)
# define uid_t_fmt "%u"
- #else
+ #else
# define uid_t_fmt pid_t_fmt
-@@ -132,7 +132,7 @@ extern "C" {
+@@ -150,7 +150,7 @@ extern "C" {
+
+ #if (defined(SOLARIS) && defined(TARGET_32BIT)) || defined(IRIX) || defined(INTERIX)
# define gid_t_fmt "%ld"
- #elif defined(LINUX5)
- # define gid_t_fmt "%hu"
--#elif defined(LINUX6) || defined(FREEBSD)
-+#elif defined(LINUX6) || defined(FREEBSD) || defined(NETBSD)
+-#elif defined(LINUX86) || defined(FREEBSD)
++#elif defined(LINUX86) || defined(FREEBSD) || defined(NETBSD)
# define gid_t_fmt "%u"
#else
# define gid_t_fmt "%d"
-@@ -185,7 +185,7 @@ typedef char stringTlong[4*MAX_STRING_SI
- #define SN_UNLIMITED "%s"
-
- /* used for shepherd and procfs */
--#if defined(LINUX) || defined(SUN4) || defined(AIX4) || defined(HP10) || defined(HP11) || defined(FREEBSD)
-+#if defined(LINUX) || defined(SUN4) || defined(AIX4) || defined(HP10) || defined(HP11) || defined(FREEBSD) || defined(NETBSD)
- # define MAX_GROUPS NGROUPS
- #elif defined(IRIX6) || defined(SOLARIS)
- # define MAX_GROUPS NGROUPS_UMAX
diff --git a/parallel/sge/patches/patch-bh b/parallel/sge/patches/patch-bh
deleted file mode 100644
index d0fdfa7530c..00000000000
--- a/parallel/sge/patches/patch-bh
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-bh,v 1.1 2004/06/15 00:26:07 dmcmahill Exp $
-
---- source/daemons/common/pdc.c.orig Wed Mar 3 13:09:47 2004
-+++ source/daemons/common/pdc.c
-@@ -117,7 +117,7 @@ int main(int argc,char *argv[])
- #include "sge_stat.h"
- #endif
-
--#if defined(LINUX) || defined(ALPHA) || defined(IRIX6) || defined(SOLARIS) || defined(FREEBSD) || defined(DARWIN)
-+#if defined(LINUX) || defined(ALPHA) || defined(IRIX6) || defined(SOLARIS) || defined(FREEBSD) || defined (NETBSD) || defined(DARWIN)
- #include "sge_nprocs.h"
- #endif
-
-@@ -2082,7 +2082,7 @@ int psStartCollector(void)
- pagesize = getpagesize();
-
- /* retrieve static parameters */
--#if defined(LINUX) || defined(ALINUX) || defined(IRIX6) || defined(SOLARIS) || defined(FREEBSD) || defined(DARWIN)
-+#if defined(LINUX) || defined(ALINUX) || defined(IRIX6) || defined(SOLARIS) || defined(FREEBSD) || defined (NETBSD) || defined(DARWIN)
- ncpus = sge_nprocs();
- #elif defined(ALPHA)
- {
diff --git a/parallel/sge/patches/patch-bj b/parallel/sge/patches/patch-bj
new file mode 100644
index 00000000000..ea2078c6baf
--- /dev/null
+++ b/parallel/sge/patches/patch-bj
@@ -0,0 +1,13 @@
+$NetBSD: patch-bj,v 1.1 2006/10/19 11:51:27 markd Exp $
+
+--- source/daemons/common/err_trace.c.orig 2005-11-24 00:03:58.000000000 +1300
++++ source/daemons/common/err_trace.c
+@@ -962,7 +962,7 @@ static bool nfs_mounted(const char *path
+ {
+ bool ret=true;
+
+-#if defined(LINUX) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
++#if defined(LINUX) || defined(DARWIN) || defined(FREEBSD) || (defined(NETBSD) && !defined(ST_RDONLY))
+ struct statfs buf;
+ statfs(path, &buf);
+ #elif defined(INTERIX)
diff --git a/parallel/sge/patches/patch-bk b/parallel/sge/patches/patch-bk
new file mode 100644
index 00000000000..3809e701f6d
--- /dev/null
+++ b/parallel/sge/patches/patch-bk
@@ -0,0 +1,13 @@
+$NetBSD: patch-bk,v 1.1 2006/10/19 11:51:27 markd Exp $
+
+--- source/utilbin/fstype.c.orig 2005-10-06 20:18:25.000000000 +1300
++++ source/utilbin/fstype.c
+@@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
+ }
+ else
+ {
+-#if defined(LINUX) || defined(DARWIN) || defined(FREEBSD) || defined(NETBSD)
++#if defined(LINUX) || defined(DARWIN) || defined(FREEBSD) || (defined(NETBSD) && !defined(ST_RDONLY))
+ struct statfs buf;
+ ret = statfs(argv[1], &buf);
+ #elif defined(INTERIX)
diff --git a/parallel/sge/patches/patch-bl b/parallel/sge/patches/patch-bl
new file mode 100644
index 00000000000..ec318498a9a
--- /dev/null
+++ b/parallel/sge/patches/patch-bl
@@ -0,0 +1,55 @@
+$NetBSD: patch-bl,v 1.1 2006/10/19 11:51:27 markd Exp $
+
+--- source/libs/comm/cl_ssl_framework.c.orig 2006-10-08 23:52:33.000000000 +1300
++++ source/libs/comm/cl_ssl_framework.c
+@@ -988,6 +988,9 @@ static int cl_com_ssl_build_symbol_table
+ {
+ char* func_name = NULL;
+ int had_errors = 0;
++#if defined(FREEBSD) || defined(NETBSD)
++ void* cl_com_ssl_crypto_handle_saved = NULL;
++#endif
+
+
+ CL_LOG(CL_LOG_INFO,"loading ssl library functions with dlopen() ...");
+@@ -1002,9 +1005,16 @@ static int cl_com_ssl_build_symbol_table
+
+ #if defined(DARWIN)
+ #ifdef RTLD_NODELETE
+- cl_com_ssl_crypto_handle = dlopen ("libssl.bundle", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
++ cl_com_ssl_crypto_handle = dlopen ("libssl.dylib", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
++#else
++ cl_com_ssl_crypto_handle = dlopen ("libssl.dylib", RTLD_NOW | RTLD_GLOBAL );
++#endif /* RTLD_NODELETE */
++
++#elif defined(FREEBSD) || defined(NETBSD)
++#ifdef RTLD_NODELETE
++ cl_com_ssl_crypto_handle = dlopen ("libssl.so", RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE);
+ #else
+- cl_com_ssl_crypto_handle = dlopen ("libssl.bundle", RTLD_NOW | RTLD_GLOBAL );
++ cl_com_ssl_crypto_handle = dlopen ("libssl.so", RTLD_LAZY | RTLD_GLOBAL);
+ #endif /* RTLD_NODELETE */
+
+ #elif defined(HP11)
+@@ -1029,6 +1039,10 @@ static int cl_com_ssl_build_symbol_table
+ return CL_RETVAL_SSL_DLOPEN_SSL_LIB_FAILED;
+ }
+
++#if defined(FREEBSD) || defined(NETBSD)
++ cl_com_ssl_crypto_handle_saved = cl_com_ssl_crypto_handle;
++ cl_com_ssl_crypto_handle = RTLD_DEFAULT;
++#endif
+
+
+ /* setting up crypto function pointers */
+@@ -1649,6 +1663,10 @@ static int cl_com_ssl_build_symbol_table
+ return CL_RETVAL_SSL_CANT_LOAD_ALL_FUNCTIONS;
+ }
+
++#if defined(FREEBSD) || defined(NETBSD)
++ cl_com_ssl_crypto_handle = cl_com_ssl_crypto_handle_saved;
++#endif
++
+ pthread_mutex_unlock(&cl_com_ssl_crypto_handle_mutex);
+ CL_LOG(CL_LOG_INFO,"loading ssl library functions with dlopen() done");
+