From 48ff1ec04231c0e56baa2bf28ccc4e8531df4903 Mon Sep 17 00:00:00 2001 From: avsm Date: Thu, 8 Feb 2007 14:32:57 +0000 Subject: [PATCH] - support shared libraries in OCaml, for dynamic top level to work. - fix bad string handling in ocamlyacc, spotted by Ray Lai w/ malloc flags - bump PKGNAME --- lang/ocaml/Makefile | 3 ++- lang/ocaml/patches/patch-configure | 15 ++++++++++++--- lang/ocaml/patches/patch-yacc_reader_c | 11 +++++++++++ lang/ocaml/pkg/PFRAG.shared | 11 +++++++++++ lang/ocaml/pkg/PLIST | 3 ++- 5 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 lang/ocaml/patches/patch-yacc_reader_c create mode 100644 lang/ocaml/pkg/PFRAG.shared diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile index 92efc02b2f8..51b141450b1 100644 --- a/lang/ocaml/Makefile +++ b/lang/ocaml/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.37 2006/12/26 22:07:18 avsm Exp $ +# $OpenBSD: Makefile,v 1.38 2007/02/08 14:32:57 avsm Exp $ NOT_FOR_ARCHS= hppa @@ -6,6 +6,7 @@ COMMENT= "ML language based on complete class-based objective system" BASENAME= ocaml-3.09 DISTNAME= ${BASENAME}.3 +PKGNAME= ${DISTNAME}p0 CATEGORIES= lang MASTER_SITES= http://caml.inria.fr/distrib/${BASENAME}/ DOCFILES= ${BASENAME}-refman.html.tar.gz diff --git a/lang/ocaml/patches/patch-configure b/lang/ocaml/patches/patch-configure index ab9c9d7c78d..647dee7af53 100644 --- a/lang/ocaml/patches/patch-configure +++ b/lang/ocaml/patches/patch-configure @@ -1,6 +1,15 @@ -$OpenBSD: patch-configure,v 1.9 2006/05/28 15:28:54 avsm Exp $ ---- configure.orig Thu Mar 30 11:00:19 2006 -+++ configure Tue May 2 12:02:42 2006 +$OpenBSD: patch-configure,v 1.10 2007/02/08 14:32:57 avsm Exp $ +--- configure.orig Tue Dec 26 23:30:01 2006 ++++ configure Tue Dec 26 23:29:28 2006 +@@ -483,7 +483,7 @@ mksharedlibrpath='' + + if test $withsharedlibs = "yes"; then + case "$host" in +- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-gnu*) ++ *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd*|*-*-gnu*) + sharedcccompopts="-fPIC" + mksharedlib="$bytecc -shared -o" + bytecclinkopts="$bytecclinkopts -Wl,-E" @@ -566,6 +566,7 @@ case "$host" in alpha*-*-freebsd*) arch=alpha; system=freebsd;; alpha*-*-netbsd*) arch=alpha; system=netbsd;; diff --git a/lang/ocaml/patches/patch-yacc_reader_c b/lang/ocaml/patches/patch-yacc_reader_c new file mode 100644 index 00000000000..617e66c7c6a --- /dev/null +++ b/lang/ocaml/patches/patch-yacc_reader_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-yacc_reader_c,v 1.1 2007/02/08 14:32:57 avsm Exp $ +--- yacc/reader.c.orig Fri Dec 29 21:32:48 2006 ++++ yacc/reader.c Fri Dec 29 21:36:44 2006 +@@ -163,6 +163,7 @@ char *substring (char *str, int start, i + for (i = 0; i < len; i++){ + buf[i] = str[start+i]; + } ++ buf[i] = '\0'; + return buf; + } + diff --git a/lang/ocaml/pkg/PFRAG.shared b/lang/ocaml/pkg/PFRAG.shared new file mode 100644 index 00000000000..3fdc571116d --- /dev/null +++ b/lang/ocaml/pkg/PFRAG.shared @@ -0,0 +1,11 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1 2007/02/08 14:32:57 avsm Exp $ +lib/ocaml/stublibs/dllbigarray.so +lib/ocaml/stublibs/dllgraphics.so +lib/ocaml/stublibs/dlllabltk.so +lib/ocaml/stublibs/dllmldbm.so +lib/ocaml/stublibs/dllnums.so +lib/ocaml/stublibs/dllstr.so +lib/ocaml/stublibs/dllthreads.so +lib/ocaml/stublibs/dlltkanim.so +lib/ocaml/stublibs/dllunix.so +lib/ocaml/stublibs/dllvmthreads.so diff --git a/lang/ocaml/pkg/PLIST b/lang/ocaml/pkg/PLIST index d104c425fe2..7fcce5f86ce 100644 --- a/lang/ocaml/pkg/PLIST +++ b/lang/ocaml/pkg/PLIST @@ -1,4 +1,5 @@ -@comment $OpenBSD: PLIST,v 1.17 2006/12/26 22:07:18 avsm Exp $ +@comment $OpenBSD: PLIST,v 1.18 2007/02/08 14:32:57 avsm Exp $ +%%SHARED%% bin/camlp4 bin/camlp4o bin/camlp4r