commit: 654f878f7878f61b2ab5fc8cfc4996c273e81e4e Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Wed May 21 20:10:19 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed May 21 20:10:19 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=654f878f
dev-libs/libcbor: add 0.12.0 Closes: https://bugs.gentoo.org/951992 Closes: https://bugs.gentoo.org/952306 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-libs/libcbor/Manifest | 1 + .../libcbor/files/libcbor-0.12.0-cmake-4.patch | 19 ++++++ dev-libs/libcbor/libcbor-0.12.0.ebuild | 72 ++++++++++++++++++++++ 3 files changed, 92 insertions(+) diff --git a/dev-libs/libcbor/Manifest b/dev-libs/libcbor/Manifest index 26af9025d4cd..78a72a3b3026 100644 --- a/dev-libs/libcbor/Manifest +++ b/dev-libs/libcbor/Manifest @@ -1 +1,2 @@ DIST libcbor-0.11.0.tar.gz 293563 BLAKE2B 6ac400ee9cabb0ec68355c35f762ea61222152059e70bcf9dc3cf4e06a6599bb6a392197ee979821a0e50c22a5c9e94e5d11458178ed7e26b049c410fddfa24f SHA512 c14aaa55c0c82e09b9eb2cc6847951d1bac8a081a247776c507d5450367da5717b1056bad09fb0f0178311de8754e8f89c060e0fc0f400fafdc42de441421e66 +DIST libcbor-0.12.0.tar.gz 294856 BLAKE2B 7a215aceaae2bb333463f6c7d125ced7b60f07d7bb859c24356fd181f06bfe1a6732bcfb73007a05d38880969ed158ba29f9eae44f716f8a7c7965668b10cd21 SHA512 07fcf4e758742e6d430eaab0b333e8f836587c6eeb3f15eea094f8e7881804998382335737df6e2a5d0f570eb9cb46bae6c6d1058aeca8fa29b973a98ae6b69b diff --git a/dev-libs/libcbor/files/libcbor-0.12.0-cmake-4.patch b/dev-libs/libcbor/files/libcbor-0.12.0-cmake-4.patch new file mode 100644 index 000000000000..1f171cebc1e4 --- /dev/null +++ b/dev-libs/libcbor/files/libcbor-0.12.0-cmake-4.patch @@ -0,0 +1,19 @@ +https://bugs.gentoo.org/951992 +https://github.com/PJK/libcbor/issues/351 +https://github.com/PJK/libcbor/commit/1183292d4695300785b272532c1e02d68840e4b8 + +From 1183292d4695300785b272532c1e02d68840e4b8 Mon Sep 17 00:00:00 2001 +From: PJK <[email protected]> +Date: Fri, 4 Apr 2025 23:19:13 +0200 +Subject: [PATCH] Set cmake_minimum_required to 3.5 + +Fixed https://github.com/PJK/libcbor/issues/351 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.0) ++cmake_minimum_required(VERSION 3.5) + + project(libcbor) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} + diff --git a/dev-libs/libcbor/libcbor-0.12.0.ebuild b/dev-libs/libcbor/libcbor-0.12.0.ebuild new file mode 100644 index 000000000000..f54459a33d89 --- /dev/null +++ b/dev-libs/libcbor/libcbor-0.12.0.ebuild @@ -0,0 +1,72 @@ +# Copyright 2020-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..13} ) +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 )" + +PATCHES=( + "${FILESDIR}"/${P}-cmake-4.patch +) + +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 + -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 +}
