dev-python/agate: Bump to 1.13.0
[gentoo/gentoo.git] / dev-cpp / msgpack-cxx / msgpack-cxx-5.0.0.ebuild
blobcaf19cd7e8f6df03f73e5e1d150f0ad18f735603
1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit cmake
8 DESCRIPTION="MessagePack for C++"
9 HOMEPAGE="https://msgpack.org/ https://github.com/msgpack/msgpack-c/"
10 SRC_URI="https://github.com/msgpack/msgpack-c/releases/download/cpp-${PV}/${P}.tar.gz"
12 LICENSE="Boost-1.0"
13 SLOT="0"
14 KEYWORDS="amd64 ~arm arm64 ~riscv x86 ~amd64-linux ~x86-linux ~x64-macos"
15 IUSE="+boost doc examples test"
17 REQUIRED_USE="test? ( boost )"
19 RESTRICT="!test? ( test )"
21 RDEPEND="boost? ( dev-libs/boost[context] )
22         !<dev-libs/msgpack-5.0.0"
23 DEPEND="${RDEPEND}"
24 BDEPEND="doc? ( app-text/doxygen[dot] )
25         test? ( sys-libs/zlib )"
27 src_configure() {
28         local mycmakeargs=(
29                 -DMSGPACK_BUILD_EXAMPLES=OFF
30                 -DMSGPACK_CXX17=ON
31                 -DMSGPACK_BUILD_TESTS="$(usex test)"
32                 -DMSGPACK_USE_BOOST="$(usex boost)"
33                 -DMSGPACK_USE_X3_PARSE="$(usex boost)"
34         )
36         cmake_src_configure
39 src_compile() {
40         cmake_src_compile
42         if use doc; then
43                 cmake_build doxygen
44         fi
47 src_install() {
48         if use doc; then
49                 local HTML_DOCS=( "${BUILD_DIR}"/doc_cpp/html/. )
50         fi
52         if use examples; then
53                 docinto examples
54                 dodoc -r example/.
55                 docompress -x /usr/share/doc/${PF}/examples
56         fi
58         cmake_src_install