aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroliver <oliver@FreeBSD.org>2003-12-14 03:37:23 +0800
committeroliver <oliver@FreeBSD.org>2003-12-14 03:37:23 +0800
commit30784a85c39855a0dbb8ad4520427426aaf079bb (patch)
treeb052e4016a5502bcd0b4c2121eabd9f8a6a6f569
parent0f24c7ab7a951d2d57c1f4d584aa95bae9ffb71e (diff)
downloadfreebsd-ports-gnome-30784a85c39855a0dbb8ad4520427426aaf079bb.tar.gz
freebsd-ports-gnome-30784a85c39855a0dbb8ad4520427426aaf079bb.tar.zst
freebsd-ports-gnome-30784a85c39855a0dbb8ad4520427426aaf079bb.zip
fix build on 4 and 5
-rw-r--r--lang/sr/Makefile11
-rw-r--r--lang/sr/files/patch-rts::alloc.c11
-rw-r--r--lang/sr/files/patch-rts::array.c60
-rw-r--r--lang/sr/files/patch-rts::io.c60
-rw-r--r--lang/sr/files/patch-rts::main.c34
-rw-r--r--lang/sr/files/patch-rts::math.c82
-rw-r--r--lang/sr/files/patch-rts::misc.c50
-rw-r--r--lang/sr/files/patch-rts::oper.c10
-rw-r--r--lang/sr/files/patch-rts::scan.c34
-rw-r--r--lang/sr/files/patch-rts:funcs.h70
-rw-r--r--lang/sr/files/patch-sr.h61
-rw-r--r--lang/sr/files/patch-sr::output.c34
-rw-r--r--lang/sr/files/patch-sr::protos.h11
-rw-r--r--lang/sr/pkg-plist1
14 files changed, 522 insertions, 7 deletions
diff --git a/lang/sr/Makefile b/lang/sr/Makefile
index 33f7374faf09..dea0ed01e1c5 100644
--- a/lang/sr/Makefile
+++ b/lang/sr/Makefile
@@ -8,7 +8,9 @@
PORTNAME= sr
PORTVERSION= 2.3.1
CATEGORIES= lang parallel
-MASTER_SITES= ftp://ftp.cs.arizona.edu/sr/
+MASTER_SITES= ftp://ftp.uu.net/.vol/1/languages/sr/ \
+ http://www.it.uc3m.es/~ptb/clases/sr/inst/src/ \
+ ftp://ftp.cs.arizona.edu/sr/
DISTNAME= sr231
EXTRACT_SUFX= .tar.Z
@@ -17,6 +19,7 @@ COMMENT= A parallel language "Synchronization Resources"
HAS_CONFIGURE= yes
CONFIGURE_ARGS= prefix
+CONFIGURE_ENV= PREFIX="${PREFIX}"
NO_WRKSUBDIR= yes
MAN1 = sr.1 srl.1 srm.1 srprof.1 srtex.1 srlatex.1 srgrind.1 \
ccr2sr.1 m2sr.1 csp2sr.1
@@ -25,12 +28,6 @@ MAN5 = srmap.5 srtrace.5
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 500000
-BROKEN= "fails to package due to missing lib/sr/srwin.o"
-.endif
-.if ${OSVERSION} >= 500000
-BROKEN= "fails to build; bad C++ code"
-.endif
pre-install:
@${MKDIR} ${PREFIX}/lib/sr
diff --git a/lang/sr/files/patch-rts::alloc.c b/lang/sr/files/patch-rts::alloc.c
new file mode 100644
index 000000000000..2fbbd27bce9a
--- /dev/null
+++ b/lang/sr/files/patch-rts::alloc.c
@@ -0,0 +1,11 @@
+--- rts/alloc.c.orig Sat Dec 13 19:57:23 2003
++++ rts/alloc.c Sat Dec 13 19:57:00 2003
+@@ -5,7 +5,7 @@
+ */
+
+ #include "rts.h"
+-#include <varargs.h>
++#include <stdarg.h>
+
+ static Memh all_mem; /* header blocks for SR allocated memory */
+ static Mutex mem_mutex; /* protection for all_mem; acquired after res->rmutex.*/
diff --git a/lang/sr/files/patch-rts::array.c b/lang/sr/files/patch-rts::array.c
new file mode 100644
index 000000000000..6d4ce2b41871
--- /dev/null
+++ b/lang/sr/files/patch-rts::array.c
@@ -0,0 +1,60 @@
+--- rts/array.c.orig Sat Dec 13 19:38:54 2003
++++ rts/array.c Sat Dec 13 19:52:13 2003
+@@ -1,7 +1,7 @@
+ /* array.c -- runtime support of arrays */
+
+ #include "rts.h"
+-#include <varargs.h>
++#include <stdarg.h>
+
+
+ static void slices ();
+@@ -22,13 +22,10 @@
+ */
+ /*VARARGS*/
+ Array *
+-sr_init_array (va_alist)
+-va_dcl
++sr_init_array (char *locn, Array *addr, ...)
+ {
+ va_list ap;
+- char *locn;
+ int ndim, elemsize, alcsize, i, n;
+- Array *addr;
+ Dim *d;
+ Ptr p, q, initvalue;
+ int *lb, *ub, la[MAX_DIMENS], ua[MAX_DIMENS], size[MAX_DIMENS+1];
+@@ -39,9 +36,7 @@
+ /*
+ * Calculate the size of each dimension.
+ */
+- va_start (ap);
+- locn = va_arg (ap, char *);
+- addr = va_arg (ap, Array *);
++ va_start (ap, addr);
+ elemsize = va_arg (ap, int);
+ initvalue = va_arg (ap, Ptr);
+ ndim = va_arg (ap, int);
+@@ -251,11 +246,9 @@
+
+ /*VARARGS*/
+ Ptr
+-sr_slice (va_alist)
+-va_dcl
++sr_slice (char *locn, ...)
+ {
+ va_list ap;
+- char *locn;
+ Array *a1, *a2;
+ int elemsize, nbounds;
+ int adim, lb[MAX_DIMENS], ub[MAX_DIMENS]; /* array dims*/
+@@ -266,8 +259,7 @@
+ sr_check_stk (CUR_STACK);
+
+ /* get fixed arguments */
+- va_start (ap);
+- locn = va_arg (ap, char *); /* SR source code location */
++ va_start (ap, locn);
+ a1 = va_arg (ap, Array *); /* contiguous array */
+ a2 = va_arg (ap, Array *); /* sliced array */
+ elemsize = va_arg (ap, int); /* array element size */
diff --git a/lang/sr/files/patch-rts::io.c b/lang/sr/files/patch-rts::io.c
new file mode 100644
index 000000000000..4b856851b0d2
--- /dev/null
+++ b/lang/sr/files/patch-rts::io.c
@@ -0,0 +1,60 @@
+--- rts/io.c.orig Sat Dec 13 19:38:54 2003
++++ rts/io.c Sat Dec 13 19:41:34 2003
+@@ -7,7 +7,7 @@
+ */
+
+ #include <ctype.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include "rts.h"
+
+ #define NOTHING /* for use as null macro arg under ANSI C */
+@@ -218,11 +218,9 @@
+ */
+ /*VARARGS*/
+ int
+-sr_read (va_alist)
+-va_dcl
++sr_read (char *locn, ...)
+ {
+ va_list ap;
+- char *locn;
+ File fp;
+ char *argt;
+ Array *a;
+@@ -238,8 +236,7 @@
+ double d;
+
+ sr_check_stk (CUR_STACK);
+- va_start (ap);
+- locn = va_arg (ap, char *);
++ va_start (ap, locn);
+
+ fp = va_arg (ap, File);
+ BEGIN_IO (fp);
+@@ -442,8 +439,7 @@
+ */
+ /*VARARGS*/
+ void
+-sr_printf (va_alist)
+-va_dcl
++sr_printf (char *locn, ...)
+ {
+ va_list ap;
+ File fp;
+@@ -451,14 +447,12 @@
+ double v;
+ char xbuf[20], fbuf[512], dbuf[512], obuf[512];
+ int n;
+- char *locn;
+ String *str, *sp;
+ int ssize;
+ Array *arr;
+
+ sr_check_stk (CUR_STACK);
+- va_start (ap);
+- locn = va_arg (ap, char *);
++ va_start (ap, locn);
+ fp = va_arg (ap, File);
+ sp = va_arg (ap, String *);
+
diff --git a/lang/sr/files/patch-rts::main.c b/lang/sr/files/patch-rts::main.c
new file mode 100644
index 000000000000..d33a6092a3ae
--- /dev/null
+++ b/lang/sr/files/patch-rts::main.c
@@ -0,0 +1,34 @@
+--- rts/main.c.orig Sat Dec 13 19:38:54 2003
++++ rts/main.c Sat Dec 13 19:42:06 2003
+@@ -16,7 +16,7 @@
+ #endif
+
+
+-#include <varargs.h>
++#include <stdarg.h>
+
+ #define RUNERR(s,n,m) {n, m},
+ static struct err {
+@@ -311,20 +311,17 @@
+ */
+ /*VARARGS*/
+ int
+-sr_runerr (va_alist)
+-va_dcl
++sr_runerr (char *locn, ...)
+ {
+ va_list ap;
+ char c, *f, *o;
+- char *locn;
+ int errnum;
+ struct err *ep;
+ char buf[200];
+ Dim *d;
+ String *s;
+
+- va_start (ap);
+- locn = va_arg (ap, char *);
++ va_start (ap, locn);
+ errnum = va_arg (ap, int);
+
+
diff --git a/lang/sr/files/patch-rts::math.c b/lang/sr/files/patch-rts::math.c
new file mode 100644
index 000000000000..b8e282a679f0
--- /dev/null
+++ b/lang/sr/files/patch-rts::math.c
@@ -0,0 +1,82 @@
+--- rts/math.c.orig Sat Dec 13 19:38:54 2003
++++ rts/math.c Sat Dec 13 19:43:26 2003
+@@ -1,6 +1,6 @@
+ /* math.c -- runtime support of arithmetic and math builtins */
+
+-#include <varargs.h>
++#include <stdarg.h>
+ #include "rts.h"
+
+
+@@ -162,14 +162,12 @@
+ */
+ /*VARARGS*/
+ int
+-sr_imax (va_alist)
+-va_dcl
++sr_imax (int n, ...)
+ {
+ va_list ap;
+- int n, r, v;
++ int r, v;
+
+- va_start (ap);
+- n = va_arg (ap, int);
++ va_start (ap, n);
+ if (n <= 0)
+ sr_malf ("no args to sr_imax");
+
+@@ -193,14 +191,12 @@
+ */
+ /*VARARGS*/
+ int
+-sr_imin (va_alist)
+-va_dcl
++sr_imin (int n, ...)
+ {
+ va_list ap;
+- int n, r, v;
++ int r, v;
+
+- va_start (ap);
+- n = va_arg (ap, int);
++ va_start (ap, n);
+ if (n <= 0)
+ sr_malf ("no args to sr_imin");
+
+@@ -222,15 +218,12 @@
+ */
+ /*VARARGS*/
+ Real
+-sr_rmax (va_alist)
+-va_dcl
++sr_rmax (int n, ...)
+ {
+ va_list ap;
+- int n;
+ Real r, v;
+
+- va_start (ap);
+- n = va_arg (ap, int);
++ va_start (ap, n);
+ if (n <= 0)
+ sr_malf ("no args to sr_rmax");
+
+@@ -254,15 +247,12 @@
+ */
+ /*VARARGS*/
+ Real
+-sr_rmin (va_alist)
+-va_dcl
++sr_rmin (int n, ...)
+ {
+ va_list ap;
+- int n;
+ Real r, v;
+
+- va_start (ap);
+- n = va_arg (ap, int);
++ va_start (ap, n);
+ if (n <= 0)
+ sr_malf ("no args to sr_rmin");
+
diff --git a/lang/sr/files/patch-rts::misc.c b/lang/sr/files/patch-rts::misc.c
new file mode 100644
index 000000000000..3a1c363fdbbb
--- /dev/null
+++ b/lang/sr/files/patch-rts::misc.c
@@ -0,0 +1,50 @@
+--- rts/misc.c.orig Sat Dec 13 19:38:54 2003
++++ rts/misc.c Sat Dec 13 19:59:34 2003
+@@ -1,6 +1,6 @@
+ /* misc.c -- miscellaneous routines supporting the generated code */
+
+-#include <varargs.h>
++#include <stdarg.h>
+ #include "rts.h"
+
+
+@@ -15,8 +15,7 @@
+ */
+ /*VARARGS*/
+ Ptr
+-sr_cat (va_alist)
+-va_dcl
++sr_cat (String *a, ...)
+ {
+ va_list ap;
+ String *s, *t;
+@@ -24,7 +23,12 @@
+ char *p;
+
+ n = 0; /* total the string lengths */
+- va_start (ap);
++ va_start (ap, a);
++ if ((int) a & 1)
++ n++;
++ else
++ n += s->length;
++
+ while ((s = va_arg (ap, String *)) != NULL)
+ if ((int) s & 1)
+ n++; /* char argument */
+@@ -37,7 +41,14 @@
+ t->length = n;
+
+ p = DATA (t);
+- va_start (ap);
++ va_start (ap, a);
++ if ((int) a & 1) {
++ *p++ = (int) a >> 2;
++ } else {
++ memcpy (p, DATA (a), a->length);
++ p += a->length;
++ }
++
+ while ((s = va_arg (ap, String *)) != NULL) { /* for each input string: */
+ if ((int) s & 1) {
+ *p++ = (int) s >> 2; /* copy in char argument */
diff --git a/lang/sr/files/patch-rts::oper.c b/lang/sr/files/patch-rts::oper.c
new file mode 100644
index 000000000000..2fb5331748aa
--- /dev/null
+++ b/lang/sr/files/patch-rts::oper.c
@@ -0,0 +1,10 @@
+--- rts/oper.c.orig Sat Dec 13 20:00:05 2003
++++ rts/oper.c Sat Dec 13 20:00:13 2003
+@@ -1,6 +1,6 @@
+ /* oper.c -- runtime support of operations */
+
+-#include <varargs.h>
++#include <stdarg.h>
+ #include "rts.h"
+
+ static Pool oper_pool; /* pool of operation descriptors */
diff --git a/lang/sr/files/patch-rts::scan.c b/lang/sr/files/patch-rts::scan.c
new file mode 100644
index 000000000000..b950d7df1f4e
--- /dev/null
+++ b/lang/sr/files/patch-rts::scan.c
@@ -0,0 +1,34 @@
+--- rts/scan.c.orig Sat Dec 13 19:38:54 2003
++++ rts/scan.c Sat Dec 13 19:45:43 2003
+@@ -1,7 +1,7 @@
+ /* scan.c -- scanf and sscanf */
+
+ #include <ctype.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include "rts.h"
+
+ static int scanToken (), scanInteger (), scanReal (), scanPointer ();
+@@ -58,11 +58,9 @@
+ * (or EOF). The number of successful conversions is returned otherwise.
+ */
+ int
+-sr_scanf (va_alist)
+-va_dcl
++sr_scanf (char *locn, ...)
+ {
+ va_list ap;
+- char *locn;
+ Array *a;
+ String *sp, *sfmt, *sarg;
+ Real *rp, real;
+@@ -84,8 +82,7 @@
+
+ sr_check_stk (CUR_STACK);
+
+- va_start (ap);
+- locn = va_arg (ap, char *);
++ va_start (ap, locn);
+ fp = va_arg (ap, FILE *);
+ sarg = va_arg (ap, String *);
+ sfmt = va_arg (ap, String *);
diff --git a/lang/sr/files/patch-rts:funcs.h b/lang/sr/files/patch-rts:funcs.h
new file mode 100644
index 000000000000..ac19b1632e73
--- /dev/null
+++ b/lang/sr/files/patch-rts:funcs.h
@@ -0,0 +1,70 @@
+--- rts/funcs.h.orig Sat Dec 13 19:48:15 2003
++++ rts/funcs.h Sat Dec 13 19:51:42 2003
+@@ -6,7 +6,7 @@
+ extern char* sr_fmt_locn ();
+ extern void sr_malf ();
+ extern void sr_message ();
+-extern int sr_runerr ();
++extern int sr_runerr (char *locn, ...);
+ extern void sr_net_abort ();
+ extern void sr_stk_corrupted ();
+ extern void sr_stk_overflow ();
+@@ -30,8 +30,8 @@
+ extern Array* sr_aswap ();
+ extern String* sr_chgstr ();
+ extern Ptr sr_clone ();
+-extern Array* sr_init_array ();
+-extern Ptr sr_slice ();
++extern Array* sr_init_array (char *locn, Array *addr, ...);
++extern Ptr sr_slice (char *locn, ...);
+ extern Ptr sr_sslice ();
+ extern Array* sr_strarr ();
+
+@@ -97,8 +97,8 @@
+ extern int sr_inchar ();
+ extern void sr_init_io ();
+ extern File sr_open ();
+-extern void sr_printf ();
+-extern int sr_read ();
++extern void sr_printf (char *locn, ...);
++extern int sr_read (char *locn, ...);
+ extern Bool sr_remove ();
+ extern int sr_seek ();
+ extern int sr_where ();
+@@ -111,14 +111,14 @@
+ extern void sr_rm_iop ();
+
+ /* math.c */
+-extern int sr_imax ();
+-extern int sr_imin ();
++extern int sr_imax (int n, ...);
++extern int sr_imin (int n, ...);
+ extern int sr_imod ();
+ extern void sr_init_random ();
+ extern int sr_itoi ();
+ extern Real sr_random ();
+-extern Real sr_rmax ();
+-extern Real sr_rmin ();
++extern Real sr_rmax (int n, ...);
++extern Real sr_rmin (int n, ...);
+ extern Real sr_rmod ();
+ extern Real sr_round ();
+ extern Real sr_rtoi ();
+@@ -134,7 +134,7 @@
+ extern int sr_arg_ptr ();
+ extern int sr_arg_real ();
+ extern int sr_arg_string ();
+-extern Ptr sr_cat ();
++extern Ptr sr_cat (String *a, ...);
+ extern void sr_dispose ();
+ extern Ptr sr_gswap ();
+ extern void sr_init_misc ();
+@@ -210,7 +210,7 @@
+ extern Ptr sr_literal_rcap ();
+
+ /* scan.c */
+-extern int sr_scanf ();
++extern int sr_scanf (char *locn, ...);
+
+ /* semaphore.c */
+ extern void P ();
diff --git a/lang/sr/files/patch-sr.h b/lang/sr/files/patch-sr.h
new file mode 100644
index 000000000000..16e8689cfd30
--- /dev/null
+++ b/lang/sr/files/patch-sr.h
@@ -0,0 +1,61 @@
+--- sr.h.orig Sat Dec 13 19:53:57 2003
++++ sr.h Sat Dec 13 19:56:14 2003
+@@ -324,7 +324,7 @@
+ extern Ptr sr_astring();
+ extern Array * sr_aswap();
+ extern int sr_boolval();
+-extern Ptr sr_cat();
++extern Ptr sr_cat(String *a, ...);
+ extern Bool sr_cap_ck();
+ extern Array * sr_chars();
+ extern int sr_charval();
+@@ -363,10 +363,10 @@
+ extern int sr_get_string();
+ extern Ptr sr_gswap();
+ extern void sr_iaccess();
+-extern int sr_imax();
+-extern int sr_imin();
++extern int sr_imax(int n, ...);
++extern int sr_imin(int n, ...);
+ extern int sr_imod();
+-extern Array * sr_init_array();
++extern Array * sr_init_array(char *locn, Array *addr, ...);
+ extern void sr_init_semop();
+ extern int sr_intval();
+ extern Ptr sr_invoke();
+@@ -385,28 +385,28 @@
+ extern Ocap sr_new_op();
+ extern int sr_numargs();
+ extern File sr_open();
+-extern void sr_printf();
++extern void sr_printf(char *locn, ...);
+ extern Ptr sr_ptrval();
+ extern int sr_query_iop();
+ extern Real sr_random();
+-extern int sr_read();
++extern int sr_read(char *locn, ...);
+ extern Real sr_realval();
+ extern Ptr sr_receive();
+ extern Bool sr_remove();
+ extern Invb sr_reply();
+ extern void sr_rm_iop();
+-extern Real sr_rmax();
+-extern Real sr_rmin();
++extern Real sr_rmax(int n, ...);
++extern Real sr_rmin(int n, ...);
+ extern Real sr_rmod();
+ extern Real sr_round();
+ extern Real sr_rtoi();
+ extern Real sr_rtor();
+-extern int sr_runerr();
+-extern int sr_scanf();
++extern int sr_runerr(char *locn, ...);
++extern int sr_scanf(char *locn, ...);
+ extern void sr_seed();
+ extern int sr_seek();
+ extern void sr_setpri();
+-extern Ptr sr_slice();
++extern Ptr sr_slice(char *locn, ...);
+ extern Ptr sr_sslice();
+ extern String * sr_sswap();
+ extern void sr_stop();
diff --git a/lang/sr/files/patch-sr::output.c b/lang/sr/files/patch-sr::output.c
new file mode 100644
index 000000000000..47a11243a8f1
--- /dev/null
+++ b/lang/sr/files/patch-sr::output.c
@@ -0,0 +1,34 @@
+--- sr/output.c.orig Sat Dec 13 19:34:04 2003
++++ sr/output.c Sat Dec 13 19:34:47 2003
+@@ -8,7 +8,7 @@
+ #include "compiler.h"
+ #include <ctype.h>
+ #include <errno.h>
+-#include <varargs.h>
++#include <stdarg.h>
+
+ #define NSTREAMS 10 /* number of output streams */
+ #define DEFSTREAM 9 /* default stream number */
+@@ -231,11 +231,9 @@
+
+ /* VARARGS */
+ void
+-cprintf (va_alist)
+-va_dcl
++cprintf (char *fmt, ...)
+ {
+ va_list ap;
+- char *fmt;
+ char *s;
+ char c;
+ int n, oldstream;
+@@ -244,8 +242,7 @@
+
+ oldstream = outstream; /* save stream number in case changed */
+
+- va_start (ap);
+- fmt = va_arg (ap, char *);
++ va_start (ap, fmt);
+
+ if (*fmt == ',' && LASTPUT () == '(')
+ fmt++; /* skip initial comma inside parens */
diff --git a/lang/sr/files/patch-sr::protos.h b/lang/sr/files/patch-sr::protos.h
new file mode 100644
index 000000000000..e6e5d6bdc535
--- /dev/null
+++ b/lang/sr/files/patch-sr::protos.h
@@ -0,0 +1,11 @@
+--- sr/protos.h.orig Sat Dec 13 19:36:36 2003
++++ sr/protos.h Sat Dec 13 19:36:45 2003
+@@ -147,7 +147,7 @@
+ extern void copen PARAMS ((char *fname));
+ extern void cdivert PARAMS ((int n));
+ extern void undivert PARAMS ((int n));
+-extern void cprintf PARAMS ((/* VARARGS */));
++extern void cprintf PARAMS ((char *fmt, ...));
+ extern void cflush PARAMS (());
+ extern void cclose PARAMS ((NOARGS));
+ extern void setstream PARAMS ((int n));
diff --git a/lang/sr/pkg-plist b/lang/sr/pkg-plist
index 56258e8c3488..bf19921adea2 100644
--- a/lang/sr/pkg-plist
+++ b/lang/sr/pkg-plist
@@ -26,6 +26,7 @@ lib/sr/srlatex.sty
lib/sr/srlib.a
lib/sr/srmap
lib/sr/srmulti.h
+lib/sr/srwin.o
lib/sr/srx
%%PORTDOCS%%%%DOCSDIR%%/notes/Memory
%%PORTDOCS%%%%DOCSDIR%%/notes/Questions