net-print/gutenprint: fix for modern C

Patch by Nuitari <nuitari@nuitari.net>

Closes: https://bugs.gentoo.org/935662
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
This commit is contained in:
Andreas K. Hüttel
2024-11-14 12:37:06 +01:00
parent 011242d90c
commit 7363e21271
2 changed files with 17 additions and 1 deletions
@@ -0,0 +1,13 @@
--- gutenprint-5.3.4.orig/src/gimp2/print.c 2024-09-17 01:59:12.666943714 -0400
+++ gutenprint-5.3.4/src/gimp2/print.c 2024-09-17 02:02:46.637482947 -0400
@@ -114,8 +114,8 @@
{
if (gimp_thumbnail_data)
g_free(gimp_thumbnail_data);
- gint x = gimp_image_width(image_ID);
- gint y = gimp_image_height(image_ID);
+ gint x = gimp_image_width((gint32)(intptr_t)image_ID);
+ gint y = gimp_image_height((gint32)(intptr_t)image_ID);
if (*width > x)
*width = x;
if (*height > y)
@@ -39,7 +39,10 @@ RDEPEND="
DEPEND="${RDEPEND}"
DOCS=( AUTHORS ChangeLog NEWS README doc/gutenprint-users-manual.{pdf,odt} )
PATCHES=( "${FILESDIR}"/${PN}-5.3.1-cflags.patch )
PATCHES=(
"${FILESDIR}"/${PN}-5.3.1-cflags.patch
"${FILESDIR}"/${P}-invalidint.patch
)
src_prepare() {
default