Our in-tree findlib is broken in the same way as described here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630490

You can reproduce this with small two-line script on a non-native ocaml
architecture (like sparc64):

---8<---
#use "topfind";;
#camlp4o;;
---8<---

Use the ocaml interpreter and you will see this:
File "/tmp/test1.ml", line 1, characters 0-1:
Error: Reference to undefined global `Dynlink'

Fix inline. Also fixed library dependecies while I am here.

OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/findlib/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- Makefile    9 Jul 2012 20:36:18 -0000       1.21
+++ Makefile    12 Jul 2012 09:28:00 -0000
@@ -3,7 +3,8 @@
 COMMENT=       Objective Caml package manager
 CATEGORIES=    sysutils
 DISTNAME=      findlib-1.2.7
-REVISION=      0
+REVISION =     1
+
 MASTER_SITES=  http://www.ocaml-programming.de/packages/
 
 MAINTAINER=    Anil Madhavapeddy <a...@openbsd.org>
@@ -14,11 +15,13 @@ PERMIT_PACKAGE_FTP= Yes
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_DISTFILES_FTP=  Yes
 PERMIT_DISTFILES_CDROM=        Yes
-WANTLIB=               X11 c curses m pthread pthread-stubs tcl85 xcb
+
+WANTLIB =      c curses m pthread
 
 MODULES+=      lang/ocaml x11/tk
-LIB_DEPENDS =  ${MODTK_LIB_DEPENDS}
-WANTLIB +=     ${MODTK_WANTLIB}
+BUILD_DEPENDS =        ${MODTK_BUILD_DEPENDS}
+RUN_DEPENDS =  ${MODTK_RUN_DEPENDS}
+
 NO_REGRESS=    Yes
 
 CONFIGURE_STYLE=simple
Index: patches/patch-site-lib-src_camlp4_310_META_in
===================================================================
RCS file: patches/patch-site-lib-src_camlp4_310_META_in
diff -N patches/patch-site-lib-src_camlp4_310_META_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-site-lib-src_camlp4_310_META_in       12 Jul 2012 09:28:00 
-0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630490
+
+--- site-lib-src/camlp4.310/META.in.orig       Thu Jul 12 10:18:41 2012
++++ site-lib-src/camlp4.310/META.in    Thu Jul 12 10:19:43 2012
+@@ -6,7 +6,7 @@ dnl This file is input of the m4 macro processor.
+ `directory = "'camlp4_dir`"'
+ 
+ `# For the toploop:'
+-`requires(byte,toploop) = "'camlp4_dynlink`"'
++`requires(byte,toploop) = "dynlink"'
+ `archive(byte,toploop,camlp4o) = "camlp4o.cma"'
+ `archive(byte,toploop,camlp4r) = "camlp4r.cma"'
+ 
+@@ -16,7 +16,7 @@ dnl This file is input of the m4 macro processor.
+ `preprocessor = "'camlp4_cmd`"'
+ 
+ `package "lib" ('
+-`  requires = "camlp4 'camlp4_dynlink`"'
++`  requires = "camlp4 dynlink"'
+ `  version = "[distributed with Ocaml]"'
+ `  description = "Camlp4 library"'
+ `  archive(byte) = "camlp4lib.cma"'

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk

Reply via email to