# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup cmake 1.1 PortGroup github 1.0 github.setup Tencent rapidjson ab1842a2dae061284c0a62dca1cc6d5e7e37e346 version 20240409 revision 0 name rapidjson-devel checksums rmd160 5dd5db1289c3cea2a4d52c0e383b8bd065ccb72e \ sha256 39f96f17b40f7201042c9b45d6444cb7eae1b7adfb7455412a86f6140450d32d \ size 1116409 github.tarball_from archive license MIT categories devel if {![variant_isset examples]} { platforms any supported_archs noarch } # original by {@Lord-Kamina gmail.com:g.litenstein} maintainers {@barracuda156 gmail.com:vital.had} openmaintainer conflicts rapidjson description A fast JSON parser/generator for C++ with both SAX/DOM style API. long_description RapidJSON is a fast, unicode-friendly, self-contained \ and header-only library without any dependencies for parsing JSON. homepage https://rapidjson.org patchfiles-append 0001-CMakeLists-fix-optflags-for-ppc.patch \ 0002-Wno-sign-conversion-Wno-sign-compare-with-GCC.patch compiler.cxx_standard 2011 configure.args-append -DRAPIDJSON_HAS_STDSTRING=ON \ -DRAPIDJSON_BUILD_DOC=OFF \ -DRAPIDJSON_BUILD_EXAMPLES=OFF \ -DRAPIDJSON_BUILD_TESTS=OFF variant docs description {Build documentation} { depends_build-append path:bin/doxygen:doxygen \ path:bin/dot:graphviz configure.args-delete -DRAPIDJSON_BUILD_DOC=OFF } variant examples description {Build examples} { configure.args-delete -DRAPIDJSON_BUILD_EXAMPLES=OFF } post-destroot { if {[variant_isset examples]} { xinstall -d -m 0755 ${destroot}${prefix}/share/examples move ${destroot}${prefix}/share/doc/RapidJSON/examples \ ${destroot}${prefix}/share/examples/RapidJSON # Otherwise destroot code fails: move ${cmake.build_dir}/bin/archivertest ${cmake.build_dir}/bin/archiver foreach example [glob -tails -directory ${cmake.build_dir}/bin *] { xinstall -m 0755 \ ${cmake.build_dir}/bin/${example} \ ${destroot}${prefix}/share/examples/RapidJSON/${example}/ } } else { delete ${destroot}${prefix}/share/doc/RapidJSON/examples } } variant tests description {Build and run unit tests} { # https://github.com/Tencent/rapidjson/issues/2118 compiler.cxx_standard 2014 patchfiles-append patch-fix-cxx-standard.diff depends_build-append port:gtest configure.args-append -DRAPIDJSON_BUILD_THIRDPARTY_GTEST=ON \ -DGTEST_SOURCE_DIR=${prefix}/src/googletest configure.args-replace -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_TESTS=ON test.run yes }