Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Nov 2016 23:49:33 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r425819 - in head/devel/jsoncpp: . files
Message-ID:  <201611092349.uA9NnXce036991@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Wed Nov  9 23:49:32 2016
New Revision: 425819
URL: https://svnweb.freebsd.org/changeset/ports/425819

Log:
  Fix build on GCC 5.
  
  PR:		213992
  Submitted by:	Yuri Victorovich (maintainer)

Added:
  head/devel/jsoncpp/files/patch-src_lib__json_json__reader.cpp   (contents, props changed)
  head/devel/jsoncpp/files/patch-src_lib__json_json__writer.cpp   (contents, props changed)
Modified:
  head/devel/jsoncpp/Makefile

Modified: head/devel/jsoncpp/Makefile
==============================================================================
--- head/devel/jsoncpp/Makefile	Wed Nov  9 23:35:33 2016	(r425818)
+++ head/devel/jsoncpp/Makefile	Wed Nov  9 23:49:32 2016	(r425819)
@@ -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:

Added: head/devel/jsoncpp/files/patch-src_lib__json_json__reader.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/jsoncpp/files/patch-src_lib__json_json__reader.cpp	Wed Nov  9 23:49:32 2016	(r425819)
@@ -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>

Added: head/devel/jsoncpp/files/patch-src_lib__json_json__writer.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/jsoncpp/files/patch-src_lib__json_json__writer.cpp	Wed Nov  9 23:49:32 2016	(r425819)
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611092349.uA9NnXce036991>