commit: 7050083e912dd60a7e917807bbd8218e1018cfbb
Author: Sam James gentoo org>
AuthorDate: Sun Jun 19 23:10:50 2022 +
Commit: Sam James gentoo org>
CommitDate: Sun Jun 19 23:26:30 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7050083e
sys-apps/pciutils: update EAPI 7 -> 8; drop which
Signed-off-by: Sam James gentoo.org>
.../pciutils/files/pciutils-3.8.0-no-which.patch | 34 +
.../pciutils/files/pciutils-3.8.0-pkg-config.patch | 19 +++
sys-apps/pciutils/pciutils-3.8.0-r1.ebuild | 167 +
3 files changed, 220 insertions(+)
diff --git a/sys-apps/pciutils/files/pciutils-3.8.0-no-which.patch
b/sys-apps/pciutils/files/pciutils-3.8.0-no-which.patch
new file mode 100644
index ..3024d73555d3
--- /dev/null
+++ b/sys-apps/pciutils/files/pciutils-3.8.0-no-which.patch
@@ -0,0 +1,34 @@
+https://github.com/pciutils/pciutils/pull/105
+
+From 91bf24dd3c91f826377548b7e164b49cfed56f9a Mon Sep 17 00:00:00 2001
+From: Sam James
+Date: Sun, 19 Jun 2022 23:52:22 +0100
+Subject: [PATCH 1/2] lib/configure: drop usage of which
+
+'which' is not required by POSIX and is an external command which may not be
+available, and 'command -v' does the job just fine.
+
+Debian and Gentoo at least are both making efforts to drop which from
+their base system package list.
+
+Signed-off-by: Sam James
+--- a/lib/configure
b/lib/configure
+@@ -238,7 +238,7 @@ if [ "$sys" = linux ] ; then
+ PKG_CONFIG=pkg-config
+ fi
+ if [ "$LIBKMOD" != no ] ; then
+- if ! which $PKG_CONFIG >/dev/null ; then
++ if ! command -v $PKG_CONFIG >/dev/null ; then
+ echo_n "($PKG_CONFIG not found) "
+ elif $PKG_CONFIG libkmod ; then
+ LIBKMOD_DETECTED=1
+@@ -268,7 +268,7 @@ if [ "$sys" = linux ] ; then
+ if [ "$HWDB" = yes -o "$HWDB" = no ] ; then
+ echo "$HWDB (set manually)"
+ else
+- if `which pkg-config >/dev/null && pkg-config
--atleast-version=196 libudev` ; then
++ if `command -v pkg-config >/dev/null && pkg-config
--atleast-version=196 libudev` ; then
+ HWDB=yes
+ else
+ HWDB=no
diff --git a/sys-apps/pciutils/files/pciutils-3.8.0-pkg-config.patch
b/sys-apps/pciutils/files/pciutils-3.8.0-pkg-config.patch
new file mode 100644
index ..4630609bad24
--- /dev/null
+++ b/sys-apps/pciutils/files/pciutils-3.8.0-pkg-config.patch
@@ -0,0 +1,19 @@
+https://github.com/pciutils/pciutils/pull/105
+
+From a74832198ab36683a867c79b3d6ef2cac9baad55 Mon Sep 17 00:00:00 2001
+From: Sam James
+Date: Sun, 19 Jun 2022 23:53:42 +0100
+Subject: [PATCH 2/2] lib/configure: respect $PKG_CONFIG completely
+
+Signed-off-by: Sam James
+--- a/lib/configure
b/lib/configure
+@@ -268,7 +268,7 @@ if [ "$sys" = linux ] ; then
+ if [ "$HWDB" = yes -o "$HWDB" = no ] ; then
+ echo "$HWDB (set manually)"
+ else
+- if `command -v pkg-config >/dev/null && pkg-config
--atleast-version=196 libudev` ; then
++ if `command -v $PKG_CONFIG >/dev/null && $PKG_CONFIG
--atleast-version=196 libudev` ; then
+ HWDB=yes
+ else
+ HWDB=no
diff --git a/sys-apps/pciutils/pciutils-3.8.0-r1.ebuild
b/sys-apps/pciutils/pciutils-3.8.0-r1.ebuild
new file mode 100644
index ..59f4aa0192a4
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.8.0-r1.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs multilib-minimal flag-o-matic
+
+DESCRIPTION="Various utilities dealing with the PCI bus"
+HOMEPAGE="https://mj.ucw.cz/sw/pciutils/
https://git.kernel.org/?p=utils/pciutils/pciutils.git";
+SRC_URI="https://mj.ucw.cz/download/linux/pci/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="dns +kmod static-libs +udev zlib"
+REQUIRED_USE="static-libs? ( !udev )"
+
+# Have the sub-libs in RDEPEND with [static-libs] since, logically,
+# our libpci.a depends on libz.a/etc... at runtime.
+LIB_DEPEND="zlib? (
>=sys-libs/zlib-1.2.8-r1[static-libs(+),${MULTILIB_USEDEP}] )"
+DEPEND="kmod? ( sys-apps/kmod )
+ udev? ( >=virtual/libudev-208[${MULTILIB_USEDEP}] )
+ static-libs? ( ${LIB_DEPEND} )
+ !static-libs? ( ${LIB_DEPEND//static-libs([+-]),} )"
+RDEPEND="${DEPEND}
+ sys-apps/hwdata"
+# See bug #847133 re binutils check
+BDEPEND="|| ( >=sys-devel/binutils-2.37:* sys-devel/lld
sys-devel/native-cctools )
+ kmod? ( virtual/pkgconfig )"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/pci/config.h )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.8.0-no-which.patch
+ "${FILESDIR}"/${PN}-3.8.0-pkg-config.patch
+)
+
+sw