Changeset View
Changeset View
Standalone View
Standalone View
head/devel/rapidjson/Makefile
# Created by: Yuri Victorovich <yuri@rawbw.com> | # Created by: Yuri Victorovich <yuri@rawbw.com> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= rapidjson | PORTNAME= rapidjson | ||||
PORTVERSION= 1.1.0 | |||||
DISTVERSIONPREFIX= v | DISTVERSIONPREFIX= v | ||||
PORTREVISION= 2 | PORTVERSION= 1.1.0 | ||||
PORTREVISION= 3 | |||||
CATEGORIES= devel textproc | CATEGORIES= devel textproc | ||||
MAINTAINER= yuri@rawbw.com | MAINTAINER= yuri@FreeBSD.org | ||||
COMMENT= Fast JSON parser/generator for C++ with both SAX/DOM style API | COMMENT= Fast JSON parser/generator for C++ with both SAX/DOM style API | ||||
LICENSE= unknown | LICENSE= unknown | ||||
LICENSE_NAME= RapidJSON | LICENSE_NAME= RapidJSON | ||||
LICENSE_FILE= ${WRKSRC}/license.txt | LICENSE_FILE= ${WRKSRC}/license.txt | ||||
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept | 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 | USE_GITHUB= yes | ||||
GH_ACCOUNT= miloyip | GH_ACCOUNT= Tencent | ||||
USES= cmake compiler:c++11-lang pathfix | USES= cmake compiler:c++11-lang pathfix | ||||
NO_ARCH= yes | |||||
CMAKE_OFF= RAPIDJSON_BUILD_TESTS | |||||
OPTIONS_DEFINE= DOXYGEN EXAMPLES | OPTIONS_DEFINE= DOXYGEN EXAMPLES | ||||
OPTIONS_DEFAULT=${OPTIONS_DEFINE} | OPTIONS_DEFAULT=${OPTIONS_DEFINE} | ||||
OPTIONS_SUB= yes | OPTIONS_SUB= yes | ||||
DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen | DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen | ||||
DOXYGEN_CMAKE_BOOL= RAPIDJSON_BUILD_DOC | DOXYGEN_CMAKE_BOOL= RAPIDJSON_BUILD_DOC | ||||
EXAMPLES_CMAKE_BOOL= RAPIDJSON_BUILD_EXAMPLES | 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 | DATADIR= ${PREFIX}/share/doc/RapidJSON | ||||
PORTDATA= * | PORTDATA= * | ||||
.include <bsd.port.pre.mk> | |||||
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: | 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|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 | @${REINPLACE_CMD} -e 's|-Werror||' ${WRKSRC}/example/CMakeLists.txt ${WRKSRC}/test/unittest/CMakeLists.txt | ||||
@${REINPLACE_CMD} -e 's|.*travis.*||' ${WRKSRC}/CMakeLists.txt # travis_doc breaks cmake, see https://github.com/miloyip/rapidjson/issues/715 | @${REINPLACE_CMD} -e 's|.*travis.*||' ${WRKSRC}/CMakeLists.txt # travis_doc breaks cmake, see https://github.com/miloyip/rapidjson/issues/715 | ||||
@${REINPLACE_CMD} -e 's|add_subdirectory.*googletest.*|link_directories(${LOCALBASE}/lib)|' ${WRKSRC}/test/CMakeLists.txt | @${REINPLACE_CMD} -e 's|add_subdirectory.*googletest.*|link_directories(${LOCALBASE}/lib)|' ${WRKSRC}/test/CMakeLists.txt | ||||
post-install: | post-install: | ||||
@${RM} -r ${STAGEDIR}${EXAMPLESDIR}/CMake* | @${RM} -r ${STAGEDIR}${EXAMPLESDIR}/CMake* | ||||
.include <bsd.port.mk> | .include <bsd.port.post.mk> |