import obc-2.9.1

Oberon-2 is clean and simple programming language.
This is portable compiler that translates Oberon-2 into bytecode, which
can be either interpreted or dynamically translated into machine code.
Dynamic translation uses a portable interface modelled on the one in GNU
Lightning, but is so far implemented only on x86 machines.  The
implementation includes a full garbage collector, and comes with
profiling tools and a simple GUI debugger.
[...]

    from Alexander Shiryaev (MAINTAINER) with tweaks by me
	
	    ok landry@
This commit is contained in:
jasper 2011-01-15 13:07:50 +00:00
parent be3244fe09
commit 6b5442d0e3
8 changed files with 242 additions and 0 deletions

64
lang/obc/Makefile Normal file
View File

@ -0,0 +1,64 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/01/15 13:07:50 jasper Exp $
# Fatal error: assertion sizeof(page_index) == GC_PAGESIZE failed on line 1090 of file gc.c
ONLY_FOR_ARCHS= i386
SHARED_ONLY = Yes
COMMENT = Oxford Oberon-2 compiler
DISTNAME = obc-2.9.1
CATEGORIES = lang
HOMEPAGE = http://spivey.oriel.ox.ac.uk/corner/Oxford_Oberon-2_compiler
MAINTAINER = Alexander Shiryaev <shiryaev.a.v@gmail.com>
# BSD-3
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
MASTER_SITES = http://spivey.oriel.ox.ac.uk/wiki/resources/sw/
MODULES = devel/gettext \
lang/ocaml \
lang/tcl
WANTLIB += GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
WANTLIB += Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 c cairo
WANTLIB += curses drm expat fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0
WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
WANTLIB += gtk-x11-2.0 gtksourceview-2.0 m pango-1.0 pangocairo-1.0
WANTLIB += pangoft2-1.0 pixman-1 png pthread pthread-stubs xcb
WANTLIB += xcb-render xcb-shm xml2 z
LIB_DEPENDS = x11/gtksourceview
BUILD_DEPENDS = ${RUN_DEPENDS}
RUN_DEPENDS = STEM->=2.14.2p1:x11/lablgtk2
USE_GMAKE = Yes
CONFIGURE_STYLE = gnu
CONFIGURE_ARGS = --enable-debug \
--with-x
CONFIGURE_ENV = CFLAGS="${CFLAGS} -m32 -I${X11BASE}/include" \
TCLSH="${MODTCL_BIN}" \
DLFLAGS="-Wl,-E"
FAKE_FLAGS = prefix="${WRKINST}${PREFIX}" \
mandir="${WRKINST}${PREFIX}/man"
MAKE_ENV += STRIP="/usr/bin/true"
pre-configure:
perl -pi -e s,'tclsh',${MODTCL_BIN},g ${WRKSRC}/camldep
post-install:
${INSTALL_DATA} ${WRKSRC}/lib/makeprims.tcl \
${PREFIX}/lib/obc/makeprims.tcl
do-regress:
cd ${WRKSRC}/test && ${MAKE_PROGRAM} && ./regress && ./bigtest
.include <bsd.port.mk>

