Skip to content

Commit

Permalink
media-libs/kvazaar: add patch to fix tests on big-endian
Browse files Browse the repository at this point in the history
Trivial fix and only affects BE so no revbump.

See: ultravideo/kvazaar#377
Bug: https://bugs.gentoo.org/902217
Signed-off-by: Matoro Mahri <[email protected]>
Closes: gentoo#34364
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
matoro authored and flint2 committed Dec 19, 2023
1 parent 4d0d5f4 commit 40713eb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
32 changes: 32 additions & 0 deletions media-libs/kvazaar/files/kvazaar-2.2.0-backport-pr377.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
https://bugs.gentoo.org/902217
https://github.com/ultravideo/kvazaar/pull/377

From e19b7925d910e4b77fc5a46d92de0f2563a7e506 Mon Sep 17 00:00:00 2001
From: matoro <[email protected]>
Date: Wed, 29 Nov 2023 10:58:08 -0500
Subject: [PATCH] Don't export MD5 byteReverse symbol on big-endian

Otherwise this fails the test which checks that all exported symbols
begin with kvz_ prefix.
---
src/extras/libmd5.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/extras/libmd5.c b/src/extras/libmd5.c
index b06b291eb..8a437da68 100644
--- a/src/extras/libmd5.c
+++ b/src/extras/libmd5.c
@@ -27,11 +27,11 @@ static void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
#ifndef __BIG_ENDIAN__
# define byteReverse(buf, len) /* Nothing */
#else
-void byteReverse(uint32_t *buf, unsigned len);
+static void byteReverse(uint32_t *buf, unsigned len);
/*
* Note: this code is harmless on little-endian machines.
*/
-void byteReverse(uint32_t *buf, unsigned len)
+static void byteReverse(uint32_t *buf, unsigned len)
{
uint32_t t;
do {
2 changes: 2 additions & 0 deletions media-libs/kvazaar/kvazaar-2.2.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ DEPEND="${RDEPEND}
abi_x86_64? ( ${ASM_DEP} )
"

PATCHES=( "${FILESDIR}/${PN}-2.2.0-backport-pr377.patch" )

src_prepare() {
default
sed -e "/^dist_doc_DATA/s/COPYING //" -i Makefile.am || die
Expand Down

0 comments on commit 40713eb

Please sign in to comment.