pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/newsqueak Add a package for Rob Pike's newsqueak,...
details: https://anonhg.NetBSD.org/pkgsrc/rev/eafbab3f2cf6
branches: trunk
changeset: 650678:eafbab3f2cf6
user: dholland <dholland%pkgsrc.org@localhost>
date: Sat Apr 25 19:58:32 2015 +0000
description:
Add a package for Rob Pike's newsqueak, a channel-based concurrent
programming language. It is one of the ancestors of Go.
diffstat:
lang/newsqueak/DESCR | 2 +
lang/newsqueak/Makefile | 23 ++
lang/newsqueak/PLIST | 16 +
lang/newsqueak/distinfo | 23 ++
lang/newsqueak/patches/patch-Makefile | 30 ++
lang/newsqueak/patches/patch-include_lib9.h | 28 ++
lang/newsqueak/patches/patch-include_u.h | 35 +++
lang/newsqueak/patches/patch-lib9_Makefile | 22 ++
lang/newsqueak/patches/patch-lib9_doprint.c | 228 ++++++++++++++++++++++
lang/newsqueak/patches/patch-lib9_nan.c | 42 ++++
lang/newsqueak/patches/patch-lib9_wait.c | 15 +
lang/newsqueak/patches/patch-libbio_Makefile | 34 +++
lang/newsqueak/patches/patch-squint_Makefile | 60 +++++
lang/newsqueak/patches/patch-squint_compile.c | 15 +
lang/newsqueak/patches/patch-squint_error.c | 79 +++++++
lang/newsqueak/patches/patch-squint_inst | 15 +
lang/newsqueak/patches/patch-squint_lex.c | 33 +++
lang/newsqueak/patches/patch-squint_main.c | 33 +++
lang/newsqueak/patches/patch-squint_proc.c | 44 ++++
lang/newsqueak/patches/patch-squint_progs_npowser | 15 +
lang/newsqueak/patches/patch-squint_var.c | 15 +
lang/newsqueak/patches/patch-squint_xec.c | 22 ++
22 files changed, 829 insertions(+), 0 deletions(-)
diffs (truncated from 917 to 300 lines):
diff -r 3caa4f47ddc5 -r eafbab3f2cf6 lang/newsqueak/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/newsqueak/DESCR Sat Apr 25 19:58:32 2015 +0000
@@ -0,0 +1,2 @@
+Newsqueak is a channel-based concurrent programming language from Rob
+Pike; it is a predecessor of Alef, Limbo, and Go.
diff -r 3caa4f47ddc5 -r eafbab3f2cf6 lang/newsqueak/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/newsqueak/Makefile Sat Apr 25 19:58:32 2015 +0000
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $
+
+DISTNAME= newsqueak
+PKGNAME= newsqueak-20000211
+CATEGORIES= lang
+MASTER_SITES= http://www.herpolhode.com/rob/
+
+MAINTAINER= dholland%NetBSD.org@localhost
+HOMEPAGE= http://en.wikipedia.org/wiki/Newsqueak
+COMMENT= Newsqueak: a language for communicating with mice
+LICENSE= public-domain
+
+WRKSRC= ${WRKDIR}
+USE_TOOLS+= yacc
+INSTALLATION_DIRS= bin share/squint/include
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/squint/squint \
+ ${DESTDIR}${PREFIX}/bin/squint
+ ${INSTALL_DATA} ${WRKSRC}/squint/include/*.h \
+ ${DESTDIR}${PREFIX}/share/squint/include/
+
+.include "../../mk/bsd.pkg.mk"
diff -r 3caa4f47ddc5 -r eafbab3f2cf6 lang/newsqueak/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/newsqueak/PLIST Sat Apr 25 19:58:32 2015 +0000
@@ -0,0 +1,16 @@
+@comment $NetBSD: PLIST,v 1.1 2015/04/25 19:58:32 dholland Exp $
+bin/squint
+share/squint/include/arrow.h
+share/squint/include/bitmapio.h
+share/squint/include/box.h
+share/squint/include/fio.h
+share/squint/include/gnot.h
+share/squint/include/gnotio.h
+share/squint/include/layer.h
+share/squint/include/lib.h
+share/squint/include/lmenu.h
+share/squint/include/menu.h
+share/squint/include/nspace.h
+share/squint/include/sight.h
+share/squint/include/sys.h
+share/squint/include/whitearrow.h
diff -r 3caa4f47ddc5 -r eafbab3f2cf6 lang/newsqueak/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/newsqueak/distinfo Sat Apr 25 19:58:32 2015 +0000
@@ -0,0 +1,23 @@
+$NetBSD: distinfo,v 1.1 2015/04/25 19:58:32 dholland Exp $
+
+SHA1 (newsqueak.tar.gz) = 085cc8248be5b6145f57b8517e0f22469e5047c1
+RMD160 (newsqueak.tar.gz) = 56f6fcf95a58d141efc57cedbf1a49574ea8b777
+Size (newsqueak.tar.gz) = 265358 bytes
+SHA1 (patch-Makefile) = 1c71432e17f2e146c6b077cf23e8dc13a65356d5
+SHA1 (patch-include_lib9.h) = 0988b189b5b3e6666cdc4f04b31b5410af63aca9
+SHA1 (patch-include_u.h) = ffb1752ebbcb600850e196e630592063827e32c9
+SHA1 (patch-lib9_Makefile) = 5e48c9cdca6d560cd7c8d9b92e729f7fbb5fa999
+SHA1 (patch-lib9_doprint.c) = c94bee65440c0a697ba426549740a4df3aa3e809
+SHA1 (patch-lib9_nan.c) = 3c7067d47d9a7a1f98f41f466dd346d1593994bb
+SHA1 (patch-lib9_wait.c) = a8574632f483ea9da2f83597a165605b3bc3b2b6
+SHA1 (patch-libbio_Makefile) = 0272c0953ede97a9805a5668035938c18c9932f1
+SHA1 (patch-squint_Makefile) = ae117cb88ead5924207f03c85358a3a4baeaba90
+SHA1 (patch-squint_compile.c) = 9f4c5684a04b62ed61bb9155853d921ec870231a
+SHA1 (patch-squint_error.c) = 1f7402b91c485037f154adb7346b5fa0c4bb1793
+SHA1 (patch-squint_inst) = ec4add4193884e4ae402ebbc539dcc2bacd553d8
+SHA1 (patch-squint_lex.c) = 08f503be33aac0db29295077af1e56ceb38d8ae3
+SHA1 (patch-squint_main.c) = 33afa209ca89d89c23d5cf4d225b1d0eeedf53a9
+SHA1 (patch-squint_proc.c) = 1650bb984ff237589d2d5cc83cb60e9c81cbb631
+SHA1 (patch-squint_progs_npowser) = b65ec5c6bb354bcccfaa01912f9498da031e6c07
+SHA1 (patch-squint_var.c) = 8a79fbbe4acba76214437707e1baee31e746f69c
+SHA1 (patch-squint_xec.c) = 6b040eb1189233852adbe698e902946b367884c3
diff -r 3caa4f47ddc5 -r eafbab3f2cf6 lang/newsqueak/patches/patch-Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/newsqueak/patches/patch-Makefile Sat Apr 25 19:58:32 2015 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $
+
+Configure for pkgsrc, and use bsd make.
+Don't set -g; do set -fno-strict-aliasing.
+Pass in PREFIX.
+
+--- Makefile.orig 2000-02-11 17:04:11.000000000 +0000
++++ Makefile
+@@ -1,12 +1,11 @@
+-DIRS = lib9 libbio squint
++DIRS= lib9 libbio squint
+
+-CFLAGS = -g -Wall $(INCLUDES)
++#CFLAGS+= -g
++CFLAGS+= -Wall $(INCLUDES)
++CFLAGS+= -fno-strict-aliasing # required in squint/var.c
++CFLAGS+= -DPREFIX=\"$(PREFIX)\"
+
+-all:
+- for i in $(DIRS); do cd $$i; CFLAGS="$(CFLAGS)" make -$(MAKEFLAGS); cd ..; done
+-
+-clean:
+- for i in $(DIRS); do cd $$i; CFLAGS="$(CFLAGS)" make -$(MAKEFLAGS) clean; cd ..; done
+-
+-%:
+- for i in $(DIRS); do cd $$i; CFLAGS="$(CFLAGS)" make -$(MAKEFLAGS) $@; cd ..; done
++all depend clean:
++.for D in $(DIRS)
++ (cd $D && CFLAGS=$(CFLAGS:Q) $(MAKE) $@) || exit 1
++.endfor
diff -r 3caa4f47ddc5 -r eafbab3f2cf6 lang/newsqueak/patches/patch-include_lib9.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/newsqueak/patches/patch-include_lib9.h Sat Apr 25 19:58:32 2015 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-include_lib9.h,v 1.1 2015/04/25 19:58:32 dholland Exp $
+
+Provide an implementation of SET to silence some compiler warnings.
+Muck with fmtinstall to avoid doing undefined/illegal things with va_list.
+
+--- include/lib9.h~ 2000-02-11 17:04:14.000000000 +0000
++++ include/lib9.h
+@@ -7,7 +7,7 @@ typedef unsigned short Rune;
+ #define create(name, mode, perm) creat(name, perm)
+ #define exec(a,b) execv(a,b)
+ #define USED(a)
+-#define SET(a)
++#define SET(a) ((a) = 0)
+
+ #define nil ((void*)0)
+
+@@ -96,7 +96,10 @@ int sprint(char *buf, const char *fmt, .
+ int snprint(char *buf, int len, const char *fmt, ...);
+ char* seprint(char *buf, char *e, const char *fmt, ...);
+ #define pow10(n) (pow(10.0, (double)(n)))
+-extern int fmtinstall(int, int (*)(va_list*, Fconv*));
++struct va_wrap {
++ va_list ap;
++};
++extern int fmtinstall(int, int (*)(struct va_wrap *, Fconv*));
+
+ /* nan.c */
+ double NaN(void);
diff -r 3caa4f47ddc5 -r eafbab3f2cf6 lang/newsqueak/patches/patch-include_u.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/newsqueak/patches/patch-include_u.h Sat Apr 25 19:58:32 2015 +0000
@@ -0,0 +1,35 @@
+$NetBSD: patch-include_u.h,v 1.1 2015/04/25 19:58:32 dholland Exp $
+
+Add support for modern BSDs.
+
+--- include/u.h.orig 2000-02-11 17:05:58.000000000 +0000
++++ include/u.h
+@@ -189,6 +189,28 @@ typedef unsigned long long uvlong;
+ typedef long long vlong;
+ #endif
+
++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#define _XOPEN_SOURCE_EXTENDED
++
++#include <stdarg.h>
++#include <setjmp.h>
++#include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <errno.h>
++#include <math.h>
++#include <fcntl.h>
++#include <sys/wait.h>
++#include <sys/types.h>
++#include <time.h>
++#include <sys/resource.h>
++
++typedef unsigned char uchar;
++typedef unsigned long ulong;
++typedef unsigned long long uvlong;
++typedef long long vlong;
++#endif
++
+ #ifdef sgi
+ #include <stdarg.h>
+ #include <setjmp.h>
diff -r 3caa4f47ddc5 -r eafbab3f2cf6 lang/newsqueak/patches/patch-lib9_Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/newsqueak/patches/patch-lib9_Makefile Sat Apr 25 19:58:32 2015 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-lib9_Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $
+
+Configure for pkgsrc.
+
+--- lib9/Makefile~ 2000-02-11 17:04:14.000000000 +0000
++++ lib9/Makefile
+@@ -15,12 +15,13 @@ INCLUDES=-I../include
+
+ CFLAGS += $(INCLUDES)
+
+-CC=gcc
++CC?=gcc
+
+ all: $(LIB)
+
+ $(LIB): $(OFILES)
+- ar r $(LIB) $(OFILES)
++ rm -f $(LIB)
++ $(AR) cq $(LIB) $(OFILES)
+
+ clean:
+ rm -rf $(OFILES)
diff -r 3caa4f47ddc5 -r eafbab3f2cf6 lang/newsqueak/patches/patch-lib9_doprint.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/newsqueak/patches/patch-lib9_doprint.c Sat Apr 25 19:58:32 2015 +0000
@@ -0,0 +1,228 @@
+$NetBSD: patch-lib9_doprint.c,v 1.1 2015/04/25 19:58:32 dholland Exp $
+
+Muck with fmtinstall to avoid doing undefined/illegal things with va_list.
+
+--- lib9/doprint.c~ 2000-02-11 17:04:14.000000000 +0000
++++ lib9/doprint.c
+@@ -32,21 +32,21 @@ struct Fmtalloc {
+ #endif
+ int convcount;
+ char index[MAXFMT];
+- int (*conv[MAXCONV])(va_list*, Fconv*);
++ int (*conv[MAXCONV])(struct va_wrap *, Fconv*);
+ };
+ static struct Fmtalloc fmtalloc;
+
+-static int noconv(va_list*, Fconv*);
+-static int flags(va_list*, Fconv*);
++static int noconv(struct va_wrap *, Fconv*);
++static int flags(struct va_wrap *, Fconv*);
+
+-static int cconv(va_list*, Fconv*);
+-static int rconv(va_list*, Fconv*);
+-static int sconv(va_list*, Fconv*);
+-static int percent(va_list*, Fconv*);
+-static int column(va_list*, Fconv*);
++static int cconv(struct va_wrap *, Fconv*);
++static int rconv(struct va_wrap *, Fconv*);
++static int sconv(struct va_wrap *, Fconv*);
++static int percent(struct va_wrap *, Fconv*);
++static int column(struct va_wrap *, Fconv*);
+
+-extern int numbconv(va_list*, Fconv*);
+-extern int fltconv(va_list*, Fconv*);
++extern int numbconv(struct va_wrap *, Fconv*);
++extern int fltconv(struct va_wrap *, Fconv*);
+
+
+ static void
+@@ -108,7 +108,7 @@ initfmt(void)
+ }
+
+ int
+-fmtinstall(int c, int (*f)(va_list*, Fconv*))
++fmtinstall(int c, int (*f)(struct va_wrap *, Fconv*))
+ {
+
+ #ifdef LOCKS_AVAILABLE
+@@ -165,6 +165,9 @@ doprint(char *s, char *es, const char *f
+ int n, c;
+ Rune rune;
+ Fconv local;
++ struct va_wrap argwrap;
++
++ va_copy(argwrap.ap, argp);
+
+ if(fmtalloc.convcount <= 0)
+ initfmt();
+@@ -252,7 +255,7 @@ l1:
+ goto l1;
+ }
+ if(c == '*') {
+- n = va_arg(argp, int);
++ n = va_arg(argwrap.ap, int);
+ if(local.f1 == NONE)
+ local.f1 = n;
+ else
+@@ -263,7 +266,7 @@ l1:
+ if(c >= 0 && c < MAXFMT)
+ n = fmtalloc.index[c];
+ local.chr = c;
+- n = (*fmtalloc.conv[n])(&argp, &local);
++ n = (*fmtalloc.conv[n])(&argwrap, &local);
+ if(n < 0) {
+ local.f3 |= -n;
+ goto l0;
+@@ -272,7 +275,7 @@ l1:
+ }
+
+ int
+-numbconv(va_list *arg, Fconv *fp)
++numbconv(struct va_wrap *arg, Fconv *fp)
+ {
+ char s[IDIGIT];
+ int i, f, n, b, ucase;
+@@ -313,31 +316,31 @@ numbconv(va_list *arg, Fconv *fp)
Home |
Main Index |
Thread Index |
Old Index