1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 if [[ ${PV} == 9999 ]]; then
9 EGIT_REPO_URI="https://github.com/${PN}/${PN}-c.git"
11 SRC_URI="https://github.com/${PN}/${PN}-c/releases/download/cpp-${PV}/${P}.tar.gz"
12 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
15 DESCRIPTION="MessagePack is a binary-based efficient data interchange format"
16 HOMEPAGE="https://msgpack.org/ https://github.com/msgpack/msgpack-c/"
20 IUSE="boost +cxx doc examples static-libs test"
21 RESTRICT="!test? ( test )"
23 RDEPEND="boost? ( dev-libs/boost[context,${MULTILIB_USEDEP}] )"
26 >=dev-cpp/gtest-1.6.0-r2[${MULTILIB_USEDEP}]
27 sys-libs/zlib[${MULTILIB_USEDEP}]
29 doc? ( app-doc/doxygen[dot] )
34 -DMSGPACK_BOOST="$(usex boost)"
35 -DMSGPACK_ENABLE_CXX="$(usex cxx)"
36 -DMSGPACK_ENABLE_STATIC="$(usex static-libs)"
37 -DMSGPACK_BUILD_TESTS="$(usex test)"
38 # don't build the examples
39 -DMSGPACK_BUILD_EXAMPLES=OFF
40 # enable C++11 by default
43 cmake-multilib_src_configure
46 multilib_src_compile() {
47 cmake-utils_src_compile
49 if multilib_is_native_abi && use doc; then
50 cmake-utils_src_make doxygen
54 multilib_src_install() {
55 if multilib_is_native_abi; then
57 local HTML_DOCS=( "${BUILD_DIR}"/docs/. )
60 mv doc_c/html docs/c || die
62 use cxx && mv doc_cpp/html docs/cpp || die
68 dodoc -r "${WORKDIR}/${P}/example/."
70 docompress -x /usr/share/doc/${PF}/examples
74 cmake-utils_src_install