aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-03-26 19:12:59 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-26 19:12:59 +0000
commitcd0f7dce03ab95b48d00da69bdc9a0d29f86832f (patch)
tree63b0137ece78fd8d71631c36f4313d5a8186a574 /main
parente9683d537d744d14ad7dfde6f1b39370705e831f (diff)
downloadaports-cd0f7dce03ab95b48d00da69bdc9a0d29f86832f.tar.bz2
aports-cd0f7dce03ab95b48d00da69bdc9a0d29f86832f.tar.xz
main/rhash: use patch instead of sed
Diffstat (limited to 'main')
-rw-r--r--main/rhash/APKBUILD12
-rw-r--r--main/rhash/byteorder.patch13
2 files changed, 17 insertions, 8 deletions
diff --git a/main/rhash/APKBUILD b/main/rhash/APKBUILD
index 58ef79e241..e31c69c95c 100644
--- a/main/rhash/APKBUILD
+++ b/main/rhash/APKBUILD
@@ -8,15 +8,10 @@ arch="all"
license="custom"
makedepends="libressl-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
-source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-src.tar.gz"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-src.tar.gz
+ byteorder.patch"
builddir="$srcdir/RHash-$pkgver"
-prepare() {
- # include endian.h on musl
- sed -i "$builddir"/librhash/byte_order.h \
- -e 's/__GLIBC__/__linux__/'
-}
-
build() {
cd "$builddir"
./configure --prefix=/usr \
@@ -37,4 +32,5 @@ package() {
install-headers install-lib-shared install-so-link
}
-sha512sums="54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6 rhash-1.3.6-src.tar.gz"
+sha512sums="54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6 rhash-1.3.6-src.tar.gz
+a216a7cf5e1ea5fcb7b574a57bb8137e3dc0251bdefb2c30aacba08c54079d61a595c8c5636687c70e14724efa3a4b9ca7d9f98d9170eaa66ccb278834cf56d5 byteorder.patch"
diff --git a/main/rhash/byteorder.patch b/main/rhash/byteorder.patch
new file mode 100644
index 0000000000..a0cb83d6bc
--- /dev/null
+++ b/main/rhash/byteorder.patch
@@ -0,0 +1,13 @@
+diff --git a/librhash/byte_order.h b/librhash/byte_order.h
+index 1ea1096..b248b57 100644
+--- a/librhash/byte_order.h
++++ b/librhash/byte_order.h
+@@ -4,7 +4,7 @@
+ #include "ustd.h"
+ #include <stdlib.h>
+
+-#if defined(__GLIBC__)
++#if defined(__linux__)
+ # include <endian.h>
+ #endif
+ #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)