From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=AWL,URI_NOVOWEL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 63DBEBC69 for ; Thu, 8 Feb 2007 12:07:52 +0100 (CET) Received: from fork.recoil.org (fork.recoil.org [194.70.3.132]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l18B7oUb017677 for ; Thu, 8 Feb 2007 12:07:52 +0100 Received: (qmail 19666 invoked by uid 10000); 8 Feb 2007 11:07:48 -0000 Date: Thu, 8 Feb 2007 11:07:48 +0000 From: Anil Madhavapeddy To: "Bruce O'Neel" Cc: caml-list@inria.fr, ports@openbsd.org Subject: Re: Ocaml and OpenBSD's port system Message-ID: <20070208110748.GA28307@fork.recoil.org> References: <1170931982-adbcea581cc1da11920658d8c44695a9@pckswarms.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <1170931982-adbcea581cc1da11920658d8c44695a9@pckswarms.ch> User-Agent: Mutt/1.5.11 X-Miltered: at concorde with ID 45CB0486.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; anil:01 anil:01 ocaml:01 0100,:01 ocaml:01 sockets:01 libs:01 'make:01 makefile:01 makefile:01 basename:01 ocaml-:01 basename:01 -fpic:01 bytecc:01 X-Attachments: name="patch-ocaml-shared-yacc" --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-ocaml-shared-yacc 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 @@ +@comment $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 --vtzGhvizbBRQ85DL--