diff options
Diffstat (limited to 'dev-libs/libcbor')
-rw-r--r-- | dev-libs/libcbor/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/libcbor/libcbor-0.5.0.ebuild | 68 | ||||
-rw-r--r-- | dev-libs/libcbor/metadata.xml | 11 |
3 files changed, 82 insertions, 0 deletions
diff --git a/dev-libs/libcbor/Manifest b/dev-libs/libcbor/Manifest new file mode 100644 index 000000000000..b608ef8e5474 --- /dev/null +++ b/dev-libs/libcbor/Manifest @@ -0,0 +1,3 @@ +DIST libcbor-0.5.0.tar.gz 719348 BLAKE2B 57e15e648159e7858d9d57a8b4cb7f3682f8153248610c9a3385cf9cbdea8babaf81d596b25d44bf6d59c75de23e76cce462fa7860b294019f46636726206d5a SHA512 5c2e9610d9fbb0bfc59f89a180f70b58539a1760fd39cad696af372c164a87828a23bb4d3a54d8e9d846be5271204800f0ad63656ef830f06a0ccdd10edfdb2c +EBUILD libcbor-0.5.0.ebuild 1298 BLAKE2B 2e3317055c6cddfa1e91db7f49e7c6c6be920ed460f6420104e0299ca0caa3b6ca0bb9374ac626ad894199a49d68d478248325384f40fe7f57bc7b07b47cb18a SHA512 e96c601c707f9806d8e041781330fe08bef4207b3842d6a31480fc7330273661a6a47c5154b659cd0bdfa073b4c4752de54a902fc21a515f65e8b43a2c9d88a0 +MISC metadata.xml 353 BLAKE2B ac88c66fa58046797dba48cfe47fc42a3aaf8d8a256fab563def54d126c7ad903bc2d47095ca7221b84f0fd59bcbb6677ffaef9062c9c662ef95b02bf3563b99 SHA512 56f76a4b80d8cf12f854022c2c7353119b11052bf6d454b5d2f6427a02ab64176d2d7ecfadecabafceac6b7aa5ec066145a62831d33f09a829b37cdb8bec64cf 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..139a3f3a0436 --- /dev/null +++ b/dev-libs/libcbor/libcbor-0.5.0.ebuild @@ -0,0 +1,68 @@ +# 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 ~ppc64 ~x86" +IUSE="+custom-alloc doc test" + +BDEPEND=" + doc? ( + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/breathe[${PYTHON_USEDEP}] + ') + ) + test? ( dev-util/cmocka ) +" + +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 +} diff --git a/dev-libs/libcbor/metadata.xml b/dev-libs/libcbor/metadata.xml new file mode 100644 index 000000000000..db974170e19e --- /dev/null +++ b/dev-libs/libcbor/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="custom-alloc">Custom, dynamically defined allocator support</flag> + </use> +</pkgmetadata> |