commit:     8c6cbd5792afee41a77f740ec53459de27bd6650
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 19 16:15:50 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Mon Jun 19 16:16:06 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c6cbd57

media-libs/libmp4v2: Fix build with gcc7, patch by Collin Day in bug #600892

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 media-libs/libmp4v2/files/gcc7.patch      | 13 +++++++++++++
 media-libs/libmp4v2/libmp4v2-2.0.0.ebuild |  5 +++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/media-libs/libmp4v2/files/gcc7.patch 
b/media-libs/libmp4v2/files/gcc7.patch
new file mode 100644
index 00000000000..fbfae97e58c
--- /dev/null
+++ b/media-libs/libmp4v2/files/gcc7.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/show_bug.cgi?id=600892
+
+--- mp4v2-2.0.0/src/rtphint.cpp        2012-05-20 16:11:53.000000000 -0600
++++ /tmp/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);

diff --git a/media-libs/libmp4v2/libmp4v2-2.0.0.ebuild 
b/media-libs/libmp4v2/libmp4v2-2.0.0.ebuild
index de5efb03d9e..b45b0b997ee 100644
--- a/media-libs/libmp4v2/libmp4v2-2.0.0.ebuild
+++ b/media-libs/libmp4v2/libmp4v2-2.0.0.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=4
-inherit libtool
+inherit libtool eutils
 
 MY_P=${P/lib}
 
@@ -25,6 +25,7 @@ DOCS="doc/*.txt README"
 S=${WORKDIR}/${MY_P}
 
 src_prepare() {
+       epatch "${FILESDIR}/gcc7.patch"
        elibtoolize
 }
 

Reply via email to