diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/pciutils | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/pciutils')
-rw-r--r-- | sys-apps/pciutils/Manifest | 4 | ||||
-rw-r--r-- | sys-apps/pciutils/files/conf.d-pciparm | 28 | ||||
-rw-r--r-- | sys-apps/pciutils/files/init.d-pciparm | 80 | ||||
-rw-r--r-- | sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch | 13 | ||||
-rw-r--r-- | sys-apps/pciutils/metadata.xml | 10 | ||||
-rw-r--r-- | sys-apps/pciutils/pciutils-3.2.0.ebuild | 84 | ||||
-rw-r--r-- | sys-apps/pciutils/pciutils-3.2.1.ebuild | 84 | ||||
-rw-r--r-- | sys-apps/pciutils/pciutils-3.3.0-r2.ebuild | 108 | ||||
-rw-r--r-- | sys-apps/pciutils/pciutils-3.3.1.ebuild | 108 |
9 files changed, 519 insertions, 0 deletions
diff --git a/sys-apps/pciutils/Manifest b/sys-apps/pciutils/Manifest new file mode 100644 index 000000000000..1ee6d826701d --- /dev/null +++ b/sys-apps/pciutils/Manifest @@ -0,0 +1,4 @@ +DIST pciutils-3.2.0.tar.gz 357003 SHA256 84e705bff712b128a942117565a3506bd4b8bf841d397c1962c6255169762f71 SHA512 ce619bca35c529f947b883858164584db9fd16be05b44bd20d7f30b73246076b8c80a9e0ff3f7b2c27366a08043488ccfee98dd3cb43e3c5ee8962efaa056fd1 WHIRLPOOL fda9efb423ba444b460986b82b89feb3e5940d63774377eab4dce6ed1a1c690824192ca25d04a4f34960412ddedbdb9c874dace2256ccd1dede61ee99618b418 +DIST pciutils-3.2.1.tar.gz 367046 SHA256 b31131b721fa26378b4af61b1c49986ff40fe590bc210545b210b6b774337858 SHA512 b8b2983743728eebe9f26de3b96fc8242853bbcac07df02684510c9a3ac43b0258601f5063d16fb09407cadcda7e5778a41f57423d031244f66e34041c4dbf02 WHIRLPOOL 877cfa1d28df52389179eb5ec7bc1dab7fc1677574f2694d5ca8fe33bb76dcae04a2b25b3f0cc704dd9fe6d4cf4206671799f49aa92476e9f3f74e2ca108ff1f +DIST pciutils-3.3.0.tar.gz 424967 SHA256 4b576a1c2570046fda83fa2c5488661de698874ab04fd8e06eef4b6ab806d58a SHA512 bd8c1177dfd59250f573e22c933df1673af1489758218aeb73d1b480954993fc34e7f67ae7f1a257e8b23044f7f52a806fe37947f6ea20a39e30471d9a8a4085 WHIRLPOOL 67f99d6130344e866601f5e14ff28f0929812d7d5d36e2485e51d00d1c61a514288bb8b899703a50b90e886668a485a013b40be98475a52fbc20896d08229976 +DIST pciutils-3.3.1.tar.gz 393912 SHA256 02beeb14503707c5a3293fe084c18e12e6937c0d4dd1e29e6bcb6b12f124df46 SHA512 4f8b0e62cfd0ffad1674be13c95f5581bc0037ed9843f9866b13eea6fa2703bb39bb878e96df805972f4e9bac36fc67a0a313c463f0764218211f1276cef36b2 WHIRLPOOL 315f1f4f5b98e6e90e3a6af9a8a03acf9732eb5b6de02ced53b32bdaca67360153ee4db1551729e3534d25c81ce2308d89c0715e0554552d029cbb3f18786ff6 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..d7973bf81412 --- /dev/null +++ b/sys-apps/pciutils/files/init.d-pciparm @@ -0,0 +1,80 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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..aab71979be31 --- /dev/null +++ b/sys-apps/pciutils/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> + <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.2.0.ebuild b/sys-apps/pciutils/pciutils-3.2.0.ebuild new file mode 100644 index 000000000000..e722377e3f81 --- /dev/null +++ b/sys-apps/pciutils/pciutils-3.2.0.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Various utilities dealing with the PCI bus" +HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ http://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 ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux" +IUSE="+kmod static-libs 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[static-libs(+)] )" +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 )" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.1.9-static-pc.patch + + if use static-libs ; then + cp -pPR "${S}" "${S}.static" || die + fi +} + +pemake() { + emake \ + HOST="${CHOST}" \ + CROSS_COMPILE="${CHOST}-" \ + CC="$(tc-getCC)" \ + DNS="yes" \ + 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="$(usex kmod)" \ + "$@" +} + +src_compile() { + pemake OPT="${CFLAGS}" all + if use static-libs ; then + pemake \ + -C "${S}.static" \ + OPT="${CFLAGS}" \ + SHARED="no" \ + lib/libpci.a + fi +} + +src_install() { + pemake DESTDIR="${D}" install install-lib + use static-libs && dolib.a "${S}.static/lib/libpci.a" + 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.2.1.ebuild b/sys-apps/pciutils/pciutils-3.2.1.ebuild new file mode 100644 index 000000000000..6ef3781e5e8a --- /dev/null +++ b/sys-apps/pciutils/pciutils-3.2.1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Various utilities dealing with the PCI bus" +HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ http://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 ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux" +IUSE="dns +kmod static-libs 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[static-libs(+)] )" +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 )" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.1.9-static-pc.patch + + if use static-libs ; then + cp -pPR "${S}" "${S}.static" || die + fi +} + +pemake() { + emake \ + HOST="${CHOST}" \ + CROSS_COMPILE="${CHOST}-" \ + CC="$(tc-getCC)" \ + 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=$(usex kmod) \ + "$@" +} + +src_compile() { + pemake OPT="${CFLAGS}" all + if use static-libs ; then + pemake \ + -C "${S}.static" \ + OPT="${CFLAGS}" \ + SHARED="no" \ + lib/libpci.a + fi +} + +src_install() { + pemake DESTDIR="${D}" install install-lib + use static-libs && dolib.a "${S}.static/lib/libpci.a" + 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.3.0-r2.ebuild b/sys-apps/pciutils/pciutils-3.3.0-r2.ebuild new file mode 100644 index 000000000000..9025dbf7fb71 --- /dev/null +++ b/sys-apps/pciutils/pciutils-3.3.0-r2.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils multilib toolchain-funcs multilib-minimal + +DESCRIPTION="Various utilities dealing with the PCI bus" +HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ http://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 ~x64-freebsd ~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 +} + +pemake() { + emake \ + HOST="${CHOST}" \ + CROSS_COMPILE="${CHOST}-" \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + 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.3.1.ebuild b/sys-apps/pciutils/pciutils-3.3.1.ebuild new file mode 100644 index 000000000000..b08c2c617235 --- /dev/null +++ b/sys-apps/pciutils/pciutils-3.3.1.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils multilib toolchain-funcs multilib-minimal + +DESCRIPTION="Various utilities dealing with the PCI bus" +HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ http://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 ~x64-freebsd ~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 +} + +pemake() { + emake \ + HOST="${CHOST}" \ + CROSS_COMPILE="${CHOST}-" \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + 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 +} |