summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2020-02-15 19:53:23 -0800
committerPatrick McLean <chutzpah@gentoo.org>2020-02-15 21:02:56 -0800
commit082f5e52cb9384e4e1ea2be73b5b5710cc9d99c0 (patch)
treeff67b76056fa391b67e095da5d9a3f113bd619b0 /dev-libs/libcbor/libcbor-0.5.0.ebuild
parentprofiles/profiles.desc: enable new ppc64le profiles as exp (diff)
downloadgentoo-082f5e52cb9384e4e1ea2be73b5b5710cc9d99c0.tar.gz
gentoo-082f5e52cb9384e4e1ea2be73b5b5710cc9d99c0.tar.bz2
gentoo-082f5e52cb9384e4e1ea2be73b5b5710cc9d99c0.zip
dev-libs/libcbor: New package
Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-libs/libcbor/libcbor-0.5.0.ebuild')
-rw-r--r--dev-libs/libcbor/libcbor-0.5.0.ebuild67
1 files changed, 67 insertions, 0 deletions
diff --git a/dev-libs/libcbor/libcbor-0.5.0.ebuild b/dev-libs/libcbor/libcbor-0.5.0.ebuild
new file mode 100644
index 000000000000..c8144619bb69
--- /dev/null
+++ b/dev-libs/libcbor/libcbor-0.5.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_6 )
+inherit python-any-r1 cmake-utils
+
+DESCRIPTION="CBOR protocol implementation for C and others"
+HOMEPAGE="https://github.com/pjk/libcbor"
+SRC_URI="https://github.com/PJK/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+custom-alloc doc test"
+
+BDEPEND="
+ doc? (
+ $(python_gen_any_dep '
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/breathe[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+RESTRICT="!test? ( test )"
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+
+python_check_deps() {
+ has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && \
+ has_version "dev-python/breathe[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+src_configure() {
+ local -a mycmakeargs=(
+ -DCMAKE_BUILD_TYPE=Release
+ -DCBOR_CUSTOM_ALLOC=$(usex custom-alloc 'ON' 'OFF')
+ -DWITH_TESTS=$(usex test 'ON' 'OFF')
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use doc; then
+ pushd doc >/dev/null || die
+ emake html man
+ popd >/dev/null || die
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use doc; then
+ dodoc -r doc/build/html
+ doman doc/build/man/*
+ fi
+}