pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics/gegl



Module Name:    pkgsrc
Committed By:   nros
Date:           Sun Nov 12 09:22:23 UTC 2023

Modified Files:
        pkgsrc/graphics/gegl: distinfo
Added Files:
        pkgsrc/graphics/gegl/patches: patch-operations_external_svg-load.c

Log Message:
gegl: fix build with librsvg-c


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 pkgsrc/graphics/gegl/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/gegl/patches/patch-operations_external_svg-load.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/gegl/distinfo
diff -u pkgsrc/graphics/gegl/distinfo:1.43 pkgsrc/graphics/gegl/distinfo:1.44
--- pkgsrc/graphics/gegl/distinfo:1.43  Fri Jul 14 07:35:59 2023
+++ pkgsrc/graphics/gegl/distinfo       Sun Nov 12 09:22:23 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.43 2023/07/14 07:35:59 adam Exp $
+$NetBSD: distinfo,v 1.44 2023/11/12 09:22:23 nros Exp $
 
 BLAKE2s (gegl-0.4.46.tar.xz) = 96ed49060a6fc99d73ddbc6d642445a75027e4d1f3e5cfa79faab32367023e65
 SHA512 (gegl-0.4.46.tar.xz) = cd733208da7dc1ec77ca023f03f47e578350e156ad07ece701b39f517a292e9f9c081b3a8a2db846813483b4ddb21f32f9fc8b9c70fea8a6ba27bb97ef8bb847
@@ -6,4 +6,5 @@ Size (gegl-0.4.46.tar.xz) = 5799248 byte
 SHA1 (patch-gegl_gegl-config.c) = a8e1f5f5394a33be2bcdcb05ec7654d06f7ad4bc
 SHA1 (patch-gegl_gegl-cpuaccel.c) = f32ee8dfb8b89eb0aa117ac071cd35367b7841a5
 SHA1 (patch-operations_external_png-load.c) = 9a03e842597d6c069f7dfa0fa224dd487479b27f
+SHA1 (patch-operations_external_svg-load.c) = 7b26b644863090d8bd70218cb56a26e9b9995fe4
 SHA1 (patch-operations_external_tiff-load.c) = 5be8581a1459db3007bb82c27c2770356314f71d

Added files:

Index: pkgsrc/graphics/gegl/patches/patch-operations_external_svg-load.c
diff -u /dev/null pkgsrc/graphics/gegl/patches/patch-operations_external_svg-load.c:1.1
--- /dev/null   Sun Nov 12 09:22:23 2023
+++ pkgsrc/graphics/gegl/patches/patch-operations_external_svg-load.c   Sun Nov 12 09:22:23 2023
@@ -0,0 +1,63 @@
+$NetBSD: patch-operations_external_svg-load.c,v 1.1 2023/11/12 09:22:23 nros Exp $
+
+* fix build with librsvg-c, from upstream
+https://gitlab.gnome.org/GNOME/gegl/-/commit/a99a93e5c9013bd4101f5058cdee7d0cf30234fe
+
+--- operations/external/svg-load.c.orig        2023-06-25 22:49:19.000000000 +0000
++++ operations/external/svg-load.c
+@@ -76,16 +76,25 @@ query_svg (GeglOperation *operation)
+ {
+   GeglProperties *o = GEGL_PROPERTIES (operation);
+   Priv *p = (Priv*) o->user_data;
++#if LIBRSVG_CHECK_VERSION(2, 52, 0)
+   gdouble out_width, out_height;
++#else
++  RsvgDimensionData dimensions;
++#endif
+ 
+   g_return_val_if_fail (p->handle != NULL, FALSE);
+ 
+-  rsvg_handle_get_intrinsic_size_in_pixels (p->handle, &out_width, &out_height);
+-
+   p->format = babl_format ("R'G'B'A u8");
+ 
++#if LIBRSVG_CHECK_VERSION(2, 52, 0)
++  rsvg_handle_get_intrinsic_size_in_pixels (p->handle, &out_width, &out_height);
+   p->height = out_height;
+-  p->width = out_width;
++  p->width  = out_width;
++#else
++  rsvg_handle_get_dimensions (p->handle, &dimensions);
++  p->height = dimensions.height;
++  p->width  = dimensions.width;
++#endif
+ 
+   return TRUE;
+ }
+@@ -98,10 +107,12 @@ load_svg (GeglOperation *operation,
+ {
+     GeglProperties    *o = GEGL_PROPERTIES (operation);
+     Priv              *p = (Priv*) o->user_data;
+-    RsvgRectangle      svg_rect = {0.0, 0.0, width, height};
+     cairo_surface_t   *surface;
+     cairo_t           *cr;
+-    GError            *error = NULL;
++#if LIBRSVG_CHECK_VERSION(2, 52, 0)
++    GError            *error    = NULL;
++    RsvgRectangle      svg_rect = {0.0, 0.0, width, height};
++#endif
+ 
+     g_return_val_if_fail (p->handle != NULL, -1);
+ 
+@@ -115,7 +126,11 @@ load_svg (GeglOperation *operation,
+                      (double)height / (double)p->height);
+       }
+ 
++#if LIBRSVG_CHECK_VERSION(2, 52, 0)
+     rsvg_handle_render_document (p->handle, cr, &svg_rect, &error);
++#else
++    rsvg_handle_render_cairo (p->handle, cr);
++#endif
+ 
+     cairo_surface_flush (surface);
+ 



Home | Main Index | Thread Index | Old Index