media-gfx/dawn: Fix building with GCC-7
authorPeter Levine <plevine457@gmail.com>
Sun, 1 Apr 2018 04:25:04 +0000 (00:25 -0400)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 4 Apr 2018 21:09:31 +0000 (23:09 +0200)
Bug: https://bugs.gentoo.org/638616
Closes: https://bugs.gentoo.org/638616
Package-Manager: Portage-2.3.16, Repoman-2.3.6

media-gfx/dawn/dawn-3.90b-r1.ebuild
media-gfx/dawn/dawn-3.90b.ebuild
media-gfx/dawn/files/dawn-3.90b-gcc7.patch [new file with mode: 0644]

index b7d6d5d11ea2cfcb09bfc6b813b73c4073d8ad7e..739ba96e10a9b50b8a51993d6aea80b687c3d4c3 100644 (file)
@@ -25,7 +25,10 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}/${MYP}"
 
-PATCHES=( "${FILESDIR}"/${P}-no-interactive.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-no-interactive.patch
+       "${FILESDIR}"/${P}-gcc7.patch
+)
 
 src_prepare() {
        default
index 9e9e200f5fd6fd4fc5413aefe3b14916c920c881..d3f9a78279fa4696f33d3ede616487866121a34a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=2
@@ -27,6 +27,7 @@ S="${WORKDIR}/${MYP}"
 
 src_prepare() {
        epatch "${FILESDIR}"/${P}-no-interactive.patch
+       epatch "${FILESDIR}"/${P}-gcc7.patch
        sed -i -e "s/\$(LIB_DIR)/\$(LDFLAGS) &/" \
                -e '/strip/d' Makefile*in || die
 }
diff --git a/media-gfx/dawn/files/dawn-3.90b-gcc7.patch b/media-gfx/dawn/files/dawn-3.90b-gcc7.patch
new file mode 100644 (file)
index 0000000..e144a38
--- /dev/null
@@ -0,0 +1,21 @@
+Bug: https://bugs.gentoo.org/638616
+
+--- a/FRString.h
++++ b/FRString.h
+@@ -137,13 +137,13 @@
+       char*  p = m_string ;
+       
+       // skip first blank if any
+-      while(  isspace(*p) && p != '\0' ) {p++;} 
++      while(  isspace(*p) && *p != '\0' ) {p++;}
+       // skip one word
+-      while( !isspace(*p) && p != '\0' ) {p++;} 
++      while( !isspace(*p) && *p != '\0' ) {p++;}
+       // skip second blank if any
+-      while(  isspace(*p) && p != '\0' ) {p++;} 
++      while(  isspace(*p) && *p != '\0' ) {p++;}
+       // reset string
+       strcpy( tmp, p  );