summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaapb <jaapb@pkgsrc.org>2018-01-22 11:22:40 +0000
committerjaapb <jaapb@pkgsrc.org>2018-01-22 11:22:40 +0000
commitb353bc8c50c836a7c5c720e7b21984ee4c9f70c6 (patch)
tree9263b3b9e8385e652f873f74c7e84de0c4759888
parentfacf9c01e8d7683013a488f449d92dc51ba69217 (diff)
downloadpkgsrc-b353bc8c50c836a7c5c720e7b21984ee4c9f70c6.tar.gz
Compilation fixes for devel/ocaml-optcomp.
Includes a patch for OCaml 4.06 (from an upstream pull request) and a call to oasis to regenerate the setup files (which were not compatible with 4.06 either).
-rw-r--r--devel/ocaml-optcomp/Makefile8
-rw-r--r--devel/ocaml-optcomp/buildlink3.mk4
-rw-r--r--devel/ocaml-optcomp/distinfo3
-rw-r--r--devel/ocaml-optcomp/patches/patch-src_optcomp.ml18
4 files changed, 28 insertions, 5 deletions
diff --git a/devel/ocaml-optcomp/Makefile b/devel/ocaml-optcomp/Makefile
index d783e8a841b..84ffff24e91 100644
--- a/devel/ocaml-optcomp/Makefile
+++ b/devel/ocaml-optcomp/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.12 2018/01/10 15:47:30 jaapb Exp $
+# $NetBSD: Makefile,v 1.13 2018/01/22 11:22:40 jaapb Exp $
VERSION= 1.6
GITHUB_PROJECT= optcomp
DISTNAME= ${GITHUB_PROJECT}-${VERSION}
PKGNAME= ocaml-${DISTNAME}
-PKGREVISION= 8
+PKGREVISION= 9
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=diml/}
@@ -17,6 +17,10 @@ SUPERSEDES= optcomp-[0-9]*
OCAML_USE_OASIS= yes
+pre-configure:
+ ${RUN} cd ${WRKSRC} && oasis setup
+
.include "../../mk/ocaml.mk"
+.include "../../devel/ocaml-oasis/buildlink3.mk"
.include "../../lang/camlp4/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/ocaml-optcomp/buildlink3.mk b/devel/ocaml-optcomp/buildlink3.mk
index 2c0a2251a2b..243ba3c78a3 100644
--- a/devel/ocaml-optcomp/buildlink3.mk
+++ b/devel/ocaml-optcomp/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.6 2018/01/10 15:47:30 jaapb Exp $
+# $NetBSD: buildlink3.mk,v 1.7 2018/01/22 11:22:40 jaapb Exp $
BUILDLINK_TREE+= ocaml-optcomp
@@ -6,7 +6,7 @@ BUILDLINK_TREE+= ocaml-optcomp
OCAML_OPTCOMP_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.ocaml-optcomp+= ocaml-optcomp>=1.6nb1
-BUILDLINK_ABI_DEPENDS.ocaml-optcomp+= ocaml-optcomp>=1.6nb8
+BUILDLINK_ABI_DEPENDS.ocaml-optcomp+= ocaml-optcomp>=1.6nb9
BUILDLINK_PKGSRCDIR.ocaml-optcomp?= ../../devel/ocaml-optcomp
.include "../../lang/camlp4/buildlink3.mk"
diff --git a/devel/ocaml-optcomp/distinfo b/devel/ocaml-optcomp/distinfo
index 32055655d0d..99474a78044 100644
--- a/devel/ocaml-optcomp/distinfo
+++ b/devel/ocaml-optcomp/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.4 2016/06/17 10:33:23 jaapb Exp $
+$NetBSD: distinfo,v 1.5 2018/01/22 11:22:40 jaapb Exp $
SHA1 (optcomp-1.6.tar.gz) = 7b653ae4f3f1903cfcbab4654f8f879d27914e5d
RMD160 (optcomp-1.6.tar.gz) = 1296e338a8ca155ecb53214233213c6ef3e01164
SHA512 (optcomp-1.6.tar.gz) = 19fa04a42e5ed589979647469759017442598d170bf82d49c3b720d1b1b6bbe3066ae3ffee77a3f15dcbf51be5d7a8934300873391ebce423f3a0f3878250c18
Size (optcomp-1.6.tar.gz) = 56370 bytes
+SHA1 (patch-src_optcomp.ml) = 2463996a335a15a59328a3b63cb2f8e4a2e614c0
diff --git a/devel/ocaml-optcomp/patches/patch-src_optcomp.ml b/devel/ocaml-optcomp/patches/patch-src_optcomp.ml
new file mode 100644
index 00000000000..e805ea7fb61
--- /dev/null
+++ b/devel/ocaml-optcomp/patches/patch-src_optcomp.ml
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_optcomp.ml,v 1.1 2018/01/22 11:22:40 jaapb Exp $
+
+Compatibility fix with OCaml 4.06 (upstream pull request)
+--- src/optcomp.ml.orig 2014-05-13 08:24:26.000000000 +0000
++++ src/optcomp.ml
+@@ -84,9 +84,9 @@ let rec print mode current_fname current
+ (* Go to the right position in the input. *)
+ if pos_in ic <> off then seek_in ic off;
+ (* Read the part to copy. *)
+- let str = String.create len in
+- really_input ic str 0 len;
+- (str, Loc.stop_line loc, Loc.stop_off loc - Loc.stop_bol loc)
++ let buf = Bytes.create len in
++ really_input ic buf 0 len;
++ (Bytes.to_string buf, Loc.stop_line loc, Loc.stop_off loc - Loc.stop_bol loc)
+ in
+ if current_fname = fname && current_line = line && current_col = col then
+ (* If we at the right position, just print the string. *)