diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-11-21 13:04:20 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-11-21 13:04:20 +0000 |
commit | f5a622ba784bb66ee85eb669a821801c5e135ed8 (patch) | |
tree | b385c400b3bcebc972419f425e15cf34f4d679c2 /sys-apps/pciutils | |
parent | 1ad2c51f9cc380c164b03ed03acda1c3fcc0a476 (diff) |
gentoo auto-resync : 21:11:2022 - 13:04:20
Diffstat (limited to 'sys-apps/pciutils')
-rw-r--r-- | sys-apps/pciutils/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/pciutils/pciutils-3.9.0.ebuild | 166 |
2 files changed, 168 insertions, 0 deletions
diff --git a/sys-apps/pciutils/Manifest b/sys-apps/pciutils/Manifest index 10d252ec5c85..2f244b87051e 100644 --- a/sys-apps/pciutils/Manifest +++ b/sys-apps/pciutils/Manifest @@ -3,5 +3,7 @@ AUX init.d-pciparm 1758 BLAKE2B a9dd930da942c73d7a150938b2b58543f517542c4c675334 AUX pciutils-3.8.0-no-which.patch 1207 BLAKE2B 6012046e4d0831e5a20b351e43bde4c1450c076989ed42741eac76510e2bc279940c80a04d978f6947878adca3140f5fc205615540871eefc9d62a68482fd4fa SHA512 240bb7142f5af044a8fdac96fcc63af7938b1e7f5f3d1689d213df09e71c1d6da84d1d1ee421511fa4c07f212e5605485c1f5ad8ad30052d181f0020e256d387 AUX pciutils-3.8.0-pkg-config.patch 691 BLAKE2B c12a6a6f19a62d5d161479e401f5bd9e373821fb72648c6ef0d9a49312a0ed930e790a9153eddadfaca28b8c0c330166c915c43d9439e1163a385defa08760df SHA512 d616aadc83c40cde4f8e0261ad0a99259d5b66bf32c7db3f5b47cd0981b27ec93ff5547b1927806e3b045ac61d884cd5eb96e4ff58955b1881616056a95cab4c DIST pciutils-3.8.0.tar.gz 575255 BLAKE2B 7339189f7115af31ccc19663d54e12ef966fbcd75c6b6b4c28c8ddcaafa3e233313ca14300ef70100edb00f5f2e1e767af9d6527a9d836edd07b598f0a40f4f4 SHA512 4b0de02a54c6ed19d5ea85a01d89a62386000bc0f816498872479aba26fb007a8c394cba3f95e77a7ffe52d36ad2726169b7b83bda5ab0647f00e49d8a34bf15 +DIST pciutils-3.9.0.tar.gz 908219 BLAKE2B 59d2a151b114691980b8f0a0bfdf8e48b9e1a0a9976df6dbc94962c251d8bfc61e7bd3b0f3c47a4295f52b5df67ad0e44ed6f2e6a87728e213e4ef0b8a55c028 SHA512 e17225c2adcc21c9ff4253998aec5805ae5e031888fa01841a1ff680796f7515f9dd6e5c2e0588edba854f66f1268ba8e28ae1a2f794574e715fec8a8c8def4f EBUILD pciutils-3.8.0-r1.ebuild 4915 BLAKE2B ddc1ba11cefb65a69392aad79260482827a62476200518f5d5aeac8209713b791f5fd389fcdd93c4acb3e40663180338584b17c04ea7148a5123a8bd274d0909 SHA512 ea895c2400ea0af258d0dc1151e81b3f972218f03054ddc20edf847fe053794d7286932fee44f008f53f641193bcdfd8cfac8b08800f4b0a620ae30e8591962a +EBUILD pciutils-3.9.0.ebuild 4826 BLAKE2B b98e3a74c12189551f1eb98dd23a870435706bb54755a3b084116c472e573564f90bde6dabd1370b5b3f7c573cafd612ebf93c1b8f5193123feb0cf95b089dc8 SHA512 84d49aead96a2899277538b46c2852b8800d7208f673d93d65640494ebb36f32af339eef63695359d792214ef89b74954d1622290d12b7f8ff0ad887bd993c24 MISC metadata.xml 616 BLAKE2B 0aefbd7995f4bf549cba3e9c60066675efb8dc8e4d38e320c8cb28f7f6a275527e90d2526248c57fd34d09125693e3f185f51c05d0ae10fd8a61d058d4f8a9d0 SHA512 5f44a15a2a18a40ac7a46a5c1dfed741082e48321d5ee3f53bebb6b12e310ea05070e03853cf15655ef800a768d49515f174e3a73ca923177ce0be3963154a59 diff --git a/sys-apps/pciutils/pciutils-3.9.0.ebuild b/sys-apps/pciutils/pciutils-3.9.0.ebuild new file mode 100644 index 000000000000..43f9e6d798f4 --- /dev/null +++ b/sys-apps/pciutils/pciutils-3.9.0.ebuild @@ -0,0 +1,166 @@ +# 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 ) + +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 + 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 +} |