mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Fix build on GCC 5.
PR: 213992 Submitted by: Yuri Victorovich (maintainer)
This commit is contained in:
parent
f9c0009e28
commit
72ad7e15b7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=425819
@ -26,7 +26,12 @@ MAKE_ARGS= platform=linux-gcc
|
|||||||
# Certain new compiler features unlock parts of jsoncpp API (ex. see JSON_HAS_RVALUE_REFERENCES).
|
# Certain new compiler features unlock parts of jsoncpp API (ex. see JSON_HAS_RVALUE_REFERENCES).
|
||||||
# Use c++11 above to be the most inclusive.
|
# Use c++11 above to be the most inclusive.
|
||||||
USES+= compiler:c++11-lang
|
USES+= compiler:c++11-lang
|
||||||
|
# lang/gcc5 fix
|
||||||
|
.if ${COMPILER_TYPE} == clang
|
||||||
CXXFLAGS+= --std=c++11
|
CXXFLAGS+= --std=c++11
|
||||||
|
.else
|
||||||
|
CXXFLAGS+= --std=gnu++11 -D_GLIBCXX_USE_C99=1
|
||||||
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
do-install:
|
do-install:
|
||||||
|
14
devel/jsoncpp/files/patch-src_lib__json_json__reader.cpp
Normal file
14
devel/jsoncpp/files/patch-src_lib__json_json__reader.cpp
Normal file
@ -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 <cstdio>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if !defined(JSON_IS_AMALGAMATION)
|
||||||
|
#include <json/assertions.h>
|
||||||
|
#include <json/reader.h>
|
14
devel/jsoncpp/files/patch-src_lib__json_json__writer.cpp
Normal file
14
devel/jsoncpp/files/patch-src_lib__json_json__writer.cpp
Normal file
@ -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 <cstdio>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if !defined(JSON_IS_AMALGAMATION)
|
||||||
|
#include <json/writer.h>
|
||||||
|
#include "json_tool.h"
|
Loading…
Reference in New Issue
Block a user