[packages/cairo] cups bugfix; rel 2

mis mis at pld-linux.org
Sat Feb 8 13:01:41 CET 2025


commit 71612393a8f8fb03cb1eaf07f32e526cac0e4f22
Author: mis <mistoo at gmail.com>
Date:   Sat Feb 8 12:06:48 2025 +0100

    cups bugfix; rel 2

 cairo-1.18.2-cups.patch | 32 ++++++++++++++++++++++++++++++++
 cairo.spec              |  5 +++--
 2 files changed, 35 insertions(+), 2 deletions(-)
---
diff --git a/cairo.spec b/cairo.spec
index 8741b8a..b708475 100644
--- a/cairo.spec
+++ b/cairo.spec
@@ -11,11 +11,12 @@ Summary:	Cairo - multi-platform 2D graphics library
 Summary(pl.UTF-8):	Cairo - wieloplatformowa biblioteka graficzna 2D
 Name:		cairo
 Version:	1.18.2
-Release:	1
+Release:	2
 License:	LGPL v2.1 or MPL v1.1
 Group:		Libraries
 Source0:	https://www.cairographics.org/releases/%{name}-%{version}.tar.xz
 # Source0-md5:	5ad67c707edd0003f1b91c8bbc0005c1
+Patch1:		%{name}-1.18.2-cups.patch
 URL:		https://www.cairographics.org/
 BuildRequires:	binutils-devel
 BuildRequires:	fontconfig-devel >= 2.13.0
@@ -190,7 +191,7 @@ Dokumentacja API Cairo.
 
 %prep
 %setup -q
-
+%patch 1 -p1
 %build
 %meson build \
 	%{!?with_static_libs:--default-library=shared} \
diff --git a/cairo-1.18.2-cups.patch b/cairo-1.18.2-cups.patch
new file mode 100644
index 0000000..6a34c28
--- /dev/null
+++ b/cairo-1.18.2-cups.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/939607
+https://gitlab.freedesktop.org/cairo/cairo/-/issues/870
+https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/595
+https://gitlab.freedesktop.org/cairo/cairo/-/commit/f19e2fe080ddcfce93c8234a919fd882f3d63362
+
+From f19e2fe080ddcfce93c8234a919fd882f3d63362 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson at redneon.com>
+Date: Fri, 13 Sep 2024 06:28:39 +0930
+Subject: [PATCH] cff: Don't fail if no local subs
+
+Fixes: #870
+--- a/src/cairo-cff-subset.c
++++ b/src/cairo-cff-subset.c
+@@ -952,9 +952,13 @@ cairo_cff_font_read_private_dict (cairo_cff_font_t   *font,
+ 	 decode_number (operand, nominal_width);
+ 
+     num_subs = _cairo_array_num_elements (local_sub_index);
+-    *local_subs_used = _cairo_calloc_ab (num_subs, sizeof (cairo_bool_t));
+-    if (unlikely (*local_subs_used == NULL))
+-	return _cairo_error (CAIRO_STATUS_NO_MEMORY);
++    if (num_subs > 0) {
++	*local_subs_used = _cairo_calloc_ab (num_subs, sizeof (cairo_bool_t));
++	if (unlikely (*local_subs_used == NULL))
++	    return _cairo_error (CAIRO_STATUS_NO_MEMORY);
++    } else {
++	*local_subs_used = NULL;
++    }
+ 
+     if (num_subs < 1240)
+ 	*local_sub_bias = 107;
+-- 
+GitLab
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cairo.git/commitdiff/71612393a8f8fb03cb1eaf07f32e526cac0e4f22



More information about the pld-cvs-commit mailing list