#1 New upstream version 0.6.2. Drop all patches.
Merged 2 years ago by rjones. Opened 2 years ago by jjames.
rpms/ jjames/ocaml-cairo rawhide  into  rawhide

@@ -1,126 +0,0 @@ 

- diff --git a/src/cairo_ocaml.h.p b/src/cairo_ocaml.h.p

- index 4192aed..78a02e2 100644

- --- a/src/cairo_ocaml.h.p

- +++ b/src/cairo_ocaml.h.p

- @@ -25,7 +25,7 @@

-  /* cairo_t

-  ***********************************************************************/

-  #define CAIRO_VAL(v) (* (cairo_t **) Data_custom_val(v))

- -struct custom_operations caml_cairo_ops;

- +CAMLextern struct custom_operations caml_cairo_ops;

-  

-  void caml_cairo_raise_Error(cairo_status_t status);

-  /* raise [Cairo.Error] if the status indicates a failure. */

- @@ -33,7 +33,7 @@ void caml_cairo_raise_Error(cairo_status_t status);

-  /* cairo_pattern_t

-  ***********************************************************************/

-  #define PATTERN_VAL(v) (* (cairo_pattern_t **) Data_custom_val(v))

- -struct custom_operations caml_pattern_ops;

- +CAMLextern struct custom_operations caml_pattern_ops;

-  

-  #define EXTEND_VAL(v) ((cairo_extend_t) Int_val(v))

-  #define VAL_EXTEND(v) Val_int(v)

- @@ -45,12 +45,12 @@ struct custom_operations caml_pattern_ops;

-  ***********************************************************************/

-  

-  #define FONT_OPTIONS_VAL(v) (* (cairo_font_options_t**) Data_custom_val(v))

- -struct custom_operations caml_font_options_ops;

- +CAMLextern struct custom_operations caml_font_options_ops;

-  

-  /* cairo_font_type_t

-  ***********************************************************************/

-  

- -value caml_cairo_font_type[5];

- +CAMLextern value caml_cairo_font_type[5];

-  

-  cairo_font_type_t caml_cairo_font_type_val(value vft);

-  

- @@ -61,13 +61,13 @@ cairo_font_type_t caml_cairo_font_type_val(value vft);

-  ***********************************************************************/

-  

-  #define SCALED_FONT_VAL(v) (* (cairo_scaled_font_t**) Data_custom_val(v))

- -struct custom_operations caml_scaled_font_ops;

- +CAMLextern struct custom_operations caml_scaled_font_ops;

-  

-  /* cairo_surface_t

-  ***********************************************************************/

-  

-  #define SURFACE_VAL(v) (* (cairo_surface_t **) Data_custom_val(v))

- -struct custom_operations caml_surface_ops;

- +CAMLextern struct custom_operations caml_surface_ops;

-  

-  /* Type cairo_content_t */

-  

- @@ -93,7 +93,7 @@ struct custom_operations caml_surface_ops;

-  ***********************************************************************/

-  

-  #define PATH_VAL(v) (* (cairo_path_t **) Data_custom_val(v))

- -struct custom_operations caml_path_ops;

- +CAMLextern struct custom_operations caml_path_ops;

-  

-  #define PATH_DATA_ASSIGN(vdata, data)                                   \

-    switch (data->header.type) {                                          \

- @@ -151,10 +151,10 @@ struct custom_operations caml_path_ops;

-  #include <cairo-ft.h>

-  

-  #define FT_LIBRARY_VAL(v) (* (FT_Library*) Data_custom_val(v))

- -struct custom_operations caml_cairo_ft_library_ops;

- +CAMLextern struct custom_operations caml_cairo_ft_library_ops;

-  

-  #define FT_FACE_VAL(v) (* (FT_Face*) Data_custom_val(v))

- -struct custom_operations caml_cairo_ft_face_ops;

- +CAMLextern struct custom_operations caml_cairo_ft_face_ops;

-  

-  #endif /* OCAML_CAIRO_HAS_FT */

-  

- diff --git a/src/cairo_ocaml_types.h b/src/cairo_ocaml_types.h

- index b850ae2..b036142 100644

- --- a/src/cairo_ocaml_types.h

- +++ b/src/cairo_ocaml_types.h

- @@ -267,14 +267,6 @@ static intnat caml_cairo_font_options_hash(value v)

-    return(cairo_font_options_hash(FONT_OPTIONS_VAL(v)));

-  }

-  

- -struct custom_operations caml_font_options_ops = {

- -  "font_options_t", /* identifier for serialization and deserialization */

- -  &caml_cairo_font_options_finalize,

- -  &caml_cairo_font_options_compare,

- -  &caml_cairo_font_options_hash,

- -  custom_serialize_default,

- -  custom_deserialize_default };

- -

-  

-  /* caml_cairo_font_type is defined in "cairo_ocaml.h". */

-  CAMLexport value caml_cairo_font_type_init(value unit)

- diff --git a/src/cairo_stubs.c b/src/cairo_stubs.c

- index de35aca..60fae71 100644

- --- a/src/cairo_stubs.c

- +++ b/src/cairo_stubs.c

