dev-libs/rapidjson: A fast JSON parser/generator for C++ with both SAX/DOM style API
[gentoo.git] / dev-libs / rapidjson / rapidjson-1.1.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit cmake-utils
7
8 DESCRIPTION="A fast JSON parser/generator for C++ with both SAX/DOM style API"
9 HOMEPAGE="http://rapidjson.org/"
10
11 LICENSE="MIT"
12 IUSE="doc examples test"
13 SLOT="0"
14
15 if [[ ${PV} == *9999 ]] ; then
16         EGIT_REPO_URI="git://github.com/miloyip/rapidjson.git"
17         inherit git-r3
18 else
19         SRC_URI="https://github.com/miloyip/rapidjson/archive/v${PV}.tar.gz -> ${P}.tar.gz"
20         KEYWORDS="~amd64 ~x86"
21         S="${WORKDIR}/rapidjson-${PV}"
22 fi
23
24 DEPEND="
25         doc? ( app-doc/doxygen )
26         test? (
27                 dev-cpp/gtest
28                 dev-util/valgrind
29         )"
30 RDEPEND=""
31
32 src_configure() {
33         local mycmakeargs=(
34                 -DRAPIDJSON_BUILD_DOC=$(usex doc)
35                 -DRAPIDJSON_BUILD_EXAMPLES=$(usex examples)
36                 -DRAPIDJSON_BUILD_TESTS=$(usex test)
37                 -DRAPIDJSON_BUILD_THIRDPARTY_GTEST=OFF
38         )
39         cmake-utils_src_configure
40 }