summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2018-04-18 08:42:16 +0000
committerhe <he@pkgsrc.org>2018-04-18 08:42:16 +0000
commit61359b39c0d0bebba7521a9d1aa4f3aec0288275 (patch)
tree9e64263cb33cad8cfb61470d53744fcb37860531
parentd9109c661c0d9903580d7f15207ba2998bf41611 (diff)
downloadpkgsrc-61359b39c0d0bebba7521a9d1aa4f3aec0288275.tar.gz
Modernize this so that it builds again (after SSP), and
do the context-shifting in a non-MI manner so it may work on other ports than i386. Bump PKGREVISION.
-rw-r--r--lang/sr/Makefile4
-rw-r--r--lang/sr/distinfo6
-rw-r--r--lang/sr/patches/patch-bl16
-rw-r--r--lang/sr/patches/patch-csw_netbsd.c (renamed from lang/sr/patches/patch-au)29
-rw-r--r--lang/sr/patches/patch-gen.h35
5 files changed, 49 insertions, 41 deletions
diff --git a/lang/sr/Makefile b/lang/sr/Makefile
index 57ff58b70fa..9c8133e0755 100644
--- a/lang/sr/Makefile
+++ b/lang/sr/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.24 2012/10/21 20:56:54 cheusov Exp $
+# $NetBSD: Makefile,v 1.25 2018/04/18 08:42:16 he Exp $
#
DISTNAME= sr233
PKGNAME= sr-2.3.3
-PKGREVISION= 9
+PKGREVISION= 10
CATEGORIES= lang parallel
MASTER_SITES= ftp://ftp.cs.arizona.edu/sr/
EXTRACT_SUFX= .tar.Z
diff --git a/lang/sr/distinfo b/lang/sr/distinfo
index 305f0c23590..93905346e84 100644
--- a/lang/sr/distinfo
+++ b/lang/sr/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2015/11/03 22:50:45 agc Exp $
+$NetBSD: distinfo,v 1.23 2018/04/18 08:42:16 he Exp $
SHA1 (sr233.tar.Z) = 0354987527ed1e84c32d3b1fc6bacb65d647f337
RMD160 (sr233.tar.Z) = 58c90c06abede7a15ca8a68f53b6fdfa575c79df
@@ -10,7 +10,6 @@ SHA1 (patch-ad) = 7fc00d7f52a16dc7b814c94c795bb5d7af02e58b
SHA1 (patch-ar) = 9a331cdb90959d0cc7475d2fc203d2c302d4bf5c
SHA1 (patch-as) = db45b9cbc7adf8fccc207e91041a544e427c7a2a
SHA1 (patch-at) = 989ea8ecf79a9f5d0567c53a2c9580b4ecc634c9
-SHA1 (patch-au) = 701c53883b3661c578dc5b192a9779e7fdc503f5
SHA1 (patch-av) = 1beabb719e6f4a1d1872bd66c73d0d1169686770
SHA1 (patch-aw) = 1bf4f69379229c7493b057a0445959b16cc36ca7
SHA1 (patch-ax) = a834a65f2574be388bb420fdf883a9ac74f00ec9
@@ -27,8 +26,9 @@ SHA1 (patch-bh) = c880064e871297a411e2292f78d82222bb46dac4
SHA1 (patch-bi) = ad6706295ff164fe6df257d325a06f9b157175d1
SHA1 (patch-bj) = cd46d268fc173fe02efa8338ebf3f664ff2e5b94
SHA1 (patch-bk) = 7ec4207ea173377fd6de9dc6272ab20e48ef0780
-SHA1 (patch-bl) = 7386a25df3223892fb841af3fa13eee3a17505b3
SHA1 (patch-bm) = 52ebd86cda2d354bf5d580c0f2cf25f80350cd2c
SHA1 (patch-bn) = fb8ebeb57956c094aee652c183a2fe1abbc45bb1
SHA1 (patch-bo) = 55dcc14458fcb817c605eb7b8c4240e87e1cd25a
SHA1 (patch-bp) = e0b553628fc2711ba2abe2b01999a0f84a5fbb7b
+SHA1 (patch-csw_netbsd.c) = e6a1dfe43a2c64317287cc4676d264b195fc29b5
+SHA1 (patch-gen.h) = cf024274a1c7866e103bcaf3355f5565a1612e2d
diff --git a/lang/sr/patches/patch-bl b/lang/sr/patches/patch-bl
deleted file mode 100644
index e4d3ab30472..00000000000
--- a/lang/sr/patches/patch-bl
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-bl,v 1.1 2010/03/03 15:24:19 is Exp $
-
---- gen.h.orig 1999-07-28 22:42:21.000000000 +0200
-+++ gen.h
-@@ -43,8 +43,9 @@ void exit();
- double fmod(); /* not in Sequent <math.h> */
-
- #if defined(__STDC__) || defined(__sgi) || defined(_AIX) || defined(__alpha)
--void *malloc(), *realloc();
--void *memset(), *memcpy();
-+#include <unistd.h>
-+#include <string.h>
-+#include <stdlib.h>
- #else
- char *malloc(), *realloc();
- char *memset(), *memcpy();
diff --git a/lang/sr/patches/patch-au b/lang/sr/patches/patch-csw_netbsd.c
index beb4a68bd5a..726ac38d80c 100644
--- a/lang/sr/patches/patch-au
+++ b/lang/sr/patches/patch-csw_netbsd.c
@@ -1,8 +1,10 @@
-$NetBSD: patch-au,v 1.3 2005/03/02 13:21:34 is Exp $
+$NetBSD: patch-csw_netbsd.c,v 1.1 2018/04/18 08:42:16 he Exp $
---- csw/netbsd.c.orig 2005-03-02 13:00:06.000000000 +0000
+Implement context switching for NetBSD.
+
+--- csw/netbsd.c.orig 2018-04-18 07:36:39.000000000 +0000
+++ csw/netbsd.c
-@@ -0,0 +1,112 @@
+@@ -0,0 +1,99 @@
+/*
+ * netbsd.c -- context switch code for NetBSD 2.
+ *
@@ -16,31 +18,18 @@ $NetBSD: patch-au,v 1.3 2005/03/02 13:21:34 is Exp $
+
+static void startup(void (*)(void), unsigned long, unsigned long, unsigned long, unsigned long);
+
-+#ifdef __i386__
-+void pthread__i386_init(void);
-+
-+#define _setcontext_u(uc) (*_md_setcontext_u)(uc)
-+#define _swapcontext_u(oc,nc) (*_md_swapcontext_u)(oc,nc)
-+
+static void sr_setcontext_u(ucontext_t *);
+static void sr_swapcontext_u(ucontext_t *, ucontext_t *);
+
-+void (*_md_getcontext_u) (ucontext_t *);
-+void (*_md_setcontext_u) (ucontext_t *) = sr_setcontext_u;
-+void (*_md_swapcontext_u)(ucontext_t *, ucontext_t *) = sr_swapcontext_u;
-+
+static void
+sr_setcontext_u(ucontext_t *uc) {
-+ pthread__i386_init();
-+ _setcontext_u(uc);
++ setcontext(uc);
+}
+
+static void
+sr_swapcontext_u(ucontext_t *oldc, ucontext_t *newc) {
-+ pthread__i386_init();
-+ _swapcontext_u(oldc, newc);
++ swapcontext(oldc, newc);
+}
-+#endif
+
+
+/*
@@ -96,9 +85,9 @@ $NetBSD: patch-au,v 1.3 2005/03/02 13:21:34 is Exp $
+
+ if (old) {
+ oldu = (ucontext_t *)old;
-+ _swapcontext_u(oldu, newu);
++ swapcontext(oldu, newu);
+ } else {
-+ _setcontext_u(newu);
++ setcontext(newu);
+ }
+}
+
diff --git a/lang/sr/patches/patch-gen.h b/lang/sr/patches/patch-gen.h
new file mode 100644
index 00000000000..044d3493017
--- /dev/null
+++ b/lang/sr/patches/patch-gen.h
@@ -0,0 +1,35 @@
+$NetBSD: patch-gen.h,v 1.1 2018/04/18 08:42:16 he Exp $
+
+If using modern C compiler, use header files instead of
+attempting to predeclare C library functions.
+
+--- gen.h.orig 1999-07-28 20:42:21.000000000 +0000
++++ gen.h
+@@ -32,9 +32,15 @@
+ * Don't use protoypes here; increases conflicts with system include files.
+ */
+
++#if defined(__STDC__) || defined(__sgi) || defined(_AIX) || defined(__alpha)
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#else
+ char *getenv(), *getcwd();
+ char *strcat(), *strncat(), *strchr(), *strrchr(), *strcpy(), *strncpy();
+ void exit();
++#endif
+
+ /* int functions are not explicitly defined -- use implicit definitions */
+ /* This avoids conflicts on Solaris (at least) where strlen is a size_t fn */
+@@ -43,8 +49,9 @@ void exit();
+ double fmod(); /* not in Sequent <math.h> */
+
+ #if defined(__STDC__) || defined(__sgi) || defined(_AIX) || defined(__alpha)
+-void *malloc(), *realloc();
+-void *memset(), *memcpy();
++#include <unistd.h>
++#include <string.h>
++#include <stdlib.h>
+ #else
+ char *malloc(), *realloc();
+ char *memset(), *memcpy();