- @@ -34,6 +34,27 @@

-  #include "cairo_macros.h"

-  #include "cairo_ocaml_types.h"

-  

- +CAMLexport value caml_cairo_font_type[5];

- +

- +CAMLexport struct custom_operations caml_cairo_ops;

- +CAMLexport struct custom_operations caml_pattern_ops;

- +CAMLexport struct custom_operations caml_scaled_font_ops;

- +CAMLexport struct custom_operations caml_surface_ops;

- +CAMLexport struct custom_operations caml_path_ops;

- +

- +#ifdef OCAML_CAIRO_HAS_FT

- +CAMLexport struct custom_operations caml_cairo_ft_library_ops;

- +CAMLexport struct custom_operations caml_cairo_ft_face_ops;

- +#endif

- +

- +CAMLexport struct custom_operations caml_font_options_ops = {

- +  "font_options_t", /* identifier for serialization and deserialization */

- +  &caml_cairo_font_options_finalize,

- +  &caml_cairo_font_options_compare,

- +  &caml_cairo_font_options_hash,

- +  custom_serialize_default,

- +  custom_deserialize_default };

- +

-  /* cairo_t functions.

-  ***********************************************************************/

-  

file removed
-21
@@ -1,21 +0,0 @@ 

- --- 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;

file modified
+10 -19
@@ -14,20 +14,14 @@ 

  

  Name:           ocaml-cairo

  Epoch:          2

- Version:        0.6.1

- Release:        11%{?dist}

+ Version:        0.6.2

+ Release:        1%{?dist}

  Summary:        OCaml library for accessing cairo graphics

  

  License:        LGPLv3+

  URL:            https://github.com/Chris00/%{name}

  

  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

- # Fix builds of consuming packages with -fno-common.

- # https://github.com/Chris00/ocaml-cairo/pull/20

- Patch1:         %{name}-fno-common.patch

  

  BuildRequires:  ocaml >= 4.02

  BuildRequires:  ocaml-dune-devel
@@ -35,6 +29,7 @@ 

  BuildRequires:  ocaml-ocamldoc

  BuildRequires:  ocaml-lablgtk-devel

  BuildRequires:  pkgconfig(cairo) >= 1.2.0

+ BuildRequires:  pkgconfig(freetype2)

  BuildRequires:  pkgconfig(gtk+-2.0)

  

  %global _description %{expand:
@@ -51,8 +46,7 @@ 

  complete, the API is intended to support the complete imaging model of

  PDF 1.4.}

  

- %description

- %_description

+ %description %_description

  

  This package contains OCaml bindings for Cairo.

  
@@ -73,8 +67,7 @@ 

  Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}

  

  

- %description    gtk

- %_description

+ %description    gtk %_description

  

  This package contains OCaml bindings for rendering cairo on a gtk2 canvas.

  
@@ -97,8 +90,7 @@ 

  Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}

  

  

- %description    pango

- %_description

+ %description    pango %_description

  

  This package contains OCaml bindings to use pango with cairo.

  
@@ -153,11 +145,6 @@ 

  # directories with names other than the ones we want.

  rm -rf %{buildroot}%{_prefix}/doc

  

- %ifarch %{ocaml_native_compiler}

- # Add missing executable bits

- chmod a+x %{buildroot}%{_libdir}/ocaml/*/*.cmxs

- %endif

- 

  # Remove files we do not need to package

  rm %{buildroot}%{_libdir}/ocaml/*/*.ml

  
@@ -247,6 +234,10 @@ 

  

  

  %changelog

+ * Tue Jun 22 2021 Jerry James <loganjerry@gmail.com> - 2:0.6.2-1

+ - New upstream version 0.6.2

+ - Drop all patches

+ 

  * Mon Mar  1 15:16:08 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 2:0.6.1-11

  - OCaml 4.12.0 build

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (cairo2-0.6.1.tbz) = d09274624854a45cf914ffbe984f1bcdd30db6283e7a0fd73aeec2a19226ff8f68d3f7139bbab72ca5698b58b840d6fd8a35570efc228391a7c5d031421f5c1f

+ SHA512 (cairo2-0.6.2.tbz) = 789b65428855c3b8fb71836ee6e607870c3140a6152fb01b8ba6e7d2e2f4842a62412061a5eff99023234d305587b605d0cbbacd29456c86a52e9df6466bd302

The ocaml-lablgtk package needs a rebuild to drop the gnomeui bindings. See this thread for details:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/XKCI3SMCACG6YUBVFU5GGJXDYBETVYZB/

Dropping those bindings changes the hashes on some Provides, so all consuming packages must be rebuilt. COPR builds have been done for all affected packages:

https://copr.fedorainfracloud.org/coprs/jjames/ocaml-lablgtk/

This pull request does the necessary rebuild, and also updates ocaml-cairo to its latest version. The udpate does not change any ocaml-cairo Provides.

If you merge this, do not build. I will do all of the builds in Rawhide once all packages are ready. Thank you!

Pull-Request has been merged by rjones

2 years ago

I have merged this and the other ones. However I won't have time today to rebuild these along with dependent packages, so please go ahead and do that if you want.

I will do the builds. Thank you!