diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2023-01-31 15:05:47 -0800 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2023-01-31 15:06:14 -0800 |
commit | 1b42c42ef2e65c53dca291a3ca0619690adb5d78 (patch) | |
tree | 5cf1d68a989ca9cadcb93051ef4baa309b0034ec /sys-apps/nvme-cli | |
parent | sys-libs/libnvme: add 1.3 (diff) | |
download | gentoo-1b42c42ef2e65c53dca291a3ca0619690adb5d78.tar.gz gentoo-1b42c42ef2e65c53dca291a3ca0619690adb5d78.tar.bz2 gentoo-1b42c42ef2e65c53dca291a3ca0619690adb5d78.zip |
sys-apps/nvme-cli: Add 2.3, update libnvme json USE dep
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'sys-apps/nvme-cli')
-rw-r--r-- | sys-apps/nvme-cli/Manifest | 1 | ||||
-rw-r--r-- | sys-apps/nvme-cli/files/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch | 25 | ||||
-rw-r--r-- | sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild | 4 | ||||
-rw-r--r-- | sys-apps/nvme-cli/nvme-cli-2.3.ebuild | 50 |
4 files changed, 78 insertions, 2 deletions
diff --git a/sys-apps/nvme-cli/Manifest b/sys-apps/nvme-cli/Manifest index edd4c759e100..f7b97d36e74c 100644 --- a/sys-apps/nvme-cli/Manifest +++ b/sys-apps/nvme-cli/Manifest @@ -1 +1,2 @@ DIST nvme-cli-2.2.1.gh.tar.gz 706199 BLAKE2B e0026fc2ee3edeffa18b0fc8365703e3de6f69cdd665878e8589fefa334ddb78f3fdf2768bd5a141dc27b0a7403d0fd7472db763e7e41b55a3cac314105faac3 SHA512 8efa94d49a4d443cdb0310386733e88117f17719b05044f11e63e2a09143fce55918171b457a467371263ebb2e36552558aad249ae4dbd27941af79fe9722e26 +DIST nvme-cli-2.3.gh.tar.gz 733161 BLAKE2B b6da650379f24e0dc5c41af3d09fe15076ed70ad39cf48060fd949e3a4bbfe896eef4dd42e27314fab695710c9cb04985f3444e0384b71794cfbf489aa3e6244 SHA512 9ef654e782ba737d3858fb11f24caf27aea820480179d07d32599731be204e52693062cdb86786ab5cdd1d94fe32ae9028baa0a58693d2eaee5a2b71155e3db2 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 new file mode 100644 index 000000000000..e8bba22a92bb --- /dev/null +++ b/sys-apps/nvme-cli/files/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch @@ -0,0 +1,25 @@ +diff --git a/meson.build b/meson.build +index c05dc47f..4ae7c513 100644 +--- a/meson.build ++++ b/meson.build +@@ -64,9 +64,9 @@ libz_dep = dependency('zlib', required: true, + fallback : ['zlib', 'zlib_dep']) + + # Check for libhugetlbfs availability (optional) +-if cc.has_header('hugetlbfs.h') ++if get_option('hugepages') and cc.has_header('hugetlbfs.h') + libhugetlbfs_dep = cc.find_library('hugetlbfs', +- required : false) ++ required : true) + have_libhugetlbfs = libhugetlbfs_dep.found() + else + libhugetlbfs_dep = [] +diff --git a/meson_options.txt b/meson_options.txt +index 04843ea5..bb10b6c0 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -9,3 +9,4 @@ option('nvme-tests', type : 'boolean', value : false, description: 'Run tests ag + option('docs', type : 'combo', choices : ['false', 'html', 'man', 'all'], description : 'install documentation') + option('docs-build', type : 'boolean', value : false, description : 'build documentation') + option('pdc-enabled', type: 'boolean', value : false, description : 'set default Persistent Discovery Controllers behavior') ++option('hugepages', type: 'boolean', value : false, description : 'Enable support for hugetlbfs') diff --git a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild b/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild index e048b5dc9043..2c1223bc049e 100644 --- a/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild +++ b/sys-apps/nvme-cli/nvme-cli-2.2.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -15,7 +15,7 @@ KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86" IUSE="hugepages +json" RDEPEND=" - >=sys-libs/libnvme-1.2:=[json=] + >=sys-libs/libnvme-1.2:=[json(+)=] hugepages? ( sys-libs/libhugetlbfs:= ) json? ( dev-libs/json-c:= ) sys-libs/zlib:= diff --git a/sys-apps/nvme-cli/nvme-cli-2.3.ebuild b/sys-apps/nvme-cli/nvme-cli-2.3.ebuild new file mode 100644 index 000000000000..fd549dd99719 --- /dev/null +++ b/sys-apps/nvme-cli/nvme-cli-2.3.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson systemd udev + +DESCRIPTION="NVM-Express user space tooling for Linux" +HOMEPAGE="https://github.com/linux-nvme/nvme-cli" +SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="GPL-2 GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="hugepages" + +RDEPEND=" + >=sys-libs/libnvme-1.3:= + hugepages? ( sys-libs/libhugetlbfs:= ) + dev-libs/json-c:= + sys-libs/zlib:= +" + +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/nvme-cli-2.2-docdir.patch" + "${FILESDIR}/nvme-cli-2.3-no-hugetlbfs-automatic-dep.patch" +) + +src_configure() { + local unitdir="$(systemd_get_systemunitdir)" + local emesonargs=( + -Ddocs=all + -Dhtmldir="${EPREFIX}/usr/share/doc/${P}/html" + -Dsystemddir="${unitdir%/system}" + -Dudevrulesdir="${EPREFIX}$(get_udevdir)" + $(meson_use hugepages) + ) + meson_src_configure +} + +src_install() { + meson_src_install +} |