diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-24 23:17:49 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-24 23:12:18 +0200 |
commit | 634d90125743a9301ba5280172ebf3b56ad86377 (patch) | |
tree | 30ae11b6fb207e9a4088c9e981a340e26c2a5e9e /main | |
parent | e6a6453651a9c3c80af79c2193ce5ba2d9204c4c (diff) | |
download | aports-634d90125743a9301ba5280172ebf3b56ad86377.tar.bz2 aports-634d90125743a9301ba5280172ebf3b56ad86377.tar.xz |
main/snappy: fix runtime failure on armhf and re-enable check
Ref #8921 (https://bugs.alpinelinux.org/issues/8921)
Diffstat (limited to 'main')
-rw-r--r-- | main/snappy/APKBUILD | 8 | ||||
-rw-r--r-- | main/snappy/fix-GetHashTable.patch | 16 |
2 files changed, 20 insertions, 4 deletions
diff --git a/main/snappy/APKBUILD b/main/snappy/APKBUILD index f8eb659a07..749ede109e 100644 --- a/main/snappy/APKBUILD +++ b/main/snappy/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=snappy pkgver=1.1.4 -pkgrel=3 +pkgrel=4 pkgdesc="Fast compression and decompression library" url="http://google.github.io/snappy/" arch="all" @@ -10,9 +10,8 @@ license="BSD-3-Clause" subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc" source="https://github.com/google/snappy/releases/download/$pkgver/snappy-$pkgver.tar.gz fix-UnalignedCopy64.patch + fix-GetHashTable.patch " -[ "$CARCH" = "armhf" ] && options="!check" # does not pass testsuite on armhf - builddir="$srcdir/$pkgname-$pkgver" build() { @@ -34,4 +33,5 @@ package() { } sha512sums="4f522f1d541e3f00d82ccaf6dda5c6ede28d4db19c53717003d8057261fe8630516ed6ff2a28615da032e0de9c6200b560ed5fce4f8714df9916d50d6a7c2178 snappy-1.1.4.tar.gz -a086dbdfe2cb21419b33c2f8a2739224a8e843f2c6a51715100c723b9fbd9aed14bcfa791c20dae785b33ac1d1cf4812ed2c5c5d4058c5b8e56a0e004e9a8c60 fix-UnalignedCopy64.patch" +a086dbdfe2cb21419b33c2f8a2739224a8e843f2c6a51715100c723b9fbd9aed14bcfa791c20dae785b33ac1d1cf4812ed2c5c5d4058c5b8e56a0e004e9a8c60 fix-UnalignedCopy64.patch +8db7a634c9147286f01eb4bd0a5ff2138540c06acad5fb77aa2977f7b64a19b91ff0f886f650b0a38834a33895f7a1dd4bcfb93af7f6676d59e3fdb8b6efbea0 fix-GetHashTable.patch" diff --git a/main/snappy/fix-GetHashTable.patch b/main/snappy/fix-GetHashTable.patch new file mode 100644 index 0000000000..0fdf88e472 --- /dev/null +++ b/main/snappy/fix-GetHashTable.patch @@ -0,0 +1,16 @@ +Fix for armhf. + +See: https://groups.google.com/d/msg/snappy-compression/uhELq553TrI/J34d3D8_BwAJ + https://bugs.alpinelinux.org/issues/8921 + +--- a/snappy.cc ++++ b/snappy.cc +@@ -323,7 +323,7 @@ + *table_size = 256; + } else { + // Since table size must be a power of 2, round up to the next power of 2. +- *table_size = 1 << (std::numeric_limits<size_t>::digits - ++ *table_size = 1 << std::max(1, std::numeric_limits<size_t>::digits - + __builtin_clzll(input_size - 1)); + } + if (*table_size <= ARRAYSIZE(small_table_)) { |