From 776321ad1c0cd03bac333a2a44cbf5d42e0ec38a Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Sun, 31 Dec 2017 17:14:14 +0000 Subject: [PATCH] devel/rapidjson: Fix clang warnings on 12 PR: 220388 Submitted by: dim Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D13599 --- devel/rapidjson/Makefile | 25 +++++++++++-------- devel/rapidjson/distinfo | 6 ++--- .../files/patch-include_rapidjson_schema.h | 10 ++++++++ 3 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 devel/rapidjson/files/patch-include_rapidjson_schema.h diff --git a/devel/rapidjson/Makefile b/devel/rapidjson/Makefile index d112a2a93fb8..30278776eb6d 100644 --- a/devel/rapidjson/Makefile +++ b/devel/rapidjson/Makefile @@ -2,12 +2,12 @@ # $FreeBSD$ PORTNAME= rapidjson -PORTVERSION= 1.1.0 DISTVERSIONPREFIX= v -PORTREVISION= 2 +PORTVERSION= 1.1.0 +PORTREVISION= 3 CATEGORIES= devel textproc -MAINTAINER= yuri@rawbw.com +MAINTAINER= yuri@FreeBSD.org COMMENT= Fast JSON parser/generator for C++ with both SAX/DOM style API LICENSE= unknown @@ -15,12 +15,13 @@ LICENSE_NAME= RapidJSON LICENSE_FILE= ${WRKSRC}/license.txt LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -BROKEN_armv7= does not build: include/rapidjson/internal/../allocators.h:128:36: error: zero as null pointer constant - USE_GITHUB= yes -GH_ACCOUNT= miloyip +GH_ACCOUNT= Tencent USES= cmake compiler:c++11-lang pathfix +NO_ARCH= yes + +CMAKE_OFF= RAPIDJSON_BUILD_TESTS OPTIONS_DEFINE= DOXYGEN EXAMPLES OPTIONS_DEFAULT=${OPTIONS_DEFINE} @@ -30,12 +31,16 @@ DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen DOXYGEN_CMAKE_BOOL= RAPIDJSON_BUILD_DOC EXAMPLES_CMAKE_BOOL= RAPIDJSON_BUILD_EXAMPLES -CXXFLAGS+= -Wno-c++98-compat # for EXAMPLES option, due to this bug: https://github.com/miloyip/rapidjson/issues/761 -CMAKE_ARGS= -DRAPIDJSON_BUILD_TESTS:BOOL=OFF - DATADIR= ${PREFIX}/share/doc/RapidJSON PORTDATA= * +.include + +CXXFLAGS+= -Wno-c++98-compat # for EXAMPLES option, due to this bug: https://github.com/miloyip/rapidjson/issues/761 +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 50 +CXXFLAGS+= -Wno-zero-as-null-pointer-constant +.endif + post-patch: @${REINPLACE_CMD} -e 's|DOC_INSTALL_DIR}/examples"|CMAKE_INSTALL_PREFIX}/share/examples/${PORTNAME}"| ; s| -march=native||' ${WRKSRC}/CMakeLists.txt @${REINPLACE_CMD} -e 's|-Werror||' ${WRKSRC}/example/CMakeLists.txt ${WRKSRC}/test/unittest/CMakeLists.txt @@ -45,4 +50,4 @@ post-patch: post-install: @${RM} -r ${STAGEDIR}${EXAMPLESDIR}/CMake* -.include +.include diff --git a/devel/rapidjson/distinfo b/devel/rapidjson/distinfo index da2037f4b222..271754099f97 100644 --- a/devel/rapidjson/distinfo +++ b/devel/rapidjson/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1472138938 -SHA256 (miloyip-rapidjson-v1.1.0_GH0.tar.gz) = bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e -SIZE (miloyip-rapidjson-v1.1.0_GH0.tar.gz) = 1019402 +TIMESTAMP = 1514740231 +SHA256 (Tencent-rapidjson-v1.1.0_GH0.tar.gz) = bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e +SIZE (Tencent-rapidjson-v1.1.0_GH0.tar.gz) = 1019402 diff --git a/devel/rapidjson/files/patch-include_rapidjson_schema.h b/devel/rapidjson/files/patch-include_rapidjson_schema.h new file mode 100644 index 000000000000..a07c8e9cd02e --- /dev/null +++ b/devel/rapidjson/files/patch-include_rapidjson_schema.h @@ -0,0 +1,10 @@ +--- include/rapidjson/schema.h.orig 2016-08-25 07:59:05 UTC ++++ include/rapidjson/schema.h +@@ -379,7 +379,6 @@ class Schema { (public) + exclusiveMinimum_(false), + exclusiveMaximum_(false) + { +- typedef typename SchemaDocumentType::ValueType ValueType; + typedef typename ValueType::ConstValueIterator ConstValueIterator; + typedef typename ValueType::ConstMemberIterator ConstMemberIterator; +