textproc/ugrep: Fix build on non-Linux arm32/aarch64 platformsdiff -r1.73 -r1.74 pkgsrc/textproc/ugrep/distinfo
(pho)
@@ -1,5 +1,6 @@ | @@ -1,5 +1,6 @@ | |||
1 | $NetBSD: distinfo,v 1.73 2024/05/10 09:20:59 adam Exp $ | 1 | $NetBSD: distinfo,v 1.74 2024/05/10 16:06:28 pho Exp $ | |
2 | 2 | |||
3 | BLAKE2s (ugrep-6.0.0.tar.gz) = 9be74fa798a74ff31a7793146170acde77b04d3808434d1750c7b63eb183bba7 | 3 | BLAKE2s (ugrep-6.0.0.tar.gz) = 9be74fa798a74ff31a7793146170acde77b04d3808434d1750c7b63eb183bba7 | |
4 | SHA512 (ugrep-6.0.0.tar.gz) = cb67fa088e372d2e59d707366d23dde386102a54fb829d00b17e11469b5e05c44dc2891ba8d157100674e77fbf4267a33d9ab5bd31fa2d1655859b0643cf6930 | 4 | SHA512 (ugrep-6.0.0.tar.gz) = cb67fa088e372d2e59d707366d23dde386102a54fb829d00b17e11469b5e05c44dc2891ba8d157100674e77fbf4267a33d9ab5bd31fa2d1655859b0643cf6930 | |
5 | Size (ugrep-6.0.0.tar.gz) = 7009582 bytes | 5 | Size (ugrep-6.0.0.tar.gz) = 7009582 bytes | |
6 | SHA1 (patch-lzma_C_CpuArch.c) = 37ba2265c7a348abedaf5c1eaf95677142cc2b9d |
$NetBSD: patch-lzma_C_CpuArch.c,v 1.1 2024/05/10 16:06:28 pho Exp $
Fix build on non-Linux arm32/aarch64 platforms. Especially on NetBSD the
kernel currently only provides information about optional CPU features to
userland via /proc/cpuinfo. Providing AT_SUN_HWCAP via auxv would be
nice. Adding getauxval(3) to crt would also be nice.
--- lzma/C/CpuArch.c.orig 2024-05-10 15:18:53.793198757 +0000
+++ lzma/C/CpuArch.c
@@ -760,12 +760,13 @@ BoolInt CPU_IsSupported_AES (void) { ret
#else // __APPLE__
-#include <sys/auxv.h>
-
-#define USE_HWCAP
+#if defined(__linux__)
+# define USE_HWCAP
+#endif
#ifdef USE_HWCAP
+#include <sys/auxv.h>
#include <asm/hwcap.h>
#define MY_HWCAP_CHECK_FUNC_2(name1, name2) \