1SUMMARY="A fast JSON parser/generator for C++ with both SAX/DOM style API" 2DESCRIPTION="RapidJSON is a JSON parser and generator for C++. It was \ 3inspired by RapidXml. 4 5RapidJSON is small but complete. It supports both SAX and DOM style API. The \ 6SAX parser is only a half thousand lines of code. 7 8RapidJSON is fast. Its performance can be comparable to strlen(). It also \ 9optionally supports SSE2/SSE4.2 for acceleration. 10 11RapidJSON is self-contained and header-only. It does not depend on external \ 12libraries such as BOOST. It even does not depend on STL. 13 14RapidJSON is memory-friendly. Each JSON value occupies exactly 16 bytes for \ 15most 32/64-bit machines (excluding text string). By default it uses a fast \ 16memory allocator, and the parser allocates memory compactly during parsing. 17 18RapidJSON is Unicode-friendly. It supports UTF-8, UTF-16, UTF-32 (LE & BE), \ 19and their detection, validation and transcoding internally. For example, you \ 20can read a UTF-8 file and let RapidJSON transcode the JSON strings into \ 21UTF-16 in the DOM. It also supports surrogates and \"\u0000\" \ 22(null character)." 23HOMEPAGE="https://github.com/Tencent/rapidjson" 24COPYRIGHT="2015 THL A29 Limited, a Tencent company, and Milo Yip" 25LICENSE="MIT" 26REVISION="3" 27SOURCE_URI="https://github.com/Tencent/rapidjson/archive/v$portVersion.tar.gz" 28CHECKSUM_SHA256="bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e" 29SOURCE_FILENAME="rapidjson-$portVersion.tar.gz" 30PATCHES="rapidjson-$portVersion.patchset" 31 32ARCHITECTURES="all" 33SECONDARY_ARCHITECTURES="x86" 34 35libVersion="$portVersion" 36libVersionCompat="$libVersion compat >= ${libVersion%%.*}" 37 38PROVIDES=" 39 rapidjson$secondaryArchSuffix = $portVersion 40 devel:librapidjson$secondaryArchSuffix = $libVersionCompat 41 " 42REQUIRES=" 43 haiku$secondaryArchSuffix 44 " 45 46BUILD_REQUIRES=" 47 haiku${secondaryArchSuffix}_devel 48 " 49BUILD_PREREQUIRES=" 50 cmd:cmake 51 cmd:gcc$secondaryArchSuffix 52 cmd:ld$secondaryArchSuffix 53 cmd:make 54 cmd:pkg_config$secondaryArchSuffix 55 " 56 57BUILD() 58{ 59 cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \ 60 -DBUILD_SHARED_LIBS=ON \ 61 -DRAPIDJSON_BUILD_DOC=ON \ 62 -DRAPIDJSON_BUILD_EXAMPLES=OFF \ 63 -DRAPIDJSON_BUILD_TESTS=ON \ 64 -DRAPIDJSON_BUILD_THIRDPARTY_GTEST=OFF \ 65 -DINCLUDE_INSTALL_DIR=$includeDir \ 66 -DLIB_INSTALL_DIR=$libDir \ 67 -DDOC_INSTALL_DIR=$docDir \ 68 $cmakeDirArgs 69 make -C build $jobArgs 70} 71 72INSTALL() 73{ 74 make -C build install 75 76 fixPkgconfig 77} 78 79TEST() 80{ 81 cd haiku_build 82 make test 83} 84