diff --git a/devel/jsoncpp/Makefile b/devel/jsoncpp/Makefile index e4f2861f2950..dc207f4ccfc9 100644 --- a/devel/jsoncpp/Makefile +++ b/devel/jsoncpp/Makefile @@ -26,7 +26,12 @@ MAKE_ARGS= platform=linux-gcc # Certain new compiler features unlock parts of jsoncpp API (ex. see JSON_HAS_RVALUE_REFERENCES). # Use c++11 above to be the most inclusive. USES+= compiler:c++11-lang +# lang/gcc5 fix +.if ${COMPILER_TYPE} == clang CXXFLAGS+= --std=c++11 +.else +CXXFLAGS+= --std=gnu++11 -D_GLIBCXX_USE_C99=1 +.endif .endif do-install: diff --git a/devel/jsoncpp/files/patch-src_lib__json_json__reader.cpp b/devel/jsoncpp/files/patch-src_lib__json_json__reader.cpp new file mode 100644 index 000000000000..48bc9f45a5ae --- /dev/null +++ b/devel/jsoncpp/files/patch-src_lib__json_json__reader.cpp @@ -0,0 +1,14 @@ +--- src/lib_json/json_reader.cpp.orig 2016-10-30 21:28:16 UTC ++++ src/lib_json/json_reader.cpp +@@ -3,6 +3,11 @@ + // recognized in your jurisdiction. + // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + ++// fix for lang/gcc5+ ++#if __GNUC__ == 5 ++#include ++#endif ++ + #if !defined(JSON_IS_AMALGAMATION) + #include + #include diff --git a/devel/jsoncpp/files/patch-src_lib__json_json__writer.cpp b/devel/jsoncpp/files/patch-src_lib__json_json__writer.cpp new file mode 100644 index 000000000000..5fe8d0ca6d50 --- /dev/null +++ b/devel/jsoncpp/files/patch-src_lib__json_json__writer.cpp @@ -0,0 +1,14 @@ +--- src/lib_json/json_writer.cpp.orig 2016-10-30 21:27:18 UTC ++++ src/lib_json/json_writer.cpp +@@ -3,6 +3,11 @@ + // recognized in your jurisdiction. + // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + ++// fix for lang/gcc5+ ++#if __GNUC__ == 5 ++#include ++#endif ++ + #if !defined(JSON_IS_AMALGAMATION) + #include + #include "json_tool.h"