summaryrefslogtreecommitdiff
path: root/sys-apps/pciutils
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/pciutils')
-rw-r--r--sys-apps/pciutils/Manifest12
-rw-r--r--sys-apps/pciutils/files/conf.d-pciparm28
-rw-r--r--sys-apps/pciutils/files/init.d-pciparm79
-rw-r--r--sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch13
-rw-r--r--sys-apps/pciutils/metadata.xml13
-rw-r--r--sys-apps/pciutils/pciutils-3.4.1.ebuild112
-rw-r--r--sys-apps/pciutils/pciutils-3.5.4.ebuild112
-rw-r--r--sys-apps/pciutils/pciutils-3.5.5.ebuild120
8 files changed, 489 insertions, 0 deletions
diff --git a/sys-apps/pciutils/Manifest b/sys-apps/pciutils/Manifest
new file mode 100644
index 000000000000..bb265d4c1436
--- /dev/null
+++ b/sys-apps/pciutils/Manifest
@@ -0,0 +1,12 @@
+AUX conf.d-pciparm 988 SHA256 ffdec7d6c510a502d212129d31a9b37c3b9c75393a48a8b1ee6010b7d4aa1887 SHA512 7c3513a9112318736907f4a1f3e94910d59752d8f51cf4f9f8ccd33b563250aca17a507e0937507bd9352d12a2b9a47e7419306908990b21a3460e6527dab6a4 WHIRLPOOL b5954d8897687a0c6d267c9f60feadb692ce637bf294f5b2f8b7eca479cf454ac541a4bfe904d43ff59e5a77a808c1cecd63aa1011817ba61152d7a4664c86ad
+AUX init.d-pciparm 1758 SHA256 783cbb24591fdab3b1f95f1fe8ea2d1b0e4fa1fbf0b55e57ec9d95fb849e3b5d SHA512 c5a527236039edf29f6876d3b07909045dd04e40d863d68014dd96cc021b7b61356470e67541b5b68487d996a299b60b3da46272259f9d0724ea1392e6243646 WHIRLPOOL 020f4e29cd7cca640f7d92241229f86b0ac63fdf3902c95bec3a54dff36b4431c3b4d7a954c22b82ad2956ee0896090bee448ab24599714a463ddd783b0305e5
+AUX pciutils-3.1.9-static-pc.patch 373 SHA256 81f8c664cf844adfe2238f6dc584100340de8781d361cb185035d5928aee82fe SHA512 e20286ae41569236b549d13c703266f920f335609c1ad2e5d67fd1561f9e9c68d4ac1fd530f93a4451ec79a5496ed226b83db0c74935499f44cd47e94eb74f49 WHIRLPOOL 9d5bf04b08a76bb786524e8fdc4de412154340f17dcccf48ebcb7504a6b5feb8a719337489a20dd8d94d77bdeb93e75009f66840a18ec63805d8fe36dc7e1981
+DIST pciutils-3.4.1.tar.gz 404166 SHA256 0196624282c33a9bcd4bd097d4100271c82af47797ecd7488ef2711fa5f043b2 SHA512 1394647d5e9d324d68bd8bdf4709a438ae06e6a83ded40b9e0026968c032f214073bc764fbf59e15da90b2e424d90dc430db5810d7ff5fbeab0f3e5c6250ee49 WHIRLPOOL 4391c84695dc1f0844129ff5d6056ac1332d855824e1b96ec105073b97d453db21e82d2a071f1bf7d977e26cf51421183b5a37d5a962bccbed9c2667c813cc4c
+DIST pciutils-3.5.4.tar.gz 423997 SHA256 1a650f10170423371d481c580071c27420b16a40eda995f3e906b8a9ade530c5 SHA512 cd3ed843b8b2a31f92234be6a59bb02cd5268afad7e353872f588df281984af5129b4a9e363332bcf173dd71fda2091e501237fbd4fc39575cfe0472456d4a34 WHIRLPOOL 4a99d7c95cebc42a369bd51db1f7682dd0c49ecf8023558781fb62dc57431a4993f41e01f2d128c99bb312e5d1d2fa97f653ae5dd6ee10f112aa5bded676ddfe
+DIST pciutils-3.5.5.tar.gz 437331 SHA256 58ad27f25c510598bdc5337160c8b573d6e9b328b3c5235636e89a1cc04d6a48 SHA512 b2c89e1d742c5a23cad662ed6bb1d47d7587b0d823fcbf3abc6d613735961473f7d29c83a4ccb49b64ec4f674026f17e88693eb34b42cb6c128abd1407c778ba WHIRLPOOL cfa15b7622d11495b1e83f543b1677ff42c2b54fb8acda6d99a4eb3a76387874da36147d04cadd0a801917e1499de87bd5e25cd80377b4695c68c2086ee2a6a1
+EBUILD pciutils-3.4.1.ebuild 2985 SHA256 183576a92c8dc2165f8ef3ab00bd907ae9e4d9bb58c49b119187a812af6c795f SHA512 55a6c8d02aac32c5115dd563ff1962dfc79fc09681cb062872cbd9c0dab0873eb3183efd51ed8bbd075a21815f9fa779fdbd5ec8c6556acbbf1dff44bf26af48 WHIRLPOOL 412fa4c43f62841826530c8ffd04b87cdd0b84c4ee27bfcb23864ad2bf2a61ceb160929a827a59d40f74f1e842e059ed88922c6c4a8d91256ad38ab4f4de0f2c
+EBUILD pciutils-3.5.4.ebuild 2912 SHA256 9465521eea7bbf44f5eff2e24c155d06f944bc8b1622ff98aee9f71686cbb618 SHA512 e30bf4f61ec643a7c6a61b4c72cb23ca41e0f24464655c7dc8031e135e80e4cf06545cdfeb0f513a9b72247949603a5510ae9ecf2196884efcb8e91dc68cb69b WHIRLPOOL b1f7b7f0884be2f5868d0076f70cfabedf45f96c6fe2756ba334effc622cf49cd3181f9bf63f8ac8200f30cfddef87c4f99ca3fe7cfae2db9d00c5f7e8a57923
+EBUILD pciutils-3.5.5.ebuild 2922 SHA256 9416882730b7a4510c1c9d309f00705411b35d0cfc8304c9533fe0562bce2e25 SHA512 7421156ce321c3cd979712debccf4908ace3dbdd70d0b033c15fecba3f010122b4675d567a302fb4ec594edf2e46535691c24abd23e37bf296fdddc0c9c41d9b WHIRLPOOL c69b503b0b61236c3797448d95779358eebb1270bb574f12316140d0cd350954dae17b7e7842fc1069ed6e1635128f0bcd2c6880480b004ca116a2d383ac2a02
+MISC ChangeLog 9557 SHA256 9371159f68be11c13c975c677207dcff3f06d2d72dfad5ca31079291f789475e SHA512 4076c2f56ec1800da9119650f2b408319a59d1ef79f94196db43ae2d41581701104eb60d3c65fab869cb358ad00682764af6947b2185cbfa7f91e29a3116852e WHIRLPOOL ecdfc701c679c908aaf79be7aaced993ee6fbf5f63cd151a7ccc006823a6f134b935766d1703a1f7c2df17958a6fa6d6869a8cbf5123ad8540b1d7bfe64e42f4
+MISC ChangeLog-2015 31500 SHA256 64e8281eb7979554390ef6c4c323f8d65f4da9a76bdc071d072f78d2c4a67ad6 SHA512 5baa5b45155b0df008de51298fdb54fda6d71b179a148bc799aa4f15a18c7d9de48240354826223fb7bcb1a4b44289dd72252a29204618dd54ddc336fcf245ec WHIRLPOOL 040a27595fe695d2bc4edd48697121b52d05abc302c6a1877e880a777d9a0417fd02cd324ca47b38ec38551296923f1bf157a6cf35fc2a0988d416031c208a45
+MISC metadata.xml 524 SHA256 11eae8d518033f12d6fd34b5624e1271900450dce2755cba0879d3c116155dd0 SHA512 881e7cb9a71e1ccbf84be8cbaab54cfd0258a782aa1e4def6f3398444f4c28790a23eb194c3facc6e7c77437c06e4c17db01e0360debb1f01349cbca69dd8020 WHIRLPOOL 499344b03bb97ab85fab18cc15c64318c047f58930b0d0bb545a8b29230639dcf8d7e13746e6fbb62d32d7f89e4d03c958a5271b5521977ab29459d7e573efa8
diff --git a/sys-apps/pciutils/files/conf.d-pciparm b/sys-apps/pciutils/files/conf.d-pciparm
new file mode 100644
index 000000000000..f036b15ad20c
--- /dev/null
+++ b/sys-apps/pciutils/files/conf.d-pciparm
@@ -0,0 +1,28 @@
+# PCI tweaking article:
+# http://www.gentoo.org/doc/en/articles/hardware-stability-p2.xml
+#
+# Apply to all devices:
+# PCIPARM_ALL="...."
+# Cards also can be addressed by vid:pid or by bus:slot.func
+# (see setpci man page relative to -d and -s options)
+# PCIPARM_(BUS|VENDOR)_#="...."
+# Where # is sequentially numbered from zero.
+
+# Examples:
+# "open up" the PCI bus by allowing fairly long bursts
+# for all devices, increasing performance
+# (equivalent to: setpci -v -d *:* latency_timer=b0)
+#PCIPARM_ALL="latency_timer=b0"
+
+# maximize latency timers for network and audio,
+# allowing them to transmit more data per burst,
+# preventing buffer over/under-run conditions
+#PCIPARM_BUS_0="00:04.0 latency_timer=ff"
+#PCIPARM_BUS_1="01:04.0 latency_timer=ff"
+#PCIPARM_VENDOR_0="1057:3410 latency_timer=ff"
+
+# -v : whether to be verbose about changes
+# -D : dry-run, no commit
+# -f : do not warn if the change is already set
+# (see the setpci manpage for more advanced options)
+SETPCI_OPT="-f"
diff --git a/sys-apps/pciutils/files/init.d-pciparm b/sys-apps/pciutils/files/init.d-pciparm
new file mode 100644
index 000000000000..734ca9935a3b
--- /dev/null
+++ b/sys-apps/pciutils/files/init.d-pciparm
@@ -0,0 +1,79 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before bootmisc hdparm
+ after localmount
+}
+
+checkconfig() {
+ if [ ! -f /etc/conf.d/pciparm ]; then
+ ewarn "/etc/conf.d/pciparm does not exist, skipping"
+ return 1
+ fi
+
+ if [ -z "${PCIPARM_ALL}" -a -z "${PCIPARM_BUS_0}" -a -z "${PCIPARM_VENDOR_0}" ]; then
+ ewarn "None of PCIPARM_ALL, PCIPARM_BUS_* or PCIPARM_VENDOR_* set in /etc/conf.d/pciparm"
+ return 1
+ fi
+}
+
+do_setpci() {
+ #ewarn "do_setpci: /usr/sbin/setpci $SETPCI_OPT $@"
+ SWITCH=$1
+ SPEC_ID=$2
+ shift 2
+ case "$SWITCH" in
+ -d) DESC=vendor ;;
+ -s) DESC=bus ;;
+ *) eerror "Unknown setpci type: $SWITCH" ; return 1 ;;
+ esac
+
+ if [ -z "$SPEC_ID" ]; then
+ eerror "Missing device specifier!"
+ return 1
+ fi
+ if [ -z "$*" ]; then
+ eerror "Missing configuration to set for ($DESC) $SPEC_ID!"
+ return 1
+ fi
+
+ ebegin "Setting PCI params for ($DESC) $SPEC_ID to $@"
+ /usr/sbin/setpci $SETPCI_OPT $SWITCH $SPEC_ID "$@"
+ rc=$?
+ eend $rc
+ return $rc
+}
+
+do_setpci_array() {
+ name=$1
+ shift
+ i=0
+ while true; do
+ eval opt="\$${name}_$i"
+ # End of loop
+ [ -z "${opt}" ] && break
+ # Pass in all other parameters here, in case we want to use multiple
+ # arguments later.
+ do_setpci "$@" $opt #|| return 1
+ i=$(($i+1))
+ done
+}
+
+start() {
+ if get_bootparam "nopciparm" ; then
+ ewarn "Skipping pciparm init as requested in kernel cmdline"
+ return 0
+ fi
+
+ checkconfig || return 1
+
+ # We do not exit after any errors presently, because it might be a
+ # stability-related fix after a failure.
+ [ -n "$PCIPARM_ALL" ] && \
+ do_setpci -d '*:*' $PCIPARM_ALL #|| return 1
+
+ do_setpci_array PCIPARM_BUS -s #|| return 1
+ do_setpci_array PCIPARM_VENDOR -d #|| return 1
+}
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
new file mode 100644
index 000000000000..9e63b7ecd661
--- /dev/null
+++ b/sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch
@@ -0,0 +1,13 @@
+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
new file mode 100644
index 000000000000..739960f0acfd
--- /dev/null
+++ b/sys-apps/pciutils/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://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>
+</pkgmetadata>
diff --git a/sys-apps/pciutils/pciutils-3.4.1.ebuild b/sys-apps/pciutils/pciutils-3.4.1.ebuild
new file mode 100644
index 000000000000..5688ca238f9c
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.4.1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils 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 ~arm-linux ~x86-linux"
+IUSE="dns +kmod static-libs +udev zlib"
+
+# Have the sub-libs in RDEPEND with [static-libs] since, logically,
+# our libssl.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 )
+ static-libs? ( ${LIB_DEPEND} )
+ !static-libs? ( ${LIB_DEPEND//static-libs(+),} )
+ udev? ( >=virtual/libudev-208[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}
+ sys-apps/hwids
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${DEPEND}
+ 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() {
+ epatch "${FILESDIR}"/${PN}-3.1.9-static-pc.patch
+
+ 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.5.4.ebuild b/sys-apps/pciutils/pciutils-3.5.4.ebuild
new file mode 100644
index 000000000000..7de545e32784
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.5.4.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils 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 ~arm-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() {
+ epatch "${PATCHES[@]}"
+
+ 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.5.5.ebuild b/sys-apps/pciutils/pciutils-3.5.5.ebuild
new file mode 100644
index 000000000000..953cbfc4aa60
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.5.5.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils 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 ~arm-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() {
+ epatch "${PATCHES[@]}"
+
+ 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
+}