sys-apps/nvme-cli: Sync with Gentoo

It's from Gentoo commit a8b199569789a7715cc5b008c12f85a578872467.
This commit is contained in:
Flatcar Buildbot 2024-02-19 07:16:31 +00:00 committed by Krzesimir Nowak
parent 370402c96b
commit 1b06876229
6 changed files with 6 additions and 91 deletions

View File

@ -1,3 +1,2 @@
DIST nvme-cli-2.6.gh.tar.gz 837964 BLAKE2B cd8b0442d58d94d6c402e252e98d81da209fbbd34d3d9eb8d570caedb7e56107d8cb4f9bd774b72eea688fc00678fc24c5f3f8cf46875e6dedadccca3c8e6f68 SHA512 da4daef2d7c554455e0c195c03f92188e0e946409a3bd8a5b421d9a106746e82fb1309901d2893639b1a3447bda094c80a9f49f59bf43cf2b00402f82beea3fc
DIST nvme-cli-2.7.1.gh.tar.gz 902081 BLAKE2B 7d14838f7f0fd6d1ab1cb30041f862fe2db6f40fe72c13cb4ce227831cac6e141ff5cec2924c846f30629188754b0ce0630ad9009d2a490c193da20e8b8a45d1 SHA512 6a9f3574dfd4375e6f7a76ed95f698efb26da5b72a490579caeba9d46c4811ae31650844e0a0e1047dc627158d5ffbdc020112a5059d3195e7eadff902b70b19
DIST nvme-cli-2.7.gh.tar.gz 902149 BLAKE2B 4e9d63f002480f60b76b4c7ca5dfefe0f5c8a1acf37eaeab91d4f0844aa43448b0a79cd906d33a09d6546c0ce5ed17f7a7a104d4f607e0a99c4ebd5b4125b0a3 SHA512 fcdd6598b004287b90b9fdea2948434f288113a9e41b36c2f44731ac51b7acbda9481bf60d0a183b4a8d79b06a1faaf71bd66f47e641d8eb229f1c05c281b2ae
DIST nvme-cli-2.8.gh.tar.gz 910994 BLAKE2B c231fc087219622736bdc400c83d2a320670f247f77b53f0cad20c8117e620703badba7cd9a6f267ba79223be9c0d6710c2be968683f77fe72e45957e0c8b899 SHA512 1be0bed4e1bf8a25229f301c2b00b78d2de4eaf8ff2b815fa75e44dd35ddd7787604152bdf00696130df3281206a734c5f408c3f2127440e05c2e4b1cdbb79d4

View File

@ -1,30 +0,0 @@
diff --git a/meson.build b/meson.build
index af79bd4d..90c4d6ad 100644
--- a/meson.build
+++ b/meson.build
@@ -69,9 +69,9 @@ endif
conf.set('CONFIG_JSONC', json_c_dep.found(), description: 'Is json-c available?')
# 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)
else
libhugetlbfs_dep = dependency('', required: false)
endif
diff --git a/meson_options.txt b/meson_options.txt
index c61dae0f..a05a7e0f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -70,3 +70,9 @@ option(
type : 'string',
description : 'override the git version string'
)
+option(
+ 'hugepages',
+ type: 'boolean',
+ value : false,
+ description : 'Enable support for hugetlbfs'
+)

View File

@ -10,6 +10,5 @@
</upstream>
<use>
<flag name="json">Support JSON output via <pkg>dev-libs/json-c</pkg></flag>
<flag name="hugepages">Use huge pages for memory allocations via <pkg>sys-libs/libhugetlbfs</pkg></flag>
</use>
</pkgmetadata>

View File

@ -1,54 +0,0 @@
# 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 ~sparc x86"
IUSE="hugepages +json"
RDEPEND="
>=sys-libs/libnvme-1.6:=[json?]
hugepages? ( sys-libs/libhugetlbfs:= )
json? ( dev-libs/json-c:= )
sys-libs/zlib:=
"
DEPEND="
${RDEPEND}
"
BDEPEND="
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}/nvme-cli-2.5-no-hugetlbfs-automatic-dep.patch"
)
src_configure() {
local emesonargs=(
-Dversion-tag="${PV}"
-Ddocs=all
-Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/html"
-Dsystemddir="$(systemd_get_systemunitdir)"
-Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
$(meson_use hugepages)
$(meson_feature json json-c)
)
meson_src_configure
}
pkg_postinst() {
udev_reload
}
pkg_postrm() {
udev_reload
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -11,7 +11,7 @@ SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.gh
LICENSE="GPL-2 GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86"
KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv ~sparc x86"
IUSE="+json"
RDEPEND="

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -15,12 +15,13 @@ KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86"
IUSE="+json"
RDEPEND="
>=sys-libs/libnvme-1.7:=[json?]
>=sys-libs/libnvme-1.8:=[json?]
json? ( dev-libs/json-c:= )
sys-libs/zlib:=
"
DEPEND="
${RDEPEND}
virtual/os-headers
"
BDEPEND="
virtual/pkgconfig