summaryrefslogtreecommitdiffstats
path: root/main/ethtool
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-01-14 08:04:10 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-01-14 08:04:40 +0000
commit28fe8399aded0c62559f7913c1d5c5107010401b (patch)
treee738f152e50d98e074863eabbd7fa8957161f484 /main/ethtool
parent8d064b0b0311341e383dead00a400ad92b2f3044 (diff)
downloadaports-28fe8399aded0c62559f7913c1d5c5107010401b.tar.bz2
aports-28fe8399aded0c62559f7913c1d5c5107010401b.tar.xz
main/ethtool: build fix for musl
use stdint's uint types instead of linux internals
Diffstat (limited to 'main/ethtool')
-rw-r--r--main/ethtool/APKBUILD23
-rw-r--r--main/ethtool/stdint.patch25
2 files changed, 43 insertions, 5 deletions
diff --git a/main/ethtool/APKBUILD b/main/ethtool/APKBUILD
index 006144650..4dbca2a60 100644
--- a/main/ethtool/APKBUILD
+++ b/main/ethtool/APKBUILD
@@ -1,17 +1,27 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ethtool
pkgver=3.10
-pkgrel=0
+pkgrel=1
pkgdesc="gkernel ethtool"
url="http://sourceforge.net/projects/gkernel/"
arch="all"
license="GPL2"
depends=""
makedepends=""
-source="http://www.kernel.org/pub/software/network/ethtool/ethtool-$pkgver.tar.xz"
+source="http://www.kernel.org/pub/software/network/ethtool/ethtool-$pkgver.tar.xz
+ stdint.patch"
subpackages="$pkgname-doc"
_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ 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"
./configure \
@@ -28,6 +38,9 @@ package() {
make DESTDIR="$pkgdir" install || return 1
}
-md5sums="d1930df6e70a5204e8154a9911992be4 ethtool-3.10.tar.xz"
-sha256sums="f88d941b63a0e51613bde5498d42f4ee2eefa332064e7a8dd80069a341dc1c40 ethtool-3.10.tar.xz"
-sha512sums="b7a28e70f92854abb47e61cd927d93b2716407b77d20253e0b21d225e7033d466772677215d2c7b1a811504e8d00e438b47abcf2448c79488dc677bb0ce2183b ethtool-3.10.tar.xz"
+md5sums="d1930df6e70a5204e8154a9911992be4 ethtool-3.10.tar.xz
+f953365fe8ba94849f72016090d5e892 stdint.patch"
+sha256sums="f88d941b63a0e51613bde5498d42f4ee2eefa332064e7a8dd80069a341dc1c40 ethtool-3.10.tar.xz
+ef1df6825715164bcf9140f8b91ffd9fdc0256a8305c9dc6960ef8e3cfa98042 stdint.patch"
+sha512sums="b7a28e70f92854abb47e61cd927d93b2716407b77d20253e0b21d225e7033d466772677215d2c7b1a811504e8d00e438b47abcf2448c79488dc677bb0ce2183b ethtool-3.10.tar.xz
+c8a602dd814d57728ca66b5257d6b9a990b145a783e61edbe5e09d99a1e8f8b111d936f4b369b239a31f86383ea6fd8cef3f7524d993be6e318d817ab534e422 stdint.patch"
diff --git a/main/ethtool/stdint.patch b/main/ethtool/stdint.patch
new file mode 100644
index 000000000..cf9ae83c2
--- /dev/null
+++ b/main/ethtool/stdint.patch
@@ -0,0 +1,25 @@
+--- ./internal.h.orig
++++ ./internal.h
+@@ -7,6 +7,7 @@
+ #include "ethtool-config.h"
+ #endif
+ #include <stdio.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+@@ -23,10 +24,10 @@
+ #endif
+
+ typedef unsigned long long u64;
+-typedef __uint32_t u32;
+-typedef __uint16_t u16;
+-typedef __uint8_t u8;
+-typedef __int32_t s32;
++typedef uint32_t u32;
++typedef uint16_t u16;
++typedef uint8_t u8;
++typedef int32_t s32;
+
+ #include "ethtool-copy.h"
+ #include "net_tstamp-copy.h"