gnu: libmp4v2: Fix build with C++11.

* gnu/packages/patches/libmp4v2-c++11.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/video.scm (libmp4v2)[source](patches): New field.
This commit is contained in:
Marius Bakke 2019-07-18 16:31:14 +02:00
parent 0de9a1be04
commit 995c30d0d6
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
3 changed files with 16 additions and 0 deletions

View file

@ -1023,6 +1023,7 @@ dist_patch_DATA = \
%D%/packages/patches/libmad-armv7-thumb-pt2.patch \ %D%/packages/patches/libmad-armv7-thumb-pt2.patch \
%D%/packages/patches/libmad-frame-length.patch \ %D%/packages/patches/libmad-frame-length.patch \
%D%/packages/patches/libmad-mips-newgcc.patch \ %D%/packages/patches/libmad-mips-newgcc.patch \
%D%/packages/patches/libmp4v2-c++11.patch \
%D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch \ %D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch \
%D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \ %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \
%D%/packages/patches/libreoffice-boost.patch \ %D%/packages/patches/libreoffice-boost.patch \

View file

@ -0,0 +1,14 @@
Avoid a type mismatch that shows up in C++11.
Taken from <https://bugs.debian.org/853560>.
--- a/src/rtphint.cpp 2012-05-20 16:11:53.000000000 -0600
+++ b/src/rtphint.cpp 2017-05-16 10:25:26.930705191 -0600
@@ -339,7 +339,7 @@
pSlash = strchr(pSlash, '/');
if (pSlash != NULL) {
pSlash++;
- if (pSlash != '\0') {
+ if (*pSlash != '\0') {
length = (uint32_t)strlen(pRtpMap) - (pSlash - pRtpMap);
*ppEncodingParams = (char *)MP4Calloc(length + 1);
strncpy(*ppEncodingParams, pSlash, length);

View file

@ -2746,6 +2746,7 @@ (define-public libmp4v2
"code-archive-downloads/v2/" "code-archive-downloads/v2/"
"code.google.com/mp4v2/mp4v2-" version ".tar.bz2")) "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
(file-name (string-append name "-" version ".tar.bz2")) (file-name (string-append name "-" version ".tar.bz2"))
(patches (search-patches "libmp4v2-c++11.patch"))
(sha256 (sha256
(base32 (base32
"0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683")))) "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))