commit:     1c40510e9ddf44af2509db862822a43bc283c7a4
Author:     Alexander Tsoy <alexander <AT> tsoy <DOT> me>
AuthorDate: Thu May 11 22:22:50 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 14 22:01:52 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c40510e

media-video/dvgrab: fix building with GCC-6, #594548

Closes: https://github.com/gentoo/gentoo/pull/4608

 media-video/dvgrab/dvgrab-3.5-r1.ebuild        |  4 ++++
 media-video/dvgrab/files/dvgrab-3.5-gcc6.patch | 25 +++++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/media-video/dvgrab/dvgrab-3.5-r1.ebuild 
b/media-video/dvgrab/dvgrab-3.5-r1.ebuild
index 2cce1d54c15..004dae6a164 100644
--- a/media-video/dvgrab/dvgrab-3.5-r1.ebuild
+++ b/media-video/dvgrab/dvgrab-3.5-r1.ebuild
@@ -21,6 +21,10 @@ RDEPEND=">=sys-libs/libraw1394-1.1
 DEPEND="${RDEPEND}
        virtual/pkgconfig"
 
+PATCHES=(
+       "${FILESDIR}/${PN}-3.5-gcc6.patch"
+)
+
 src_configure() {
        econf \
                $(use_with quicktime libquicktime) \

diff --git a/media-video/dvgrab/files/dvgrab-3.5-gcc6.patch 
b/media-video/dvgrab/files/dvgrab-3.5-gcc6.patch
new file mode 100644
index 00000000000..9b82c5eac23
--- /dev/null
+++ b/media-video/dvgrab/files/dvgrab-3.5-gcc6.patch
@@ -0,0 +1,25 @@
+commit 8dd729f2cf4cc5b99ad2e3961419cf71d2dfb843
+Author: Aaro Koskinen <aaro.koski...@iki.fi>
+Date:   Sun May 15 22:44:23 2016 +0300
+
+    iec13818-1.h: fix build with GCC 6.1.0
+    
+    Fix the following build issue with GCC 6.1.0:
+    
+    iec13818-1.h:45:75: error: narrowing conversion of '255' from 'int' to 
'char' inside { } [-Wnarrowing]
+     static char bitmask[8] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff 
};
+                                                                               
^
+
+diff --git a/iec13818-1.h b/iec13818-1.h
+index 56a4aa0..e964288 100644
+--- a/iec13818-1.h
++++ b/iec13818-1.h
+@@ -42,7 +42,7 @@
+ #define BCD(c) ( ((((c) >> 4) & 0x0f) * 10) + ((c) & 0x0f) )
+ 
+ #define TOBYTES( n ) ( ( n + 7 ) / 8 )
+-static char bitmask[8] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
++static unsigned char bitmask[8] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 
0xff };
+ #define GETBITS( offset, len ) do { \
+       unsigned long value = 0; \
+       while ( len > 0 ) \

Reply via email to