Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libnvme/
Date: Tue, 31 Jan 2023 23:06:21
Message-Id: 1675206374.bf9f79c6aef2e5cf95173c3e55fdae27e0f8a3b1.chutzpah@gentoo
1 commit: bf9f79c6aef2e5cf95173c3e55fdae27e0f8a3b1
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 31 22:57:43 2023 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 31 23:06:14 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf9f79c6
7
8 sys-libs/libnvme: add 1.3
9
10 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
11
12 sys-libs/libnvme/Manifest | 1 +
13 sys-libs/libnvme/libnvme-1.3.ebuild | 71 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 72 insertions(+)
15
16 diff --git a/sys-libs/libnvme/Manifest b/sys-libs/libnvme/Manifest
17 index 52afe9a1c92e..accefee6a64f 100644
18 --- a/sys-libs/libnvme/Manifest
19 +++ b/sys-libs/libnvme/Manifest
20 @@ -1 +1,2 @@
21 DIST libnvme-1.2.tar.gz 484397 BLAKE2B ae6b1c3aa8f45594219470059cfc8982674433772f89faab1659811d860036f8af89bbcb383db37e96b763188935d2c1ecaa5176b8140bba50f8ea226e989a06 SHA512 f50517838cd1df3cdd123afdb67870633e9e484bf84dba70b784d7e86ecb355b96ba9d6a1cffb96b35444da7870dfe21c54b69701b5fe5b515319280db4a84e4
22 +DIST libnvme-1.3.tar.gz 499870 BLAKE2B 5a019c12829890a0fe0b5e6aec5fbd009fc3bd6dfe7e81f61731292f4ea8b03044e7625491479350c399cc8cd5bc023e02cc9e93f1eba38f4c747667e84cfb24 SHA512 c874b29b73e55be842f71e74a226a76fcd50dfa72e2be100f0437bc83e740cd146b6d2f2cdaa940c11c3d8c48ff2c065ac0e8a83d4d0dde743edf4179f328670
23
24 diff --git a/sys-libs/libnvme/libnvme-1.3.ebuild b/sys-libs/libnvme/libnvme-1.3.ebuild
25 new file mode 100644
26 index 000000000000..aaed25b8d4b8
27 --- /dev/null
28 +++ b/sys-libs/libnvme/libnvme-1.3.ebuild
29 @@ -0,0 +1,71 @@
30 +# Copyright 1999-2023 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +PYTHON_COMPAT=( python3_{9..11} )
36 +inherit python-r1 meson
37 +
38 +DESCRIPTION="C Library for NVM Express on Linux"
39 +HOMEPAGE="https://github.com/linux-nvme/libnvme"
40 +LICENSE="LGPL-2.1+"
41 +SLOT="0"
42 +IUSE="dbus python ssl +uuid"
43 +
44 +SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
45 +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
46 +
47 +DEPEND="
48 + dev-libs/json-c:=
49 + dbus? ( sys-apps/dbus:= )
50 + python? ( ${PYTHON_DEPS} )
51 + ssl? ( >=dev-libs/openssl-1.1:= )
52 + uuid? ( sys-apps/util-linux:= )
53 +"
54 +RDEPEND="${DEPEND}"
55 +
56 +BDEPEND="
57 + dev-lang/swig
58 +"
59 +
60 +REQUIRED_USE="
61 + python? ( ${PYTHON_REQUIRED_USE} )
62 +"
63 +
64 +src_configure() {
65 + local emesonargs=(
66 + -Dpython=false
67 + $(meson_feature ssl openssl)
68 + $(meson_feature dbus libdbus)
69 + $(meson_use python)
70 + )
71 + meson_src_configure
72 +}
73 +
74 +python_compile() {
75 + local emesonargs=(
76 + -Dpython=true
77 + )
78 + meson_src_configure --reconfigure
79 + meson_src_compile
80 +}
81 +
82 +src_compile() {
83 + meson_src_compile
84 +
85 + if use python; then
86 + python_copy_sources
87 + python_foreach_impl python_compile
88 + fi
89 +}
90 +
91 +python_install() {
92 + meson_src_install
93 + use python && python_optimize
94 +}
95 +
96 +src_install() {
97 + use python && python_foreach_impl python_install
98 +
99 + meson_src_install
100 +}