Created attachment 437192 [details, diff] ccdep.pl patch. ccdep.pl needs to call g++ with -std=c++98 during the configure stage. We can't fix this simply by building with "-std=c++98" appended to CXXFLAGS because the CXXFLAGS used by ccdep.pl are hardcoded.
Patch from comment 0 works for me too.
Just FYI, adding -std=c++98 to ccdep.pl still allows the library to be built under the C++14 standard, because ccdep.pl is just used in the configure stage.
Created attachment 447006 [details, diff] sam2p-0.49.2-Wno-literal-suffix.patch GCC-6 emits invalid suffix warnings while parsing the code in some printf/scanf functions. The 'ccdep.pl' script turns them into errors. As an alternate patch, you could just add "-Wno-literal-suffix" to one line in 'ccdep.pl'.
commit 1e4d9bfb79505198acd14497f4da8841ef7b314e Author: Jonathan Scruggs <j.scruggs@gmail.com> Date: Fri Oct 28 16:53:26 2016 +0100 media-gfx/sam2p: version bump to 0.49.3 Gentoo-bug: 585630, 598362 - Switch to EAPI 6 - Simplify ebuild - Update to new HOMEPAGE Signed off by: Jonathan Scruggs (j.scrugs@gmail.com) Closes: https://github.com/gentoo/gentoo/pull/2688 Signed-off-by: David Seifert <soap@gentoo.org>