summaryrefslogtreecommitdiff
path: root/lang/mpd
diff options
context:
space:
mode:
authoris <is@pkgsrc.org>2005-10-17 16:16:48 +0000
committeris <is@pkgsrc.org>2005-10-17 16:16:48 +0000
commitabbcaebe64b860ed881496e1c613936935b4c4c0 (patch)
tree74d47dab5c1bdb757068c7f6bb265b3c833c06f7 /lang/mpd
parent990341f7fca19f291e94088f1df0e2ada062e324 (diff)
downloadpkgsrc-abbcaebe64b860ed881496e1c613936935b4c4c0.tar.gz
Initial import of MPD-1.0.1. Might still have some problems on LP64.
Diffstat (limited to 'lang/mpd')
-rw-r--r--lang/mpd/DESCR19
-rw-r--r--lang/mpd/Makefile44
-rw-r--r--lang/mpd/PLIST37
-rw-r--r--lang/mpd/distinfo17
-rw-r--r--lang/mpd/patches/patch-aa52
-rw-r--r--lang/mpd/patches/patch-ab17
-rw-r--r--lang/mpd/patches/patch-ar9
-rw-r--r--lang/mpd/patches/patch-as23
-rw-r--r--lang/mpd/patches/patch-at36
-rw-r--r--lang/mpd/patches/patch-au117
-rw-r--r--lang/mpd/patches/patch-av12
-rw-r--r--lang/mpd/patches/patch-aw12
-rw-r--r--lang/mpd/patches/patch-ax10
-rw-r--r--lang/mpd/patches/patch-ay15
-rw-r--r--lang/mpd/patches/patch-bi14
-rw-r--r--lang/mpd/patches/patch-bk11
16 files changed, 445 insertions, 0 deletions
diff --git a/lang/mpd/DESCR b/lang/mpd/DESCR
new file mode 100644
index 00000000000..2efc17bd96f
--- /dev/null
+++ b/lang/mpd/DESCR
@@ -0,0 +1,19 @@
+This the MPD language for Multithreaded, Parallel, and Distributed
+Programming. Installation instructions are in the file doc/install.html.
+
+Language documentation can be found at the MPD home on the web,
+ http://www.cs.arizona.edu/mpd
+
+MPD was inspired by the book:
+ Foundations of Multithreaded, Parallel, and Distributed Programming
+ Gregory R. Andrews
+ Addison-Wesley, 2000 (ISBN 0-201-35752-6)
+
+The MPD implementation is based on version 2.3.2 of the SR programming
+language. The syntax has changed, but the internals are essentially
+the same except for a massive renaming. Accordingly MPD is limited by
+the features of SR and does not correspond exactly to the MPD book.
+
+Much of the SR implementation documentation is still valid. It can be
+found at:
+ http://www.cs.arizona.edu/sr/doc.html
diff --git a/lang/mpd/Makefile b/lang/mpd/Makefile
new file mode 100644
index 00000000000..82496dc8361
--- /dev/null
+++ b/lang/mpd/Makefile
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+#
+
+PKGNAME= mpd-1.0.1
+DISTNAME= mpd.1.0.1
+#PKGREVISION= 0
+CATEGORIES= lang parallel
+MASTER_SITES= http://www.cs.arizona.edu/mpd/download/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= is@NetBSD.org
+HOMEPAGE= http://www.cs.arizona.edu/mpd/
+COMMENT= The MPD language compiler and run time system
+
+ONLY_FOR_PLATFORM= NetBSD-[2-9]*-*
+
+
+TEST_TARGET= verify
+
+.include "../../mk/x11.buildlink3.mk"
+
+pre-configure:
+ ${MV} ${WRKSRC}/Configuration \
+ ${WRKSRC}/Configuration.template
+ ${SED} -e 's,_LOCALBASE_,${LOCALBASE},g' \
+ -e 's,_WRKSRC_,${WRKSRC},g' \
+ -e 's,_XINC_,${X11BASE}/include,g' \
+ -e 's,_XLIB_,${X11BASE}/lib,g' \
+ ${WRKSRC}/Configuration.template \
+ > ${WRKSRC}/Configuration
+
+pre-install:
+ -${MKDIR} ${PREFIX}/lib/mpd
+
+post-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/csw/cstest ${PREFIX}/bin/mpd-cstest
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mpd
+ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/mpd
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/mpd
+ ${INSTALL_DATA} ${WRKSRC}/doc/cairn.jpg ${PREFIX}/share/doc/html/mpd
+ ${INSTALL_DATA} ${WRKSRC}/doc/install.html ${PREFIX}/share/doc/html/mpd
+ ${INSTALL_DATA} ${WRKSRC}/doc/release.html ${PREFIX}/share/doc/html/mpd
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/mpd/PLIST b/lang/mpd/PLIST
new file mode 100644
index 00000000000..3bf4ac53fc3
--- /dev/null
+++ b/lang/mpd/PLIST
@@ -0,0 +1,37 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+bin/mpd
+bin/mpd-cstest
+bin/mpdl
+bin/mpdm
+bin/mpdprof
+lib/mpd/MPDWin.impl
+lib/mpd/MPDWin.o
+lib/mpd/MPDWin.spec
+lib/mpd/MPDanimator.impl
+lib/mpd/MPDanimator.o
+lib/mpd/MPDanimator.spec
+lib/mpd/MPDgetopt.impl
+lib/mpd/MPDgetopt.o
+lib/mpd/MPDgetopt.spec
+lib/mpd/mpd.h
+lib/mpd/mpdlib.a
+lib/mpd/mpdmap
+lib/mpd/mpdmulti.h
+lib/mpd/mpdwin.o
+lib/mpd/mpdx
+man/man1/mpd.1
+man/man1/mpdl.1
+man/man1/mpdm.1
+man/man1/mpdprof.1
+man/man3/mpdanimator.3
+man/man3/mpdgetopt.3
+man/man3/mpdwin.3
+man/man5/mpdmap.5
+man/man5/mpdtrace.5
+share/doc/html/mpd/cairn.jpg
+share/doc/html/mpd/install.html
+share/doc/html/mpd/release.html
+share/doc/mpd/README
+@dirrm share/doc/html/mpd
+@dirrm share/doc/mpd
+@dirrm lib/mpd
diff --git a/lang/mpd/distinfo b/lang/mpd/distinfo
new file mode 100644
index 00000000000..79c422c7afa
--- /dev/null
+++ b/lang/mpd/distinfo
@@ -0,0 +1,17 @@
+$NetBSD: distinfo,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+SHA1 (mpd.1.0.1.tgz) = 797b505935ccc741fdca6010bc0bd53601a6f262
+RMD160 (mpd.1.0.1.tgz) = 2862ae9220ec0a546ed4193aeee4dc8dc94610a2
+Size (mpd.1.0.1.tgz) = 581498 bytes
+SHA1 (patch-aa) = f3c3911afa2596e72d8e3056f93e5277cd41dabc
+SHA1 (patch-ab) = 2a086280fefb4acddd19cb3cbafd58f8de5b309e
+SHA1 (patch-ar) = 7b9c76e47a5f5900a2bfd6b9bb4b585dc10da562
+SHA1 (patch-as) = 4a7701f337f64ca4f0e68377ca6f32e5110a5ff0
+SHA1 (patch-at) = 6f7be8ba344a1606663f7dfeefa73edd62380721
+SHA1 (patch-au) = f694bd75154de25247e9609dc954c9319ab32089
+SHA1 (patch-av) = b10aa333ecf77e29933256117a9c4d27792993bd
+SHA1 (patch-aw) = d0efc58da58fb601257d4c108f4acc50ae05cbf9
+SHA1 (patch-ax) = daa27e66622a693cf860e3fbf7569a9363a81354
+SHA1 (patch-ay) = 1621ca66dfbece6bc82fc709fd2c507abb64abae
+SHA1 (patch-bi) = 31fc9eb664dd3e73c7fe12ae6e95fd85b67286fc
+SHA1 (patch-bk) = ffbcc49346ea57a3fd0eed51d7bb00f80e25f3a5
diff --git a/lang/mpd/patches/patch-aa b/lang/mpd/patches/patch-aa
new file mode 100644
index 00000000000..ad20baff8ea
--- /dev/null
+++ b/lang/mpd/patches/patch-aa
@@ -0,0 +1,52 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- Configuration.orig 2004-01-20 23:13:18.000000000 +0100
++++ Configuration
+@@ -26,12 +26,12 @@ VERSION = "MPD version 1.0.1, January 20
+ # MAN5: directory in which to install the mpdmap/mpdtrace(5) man pages
+ # (extension will be `tr 1 5` of MANEXT)
+
+-MPDSRC = /usr/local/src/mpd
+-MPDCMD = /usr/local/bin
+-MPDLIB = /usr/local/lib/mpd
+-MAN1 = /usr/local/man/man1
+-MAN3 = /usr/local/man/man3
+-MAN5 = /usr/local/man/man5
++MPDSRC = _WRKSRC_
++MPDCMD = _LOCALBASE_/bin
++MPDLIB = _LOCALBASE_/lib/mpd
++MAN1 = _LOCALBASE_/man/man1
++MAN3 = _LOCALBASE_/man/man3
++MAN5 = _LOCALBASE_/man/man5
+ MANEXT = 1
+
+
+@@ -54,8 +54,8 @@ MANEXT = 1
+ # for Sun Solaris with Sun's C compiler use: CCPATH = /opt/SUNWspro/bin/cc
+ # for Linux, NetBSD, FreeBSD, or SGI Irix use: CCPATH = /usr/bin/cc
+
+-CCPATH = /bin/cc
+-RSHPATH = /usr/bin/rsh
++CCPATH = /usr/bin/cc
++RSHPATH = /usr/bin/ssh
+
+
+
+@@ -74,7 +74,7 @@ RSHPATH = /usr/bin/rsh
+ # LIBC = , LIBR = , LIBM = -lm
+
+ LIBC =
+-LIBR = -L/usr/X11R6/lib
++LIBR = -R_XLIB_ -L_XLIB_
+ LIBM = -lm
+
+
+@@ -91,7 +91,7 @@ LIBM = -lm
+ # for NetBSD, set XINCL = /usr/X386/include
+ # for Linux, set XINCL = /usr/X11R6/include
+
+-XINCL = /usr/X11R6/include
++XINCL = _XINC_
+ XTANGO =
+
+
diff --git a/lang/mpd/patches/patch-ab b/lang/mpd/patches/patch-ab
new file mode 100644
index 00000000000..0878f33dfb9
--- /dev/null
+++ b/lang/mpd/patches/patch-ab
@@ -0,0 +1,17 @@
+$NetBSD: patch-ab,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- arch.h.orig 1999-08-09 16:34:12.000000000 +0000
++++ arch.h
+@@ -7,6 +7,12 @@
+ * BIGCC arguments passed to CC to enlarge tree space (if needed)
+ */
+
++
++/* here so that cpu-specific code below doesn't overwrite our choices */
++#if !defined(ARCH) && defined(__NetBSD__)
++#define ARCH "NetBSD 2.0 and later"
++#endif
++
+ #ifndef ARCH
+
+ #ifdef apollo
diff --git a/lang/mpd/patches/patch-ar b/lang/mpd/patches/patch-ar
new file mode 100644
index 00000000000..1c4159a599f
--- /dev/null
+++ b/lang/mpd/patches/patch-ar
@@ -0,0 +1,9 @@
+$NetBSD: patch-ar,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- vsuite/quick/easy/Make.std.orig 1999-07-28 22:43:18.000000000 +0200
++++ vsuite/quick/easy/Make.std
+@@ -1,3 +1,3 @@
+ echo gries.mpd
+-rm -rf ./MPDinter
++rm -rf ./MPDinter
+ rm -f core a.out
diff --git a/lang/mpd/patches/patch-as b/lang/mpd/patches/patch-as
new file mode 100644
index 00000000000..fe83857e612
--- /dev/null
+++ b/lang/mpd/patches/patch-as
@@ -0,0 +1,23 @@
+$NetBSD: patch-as,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- Makefile.orig 2001-02-06 19:30:37.000000000 +0100
++++ Makefile
+@@ -4,7 +4,7 @@
+
+
+ CC = cc
+-CFLAGS = -g
++CFLAGS = -O3 -Wall
+ MAKE = make
+ SHELL = /bin/sh
+
+@@ -212,6 +212,9 @@ vscripts: ; @cd vsuite; find * -name Sc
+
+
+
++verify:
++ mpdv/mpdv
++
+ # run some distributed tests with mpdv
+
+ mpdvdist:
diff --git a/lang/mpd/patches/patch-at b/lang/mpd/patches/patch-at
new file mode 100644
index 00000000000..65f0ecf93ed
--- /dev/null
+++ b/lang/mpd/patches/patch-at
@@ -0,0 +1,36 @@
+$NetBSD: patch-at,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- csw/Makefile.orig 1999-07-30 05:01:50.000000000 +0000
++++ csw/Makefile
+@@ -1,6 +1,6 @@
+ ## Makefile for the MPD context switch routines.
+
+-CFLAGS = -g
++CFLAGS = -O3
+ SHELL = /bin/sh
+
+ SRC = alpha.s ap3000.s bobcat.s encore.s i386.s m68k.s m88k.s mips.s \
+@@ -27,19 +27,15 @@ cstest: cstest.o asm.o
+ # csloop is a timing program, built only on request
+
+ csloop: csloop.o asm.o
+- . ../paths.sh; $(CC) -O -o csloop csloop.o asm.o $$LIBR $$LIBC
++ . ../paths.sh; $(CC) -g -o csloop csloop.o asm.o $$LIBR $$LIBC
+
+ csloop.o: csloop.c
+ $(CC) -O -c csloop.c
+
+
+-# asm.o holds the actual context switch code
+-
+-asm.o: asm.c ../arch.h $(SRC)
+- $(CC) $(CFLAGS) -E asm.c | \
+- sed -e '/^ *$$/d' -e '/^#/'d -e 's/ :/:/' >asm.s
+- as -o asm.o asm.s
+-
++asm.o: netbsd.c
++ $(CC) $(CFLAGS) -c netbsd.c
++ $(LD) -r -o asm.o netbsd.o /usr/lib/libpthread.a
+
+
+ # miscellaneous utility targets
diff --git a/lang/mpd/patches/patch-au b/lang/mpd/patches/patch-au
new file mode 100644
index 00000000000..9062b03b6cf
--- /dev/null
+++ b/lang/mpd/patches/patch-au
@@ -0,0 +1,117 @@
+$NetBSD: patch-au,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- csw/netbsd.c.orig 2005-03-02 13:00:06.000000000 +0000
++++ csw/netbsd.c
+@@ -0,0 +1,112 @@
++/*
++ * netbsd.c -- context switch code for NetBSD 2.
++ *
++ * Some Makefile changes are needed to use this code.
++ */
++
++#include <ucontext.h>
++
++void mpd_stk_underflow(void);
++void mpd_stk_corrupted(void);
++
++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 mpd_setcontext_u(ucontext_t *);
++static void mpd_swapcontext_u(ucontext_t *, ucontext_t *);
++
++void (*_md_getcontext_u) (ucontext_t *);
++void (*_md_setcontext_u) (ucontext_t *) = mpd_setcontext_u;
++void (*_md_swapcontext_u)(ucontext_t *, ucontext_t *) = mpd_swapcontext_u;
++
++static void
++mpd_setcontext_u(ucontext_t *uc) {
++ pthread__i386_init();
++ _setcontext_u(uc);
++}
++
++static void
++mpd_swapcontext_u(ucontext_t *oldc, ucontext_t *newc) {
++ pthread__i386_init();
++ _swapcontext_u(oldc, newc);
++}
++#endif
++
++
++/*
++ * mpd_build_context (func, buf, bufsize, arg1, arg2, arg3, arg4)
++ *
++ * Build a context that will call func(arg1,arg2,arg3,arg4) when activated
++ * and will catch an underflow error if func returns. We use an intermediary
++ * in order to catch that return.
++ */
++void
++mpd_build_context (func, buf, bufsize, arg1, arg2, arg3, arg4)
++void (*func)();
++char *buf;
++int bufsize;
++unsigned long arg1, arg2, arg3, arg4;
++{
++ ucontext_t *uc = (ucontext_t *) buf; /* put header at front of buf */
++
++ if (0 != getcontext(uc)) { /* initialize context */
++ mpd_stk_corrupted();
++ }
++
++ uc->uc_stack.ss_sp = buf + sizeof (ucontext_t);
++ uc->uc_stack.ss_size = bufsize - sizeof (ucontext_t);
++
++ makecontext (uc, startup, 5, func, arg1, arg2, arg3, arg4);
++ uc->uc_stack.ss_flags = 0;
++}
++
++/*
++ * startup (func, a,b,c,d) -- intermediary for startup and underflow detection.
++ */
++static void
++startup (func, arg1, arg2, arg3, arg4)
++void (*func)();
++unsigned long arg1, arg2, arg3, arg4;
++{
++ (*func) (arg1, arg2, arg3, arg4);
++ mpd_stk_underflow();
++}
++
++
++
++/*
++ * mpd_chg_context (newctx, oldctx) -- change contexts.
++ */
++void
++mpd_chg_context (new, old)
++char *new, *old;
++{
++ ucontext_t *oldu, *newu;
++ newu = (ucontext_t *)new;
++
++ if (old) {
++ oldu = (ucontext_t *)old;
++ _swapcontext_u(oldu, newu);
++ } else {
++ _setcontext_u(newu);
++ }
++}
++
++
++
++/*
++ * mpd_check_stk (stk) -- check for stack overflow.
++ *
++ * We have no idea of how to do that, so we do nothing.
++ */
++void
++mpd_check_stk(stk)
++char *stk;
++{
++ /* nothing */
++}
diff --git a/lang/mpd/patches/patch-av b/lang/mpd/patches/patch-av
new file mode 100644
index 00000000000..6e1bda782dc
--- /dev/null
+++ b/lang/mpd/patches/patch-av
@@ -0,0 +1,12 @@
+$NetBSD: patch-av,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- rts/net.c.orig 2005-03-01 16:25:59.000000000 +0000
++++ rts/net.c
+@@ -2,6 +2,7 @@
+
+ #include "rts.h"
+ #include <fcntl.h>
++#include <unistd.h>
+
+ static void start_mpdx ();
+
diff --git a/lang/mpd/patches/patch-aw b/lang/mpd/patches/patch-aw
new file mode 100644
index 00000000000..8bd24847402
--- /dev/null
+++ b/lang/mpd/patches/patch-aw
@@ -0,0 +1,12 @@
+$NetBSD: patch-aw,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- rts/mpdx.c.orig 2005-03-01 16:26:10.000000000 +0000
++++ rts/mpdx.c
+@@ -19,6 +19,7 @@
+ #include "rts.h"
+ #include <fcntl.h>
+ #include <signal.h>
++#include <unistd.h>
+ #include <sys/param.h>
+
+ #ifdef __PARAGON__
diff --git a/lang/mpd/patches/patch-ax b/lang/mpd/patches/patch-ax
new file mode 100644
index 00000000000..b8309f55cb1
--- /dev/null
+++ b/lang/mpd/patches/patch-ax
@@ -0,0 +1,10 @@
+$NetBSD: patch-ax,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- mpdm/filter.c.orig 2005-03-01 16:26:14.000000000 +0000
++++ mpdm/filter.c
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <unistd.h>
+ #include "../gen.h"
+ #include "../util.h"
+
diff --git a/lang/mpd/patches/patch-ay b/lang/mpd/patches/patch-ay
new file mode 100644
index 00000000000..559d59a2aea
--- /dev/null
+++ b/lang/mpd/patches/patch-ay
@@ -0,0 +1,15 @@
+$NetBSD: patch-ay,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- util.c.orig 2000-10-31 23:53:40.000000000 +0100
++++ util.c
+@@ -4,7 +4,10 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h> /* needed by HP-UX */
++#include <sys/wait.h> /* needed by NetBSD */
+ #include <fcntl.h> /* needed by HP-UX */
++#include <string.h> /* needed by NetBSD */
++#include <unistd.h> /* needed by NetBSD */
+ #include "gen.h"
+ #include "util.h"
+ #include "paths.h"
diff --git a/lang/mpd/patches/patch-bi b/lang/mpd/patches/patch-bi
new file mode 100644
index 00000000000..4ef5f131eff
--- /dev/null
+++ b/lang/mpd/patches/patch-bi
@@ -0,0 +1,14 @@
+$NetBSD: patch-bi,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- library/Makefile.orig 2000-10-31 23:53:41.000000000 +0100
++++ library/Makefile
+@@ -1,7 +1,7 @@
+ ## Makefile for the MPD X-Windows interface, MPDWin.
+
+-CFLAGS = -g
+-MPDFLAGS = -g
++CFLAGS = -O3
++MPDFLAGS = -O
+ SHELL = /bin/sh
+
+
diff --git a/lang/mpd/patches/patch-bk b/lang/mpd/patches/patch-bk
new file mode 100644
index 00000000000..0f8675727a5
--- /dev/null
+++ b/lang/mpd/patches/patch-bk
@@ -0,0 +1,11 @@
+$NetBSD: patch-bk,v 1.1.1.1 2005/10/17 16:16:48 is Exp $
+
+--- util.h.orig 2000-10-31 23:53:40.000000000 +0100
++++ util.h
+@@ -17,5 +17,5 @@ extern FILE *pathopen(); /* file open wi
+ extern FILE *mustopen(); /* file open with guaranteed success */
+
+ extern int trcexec; /* trace exec calls? */
+-extern spawn(); /* fork and exec */
++extern int spawn(); /* fork and exec */
+ extern void doexec(); /* exec in place */