commit:     10e443bbdb9a5890b3162e263a7daf1d3459cb4a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May  2 05:33:27 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May  2 05:33:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10e443bb

dev-perl/Cairo: fix Modern C issue

Closes: https://bugs.gentoo.org/924211
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-perl/Cairo/Cairo-1.109.0-r1.ebuild       | 36 ++++++++++++++++++++++++++++
 dev-perl/Cairo/files/Cairo-1.109.0-c99.patch | 14 +++++++++++
 2 files changed, 50 insertions(+)

diff --git a/dev-perl/Cairo/Cairo-1.109.0-r1.ebuild 
b/dev-perl/Cairo/Cairo-1.109.0-r1.ebuild
new file mode 100644
index 000000000000..7f8242531e34
--- /dev/null
+++ b/dev-perl/Cairo/Cairo-1.109.0-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=XAOC
+DIST_VERSION=1.109
+DIST_EXAMPLES=("examples/*")
+inherit perl-module
+
+DESCRIPTION="Perl interface to the cairo library"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv 
~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+
+RDEPEND="
+       >=x11-libs/cairo-1.0.0
+"
+DEPEND="
+       >=x11-libs/cairo-1.0.0
+"
+BDEPEND="
+       ${RDEPEND}
+       virtual/perl-ExtUtils-MakeMaker
+       >=dev-perl/ExtUtils-Depends-0.200.0
+       >=dev-perl/ExtUtils-PkgConfig-1.0.0
+       test? (
+               dev-perl/Test-Number-Delta
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-1.107-fatal-exit.patch"
+       "${FILESDIR}/${PN}-1.109.0-c99.patch"
+)

diff --git a/dev-perl/Cairo/files/Cairo-1.109.0-c99.patch 
b/dev-perl/Cairo/files/Cairo-1.109.0-c99.patch
new file mode 100644
index 000000000000..5bac174069bd
--- /dev/null
+++ b/dev-perl/Cairo/files/Cairo-1.109.0-c99.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/924211
+https://gitlab.gnome.org/GNOME/perl-cairo/-/issues/2
+
+--- a/CairoSurface.xs
++++ b/CairoSurface.xs
+@@ -389,7 +389,7 @@ cairo_status_t
+ cairo_surface_set_mime_data (cairo_surface_t *surface, const char *mime_type, 
SV *data);
+     PREINIT:
+       const unsigned char *mime_data;
+-      unsigned long length;
++      STRLEN length;
+     CODE:
+       SvREFCNT_inc (data);
+       mime_data = (const unsigned char *) SvPV(data, length);

Reply via email to