1 |
commit: 1b42c42ef2e65c53dca291a3ca0619690adb5d78 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 31 23:05:47 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=1b42c42e |
7 |
|
8 |
sys-apps/nvme-cli: Add 2.3, update libnvme json USE dep |
9 |
|
10 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
11 |
|
12 |
sys-apps/nvme-cli/Manifest | 1 + |
13 |
.../nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch | 25 ++++++++++++++++++++++ |
14 |
sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild | 4 ++-- |
15 |
.../{nvme-cli-2.2.1.ebuild => nvme-cli-2.3.ebuild} | 12 ++++++----- |
16 |
4 files changed, 35 insertions(+), 7 deletions(-) |
17 |
|
18 |
diff --git a/sys-apps/nvme-cli/Manifest b/sys-apps/nvme-cli/Manifest |
19 |
index edd4c759e100..f7b97d36e74c 100644 |
20 |
--- a/sys-apps/nvme-cli/Manifest |
21 |
+++ b/sys-apps/nvme-cli/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST nvme-cli-2.2.1.gh.tar.gz 706199 BLAKE2B e0026fc2ee3edeffa18b0fc8365703e3de6f69cdd665878e8589fefa334ddb78f3fdf2768bd5a141dc27b0a7403d0fd7472db763e7e41b55a3cac314105faac3 SHA512 8efa94d49a4d443cdb0310386733e88117f17719b05044f11e63e2a09143fce55918171b457a467371263ebb2e36552558aad249ae4dbd27941af79fe9722e26 |
24 |
+DIST nvme-cli-2.3.gh.tar.gz 733161 BLAKE2B b6da650379f24e0dc5c41af3d09fe15076ed70ad39cf48060fd949e3a4bbfe896eef4dd42e27314fab695710c9cb04985f3444e0384b71794cfbf489aa3e6244 SHA512 9ef654e782ba737d3858fb11f24caf27aea820480179d07d32599731be204e52693062cdb86786ab5cdd1d94fe32ae9028baa0a58693d2eaee5a2b71155e3db2 |
25 |
|
26 |
diff --git a/sys-apps/nvme-cli/files/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch b/sys-apps/nvme-cli/files/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch |
27 |
new file mode 100644 |
28 |
index 000000000000..e8bba22a92bb |
29 |
--- /dev/null |
30 |
+++ b/sys-apps/nvme-cli/files/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch |
31 |
@@ -0,0 +1,25 @@ |
32 |
+diff --git a/meson.build b/meson.build |
33 |
+index c05dc47f..4ae7c513 100644 |
34 |
+--- a/meson.build |
35 |
++++ b/meson.build |
36 |
+@@ -64,9 +64,9 @@ libz_dep = dependency('zlib', required: true, |
37 |
+ fallback : ['zlib', 'zlib_dep']) |
38 |
+ |
39 |
+ # Check for libhugetlbfs availability (optional) |
40 |
+-if cc.has_header('hugetlbfs.h') |
41 |
++if get_option('hugepages') and cc.has_header('hugetlbfs.h') |
42 |
+ libhugetlbfs_dep = cc.find_library('hugetlbfs', |
43 |
+- required : false) |
44 |
++ required : true) |
45 |
+ have_libhugetlbfs = libhugetlbfs_dep.found() |
46 |
+ else |
47 |
+ libhugetlbfs_dep = [] |
48 |
+diff --git a/meson_options.txt b/meson_options.txt |
49 |
+index 04843ea5..bb10b6c0 100644 |
50 |
+--- a/meson_options.txt |
51 |
++++ b/meson_options.txt |
52 |
+@@ -9,3 +9,4 @@ option('nvme-tests', type : 'boolean', value : false, description: 'Run tests ag |
53 |
+ option('docs', type : 'combo', choices : ['false', 'html', 'man', 'all'], description : 'install documentation') |
54 |
+ option('docs-build', type : 'boolean', value : false, description : 'build documentation') |
55 |
+ option('pdc-enabled', type: 'boolean', value : false, description : 'set default Persistent Discovery Controllers behavior') |
56 |
++option('hugepages', type: 'boolean', value : false, description : 'Enable support for hugetlbfs') |
57 |
|
58 |
diff --git a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild b/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild |
59 |
index e048b5dc9043..2c1223bc049e 100644 |
60 |
--- a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild |
61 |
+++ b/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild |
62 |
@@ -1,4 +1,4 @@ |
63 |
-# Copyright 1999-2022 Gentoo Authors |
64 |
+# Copyright 1999-2023 Gentoo Authors |
65 |
# Distributed under the terms of the GNU General Public License v2 |
66 |
|
67 |
EAPI=8 |
68 |
@@ -15,7 +15,7 @@ KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86" |
69 |
IUSE="hugepages +json" |
70 |
|
71 |
RDEPEND=" |
72 |
- >=sys-libs/libnvme-1.2:=[json=] |
73 |
+ >=sys-libs/libnvme-1.2:=[json(+)=] |
74 |
hugepages? ( sys-libs/libhugetlbfs:= ) |
75 |
json? ( dev-libs/json-c:= ) |
76 |
sys-libs/zlib:= |
77 |
|
78 |
diff --git a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild b/sys-apps/nvme-cli/nvme-cli-2.3.ebuild |
79 |
similarity index 77% |
80 |
copy from sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild |
81 |
copy to sys-apps/nvme-cli/nvme-cli-2.3.ebuild |
82 |
index e048b5dc9043..fd549dd99719 100644 |
83 |
--- a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild |
84 |
+++ b/sys-apps/nvme-cli/nvme-cli-2.3.ebuild |
85 |
@@ -1,4 +1,4 @@ |
86 |
-# Copyright 1999-2022 Gentoo Authors |
87 |
+# Copyright 1999-2023 Gentoo Authors |
88 |
# Distributed under the terms of the GNU General Public License v2 |
89 |
|
90 |
EAPI=8 |
91 |
@@ -11,13 +11,13 @@ SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.gh |
92 |
|
93 |
LICENSE="GPL-2 GPL-2+" |
94 |
SLOT="0" |
95 |
-KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86" |
96 |
-IUSE="hugepages +json" |
97 |
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" |
98 |
+IUSE="hugepages" |
99 |
|
100 |
RDEPEND=" |
101 |
- >=sys-libs/libnvme-1.2:=[json=] |
102 |
+ >=sys-libs/libnvme-1.3:= |
103 |
hugepages? ( sys-libs/libhugetlbfs:= ) |
104 |
- json? ( dev-libs/json-c:= ) |
105 |
+ dev-libs/json-c:= |
106 |
sys-libs/zlib:= |
107 |
" |
108 |
|
109 |
@@ -30,6 +30,7 @@ BDEPEND=" |
110 |
|
111 |
PATCHES=( |
112 |
"${FILESDIR}/nvme-cli-2.2-docdir.patch" |
113 |
+ "${FILESDIR}/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch" |
114 |
) |
115 |
|
116 |
src_configure() { |
117 |
@@ -39,6 +40,7 @@ src_configure() { |
118 |
-Dhtmldir="${EPREFIX}/usr/share/doc/${P}/html" |
119 |
-Dsystemddir="${unitdir%/system}" |
120 |
-Dudevrulesdir="${EPREFIX}$(get_udevdir)" |
121 |
+ $(meson_use hugepages) |
122 |
) |
123 |
meson_src_configure |
124 |
} |