Add -test patch until upstream weighs in on GC issues.
This commit is contained in:
parent
d219020c52
commit
6cebf913a5
21
ocaml-cairo-test.patch
Normal file
21
ocaml-cairo-test.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
--- a/tests/image_create.ml
|
||||||
|
+++ b/tests/image_create.ml
|
||||||
|
@@ -2,14 +2,15 @@ open Printf
|
||||||
|
open Cairo
|
||||||
|
open Bigarray
|
||||||
|
|
||||||
|
-let create() =
|
||||||
|
- let data = Array1.create int8_unsigned c_layout 360_000 in
|
||||||
|
+let create data =
|
||||||
|
Gc.finalise (fun _ -> eprintf "DESTROY bigarray 'data'\n%!") data;
|
||||||
|
let surf = Image.create_for_data8 data Image.RGB24 ~w:300 ~h:300 in
|
||||||
|
Cairo.create surf
|
||||||
|
|
||||||
|
+let data = Array1.create int8_unsigned c_layout 360_000;;
|
||||||
|
+
|
||||||
|
let () =
|
||||||
|
- let cr = create() in
|
||||||
|
+ let cr = create data in
|
||||||
|
set_source_rgb cr 1. 1. 1.;
|
||||||
|
rectangle cr 0. 0. ~w:300. ~h:300.;
|
||||||
|
fill cr;
|
@ -22,6 +22,9 @@ License: LGPLv3+
|
|||||||
URL: https://github.com/Chris00/%{name}
|
URL: https://github.com/Chris00/%{name}
|
||||||
|
|
||||||
Source0: %{url}/releases/download/%{version}/cairo2-%{version}.tbz
|
Source0: %{url}/releases/download/%{version}/cairo2-%{version}.tbz
|
||||||
|
# Avoid a GC-related segfault. See:
|
||||||
|
# https://github.com/Chris00/ocaml-cairo/issues/19
|
||||||
|
Patch0: %{name}-test.patch
|
||||||
|
|
||||||
BuildRequires: ocaml >= 4.02
|
BuildRequires: ocaml >= 4.02
|
||||||
BuildRequires: ocaml-dune-devel
|
BuildRequires: ocaml-dune-devel
|
||||||
@ -108,7 +111,7 @@ for developing applications that use %{name}-pango.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n cairo2-%{version}
|
%autosetup -n cairo2-%{version} -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -244,6 +247,7 @@ dune runtest
|
|||||||
- Add -gtk and -pango subpackages corresponding to upstream's opam packages
|
- Add -gtk and -pango subpackages corresponding to upstream's opam packages
|
||||||
- Add -gtk-devel and -pango-devel subpackages to manage dependencies
|
- Add -gtk-devel and -pango-devel subpackages to manage dependencies
|
||||||
- Add %%check script
|
- Add %%check script
|
||||||
|
- Add -test patch until upstream weighs in on GC issues
|
||||||
|
|
||||||
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.28.gitbe5a298
|
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.28.gitbe5a298
|
||||||
- OCaml 4.10.0+beta1 rebuild.
|
- OCaml 4.10.0+beta1 rebuild.
|
||||||
|
Loading…
Reference in New Issue
Block a user