pciutils: update to version 3.11.1. (#10209)

Disable x86_gcc2 (parsing errors), drop separate _data package.

Co-authored-by: Committer <c.ommitter@example.net>
This commit is contained in:
OscarL
2024-03-12 08:47:29 -03:00
committed by GitHub
parent f441193b97
commit bf2b58fb99
5 changed files with 116 additions and 282 deletions

View File

@@ -1,14 +1,14 @@
From 137958092e6ca0b5eb293d9a8f4e7e6cf5a857ad Mon Sep 17 00:00:00 2001
From 3a6541e42ab6fb953442d3f32c12f14f8b91c13d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 1 Jul 2018 18:42:31 +0200
Subject: Build fix
diff --git a/lib/sysdep.h b/lib/sysdep.h
index e525dc4..3d7944d 100644
index 40e1407..7f22427 100644
--- a/lib/sysdep.h
+++ b/lib/sysdep.h
@@ -68,6 +68,10 @@ typedef u16 word;
@@ -83,6 +83,10 @@ typedef u16 word;
#endif
#endif
@@ -20,5 +20,5 @@ index e525dc4..3d7944d 100644
#include <endian.h>
#endif
--
2.16.4
2.43.2

View File

@@ -1,30 +0,0 @@
From 5791b4969c8acb81a6879035269319d3140d2bfa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Wed, 18 Dec 2013 14:10:05 +0100
Subject: [PATCH] C89
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: François Revol <revol@free.fr>
---
ls-caps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ls-caps.c b/ls-caps.c
index f192510..865a999 100644
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -1260,8 +1260,8 @@ show_caps(struct device *d, int where)
if (get_conf_word(d, PCI_STATUS) & PCI_STATUS_CAP_LIST)
{
- where = get_conf_byte(d, where) & ~3;
byte been_there[256];
+ where = get_conf_byte(d, where) & ~3;
memset(been_there, 0, 256);
while (where)
{
--
1.8.3.4

View File

@@ -0,0 +1,112 @@
SUMMARY="Utilities for inspecting and manipulating PCI devices"
DESCRIPTION="The PCI Utilities are a collection of programs for inspecting \
and manipulating configuration of PCI devices, all based on a common \
portable library libpci which offers access to the PCI configuration space \
on a variety of operating systems.
The utilities include:
- lspci - displays detailed information about all PCI buses and devices in \
the system
- setpci - allows reading from and writing to PCI device configuration \
registers. For example, you can adjust the latency timers with it."
HOMEPAGE="https://mj.ucw.cz/sw/pciutils/"
COPYRIGHT="1997-2024 Martin Mares"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://mj.ucw.cz/download/linux/pci/pciutils-$portVersion.tar.gz"
CHECKSUM_SHA256="1904864ce5b0272d0a2e42e72ceac9e8810d1898480567f36b70642f8205fbfd"
PATCHES="pciutils-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
pciutils$secondaryArchSuffix = $portVersion
cmd:lspci$commandSuffix = $portVersion
cmd:pcilmr$commandSuffix = $portVersion
cmd:setpci$commandSuffix = $portVersion
lib:libpci$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
pciutils${secondaryArchSuffix}_devel = $portVersion
devel:libpci$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
pciutils$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:sed
"
TEST_REQUIRES="
lib:libpci$secondaryArchSuffix
"
INSTALL()
{
make \
ZLIB=no \
DNS=no \
SHARED=yes \
PREFIX="$prefix" \
BINDIR="$commandBinDir" \
SBINDIR="$commandBinDir" \
SHAREDIR="$dataDir" \
IDSDIR="$dataDir"/pciutils \
MANDIR="$manDir" \
INCDIR="$includeDir" \
LIBDIR="$libDir" \
install install-lib
# update-pciids is useless because pci.ids is read-only.
rm -f "$commandBinDir"/update-pciids
rm -f "$manDir"/man*/update-pciids.*
prepareInstalledDevelLib libpci
fixPkgconfig
sed -i -e "s,$dataDir/,/system/data/,g" \
"$manDir"/man8/lspci.8 \
"$manDir"/man8/setpci.8
local include_pci=/system/$relativeOldIncludeDir/pci
sed -i -e "s,/usr/include/linux/,$include_pci/,g" \
"$manDir"/man8/lspci.8
sed -i -e "s,/usr/include/pci/,$include_pci/,g" \
"$manDir"/man8/setpci.8
# devel package
packageEntries devel \
"$developDir" \
"$manDir"/man7
}
TEST()
{
lspci
}

View File

@@ -1,84 +0,0 @@
SUMMARY="Utilities for inspecting and manipulating PCI devices"
DESCRIPTION="The PCI Utilities are a collection of programs for inspecting \
and manipulating configuration of PCI devices, all based on a common \
portable library libpci which offers access to the PCI configuration space \
on a variety of operating systems.
The utilities include:
- lspci - displays detailed information about all PCI buses and devices in \
the system
- setpci - allows reading from and writing to PCI device configuration \
registers. For example, you can adjust the latency timers with it."
HOMEPAGE="http://mj.ucw.cz/sw/pciutils/"
COPYRIGHT="1997-2012 Martin Mares"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-3.2.1.tar.gz"
CHECKSUM_SHA256="b31131b721fa26378b4af61b1c49986ff40fe590bc210545b210b6b774337858"
PATCHES="pciutils-3.2.1_git-0001-C89.patch"
ARCHITECTURES="?all x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
pciutils${secondaryArchSuffix} = $portVersion
cmd:lspci${secondaryArchSuffix} = $portVersion
cmd:setpci${secondaryArchSuffix} = $portVersion
"
REQUIRES="
haiku${secondaryArchSuffix}
lib:libz${secondaryArchSuffix}
"
PROVIDES_devel="
pciutils${secondaryArchSuffix}_devel = $portVersion
devel:pciutils$secondaryArchSuffix = $portVersion
devel:libpci$secondaryArchSuffix
"
REQUIRES_devel="
pciutils$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz${secondaryArchSuffix}
"
BUILD_PREREQUIRES="
cmd:make
cmd:gcc${secondaryArchSuffix}
"
BUILD()
{
make \
ZLIB=yes \
PREFIX=$prefix \
SHAREDIR=$dataDir \
SBINDIR=$binDir \
MANDIR=$manDir \
INCDIR=$headersDir \
LIBDIR=$developLibDir
}
#TODO: SHARED=yes?
# XXX: remove update-pciids (packages are read-only anyway)
INSTALL()
{
make \
ZLIB=yes \
PREFIX=$prefix \
SHAREDIR=$dataDir \
SBINDIR=$binDir \
MANDIR=$manDir \
INCDIR=$includeDir \
LIBDIR=$developLibDir \
install install-lib
rm -f $binDir/update-pciids
rm -f $manDir/man*/update-pciids.*
# devel package
packageEntries devel \
$developDir \
$manDir/man*/pcilib.*
}

View File

@@ -1,164 +0,0 @@
SUMMARY="Utilities for inspecting and manipulating PCI devices"
DESCRIPTION="The PCI Utilities are a collection of programs for inspecting \
and manipulating configuration of PCI devices, all based on a common \
portable library libpci which offers access to the PCI configuration space \
on a variety of operating systems.
The utilities include:
- lspci - displays detailed information about all PCI buses and devices in \
the system
- setpci - allows reading from and writing to PCI device configuration \
registers. For example, you can adjust the latency timers with it."
HOMEPAGE="https://mj.ucw.cz/sw/pciutils/"
COPYRIGHT="1997-2018 Martin Mares"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-$portVersion.tar.gz"
CHECKSUM_SHA256="30005e341bb0ffa734174e592dc8f0dd928e1c9368b859715812149ed91d8f93"
PATCHES="pciutils-$portVersion.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
# libpci.so can only be built (for this package) if gcc >= 4.
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
LIBPCI_SHARED=yes
else
LIBPCI_SHARED=no
fi
PROVIDES="
pciutils$secondaryArchSuffix = $portVersion
cmd:lspci$secondaryArchSuffix = $portVersion
cmd:setpci$secondaryArchSuffix = $portVersion
"
if [ "$LIBPCI_SHARED" = yes ]; then
PROVIDES="$PROVIDES
lib:libpci$secondaryArchSuffix = $libVersionCompat
"
fi
REQUIRES="
haiku$secondaryArchSuffix
pciutils_data == $portVersion
"
if [ -z "$secondaryArchSuffix" ]; then
SUMMARY_data="Utilities for inspecting and manipulating PCI devices \
(data)"
ARCHITECTURES_data="any"
PROVIDES_data="
pciutils_data = $portVersion
"
REQUIRES_data=""
fi
PROVIDES_devel="
pciutils${secondaryArchSuffix}_devel = $portVersion
devel:libpci$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
pciutils$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
if [ -n "$secondaryArchSuffix" ]; then
BUILD_REQUIRES="$BUILD_REQUIRES
pciutils_data == $portVersion
"
fi
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:sed
"
BUILD()
{
make \
ZLIB=no \
SHARED=$LIBPCI_SHARED \
PREFIX="$prefix" \
SHAREDIR="$dataDir" \
IDSDIR="$dataDir"/pciutils \
SBINDIR="$binDir" \
MANDIR="$manDir" \
INCDIR="$includeDir" \
LIBDIR="$libDir" \
}
INSTALL()
{
make \
ZLIB=no \
SHARED=$LIBPCI_SHARED \
PREFIX="$prefix" \
SHAREDIR="$dataDir" \
IDSDIR="$dataDir"/pciutils \
SBINDIR="$binDir" \
MANDIR="$manDir" \
INCDIR="$includeDir" \
LIBDIR="$libDir" \
install install-lib
# update-pciids is useless because pci.ids is read-only.
rm -f "$binDir"/update-pciids
rm -f "$manDir"/man*/update-pciids.*
prepareInstalledDevelLib libpci
fixPkgconfig
if [ -z "$secondaryArchSuffix" ]; then
maybe_manDir_man7="$manDir"/man7
packageEntries data \
"$dataDir"
sed -i -e "s,$dataDir/,/system/data/,g" \
"$manDir"/man8/lspci.8 \
"$manDir"/man8/setpci.8
local include_pci=/system/$relativeOldIncludeDir/pci
sed -i -e "s,/usr/include/linux/,$include_pci/,g" \
"$manDir"/man8/lspci.8
sed -i -e "s,/usr/include/pci/,$include_pci/,g" \
"$manDir"/man8/setpci.8
else
maybe_manDir_man7=
rm -rf "$dataDir" "$documentationDir"
fi
# $dataDir/pciutils/pci.ids is not in pciutils but in pciutils_data.
local data_dir="${dataDir/pciutils$secondaryArchSuffix/pciutils_data}"
# So we need to fix the idsdir custom parameter in libpci.pc to make
# pkg-config --variable=idsdir libpci
# yeld the correct path to the directory where pci.ids will be.
sed -i \
-e "/^idsdir=/ s,=$dataDir/,=$data_dir/," \
"$developLibDir"/pkgconfig/libpci.pc
# devel package
packageEntries devel \
"$developDir" \
${maybe_manDir_man7:+"$maybe_manDir_man7"}
}
TEST()
{
if [ "$LIBPCI_SHARED" = yes ]; then
# Do we already have a symlink for the library with its soname?
if [ ! -e lib/libpci.so.${libVersionCompat##* } ]; then
# Not yet. So let's create it.
ln -s libpci.so.$libVersion lib/libpci.so.${libVersionCompat##* }
fi
LIBRARY_PATH="$sourceDir/lib${LIBRARY_PATH:+:$LIBRARY_PATH}" \
"$sourceDir"/lspci
else
"$sourceDir"/lspci
fi
}