From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1387566-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 7279C15808D
	for <garchives@archives.gentoo.org>; Tue, 19 Apr 2022 21:47:16 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B70E9E08E5;
	Tue, 19 Apr 2022 21:47:15 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 1DBB7E08E5
	for <gentoo-commits@lists.gentoo.org>; Tue, 19 Apr 2022 21:47:14 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 0A643341381
	for <gentoo-commits@lists.gentoo.org>; Tue, 19 Apr 2022 21:47:13 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6984B342
	for <gentoo-commits@lists.gentoo.org>; Tue, 19 Apr 2022 21:47:11 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1650404825.e5bd42e7f830c19b6bdb4f9b37703bad0d8781cd.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/pciutils/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-apps/pciutils/Manifest sys-apps/pciutils/pciutils-3.8.0.ebuild
X-VCS-Directories: sys-apps/pciutils/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: e5bd42e7f830c19b6bdb4f9b37703bad0d8781cd
X-VCS-Branch: master
Date: Tue, 19 Apr 2022 21:47:11 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 8cc5c191-05fe-4f6e-b3be-1da616d6bac3
X-Archives-Hash: e11328ce96c632a988b4030e00ceb9a8

commit:     e5bd42e7f830c19b6bdb4f9b37703bad0d8781cd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 21:45:19 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 21:47:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5bd42e7

sys-apps/pciutils: add 3.8.0

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/pciutils/Manifest              |   1 +
 sys-apps/pciutils/pciutils-3.8.0.ebuild | 104 ++++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+)

diff --git a/sys-apps/pciutils/Manifest b/sys-apps/pciutils/Manifest
index af496acdd65b..d50cebb4e33e 100644
--- a/sys-apps/pciutils/Manifest
+++ b/sys-apps/pciutils/Manifest
@@ -1 +1,2 @@
 DIST pciutils-3.7.0.tar.gz 516418 BLAKE2B fca6720cff73ec20559c666c76fdcd3b59cdf0e33e2c3894a82590d77c5d51cf22e667fe65d9f66a248a624c2b9c868f6e9b69f45f4b6d704b637afe55041e6a SHA512 8a8fb9dc44a8dd31f80e45a48f6693452c11d343b9dfed87dd5cea6846f38d001f294e4010cd7c0545e238fde45b0e9a8e88c67a43d80676a585336e3665a631
+DIST pciutils-3.8.0.tar.gz 575255 BLAKE2B 7339189f7115af31ccc19663d54e12ef966fbcd75c6b6b4c28c8ddcaafa3e233313ca14300ef70100edb00f5f2e1e767af9d6527a9d836edd07b598f0a40f4f4 SHA512 4b0de02a54c6ed19d5ea85a01d89a62386000bc0f816498872479aba26fb007a8c394cba3f95e77a7ffe52d36ad2726169b7b83bda5ab0647f00e49d8a34bf15

diff --git a/sys-apps/pciutils/pciutils-3.8.0.ebuild b/sys-apps/pciutils/pciutils-3.8.0.ebuild
new file mode 100644
index 000000000000..cf307c37323f
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.8.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib 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 ~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"
+BDEPEND="kmod? ( virtual/pkgconfig )"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/pci/config.h )
+
+switch_config() {
+	[[ $# -ne 2 ]] && return 1
+	local opt=$1 val=$2
+
+	sed "s@^\(${opt}=\).*\$@\1${val}@" -i Makefile || die
+	return 0
+}
+
+src_prepare() {
+	default
+
+	if use static-libs ; then
+		cp -pPR "${S}" "${S}.static" || die
+		mv "${S}.static" "${S}/static" || die
+	fi
+
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	# bug #471102
+	append-lfs-flags
+}
+
+pemake() {
+	emake \
+		HOST="${CHOST}" \
+		CROSS_COMPILE="${CHOST}-" \
+		CC="$(tc-getCC)" \
+		AR="$(tc-getAR)" \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		RANLIB="$(tc-getRANLIB)" \
+		DNS=$(usex dns) \
+		IDSDIR='$(SHAREDIR)/hwdata' \
+		MANDIR='$(SHAREDIR)/man' \
+		PREFIX="${EPREFIX}/usr" \
+		SHARED="yes" \
+		STRIP="" \
+		ZLIB=$(usex zlib) \
+		PCI_COMPRESSED_IDS=0 \
+		PCI_IDS=pci.ids \
+		LIBDIR="\${PREFIX}/$(get_libdir)" \
+		LIBKMOD=$(multilib_native_usex kmod) \
+		HWDB=$(usex udev) \
+		"$@"
+}
+
+multilib_src_compile() {
+	pemake OPT="${CFLAGS}" all
+
+	if use static-libs ; then
+		pemake \
+			-C "${BUILD_DIR}"/static \
+			OPT="${CFLAGS}" \
+			SHARED="no" \
+			lib/libpci.a
+	fi
+}
+
+multilib_src_install() {
+	pemake DESTDIR="${D}" install install-lib
+
+	use static-libs && dolib.a "${BUILD_DIR}"/static/lib/libpci.a
+}
+
+multilib_src_install_all() {
+	dodoc ChangeLog README TODO
+
+	rm "${ED}"/usr/sbin/update-pciids "${ED}"/usr/share/man/man8/update-pciids.8* || die
+	rm -r "${ED}"/usr/share/hwdata || die
+
+	newinitd "${FILESDIR}"/init.d-pciparm pciparm
+	newconfd "${FILESDIR}"/conf.d-pciparm pciparm
+}