On Thu, Feb 08, 2007 at 11:53:02AM +0100, Bruce O'Neel wrote:
> 
> Ocaml installs very nicely from the OpenBSD ports system, with one small 
> glitch.
> 
> ocaml believes that it can't load dynamic librarys in OpenBSD and therefore 
> doesn't let you load .cma files.  `This is slightly annoying just because I 
> wanted to play around with sockets and this means I can't do it interactivly
> at the ocaml prompt.

Woops, I've had this patch in my outgoing OpenBSD queue for a month
now.  Just re-testing it on sparc64 (which has shared libs but no
native code) to check for regression.  It's attached against
OpenBSD-current and fixes a string termination error in yacc which
Ray Lai found as well.

Incidentally, you can just do 'make clean && make patch' and skip
all the intermediate steps when messing around with the port.  Some
good comes from using make :-)

-- 
Anil Madhavapeddy                                 http://anil.recoil.org
XenSource Inc.                                  http://www.xensource.com
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/ocaml/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- Makefile    26 Dec 2006 22:07:18 -0000      1.37
+++ Makefile    8 Feb 2007 10:57:40 -0000
@@ -6,6 +6,7 @@
 
 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
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/lang/ocaml/patches/patch-configure,v
retrieving revision 1.9
diff -u -r1.9 patch-configure
--- patches/patch-configure     28 May 2006 15:28:54 -0000      1.9
+++ patches/patch-configure     8 Feb 2007 10:57:40 -0000
@@ -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
+--- 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;;
Index: patches/patch-yacc_reader_c
===================================================================
RCS file: patches/patch-yacc_reader_c
diff -N patches/patch-yacc_reader_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-yacc_reader_c 8 Feb 2007 10:57:40 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- 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;
+ }
+ 
Index: pkg/PFRAG.shared
===================================================================
RCS file: pkg/PFRAG.shared
diff -N pkg/PFRAG.shared
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.shared    8 Feb 2007 10:57:40 -0000
@@ -0,0 +1,11 @@
[EMAIL PROTECTED] $OpenBSD$
+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
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/ocaml/pkg/PLIST,v
retrieving revision 1.17
diff -u -r1.17 PLIST
--- pkg/PLIST   26 Dec 2006 22:07:18 -0000      1.17
+++ pkg/PLIST   8 Feb 2007 10:57:40 -0000
@@ -1,4 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.17 2006/12/26 22:07:18 avsm Exp $
+%%SHARED%%
 bin/camlp4
 bin/camlp4o
 bin/camlp4r

Reply via email to