1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
8 inherit cmake-utils python-any-r1
10 DESCRIPTION="C++ JSON reader and writer"
11 HOMEPAGE="https://github.com/open-source-parsers/jsoncpp"
12 SRC_URI="https://github.com/open-source-parsers/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14 LICENSE="|| ( public-domain MIT )"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86"
18 RESTRICT="!test? ( test )"
31 if use doc || use test; then
32 python-any-r1_pkg_setup
38 -DJSONCPP_WITH_TESTS=$(usex test)
39 -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
40 -DJSONCPP_WITH_CMAKE_PACKAGE=ON
42 -DBUILD_SHARED_LIBS=ON
44 # Follow Debian, Ubuntu, Arch convention for headers location
46 -DCMAKE_INSTALL_INCLUDEDIR=include/jsoncpp
48 # Disable implicit ccache use
51 cmake-utils_src_configure
55 cmake-utils_src_compile
58 cp "${BUILD_DIR}"/version . || die
59 "${EPYTHON}" doxybuild.py --doxygen="${EPREFIX}"/usr/bin/doxygen || die
60 HTML_DOCS=( dist/doxygen/jsoncpp*/. )
65 cmake-utils_src_make jsoncpp_check