aboutsummaryrefslogtreecommitdiffstats
path: root/main/pciutils
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-09-27 14:14:49 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-09-27 14:22:25 +0000
commit99b94bcdf468a789c7ba70e26da623a974df9e2a (patch)
treecbc84d7da42100c14a7710edf01bb06ae20288c4 /main/pciutils
parent9a3d8e391a5c1481a66fa4fc7e679171fe6a2152 (diff)
downloadaports-99b94bcdf468a789c7ba70e26da623a974df9e2a.tar.bz2
aports-99b94bcdf468a789c7ba70e26da623a974df9e2a.tar.xz
main/pciutils: fix headers
has ugly kludges for ancient glibc headers. remove all the legacy hacks. makes pciutils builds against musl.
Diffstat (limited to 'main/pciutils')
-rw-r--r--main/pciutils/APKBUILD25
-rw-r--r--main/pciutils/fix-headers.patch27
2 files changed, 47 insertions, 5 deletions
diff --git a/main/pciutils/APKBUILD b/main/pciutils/APKBUILD
index 42b6b8b040..9cb8bd4e90 100644
--- a/main/pciutils/APKBUILD
+++ b/main/pciutils/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=pciutils
pkgver=3.2.0
-pkgrel=0
+pkgrel=1
pkgdesc="PCI bus configuration space access library and tools"
url="http://mj.ucw.cz/pciutils.html"
arch="all"
@@ -11,9 +11,21 @@ depends="hwdata-pci"
makedepends=
install=
subpackages="$pkgname-doc $pkgname-dev"
-source="http://www.kernel.org/pub/software/utils/$pkgname/$pkgname-$pkgver.tar.gz"
+source="http://www.kernel.org/pub/software/utils/$pkgname/$pkgname-$pkgver.tar.gz
+ fix-headers.patch"
_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
build() {
cd "$_builddir"
sed -i -e "106s/^/\#/" Makefile
@@ -39,6 +51,9 @@ package() {
}
-md5sums="c05fe3a8444d83b7cccbfa118d54a037 pciutils-3.2.0.tar.gz"
-sha256sums="17e346b168ed2caf3ee48019805e756943d945e088057b203c4368b845e32524 pciutils-3.2.0.tar.gz"
-sha512sums="7540199c57a8894e9595a4d5b59bfda60c07e940d6433c39ec5cf6bbe38864e181c53c88b59a7d676547088bd23566dd9efed7e53c41ed2901a237cd9c0fd4fd pciutils-3.2.0.tar.gz"
+md5sums="c05fe3a8444d83b7cccbfa118d54a037 pciutils-3.2.0.tar.gz
+bb5c5627b8436b9b55e27f369f392afc fix-headers.patch"
+sha256sums="17e346b168ed2caf3ee48019805e756943d945e088057b203c4368b845e32524 pciutils-3.2.0.tar.gz
+caf84597a154c53d689ca4ce6234f03da0d9f95775b28b12248bcf21f92c51ee fix-headers.patch"
+sha512sums="7540199c57a8894e9595a4d5b59bfda60c07e940d6433c39ec5cf6bbe38864e181c53c88b59a7d676547088bd23566dd9efed7e53c41ed2901a237cd9c0fd4fd pciutils-3.2.0.tar.gz
+d3104b9f4937279fc6dd24c4f92d48ae704566ef2125dc2a62d2c68b2be84b61818f023a9442d9323579315c1139dc9b57b8cb2fee7be44f1fbced02026d52a2 fix-headers.patch"
diff --git a/main/pciutils/fix-headers.patch b/main/pciutils/fix-headers.patch
new file mode 100644
index 0000000000..94c805e6d5
--- /dev/null
+++ b/main/pciutils/fix-headers.patch
@@ -0,0 +1,27 @@
+--- pciutils-3.2.0.orig/lib/i386-io-linux.h
++++ pciutils-3.2.0/lib/i386-io-linux.h
+@@ -6,11 +6,7 @@
+ * Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+-#ifdef __GLIBC__
+ #include <sys/io.h>
+-#else
+-#include <asm/io.h>
+-#endif
+
+ static int
+ intel_setup_io(struct pci_access *a UNUSED)
+Only in pciutils-3.2.0: lib/i386-ports.o
+Only in pciutils-3.2.0: lib/libpci.a
+--- pciutils-3.2.0.orig/lib/pread.h
++++ pciutils-3.2.0/lib/pread.h
+@@ -12,7 +12,7 @@
+ * don't define it.
+ */
+
+-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0
++#if 1 || defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0
+ /* glibc 2.1 or newer -> pread/pwrite supported automatically */
+
+ #elif defined(i386) && defined(__GLIBC__)