main/rhash: use patch instead of sed

This commit is contained in:
Natanael Copa 2018-03-26 19:12:59 +00:00
parent e9683d537d
commit cd0f7dce03
2 changed files with 17 additions and 8 deletions

View File

@ -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"

View File

@ -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__)