diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-12-17 06:56:18 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-12-17 06:56:18 +0000 |
commit | afd299997b829913d2a08ce197a95355658f7a1b (patch) | |
tree | 1e6bb92bcfccf2d3bf04f43d414250923ac05b1d /main/hdparm | |
parent | 1f8969c785d4dd9bf0ec1464dd863d1c1ffa9c62 (diff) | |
download | aports-afd299997b829913d2a08ce197a95355658f7a1b.tar.bz2 aports-afd299997b829913d2a08ce197a95355658f7a1b.tar.xz |
main/hdparm: fix musl build
Diffstat (limited to 'main/hdparm')
-rw-r--r-- | main/hdparm/APKBUILD | 23 | ||||
-rw-r--r-- | main/hdparm/fix-includes.patch | 21 |
2 files changed, 41 insertions, 3 deletions
diff --git a/main/hdparm/APKBUILD b/main/hdparm/APKBUILD index 3640e78600..6195f0bc1d 100644 --- a/main/hdparm/APKBUILD +++ b/main/hdparm/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=hdparm pkgver=9.43 -pkgrel=0 +pkgrel=1 pkgdesc="A shell utility for manipulating Linux IDE drive/driver parameters" url="http://sourceforge.net/projects/hdparm/" arch="all" @@ -9,11 +9,23 @@ license="BSD" depends= makedepends= subpackages="$pkgname-doc" -source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz" +source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz + fix-includes.patch + " _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" + export CFLAGS="$CFLAGS -D_GNU_SOURCE" make || return 1 } @@ -26,4 +38,9 @@ package() { install -D -m 644 LICENSE.TXT $pkgdir/usr/share/licenses/hdparm/LICENSE.TXT || return 1 } -md5sums="f73233be118d86c779a8463d8b6a3cdb hdparm-9.43.tar.gz" +md5sums="f73233be118d86c779a8463d8b6a3cdb hdparm-9.43.tar.gz +13a99ab348839153ffd0f309981f892b fix-includes.patch" +sha256sums="2bbe92274971182192901ab220e94bd2e4896f924fa6b225d0cffd7d8c16b52a hdparm-9.43.tar.gz +8234bdc6cda1a81ba404ac2666ba7c0b2c047f13c3face83ee95a5eaa72abe28 fix-includes.patch" +sha512sums="24cf10290d11c611951064ae2f4fc0c06d2aa764eb2801126c0cda272944adc1c07bc905c6c11dd964dd966e213aed1cde06afc7f24c565cfa709ba9134842df hdparm-9.43.tar.gz +8d6268d3183375f5984f9c958f7911dbc501de589a035a6252cfbb5595e5049b567ceaa064ea4644a0d3f9a3381370e1c416c151e34fa19d3df8a09ec12613c0 fix-includes.patch" diff --git a/main/hdparm/fix-includes.patch b/main/hdparm/fix-includes.patch new file mode 100644 index 0000000000..8a63f7a703 --- /dev/null +++ b/main/hdparm/fix-includes.patch @@ -0,0 +1,21 @@ +--- hdparm-9.43/hdparm.h.orig ++++ hdparm-9.43/hdparm.h +@@ -1,7 +1,7 @@ + /* Some prototypes for extern functions. */ + + //#undef __KERNEL_STRICT_NAMES +-#include <linux/types.h> ++#include <sys/types.h> + + #if !defined(__GNUC__) && !defined(__attribute__) + #define __attribute__(x) +--- hdparm-9.43/sysfs.c.orig ++++ hdparm-9.43/sysfs.c +@@ -12,6 +12,7 @@ + #include <stdio.h> + #include <fcntl.h> + #include <errno.h> ++#include <limits.h> + #include <dirent.h> + #include <sys/stat.h> + #include <linux/types.h> |