summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/pciutils')
-rw-r--r--sys-apps/pciutils/Manifest6
-rw-r--r--sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch13
-rw-r--r--sys-apps/pciutils/metadata.xml23
-rw-r--r--sys-apps/pciutils/pciutils-3.10.0.ebuild173
-rw-r--r--sys-apps/pciutils/pciutils-3.12.0.ebuild173
-rw-r--r--sys-apps/pciutils/pciutils-3.13.0.ebuild173
-rw-r--r--sys-apps/pciutils/pciutils-3.5.6.ebuild120
-rw-r--r--sys-apps/pciutils/pciutils-3.6.1.ebuild120
-rw-r--r--sys-apps/pciutils/pciutils-3.6.2.ebuild120
9 files changed, 535 insertions, 386 deletions
diff --git a/sys-apps/pciutils/Manifest b/sys-apps/pciutils/Manifest
index 1194244e3fd5..8621ab558ac2 100644
--- a/sys-apps/pciutils/Manifest
+++ b/sys-apps/pciutils/Manifest
@@ -1,3 +1,3 @@
-DIST pciutils-3.5.6.tar.gz 442190 BLAKE2B 9f1237828436f0566caa13e49a154b40fcc41ddd165268011012e55a33ea401e3b78ddffecc6f0ec36efb24b6d9338a691167ac094d0d26f855e42cd055701bb SHA512 dcdca7e0bce69d1bee1fa5ea480a9f38534d66da576fdc710aefd8eeb0c18bf6ec5b39e63019d29d6bae0ec2d3881f5d07a4a105ca04c320d84c17821f7297e4
-DIST pciutils-3.6.1.tar.gz 455061 BLAKE2B a9dcce9a79aa66101a77d9299aa7c4f2ae3ab9d7ec597790de7396d65e9c700e4e866b5702412972abbf9ffc2996ebad52782a26d9206cc8d33d96566072fb90 SHA512 2a9c86d826932ac6242677bdd0c5288c264b964aa14314aa7eda5379e687822656081883a2a1c5f846037db9bdba616381f84104d0b3b62cd34acf653faf3990
-DIST pciutils-3.6.2.tar.gz 473699 BLAKE2B ae7563f2d17334f54e6b055d135138e21d105fa5f5b71061a6de638ecf26c35d9de79cb67a691f936f42fcedb9a1f300e046dd892429195a9f54f9536e313110 SHA512 ab2bab26dd11f941286593135b751b811fa6199d4b5fb8a18e74f72709ea598ab0c0efa31ad6ca70949966dcf80cdfb16d53e5d339b773c69e0a12f132bb8577
+DIST pciutils-3.10.0.tar.gz 931711 BLAKE2B 2e1255eb5508c9d1339f5bc772c2592a03cae4d8d097e8939748c9bb5d5d949be53d705d1b7d903f7ea88b2abeea91e39de16e39d2f46f0a1f62f8a9e32c6faa SHA512 3da1af4af8b0fa3cf4d3f06095524e25dc292182beec10aa2c16c5c6ba751fe469d0e7f54e43413b6f3f5bcdbd1fba3c66df1d8e39d2e1962ae36a2d9c06238e
+DIST pciutils-3.12.0.tar.gz 668358 BLAKE2B 6d57b0654a26e959d2a953a102fd616ba0a0a183ec6d40f65a1274ad33330df9c81b95d4b2274edc240cbcf576ce93a0b61252bae0b6348a29df659b3fc219eb SHA512 b1efd3e24efad4f80e1a942d23d6ea12acec9642714e47d24bff7f7c53ff475b0252c6f75c0053b7ec64635037e72b150b3e313229b36479dc0cbf96902096c5
+DIST pciutils-3.13.0.tar.gz 672999 BLAKE2B d779ca0fd8c96a54bf81f6234d6a38eae2882d39dd1a52a508246bc46b5f4ac9318bbca20266378ec3917e72fe6ec30c47b1b5e9df4e86d3f59cbe860e2ac70e SHA512 73f99b5c2251676368738e0dc9d82529f3516966f1658a96149768b9775a0e177d630512dc7ea33087a7fcb960a3498f0c4c1a9f7233ec1cf242b9ab087fa0d1
diff --git a/sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch b/sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch
deleted file mode 100644
index 9e63b7ecd661..000000000000
--- a/sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-make sure all lib entries get into libs.private in the .pc file
-
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -61,7 +61,7 @@ $(PCILIBPC): libpci.pc.in
- -e 's,@LIBDIR@,$(LIBDIR),' \
- -e 's,@IDSDIR@,$(IDSDIR),' \
- -e 's,@VERSION@,$(VERSION),' \
-- -e 's,@LDLIBS@,$(LDLIBS),'
-+ -e 's,@LDLIBS@,$(LDLIBS) $(LIB_LDLIBS),'
-
- init.o: init.c $(INCL)
- access.o: access.c $(INCL)
diff --git a/sys-apps/pciutils/metadata.xml b/sys-apps/pciutils/metadata.xml
index 739960f0acfd..708b18c7834c 100644
--- a/sys-apps/pciutils/metadata.xml
+++ b/sys-apps/pciutils/metadata.xml
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<use>
- <flag name="dns">Enable support for querying the central database of PCI IDs using DNS</flag>
- <flag name="kmod">Enable <pkg>sys-apps/kmod</pkg> support for the -k switch in lspci command</flag>
- <flag name="zlib">Support compressed pci.ids database</flag>
-</use>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <use>
+ <flag name="dns">Enable support for querying the central database of PCI IDs using DNS</flag>
+ <flag name="kmod">Enable <pkg>sys-apps/kmod</pkg> support for the -k switch in lspci command</flag>
+ <flag name="zlib">Support compressed pci.ids database</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">pciutils/pciutils</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-apps/pciutils/pciutils-3.10.0.ebuild b/sys-apps/pciutils/pciutils-3.10.0.ebuild
new file mode 100644
index 000000000000..41764a0c3806
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.10.0.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2023 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 )
+
+switch_config() {
+ [[ $# -ne 2 ]] && return 1
+ local opt=$1 val=$2
+
+ sed "s@^\(${opt}=\).*\$@\1${val}@" -i Makefile || die
+ return 0
+}
+
+check_binutils_version() {
+ if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! tc-ld-is-gold && ! tc-ld-is-lld ; then
+ # Okay, hopefully it's Binutils' bfd.
+ # bug #847133
+
+ # Convert this:
+ # ```
+ # GNU ld (Gentoo 2.38 p4) 2.38
+ # Copyright (C) 2022 Free Software Foundation, Inc.
+ # This program is free software; you may redistribute it under the terms of
+ # the GNU General Public License version 3 or (at your option) a later version.
+ # This program has absolutely no warranty.
+ # ```
+ #
+ # into...
+ # ```
+ # 2.38
+ # ```
+ local ver=$($(tc-getLD) --version 2>&1 | head -n 1 | rev | cut -d' ' -f1 | rev)
+
+ if ! [[ ${ver} =~ [0-9].[0-9][0-9] ]] ; then
+ # Skip if unrecognised format so we don't pass something
+ # odd into ver_cut.
+ return
+ fi
+
+ ver_major=$(ver_cut 1 "${ver}")
+ ver_minor=$(ver_cut 2 "${ver}")
+
+ # We use 2.37 here, not 2.35, as https://github.com/pciutils/pciutils/issues/98 mentions
+ # because we've had other miscompiles with older Binutils (not just build failures!)
+ # and we don't want people running any unsupported versions of Binutils. An example
+ # of this is where glibc is completely broken with old binutils: bug #802036. It's
+ # just not sustainable to support.
+ if [[ ${ver_major} -eq 2 && ${ver_minor} -lt 37 ]] ; then
+ eerror "Old version of binutils activated! ${P} cannot be built with an old version."
+ eerror "Please follow these steps:"
+ eerror "1. Select a newer binutils (>= 2.37) using binutils-config"
+ eerror " (If no such version is installed, run emerge -v1 sys-devel/binutils)"
+ eerror "2. Run: . /etc/profile"
+ eerror "3. Try emerging again with: emerge -v1 ${CATEGORY}/${P}"
+ eerror "4. Complete your world upgrade if you were performing one."
+ eerror "5. Perform a depclean (emerge -acv)"
+ eerror "\tYou MUST depclean after every world upgrade in future!"
+ die "Old binutils found! Change to a newer ld using binutils-config (bug #847133)."
+ fi
+ fi
+}
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && check_binutils_version
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && check_binutils_version
+}
+
+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 #640836, bug #852929
+ # Still broken in 3.10.0, see https://github.com/pciutils/pciutils/pull/144.
+ filter-lto
+
+ # 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
+}
diff --git a/sys-apps/pciutils/pciutils-3.12.0.ebuild b/sys-apps/pciutils/pciutils-3.12.0.ebuild
new file mode 100644
index 000000000000..612e1edd227f
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.12.0.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 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 )
+
+switch_config() {
+ [[ $# -ne 2 ]] && return 1
+ local opt=$1 val=$2
+
+ sed "s@^\(${opt}=\).*\$@\1${val}@" -i Makefile || die
+ return 0
+}
+
+check_binutils_version() {
+ if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! tc-ld-is-gold && ! tc-ld-is-lld ; then
+ # Okay, hopefully it's Binutils' bfd.
+ # bug #847133
+
+ # Convert this:
+ # ```
+ # GNU ld (Gentoo 2.38 p4) 2.38
+ # Copyright (C) 2022 Free Software Foundation, Inc.
+ # This program is free software; you may redistribute it under the terms of
+ # the GNU General Public License version 3 or (at your option) a later version.
+ # This program has absolutely no warranty.
+ # ```
+ #
+ # into...
+ # ```
+ # 2.38
+ # ```
+ local ver=$($(tc-getLD) --version 2>&1 | head -n 1 | rev | cut -d' ' -f1 | rev)
+
+ if ! [[ ${ver} =~ [0-9].[0-9][0-9] ]] ; then
+ # Skip if unrecognised format so we don't pass something
+ # odd into ver_cut.
+ return
+ fi
+
+ ver_major=$(ver_cut 1 "${ver}")
+ ver_minor=$(ver_cut 2 "${ver}")
+
+ # We use 2.37 here, not 2.35, as https://github.com/pciutils/pciutils/issues/98 mentions
+ # because we've had other miscompiles with older Binutils (not just build failures!)
+ # and we don't want people running any unsupported versions of Binutils. An example
+ # of this is where glibc is completely broken with old binutils: bug #802036. It's
+ # just not sustainable to support.
+ if [[ ${ver_major} -eq 2 && ${ver_minor} -lt 37 ]] ; then
+ eerror "Old version of binutils activated! ${P} cannot be built with an old version."
+ eerror "Please follow these steps:"
+ eerror "1. Select a newer binutils (>= 2.37) using binutils-config"
+ eerror " (If no such version is installed, run emerge -v1 sys-devel/binutils)"
+ eerror "2. Run: . /etc/profile"
+ eerror "3. Try emerging again with: emerge -v1 ${CATEGORY}/${P}"
+ eerror "4. Complete your world upgrade if you were performing one."
+ eerror "5. Perform a depclean (emerge -acv)"
+ eerror "\tYou MUST depclean after every world upgrade in future!"
+ die "Old binutils found! Change to a newer ld using binutils-config (bug #847133)."
+ fi
+ fi
+}
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && check_binutils_version
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && check_binutils_version
+}
+
+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 #640836, bug #852929
+ # Still broken in 3.10.0, see https://github.com/pciutils/pciutils/pull/144.
+ filter-lto
+
+ # 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
+}
diff --git a/sys-apps/pciutils/pciutils-3.13.0.ebuild b/sys-apps/pciutils/pciutils-3.13.0.ebuild
new file mode 100644
index 000000000000..dd3c7a05627e
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.13.0.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 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 )
+
+switch_config() {
+ [[ $# -ne 2 ]] && return 1
+ local opt=$1 val=$2
+
+ sed "s@^\(${opt}=\).*\$@\1${val}@" -i Makefile || die
+ return 0
+}
+
+check_binutils_version() {
+ if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! tc-ld-is-gold && ! tc-ld-is-lld ; then
+ # Okay, hopefully it's Binutils' bfd.
+ # bug #847133
+
+ # Convert this:
+ # ```
+ # GNU ld (Gentoo 2.38 p4) 2.38
+ # Copyright (C) 2022 Free Software Foundation, Inc.
+ # This program is free software; you may redistribute it under the terms of
+ # the GNU General Public License version 3 or (at your option) a later version.
+ # This program has absolutely no warranty.
+ # ```
+ #
+ # into...
+ # ```
+ # 2.38
+ # ```
+ local ver=$($(tc-getLD) --version 2>&1 | head -n 1 | rev | cut -d' ' -f1 | rev)
+
+ if ! [[ ${ver} =~ [0-9].[0-9][0-9] ]] ; then
+ # Skip if unrecognised format so we don't pass something
+ # odd into ver_cut.
+ return
+ fi
+
+ ver_major=$(ver_cut 1 "${ver}")
+ ver_minor=$(ver_cut 2 "${ver}")
+
+ # We use 2.37 here, not 2.35, as https://github.com/pciutils/pciutils/issues/98 mentions
+ # because we've had other miscompiles with older Binutils (not just build failures!)
+ # and we don't want people running any unsupported versions of Binutils. An example
+ # of this is where glibc is completely broken with old binutils: bug #802036. It's
+ # just not sustainable to support.
+ if [[ ${ver_major} -eq 2 && ${ver_minor} -lt 37 ]] ; then
+ eerror "Old version of binutils activated! ${P} cannot be built with an old version."
+ eerror "Please follow these steps:"
+ eerror "1. Select a newer binutils (>= 2.37) using binutils-config"
+ eerror " (If no such version is installed, run emerge -v1 sys-devel/binutils)"
+ eerror "2. Run: . /etc/profile"
+ eerror "3. Try emerging again with: emerge -v1 ${CATEGORY}/${P}"
+ eerror "4. Complete your world upgrade if you were performing one."
+ eerror "5. Perform a depclean (emerge -acv)"
+ eerror "\tYou MUST depclean after every world upgrade in future!"
+ die "Old binutils found! Change to a newer ld using binutils-config (bug #847133)."
+ fi
+ fi
+}
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && check_binutils_version
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && check_binutils_version
+}
+
+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 #640836, bug #852929
+ # Still broken in 3.10.0, see https://github.com/pciutils/pciutils/pull/144.
+ filter-lto
+
+ # 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
+}
diff --git a/sys-apps/pciutils/pciutils-3.5.6.ebuild b/sys-apps/pciutils/pciutils-3.5.6.ebuild
deleted file mode 100644
index e9b3c34b4292..000000000000
--- a/sys-apps/pciutils/pciutils-3.5.6.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib toolchain-funcs multilib-minimal flag-o-matic
-
-DESCRIPTION="Various utilities dealing with the PCI bus"
-HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ https://git.kernel.org/?p=utils/pciutils/pciutils.git"
-SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="dns +kmod static-libs +udev zlib"
-
-# 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}] )
- udev? ( >=virtual/libudev-208[static-libs(+),${MULTILIB_USEDEP}] )
-"
-DEPEND="
- kmod? ( sys-apps/kmod )
- static-libs? ( ${LIB_DEPEND} )
- !static-libs? ( ${LIB_DEPEND//static-libs(+),} )
-"
-RDEPEND="
- ${DEPEND}
- sys-apps/hwids
-"
-DEPEND="
- ${DEPEND}
- kmod? ( virtual/pkgconfig )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.1.9-static-pc.patch
-)
-
-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() {
- append-lfs-flags #471102
-}
-
-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)/misc' \
- 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/misc/pci.ids \
- "${ED}"/usr/share/man/man8/update-pciids.8*
-
- newinitd "${FILESDIR}"/init.d-pciparm pciparm
- newconfd "${FILESDIR}"/conf.d-pciparm pciparm
-}
-
-pkg_postinst() {
- if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2.0 ]]; then
- elog "The 'network-cron' USE flag is gone; if you want a more up-to-date"
- elog "pci.ids file, you should use sys-apps/hwids-99999999 (live ebuild)."
- fi
-}
diff --git a/sys-apps/pciutils/pciutils-3.6.1.ebuild b/sys-apps/pciutils/pciutils-3.6.1.ebuild
deleted file mode 100644
index 9797f04d23d9..000000000000
--- a/sys-apps/pciutils/pciutils-3.6.1.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib toolchain-funcs multilib-minimal flag-o-matic
-
-DESCRIPTION="Various utilities dealing with the PCI bus"
-HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ https://git.kernel.org/?p=utils/pciutils/pciutils.git"
-SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="dns +kmod static-libs +udev zlib"
-
-# 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}] )
- udev? ( >=virtual/libudev-208[static-libs(+),${MULTILIB_USEDEP}] )
-"
-DEPEND="
- kmod? ( sys-apps/kmod )
- static-libs? ( ${LIB_DEPEND} )
- !static-libs? ( ${LIB_DEPEND//static-libs(+),} )
-"
-RDEPEND="
- ${DEPEND}
- sys-apps/hwids
-"
-DEPEND="
- ${DEPEND}
- kmod? ( virtual/pkgconfig )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.1.9-static-pc.patch
-)
-
-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() {
- append-lfs-flags #471102
-}
-
-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)/misc' \
- 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/misc/pci.ids \
- "${ED}"/usr/share/man/man8/update-pciids.8*
-
- newinitd "${FILESDIR}"/init.d-pciparm pciparm
- newconfd "${FILESDIR}"/conf.d-pciparm pciparm
-}
-
-pkg_postinst() {
- if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2.0 ]]; then
- elog "The 'network-cron' USE flag is gone; if you want a more up-to-date"
- elog "pci.ids file, you should use sys-apps/hwids-99999999 (live ebuild)."
- fi
-}
diff --git a/sys-apps/pciutils/pciutils-3.6.2.ebuild b/sys-apps/pciutils/pciutils-3.6.2.ebuild
deleted file mode 100644
index 9797f04d23d9..000000000000
--- a/sys-apps/pciutils/pciutils-3.6.2.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib toolchain-funcs multilib-minimal flag-o-matic
-
-DESCRIPTION="Various utilities dealing with the PCI bus"
-HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ https://git.kernel.org/?p=utils/pciutils/pciutils.git"
-SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="dns +kmod static-libs +udev zlib"
-
-# 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}] )
- udev? ( >=virtual/libudev-208[static-libs(+),${MULTILIB_USEDEP}] )
-"
-DEPEND="
- kmod? ( sys-apps/kmod )
- static-libs? ( ${LIB_DEPEND} )
- !static-libs? ( ${LIB_DEPEND//static-libs(+),} )
-"
-RDEPEND="
- ${DEPEND}
- sys-apps/hwids
-"
-DEPEND="
- ${DEPEND}
- kmod? ( virtual/pkgconfig )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.1.9-static-pc.patch
-)
-
-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() {
- append-lfs-flags #471102
-}
-
-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)/misc' \
- 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/misc/pci.ids \
- "${ED}"/usr/share/man/man8/update-pciids.8*
-
- newinitd "${FILESDIR}"/init.d-pciparm pciparm
- newconfd "${FILESDIR}"/conf.d-pciparm pciparm
-}
-
-pkg_postinst() {
- if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2.0 ]]; then
- elog "The 'network-cron' USE flag is gone; if you want a more up-to-date"
- elog "pci.ids file, you should use sys-apps/hwids-99999999 (live ebuild)."
- fi
-}