5
lang/obc/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (obc-2.9.1.tar.gz) = uxKsRWKaryKFukuTqFQ2IQ==
RMD160 (obc-2.9.1.tar.gz) = XSok8pJAsvWcRNYyd5XjjpzHVDc=
SHA1 (obc-2.9.1.tar.gz) = TMgfola9HtkWa4dG8aUqAD4+00c=
SHA256 (obc-2.9.1.tar.gz) = PQmMiZ4FT1NKbXWYefQPUkti+pXxdfrRNE2j+JZO2Qc=
SIZE (obc-2.9.1.tar.gz) = 773485

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-Makefile_in,v 1.1.1.1 2011/01/15 13:07:50 jasper Exp $
--- Makefile.in.orig Wed Jan 5 13:11:55 2011
+++ Makefile.in Thu Jan 13 01:08:31 2011
@@ -94,7 +94,7 @@ else
endif
ifdef ENABLE_DEBUGGER
- PREDIRS += lablgtk
+# PREDIRS += lablgtk
SUBDIRS += debugger
BUILD += obxdeb obdb
DEBUILD += obdb0
@@ -195,7 +195,7 @@ LIB = runtime/obx.a runtime/obx-j.a runtime/obx-p.a li
$(MODULES:%=lib/%.k) $(CHECKMODS:%=lib/%-b.k)
# Man pages
-MAN = $(wildcard $(srcdir)/doc/*.1)
+MAN = $(wildcard $(srcdir)/man/*.1)
# Installation directories
DIRS = $(bindir) $(libdir)/obc $(mandir)/man1

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-configure,v 1.1.1.1 2011/01/15 13:07:50 jasper Exp $
--- configure.orig Tue Jan 11 13:44:38 2011
+++ configure Thu Jan 13 00:29:44 2011
@@ -3650,7 +3650,7 @@ $as_echo "#define ENABLE_JIT 1" >>confdefs.h
;;
esac
case $host in
- *-*-darwin*|*-*-linux*)
+ *-*-darwin*|*-*-linux*|*-*-openbsd*)
$as_echo "#define USE_MPROTECT 1" >>confdefs.h
;;

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-debugger_Makefile_in,v 1.1.1.1 2011/01/15 13:07:50 jasper Exp $
--- debugger/Makefile.in.orig Fri Jan 7 19:11:07 2011
+++ debugger/Makefile.in Thu Jan 13 03:00:28 2011
@@ -54,10 +54,11 @@ LABLGTK2 = @LABLGTK2@
all: obdb1
-LIBS = unix.cma threads.cma lablgtk.cma str.cma gtkThread.cmo $(YYPARSE)
+LIBS = unix.cma threads.cma lablgtk.cma lablgtksourceview2.cma str.cma \
+ gtkThread.cmo $(YYPARSE)
OBDB1 = ../compiler/basis.cma debugger.cma debmain.cmo
-obdb1: $(OBDB1) debprims.o ../lablgtk/lablgtk.cma ../lablgtk/liblablgtk.a
- $(OCAMLC) $(MLFLAGS) -custom -I ../lablgtk \
+obdb1: $(OBDB1) debprims.o $(LABLGTK2)/lablgtk.cma $(LABLGTK2)/liblablgtk2.a
+ $(OCAMLC) $(MLFLAGS) -custom -I $(LABLGTK2) \
-thread -o $@ $(LIBS) $(OBDB1) debprims.o $(MLLINKFLAGS)
DEBUGGER = debconf.cmo binary.cmo info.cmo procio.cmo data.cmo \
@@ -76,7 +77,7 @@ debprims.o: debprims.c
%.ml: %.mll
$(OCAMLLEX) -o $@ $<
-INCLUDE = -I ../compiler -I ../lablgtk
+INCLUDE = -I ../compiler -I $(LABLGTK2)
%.cmi: %.mli
$(OCAMLC) $(MLFLAGS) -c $(INCLUDE) -o $@ $<

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-debugger_debmain_ml,v 1.1.1.1 2011/01/15 13:07:50 jasper Exp $
- Removed in new lablgtk2 version.
- Looks like it was MacOS-specific anyway.
--- debugger/debmain.ml.orig Thu Jan 13 02:26:02 2011
+++ debugger/debmain.ml Thu Jan 13 02:56:51 2011
@@ -271,7 +271,7 @@ class main_window () =
else begin
let about_item = GMenu.menu_item ~label:"About Obdb" () in
let _ = about_item#connect#activate self#about in
- GMain.set_platform_menubar menubar about_item
+ ()
end;
ignore (peer#event#connect#delete

17
lang/obc/pkg/DESCR Normal file
View File

@ -0,0 +1,17 @@
Oberon-2 is clean and simple programming language.
This is portable compiler that translates Oberon-2 into bytecode, which
can be either interpreted or dynamically translated into machine code.
Dynamic translation uses a portable interface modelled on the one in GNU
Lightning, but is so far implemented only on x86 machines. The
implementation includes a full garbage collector, and comes with
profiling tools and a simple GUI debugger.
This implementation of the Oberon-2 language does not include a version
of the Oberon-2 operating system and programming environment; instead,
programs are edited with the tools of the host operating system and
compiled into executables that run like other programs on the host
system.
The compiler is written in Objective Caml, and the runtime system is
written in C.

80
lang/obc/pkg/PLIST Normal file
View File

@ -0,0 +1,80 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/01/15 13:07:50 jasper Exp $
bin/obb
bin/obc
bin/obdb
bin/obdump
@bin bin/obprof
lib/obc/
lib/obc/Args.k
lib/obc/Args.m
lib/obc/Bit.k
lib/obc/Bit.m
lib/obc/Builtin.m
lib/obc/Conv.k
lib/obc/Conv.m
lib/obc/DynLink.k
lib/obc/DynLink.m
lib/obc/Err.k
lib/obc/Err.m
lib/obc/Files.k
lib/obc/Files.m
lib/obc/Files.so
lib/obc/GC.k
lib/obc/GC.m
lib/obc/In-b.k
lib/obc/In.k
lib/obc/In.m
lib/obc/Math.k
lib/obc/Math.m
lib/obc/Math.so
lib/obc/MathL.k
lib/obc/MathL.m
lib/obc/MathL.so
lib/obc/Out.k
lib/obc/Out.m
lib/obc/Random-b.k
lib/obc/Random.k
lib/obc/Random.m
lib/obc/Strings-b.k
lib/obc/Strings.k
lib/obc/Strings.m
lib/obc/Timer.k
lib/obc/Timer.m
lib/obc/XYplane.k
lib/obc/XYplane.m
lib/obc/XYplane.so
lib/obc/_Builtin.k
lib/obc/blank.png
lib/obc/breakpoint.png
lib/obc/config.h
lib/obc/continue.png
lib/obc/dlstub.o
lib/obc/exit.png
lib/obc/here.png
lib/obc/lscript
lib/obc/lscript-b
lib/obc/makeprims.tcl
@bin lib/obc/obb1
@bin lib/obc/obc1
lib/obc/obcommon.h
@bin lib/obc/obdb1
lib/obc/oberon.lang
lib/obc/oblib.a
@bin lib/obc/oblink
@bin lib/obc/obx
lib/obc/obx-j.a
lib/obc/obx-p.a
lib/obc/obx.a
lib/obc/obx.h
@bin lib/obc/obxdeb
@bin lib/obc/obxj
lib/obc/pause.png
lib/obc/restart.png
lib/obc/sober.xml
lib/obc/stepinto.png
lib/obc/stepout.png
lib/obc/stepover.png
@man man/man1/obb.1
@man man/man1/obc.1
@man man/man1/obdump.1
@man man/man1/obprof.1