commit: 036bdd4dd45e83c7d5c5da9448a6937fb08d2ded Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Oct 5 02:31:52 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Oct 5 02:31:52 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=036bdd4d
dev-libs/libcbor: add 0.13.0 Set -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF until the eclass does it for us. Bug: https://bugs.gentoo.org/927157 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-libs/libcbor/Manifest | 1 + dev-libs/libcbor/libcbor-0.13.0.ebuild | 70 ++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/dev-libs/libcbor/Manifest b/dev-libs/libcbor/Manifest index 78a72a3b3026..5f246e476cdd 100644 --- a/dev-libs/libcbor/Manifest +++ b/dev-libs/libcbor/Manifest @@ -1,2 +1,3 @@ DIST libcbor-0.11.0.tar.gz 293563 BLAKE2B 6ac400ee9cabb0ec68355c35f762ea61222152059e70bcf9dc3cf4e06a6599bb6a392197ee979821a0e50c22a5c9e94e5d11458178ed7e26b049c410fddfa24f SHA512 c14aaa55c0c82e09b9eb2cc6847951d1bac8a081a247776c507d5450367da5717b1056bad09fb0f0178311de8754e8f89c060e0fc0f400fafdc42de441421e66 DIST libcbor-0.12.0.tar.gz 294856 BLAKE2B 7a215aceaae2bb333463f6c7d125ced7b60f07d7bb859c24356fd181f06bfe1a6732bcfb73007a05d38880969ed158ba29f9eae44f716f8a7c7965668b10cd21 SHA512 07fcf4e758742e6d430eaab0b333e8f836587c6eeb3f15eea094f8e7881804998382335737df6e2a5d0f570eb9cb46bae6c6d1058aeca8fa29b973a98ae6b69b +DIST libcbor-0.13.0.tar.gz 299917 BLAKE2B 80ca4bd1b8ad13689b1e556f72ced63358cd920f258723ebe37fc94a61d2abbf8b0f42cc5e4770b283acb9a542b9e7f37de92a032301c24e09ee448a18b3d634 SHA512 4b41f3c55de0169a60cbd353694c741c3db32d6a173feb1cb14022a7daf8511fc32befbaff7133903ea005df3db02e8ebd67881dff2cfdb89a5e51203b03fe4f diff --git a/dev-libs/libcbor/libcbor-0.13.0.ebuild b/dev-libs/libcbor/libcbor-0.13.0.ebuild new file mode 100644 index 000000000000..e1fbde7b1b5a --- /dev/null +++ b/dev-libs/libcbor/libcbor-0.13.0.ebuild @@ -0,0 +1,70 @@ +# Copyright 2020-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..14} ) +inherit python-any-r1 cmake + +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/$(ver_cut 1-2)" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="doc test" + +BDEPEND=" + doc? ( + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}] + dev-python/breathe[${PYTHON_USEDEP}] + ') + ) + test? ( dev-util/cmocka ) +" + +RESTRICT="!test? ( test )" + +python_check_deps() { + python_has_version \ + "dev-python/sphinx[${PYTHON_USEDEP}]" \ + "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" \ + "dev-python/breathe[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use doc && python-any-r1_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_BUILD_TYPE=Release + # Set this to avoid automagic until bug #927157 is done + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF + -DWITH_TESTS=$(usex test) + -Wno-dev + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + if use doc; then + mkdir -p doc/build || die + emake -C doc -j1 html man + fi +} + +src_install() { + cmake_src_install + + if use doc; then + dodoc -r "${S}"/doc/build/html + doman "${S}"/doc/build/man/*.? + fi +}
