Added patch to x11/ocaml-lablgtk for compilation with ocaml 4.05

This commit is contained in:
jaapb 2017-11-09 10:57:57 +00:00
parent 73f7b4331b
commit 9b1688b082
3 changed files with 26 additions and 2 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.30 2017/11/01 09:25:36 jaapb Exp $
# $NetBSD: Makefile,v 1.31 2017/11/09 10:57:57 jaapb Exp $
DISTNAME= lablgtk-2.18.6
PKGNAME= ocaml-${DISTNAME}
PKGREVISION= 1
CATEGORIES= x11
MASTER_SITES= https://forge.ocamlcore.org/frs/download.php/1726/

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.10 2017/11/01 09:25:36 jaapb Exp $
$NetBSD: distinfo,v 1.11 2017/11/09 10:57:57 jaapb Exp $
SHA1 (lablgtk-2.18.6.tar.gz) = 2dd099ecca246274df8f6f363c8d418ff3a67568
RMD160 (lablgtk-2.18.6.tar.gz) = 6fef28c6ec2757da3e0773d33c77c13abaf61895
@ -6,3 +6,4 @@ SHA512 (lablgtk-2.18.6.tar.gz) = 0d30da0e4a93b1693ac6d63161d40c8cd6d9337e105a65f
Size (lablgtk-2.18.6.tar.gz) = 804837 bytes
SHA1 (patch-configure) = a559be17f6687bfb4919617c01e5c28252bf9e99
SHA1 (patch-src_Makefile) = 5cdcc55b1b2be61bf7303c1f5fb28bb02d931aae
SHA1 (patch-src_gutf8.ml) = a813e6b7dc3944a23b4b069c9484417a592c42e8

View file

@ -0,0 +1,22 @@
$NetBSD: patch-src_gutf8.ml,v 1.1 2017/11/09 10:57:57 jaapb Exp $
Patch to compile with OCaml 4.05 (remove for 4.06!)
--- src/gutf8.ml.orig 2017-10-30 08:37:29.000000000 +0000
+++ src/gutf8.ml
@@ -68,14 +68,14 @@ let write_unichar s ~pos (c : unichar) =
let from_unichar (n : unichar) =
let s = Bytes.create 6 and pos = ref 0 in
write_unichar s ~pos n;
- Bytes.sub_string s ~pos:0 ~len:!pos
+ Bytes.sub_string s 0 !pos
let from_unistring (s : unistring) =
let len = Array.length s in
let r = Bytes.create (len*6) in
let pos = ref 0 in
for i = 0 to len-1 do write_unichar r ~pos s.(i) done;
- Bytes.sub_string r ~pos:0 ~len:!pos
+ Bytes.sub_string r 0 !pos
let rec hi_bits n =
if n land 0x80 = 0 then 0 else