Added OCaml 4.10 patch to devel/ocaml-ppx_expect. Revbump.
No upstream changes.
This commit is contained in:
parent
69b7e2ee33
commit
10a0c091e6
4 changed files with 52 additions and 4 deletions
|
@ -1,9 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.3 2020/01/16 14:20:56 jaapb Exp $
|
||||
# $NetBSD: Makefile,v 1.4 2020/04/30 08:11:24 jaapb Exp $
|
||||
|
||||
GITHUB_PROJECT= ppx_expect
|
||||
GITHUB_TAG= v${PKGVERSION_NOREV}
|
||||
DISTNAME= ${GITHUB_PROJECT}-0.13.0
|
||||
PKGNAME= ocaml-${DISTNAME}
|
||||
PKGREVISION= 1
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=janestreet/}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.3 2020/01/16 14:20:56 jaapb Exp $
|
||||
# $NetBSD: buildlink3.mk,v 1.4 2020/04/30 08:11:24 jaapb Exp $
|
||||
|
||||
BUILDLINK_TREE+= ocaml-ppx_expect
|
||||
|
||||
|
@ -6,7 +6,7 @@ BUILDLINK_TREE+= ocaml-ppx_expect
|
|||
OCAML_PPX_EXPECT_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.ocaml-ppx_expect+= ocaml-ppx_expect>=0.12.0
|
||||
BUILDLINK_ABI_DEPENDS.ocaml-ppx_expect+= ocaml-ppx_expect>=0.13.0
|
||||
BUILDLINK_ABI_DEPENDS.ocaml-ppx_expect+= ocaml-ppx_expect>=0.13.0nb1
|
||||
BUILDLINK_PKGSRCDIR.ocaml-ppx_expect?= ../../devel/ocaml-ppx_expect
|
||||
|
||||
.endif # OCAML_PPX_EXPECT_BUILDLINK3_MK
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
$NetBSD: distinfo,v 1.2 2020/01/16 14:20:56 jaapb Exp $
|
||||
$NetBSD: distinfo,v 1.3 2020/04/30 08:11:24 jaapb Exp $
|
||||
|
||||
SHA1 (ppx_expect-0.13.0.tar.gz) = 3fdb4023b8607d8823fa93ef8b99848202d3c610
|
||||
RMD160 (ppx_expect-0.13.0.tar.gz) = 4d0f99553d423e0760804c287ffdca6ee97a353c
|
||||
SHA512 (ppx_expect-0.13.0.tar.gz) = 3643ff084b9b3c640969ec5cf45d015804cde611202a3f392d29a85fd1becbff93130dc2e3a9d61d2a09d4d74b15697f35cd82e0d2a5c01ffd9d124bfa9dc926
|
||||
Size (ppx_expect-0.13.0.tar.gz) = 40160 bytes
|
||||
SHA1 (patch-collector_expect__test__collector__stubs.c) = 3b4b0c507a679251a2a9b14c362a02f1fc44538d
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
$NetBSD: patch-collector_expect__test__collector__stubs.c,v 1.1 2020/04/30 08:11:24 jaapb Exp $
|
||||
|
||||
Rename stdout and stderr to avoid name clashes with OCaml 4.10
|
||||
|
||||
--- collector/expect_test_collector_stubs.c.orig 2019-11-18 14:56:06.000000000 +0000
|
||||
+++ collector/expect_test_collector_stubs.c
|
||||
@@ -51,29 +51,29 @@ static int expect_test_collector_saved_s
|
||||
|
||||
CAMLprim value expect_test_collector_before_test (value voutput, value vstdout, value vstderr) {
|
||||
struct channel* output = Channel(voutput);
|
||||
- struct channel* stdout = Channel(vstdout);
|
||||
- struct channel* stderr = Channel(vstderr);
|
||||
+ struct channel* cstdout = Channel(vstdout);
|
||||
+ struct channel* cstderr = Channel(vstderr);
|
||||
int fd, ret;
|
||||
- fd = dup(stdout->fd);
|
||||
+ fd = dup(cstdout->fd);
|
||||
if(fd == -1) caml_sys_error(NO_ARG);
|
||||
expect_test_collector_saved_stdout = fd;
|
||||
- fd = dup(stderr->fd);
|
||||
+ fd = dup(cstderr->fd);
|
||||
if(fd == -1) caml_sys_error(NO_ARG);
|
||||
expect_test_collector_saved_stderr = fd;
|
||||
- ret = dup2(output->fd, stdout->fd);
|
||||
+ ret = dup2(output->fd, cstdout->fd);
|
||||
if(ret == -1) caml_sys_error(NO_ARG);
|
||||
- ret = dup2(output->fd, stderr->fd);
|
||||
+ ret = dup2(output->fd, cstderr->fd);
|
||||
if(ret == -1) caml_sys_error(NO_ARG);
|
||||
return Val_unit;
|
||||
}
|
||||
|
||||
CAMLprim value expect_test_collector_after_test (value vstdout, value vstderr) {
|
||||
- struct channel* stdout = Channel(vstdout);
|
||||
- struct channel* stderr = Channel(vstderr);
|
||||
+ struct channel* cstdout = Channel(vstdout);
|
||||
+ struct channel* cstderr = Channel(vstderr);
|
||||
int ret;
|
||||
- ret = dup2(expect_test_collector_saved_stdout, stdout->fd);
|
||||
+ ret = dup2(expect_test_collector_saved_stdout, cstdout->fd);
|
||||
if(ret == -1) caml_sys_error(NO_ARG);
|
||||
- ret = dup2(expect_test_collector_saved_stderr, stderr->fd);
|
||||
+ ret = dup2(expect_test_collector_saved_stderr, cstderr->fd);
|
||||
if(ret == -1) caml_sys_error(NO_ARG);
|
||||
ret = close(expect_test_collector_saved_stdout);
|
||||
if(ret == -1) caml_sys_error(NO_ARG);
|
Loading…
Reference in a new issue