From 10e443bbdb9a5890b3162e263a7daf1d3459cb4a Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 2 May 2024 06:33:27 +0100 Subject: dev-perl/Cairo: fix Modern C issue Closes: https://bugs.gentoo.org/924211 Signed-off-by: Sam James --- 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(+) create mode 100644 dev-perl/Cairo/Cairo-1.109.0-r1.ebuild create mode 100644 dev-perl/Cairo/files/Cairo-1.109.0-c99.patch 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); -- cgit v1.2.3-65-gdbad