libraries/libmp4v2: Use a safer patch.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Gary Langshaw 2021-08-20 07:06:03 +02:00 committed by Willy Sudiarto Raharjo
parent d9c895cb3b
commit 6c3436d69f
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 23 additions and 3 deletions

View file

@ -38,7 +38,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=libmp4v2
VERSION=${VERSION:-20191108_9084868}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -91,8 +91,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# thanks to Gentoo!
patch -p1 < $CWD/libmp4v2-2.0.0-unsigned-int-cast.patch
# Fix gcc 'narrowing errors":
patch -p1 < "$CWD/libmp4v2_gcc_narrowing.patch" || exit 1
autoreconf -vif

View file

@ -0,0 +1,20 @@
#
# libmp4v2_narrowing.patch
#
# Reduce LC_NONE by a power of 2 to prevent LongCode promotion to unsigned int
# causing "narrowing" errors in recent GCC. The value is still sufficiently high
# as not to clash with any character values.
#
diff -Nurp libmp4v2-20191108_9084868.orig/libutil/Utility.h libmp4v2-20191108_9084868/libutil/Utility.h
--- libmp4v2-20191108_9084868.orig/libutil/Utility.h 2019-11-08 02:03:40.000000000 +0000
+++ libmp4v2-20191108_9084868/libutil/Utility.h 2021-08-19 23:40:34.724030480 +0100
@@ -52,7 +52,7 @@ class MP4V2_EXPORT Utility
{
protected:
enum LongCode {
- LC_NONE = 0xf0000000, // safe (cannot conflict with char values)
+ LC_NONE = 0x0f000000, // safe (cannot conflict with char values)
LC_DEBUG,
LC_VERBOSE,
LC_HELP,