Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libyang/, net-libs/libyang/files/
Date: Wed, 26 May 2021 12:37:26
Message-Id: 1622032490.ccbb230dd4d49d067656b9ad33ee1dbd41131e66.sam@gentoo
1 commit: ccbb230dd4d49d067656b9ad33ee1dbd41131e66
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Thu May 20 10:26:29 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed May 26 12:34:50 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccbb230d
7
8 net-libs/libyang: Bump to 2.0.0
9
10 * Complete rewrite of the library with lots of major
11 changes, so will be masked until revdeps are ported
12 to new version
13
14 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 net-libs/libyang/Manifest | 1 +
18 net-libs/libyang/files/libyang-2.0.0-cmake.patch | 12 +++++++
19 net-libs/libyang/libyang-2.0.0.ebuild | 46 ++++++++++++++++++++++++
20 3 files changed, 59 insertions(+)
21
22 diff --git a/net-libs/libyang/Manifest b/net-libs/libyang/Manifest
23 index 17971ae007c..9bbc2ce5cfe 100644
24 --- a/net-libs/libyang/Manifest
25 +++ b/net-libs/libyang/Manifest
26 @@ -1,2 +1,3 @@
27 DIST libyang-1.0.215.tar.gz 1666478 BLAKE2B 66fc53458caf43e8473905ce9294efb9a49f0c73206a4c5ef96f7b79e72fff9429aa4245fdb29a7d2b4a23460d771d30a9397ca4d2ce76379675dc4a9f6427fd SHA512 042e7be3a658340eebb5aaf819169a516af5489c366c026b599d673b623811b01a5cc7b2fce0fe39c5deb5cce5b1e0e6dfc4eb85a331fb3203d415011e6d2dad
28 DIST libyang-1.0.225.tar.gz 1667054 BLAKE2B eb1bfd555d72aceba7da7ade1a55985caad9d3cc904c5504978c298ef9e08a6848c810d1b62b1fa7076a9f30638b6080a3546c07892d3e8980eb1db337dc4deb SHA512 3366df8c2869454b6da456010ca62b538876cba16fa84e1ed9053acca6d7756c15329c0fb8a62477a1887d6c00cce8449f29954b2d2b0e556d81baa11dc9776d
29 +DIST libyang-2.0.0.tar.gz 1016366 BLAKE2B 5a69083937d5b6102e48bbb742d1ba5562a78d434d0646758160f70c5fe3b42fb651c3e4421758a41f21bde6f00ba112f5b2cd49561e36afb5160641edf2ff0f SHA512 6226ae2b51eae07d866097248c1583006acc2f3b8f120ab7302a9bd2854ece6a067eff54553102ebafd759e1f2984076e2e6553fa01fc830d69496504353be5d
30
31 diff --git a/net-libs/libyang/files/libyang-2.0.0-cmake.patch b/net-libs/libyang/files/libyang-2.0.0-cmake.patch
32 new file mode 100644
33 index 00000000000..09b83b3639f
34 --- /dev/null
35 +++ b/net-libs/libyang/files/libyang-2.0.0-cmake.patch
36 @@ -0,0 +1,12 @@
37 +# https://github.com/CESNET/libyang/pull/1581
38 +--- a/CMakeLists.txt
39 ++++ b/CMakeLists.txt
40 +@@ -35,8 +35,6 @@ elseif ("${BUILD_TYPE_UPPER}" STREQUAL "ABICHECK")
41 + set(CMAKE_BUILD_TYPE "ABICheck" CACHE STRING "Build Type" FORCE)
42 + elseif ("${BUILD_TYPE_UPPER}" STREQUAL "DOCONLY")
43 + set(CMAKE_BUILD_TYPE "DocOnly" CACHE STRING "Build Type" FORCE)
44 +-else ()
45 +- message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\".")
46 + endif ()
47 +
48 + # check the supported platform
49
50 diff --git a/net-libs/libyang/libyang-2.0.0.ebuild b/net-libs/libyang/libyang-2.0.0.ebuild
51 new file mode 100644
52 index 00000000000..d832209254e
53 --- /dev/null
54 +++ b/net-libs/libyang/libyang-2.0.0.ebuild
55 @@ -0,0 +1,46 @@
56 +# Copyright 2021 Gentoo Authors
57 +# Distributed under the terms of the GNU General Public License v2
58 +
59 +EAPI=7
60 +
61 +CMAKE_ECLASS=cmake
62 +inherit cmake-multilib
63 +
64 +DESCRIPTION="YANG data modeling language library"
65 +HOMEPAGE="https://github.com/CESNET/libyang"
66 +SRC_URI="https://github.com/CESNET/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
67 +
68 +LICENSE="BSD"
69 +SLOT="0"
70 +KEYWORDS="~amd64 ~arm64 ~x86"
71 +IUSE="doc test"
72 +RESTRICT="!test? ( test )"
73 +
74 +RDEPEND="dev-libs/libpcre2[${MULTILIB_USEDEP}]"
75 +DEPEND="
76 + ${RDEPEND}
77 + test? ( dev-util/cmocka )
78 +"
79 +BDEPEND="
80 + virtual/pkgconfig
81 + doc? ( app-doc/doxygen[dot] )
82 +"
83 +
84 +PATCHES=( "${FILESDIR}"/${P}-cmake.patch )
85 +
86 +multilib_src_configure() {
87 + local mycmakeargs=(
88 + -DENABLE_BUILD_TESTS=$(usex test)
89 + )
90 + cmake_src_configure
91 +}
92 +
93 +multilib_src_compile() {
94 + cmake_src_compile
95 +
96 + multilib_is_native_abi && use doc && cmake_src_compile doc
97 +}
98 +
99 +multilib_src_install_all() {
100 + use doc && dodoc -r doc/.
101 +}