blob: f6d5a5278c27c2974b358edf9ce042a2d41a6ba1 (
plain)
1 # Description: A fast JSON parser/generator for C++ with both SAX/DOM style API
2 # URL: https://github.com/miloyip/rapidjson
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: cmake
5
6 name=rapidjson
7 version=1.1.0
8 release=2
9 source=(https://github.com/Tencent/rapidjson/archive/v$version/$name-$version.tar.gz)
10
11 build() {
12 prt-get isinst ninja && PKGMK_RAPIDJSON+=' -G Ninja'
13 prt-get isinst ccache && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
14 cmake -S $name-$version -B build $PKGMK_RAPIDJSON \
15 -D CMAKE_INSTALL_PREFIX=/usr \
16 -D CMAKE_BUILD_TYPE=Release \
17 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
18 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
19 -D RAPIDJSON_BUILD_DOC=OFF \
20 -D RAPIDJSON_BUILD_EXAMPLES=OFF \
21 -D RAPIDJSON_BUILD_TESTS=OFF \
22 -Wno-dev
23 cmake --build build
24 DESTDIR=$PKG cmake --install build
25 rm -r $PKG/usr/share/doc
26 }
|