* [gentoo-commits] repo/gentoo:master commit in: sys-apps/pciutils/files/, sys-apps/pciutils/
@ 2016-05-20 17:11 Ian Stakenvicius
0 siblings, 0 replies; 2+ messages in thread
From: Ian Stakenvicius @ 2016-05-20 17:11 UTC (permalink / raw
To: gentoo-commits
commit: bcf44e3ced194129a6a63ac84f6a7723941d4dd7
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Fri May 20 16:33:57 2016 +0000
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Fri May 20 17:11:09 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcf44e3c
sys-apps/pciutils-3.5.0: fix missing pci_init for LIBPCI_3.0
Bug: http://bugs.gentoo.org/583580
Package-Manager: portage-2.2.28
.../files/pciutils-3.5.0-expose-pci_init_v30.patch | 21 +++++++++++++++++++++
...iutils-3.5.0.ebuild => pciutils-3.5.0-r1.ebuild} | 3 ++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/sys-apps/pciutils/files/pciutils-3.5.0-expose-pci_init_v30.patch b/sys-apps/pciutils/files/pciutils-3.5.0-expose-pci_init_v30.patch
new file mode 100644
index 0000000..d5e9a5e
--- /dev/null
+++ b/sys-apps/pciutils/files/pciutils-3.5.0-expose-pci_init_v30.patch
@@ -0,0 +1,21 @@
+--- a/lib/init.c 2016-05-20 11:53:00.065874342 -0400
++++ b/lib/init.c 2016-05-20 11:53:16.725850370 -0400
+@@ -214,6 +214,8 @@
+ }
+
+ STATIC_ALIAS(void pci_init(struct pci_access *a), pci_init_v35(a));
++DEFINE_ALIAS(void pci_init_v30(struct pci_access *a), pci_init_v35);
++SYMBOL_VERSION(pci_init_v30, pci_init@LIBPCI_3.0);
+ SYMBOL_VERSION(pci_init_v35, pci_init@@LIBPCI_3.5);
+
+ void
+--- a/lib/internal.h 2016-05-14 05:58:01.000000000 -0400
++++ b/lib/internal.h 2016-05-20 12:04:02.144993094 -0400
+@@ -61,6 +61,7 @@
+ void pci_mfree(void *);
+ char *pci_strdup(struct pci_access *a, const char *s);
+
++void pci_init_v30(struct pci_access *a) VERSIONED_ABI;
+ void pci_init_v35(struct pci_access *a) VERSIONED_ABI;
+
+ /* access.c */
diff --git a/sys-apps/pciutils/pciutils-3.5.0.ebuild b/sys-apps/pciutils/pciutils-3.5.0-r1.ebuild
similarity index 96%
rename from sys-apps/pciutils/pciutils-3.5.0.ebuild
rename to sys-apps/pciutils/pciutils-3.5.0-r1.ebuild
index 392ac4c..334ecdb 100644
--- a/sys-apps/pciutils/pciutils-3.5.0.ebuild
+++ b/sys-apps/pciutils/pciutils-3.5.0-r1.ebuild
@@ -42,7 +42,8 @@ switch_config() {
}
src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.1.9-static-pc.patch
+ epatch "${FILESDIR}"/${PN}-3.1.9-static-pc.patch \
+ "${FILESDIR}"/${PN}-3.5.0-expose-pci_init_v30.patch
if use static-libs ; then
cp -pPR "${S}" "${S}.static" || die
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/pciutils/files/, sys-apps/pciutils/
@ 2022-06-19 23:26 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-06-19 23:26 UTC (permalink / raw
To: gentoo-commits
commit: 7050083e912dd60a7e917807bbd8218e1018cfbb
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 19 23:10:50 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 19 23:26:30 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7050083e
sys-apps/pciutils: update EAPI 7 -> 8; drop which
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../pciutils/files/pciutils-3.8.0-no-which.patch | 34 +++++
.../pciutils/files/pciutils-3.8.0-pkg-config.patch | 19 +++
sys-apps/pciutils/pciutils-3.8.0-r1.ebuild | 167 +++++++++++++++++++++
3 files changed, 220 insertions(+)
diff --git a/sys-apps/pciutils/files/pciutils-3.8.0-no-which.patch b/sys-apps/pciutils/files/pciutils-3.8.0-no-which.patch
new file mode 100644
index 000000000000..3024d73555d3
--- /dev/null
+++ b/sys-apps/pciutils/files/pciutils-3.8.0-no-which.patch
@@ -0,0 +1,34 @@
+https://github.com/pciutils/pciutils/pull/105
+
+From 91bf24dd3c91f826377548b7e164b49cfed56f9a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 19 Jun 2022 23:52:22 +0100
+Subject: [PATCH 1/2] lib/configure: drop usage of which
+
+'which' is not required by POSIX and is an external command which may not be
+available, and 'command -v' does the job just fine.
+
+Debian and Gentoo at least are both making efforts to drop which from
+their base system package list.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/lib/configure
++++ b/lib/configure
+@@ -238,7 +238,7 @@ if [ "$sys" = linux ] ; then
+ PKG_CONFIG=pkg-config
+ fi
+ if [ "$LIBKMOD" != no ] ; then
+- if ! which $PKG_CONFIG >/dev/null ; then
++ if ! command -v $PKG_CONFIG >/dev/null ; then
+ echo_n "($PKG_CONFIG not found) "
+ elif $PKG_CONFIG libkmod ; then
+ LIBKMOD_DETECTED=1
+@@ -268,7 +268,7 @@ if [ "$sys" = linux ] ; then
+ if [ "$HWDB" = yes -o "$HWDB" = no ] ; then
+ echo "$HWDB (set manually)"
+ else
+- if `which pkg-config >/dev/null && pkg-config --atleast-version=196 libudev` ; then
++ if `command -v pkg-config >/dev/null && pkg-config --atleast-version=196 libudev` ; then
+ HWDB=yes
+ else
+ HWDB=no
diff --git a/sys-apps/pciutils/files/pciutils-3.8.0-pkg-config.patch b/sys-apps/pciutils/files/pciutils-3.8.0-pkg-config.patch
new file mode 100644
index 000000000000..4630609bad24
--- /dev/null
+++ b/sys-apps/pciutils/files/pciutils-3.8.0-pkg-config.patch
@@ -0,0 +1,19 @@
+https://github.com/pciutils/pciutils/pull/105
+
+From a74832198ab36683a867c79b3d6ef2cac9baad55 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 19 Jun 2022 23:53:42 +0100
+Subject: [PATCH 2/2] lib/configure: respect $PKG_CONFIG completely
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/lib/configure
++++ b/lib/configure
+@@ -268,7 +268,7 @@ if [ "$sys" = linux ] ; then
+ if [ "$HWDB" = yes -o "$HWDB" = no ] ; then
+ echo "$HWDB (set manually)"
+ else
+- if `command -v pkg-config >/dev/null && pkg-config --atleast-version=196 libudev` ; then
++ if `command -v $PKG_CONFIG >/dev/null && $PKG_CONFIG --atleast-version=196 libudev` ; then
+ HWDB=yes
+ else
+ HWDB=no
diff --git a/sys-apps/pciutils/pciutils-3.8.0-r1.ebuild b/sys-apps/pciutils/pciutils-3.8.0-r1.ebuild
new file mode 100644
index 000000000000..59f4aa0192a4
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.8.0-r1.ebuild
@@ -0,0 +1,167 @@
+# 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 )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.8.0-no-which.patch
+ "${FILESDIR}"/${PN}-3.8.0-pkg-config.patch
+)
+
+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 -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 "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 "4. 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 #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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-19 23:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-19 23:26 [gentoo-commits] repo/gentoo:master commit in: sys-apps/pciutils/files/, sys-apps/pciutils/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2016-05-20 17:11 Ian Stakenvicius
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox