tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ocaml build fix

ocaml has been broken for NetBSD i386 since before the freeze started.
I am unclear on if there is trouble on other platforms.  NetBSD amd64
and OS X both seem ok.  The problem is that the "raw_spacetime" library
is not built, but it's in the PLIST.  As far as I know, it's only this
PLIST mismatch that is wrong.  The patch below merely omits the
raw_spacetime libs from PLIST on NetbSD i386.

I suspect fixing the real issue is far more invasive; NetBSD i386 is
detected as bsdelf rather than netbsd, but changing that results in a
lot of other trouble.  So I am leaving figuring out the right long-term
fix for the maintainer after the freeze.

Barring a better patch materializing by tonight, I'll commit this to
allow ocaml to build and therefore most if not ocaml packages to stop
failing.  I have built unison with the resulting ocaml package, and that
works.  I have confirmed that on NetBSD 7 amd64 the package builds with
the same PLIST as before.

Index: Makefile
RCS file: /cvsroot/pkgsrc/lang/ocaml/Makefile,v
retrieving revision 1.106
diff -u -p -r1.106 Makefile
--- Makefile	30 Dec 2016 11:15:00 -0000	1.106
+++ Makefile	26 Mar 2017 15:39:42 -0000
@@ -58,6 +58,14 @@ PLIST_SRC+=	${PKGDIR}/PLIST.natdynlink
 # Common ocaml files.
+# On netbsd i386, raw_spacetime is not built; the reason is not
+# understood.  Because that changes multiple PLIST files, use
+# PLIST_VARS instead of adding two more files.
+PLIST_VARS+=	raw_spacetime
+.if !(${MACHINE_ARCH} == "i386" && ${OPSYS} == "NetBSD")
+PLIST.raw_spacetime=	yes
 # This is needed because ${WRKSRC}/build/ uses
 # $PWD as part of its script.  However, with /bin/sh on SunOS
 # (cd work/foo-1.0 && echo $PWD) will show that the value of PWD is
Index: PLIST
RCS file: /cvsroot/pkgsrc/lang/ocaml/PLIST,v
retrieving revision 1.37
diff -u -p -r1.37 PLIST
--- PLIST	23 Mar 2017 18:23:58 -0000	1.37
+++ PLIST	26 Mar 2017 15:39:42 -0000
@@ -1190,9 +1190,9 @@ lib/ocaml/
Index: PLIST.opt
RCS file: /cvsroot/pkgsrc/lang/ocaml/PLIST.opt,v
retrieving revision 1.26
diff -u -p -r1.26 PLIST.opt
--- PLIST.opt	30 Dec 2016 11:15:00 -0000	1.26
+++ PLIST.opt	26 Mar 2017 15:39:42 -0000
@@ -280,10 +280,10 @@ lib/ocaml/profiling.cmx

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index