media-gfx/exif: fix ppc tests

Closes: https://bugs.gentoo.org/867901
Thanks-to: ernsteiswuerfel <erhard_f@mailbox.org>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-07-10 04:16:36 +01:00
parent 1df12487da
commit 01b554d9a6
2 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Small CLI util to show EXIF infos hidden in JPEG files"
HOMEPAGE="https://libexif.github.io/ https://github.com/libexif/exif"
SRC_URI="https://github.com/lib${PN}/${PN}/releases/download/${PN}-${PV//./_}-release/${P}.tar.xz"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="nls"
BDEPEND="
virtual/pkgconfig
nls? ( sys-devel/gettext )
"
DEPEND="
dev-libs/popt
>=media-libs/libexif-${PV}
"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-empty-string-check.patch
"${FILESDIR}"/${P}-unsigned.patch
)
src_configure() {
econf $(use_enable nls)
}

View File

@@ -0,0 +1,50 @@
https://github.com/libexif/exif/issues/2
https://github.com/libexif/exif/issues/18
https://github.com/libexif/exif/commit/dce6c3a6b3178b2c0206aa9180a51fdcda7fb19f
https://github.com/libexif/exif/commit/dcce831dfe5d12dbf355a08db0b7dc307782f9f0
From dce6c3a6b3178b2c0206aa9180a51fdcda7fb19f Mon Sep 17 00:00:00 2001
From: Marcus Meissner <marcus@jet.franken.de>
Date: Mon, 6 Jul 2020 09:16:07 +0200
Subject: [PATCH] pass in unsinged int, related to
https://github.com/libexif/exif/issues/2
---
exif/actions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exif/actions.c b/exif/actions.c
index 4498422..b80d670 100644
--- a/exif/actions.c
+++ b/exif/actions.c
@@ -479,7 +479,7 @@ show_ifd (ExifContent *content, void *data)
}
static void
-print_hline (unsigned char ids, unsigned int screenwidth)
+print_hline (unsigned int ids, unsigned int screenwidth)
{
unsigned int i, width;
From dcce831dfe5d12dbf355a08db0b7dc307782f9f0 Mon Sep 17 00:00:00 2001
From: Marcus Meissner <marcus@jet.franken.de>
Date: Mon, 6 Jul 2020 09:23:46 +0200
Subject: [PATCH] second fix for https://github.com/libexif/exif/issues/2
---
exif/actions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exif/actions.c b/exif/actions.c
index b80d670..ed245df 100644
--- a/exif/actions.c
+++ b/exif/actions.c
@@ -599,7 +599,7 @@ action_tag_list (ExifData *ed, ExifParams p)
static void
show_entry_machine (ExifEntry *e, void *data)
{
- unsigned char *ids = data;
+ unsigned int *ids = data;
char v[TAG_VALUE_BUF];
ExifIfd ifd = exif_entry_get_ifd (e);