Mon Jun 27 01:19:40 2022 UTC ()
rhash: properly reapply build fix for OSes without aligned_alloc

This was previously fixed by schmonz@, but was half lost in the update
to 1.4.3. Upstream added their own macro NO_POSIX_ALIGNED_ALLOC to help
deal with this, so a patch was dropped, but our patch to the configure
script wasn't adjusted to match that new macro definition.

Should fix PR pkg/55571 and PR pkg/56902.

Note I have no environment with which to test this, but it seems obvious
from code inspection, and adjusting the patch did not influence test
builds on NetBSD 9.2_STABLE, Fedora 36, or OmniOS r151038.


(gutteridge)
diff -r1.21 -r1.22 pkgsrc/misc/rhash/distinfo
diff -r1.2 -r1.3 pkgsrc/misc/rhash/patches/patch-configure

cvs diff -r1.21 -r1.22 pkgsrc/misc/rhash/distinfo (expand / switch to unified diff)

--- pkgsrc/misc/rhash/distinfo 2022/06/15 08:54:58 1.21
+++ pkgsrc/misc/rhash/distinfo 2022/06/27 01:19:39 1.22
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1$NetBSD: distinfo,v 1.21 2022/06/15 08:54:58 adam Exp $ 1$NetBSD: distinfo,v 1.22 2022/06/27 01:19:39 gutteridge Exp $
2 2
3BLAKE2s (rhash-1.4.3.tar.gz) = fd47c6f7997416d295fa92fa0611dc956596ff91f1199049baf3b6bd2d88a427 3BLAKE2s (rhash-1.4.3.tar.gz) = fd47c6f7997416d295fa92fa0611dc956596ff91f1199049baf3b6bd2d88a427
4SHA512 (rhash-1.4.3.tar.gz) = d87ffcde28d8f25cf775c279fed457e52d24523ed9b695629dae694b3c22372247d18f6032f8ce13a0b70fa2953be408982e46659daaa7c4ab227ae89eaed9c7 4SHA512 (rhash-1.4.3.tar.gz) = d87ffcde28d8f25cf775c279fed457e52d24523ed9b695629dae694b3c22372247d18f6032f8ce13a0b70fa2953be408982e46659daaa7c4ab227ae89eaed9c7
5Size (rhash-1.4.3.tar.gz) = 429290 bytes 5Size (rhash-1.4.3.tar.gz) = 429290 bytes
6SHA1 (patch-configure) = 6f0c4abf3f487f046feea5aca5866481eda4546a 6SHA1 (patch-configure) = aba3e782bd317504fcb35a4d59b4146ccb944171
7SHA1 (patch-librhash_Makefile) = f5a3ccdd8c0467b11f2dda553310bf5a9c8ade0c 7SHA1 (patch-librhash_Makefile) = f5a3ccdd8c0467b11f2dda553310bf5a9c8ade0c

cvs diff -r1.2 -r1.3 pkgsrc/misc/rhash/patches/patch-configure (expand / switch to unified diff)

--- pkgsrc/misc/rhash/patches/patch-configure 2021/07/15 09:39:17 1.2
+++ pkgsrc/misc/rhash/patches/patch-configure 2022/06/27 01:19:40 1.3
@@ -1,35 +1,35 @@ @@ -1,35 +1,35 @@
1$NetBSD: patch-configure,v 1.2 2021/07/15 09:39:17 adam Exp $ 1$NetBSD: patch-configure,v 1.3 2022/06/27 01:19:40 gutteridge Exp $
2 2
3Skip compiler detection magic. 3Skip compiler detection magic.
4 4
5Avoid choosing aligned_alloc() when it's not present, such as CentOS 6 5Avoid choosing aligned_alloc() when it's not present, such as CentOS 6
6with lang/gcc7. 6with lang/gcc7 and older Solaris releases.
7 7
8--- configure.orig 2021-07-14 20:55:34.000000000 +0000 8--- configure.orig 2021-07-14 20:55:34.000000000 +0000
9+++ configure 9+++ configure
10@@ -563,8 +563,6 @@ else 10@@ -563,8 +563,6 @@ else
11 fi 11 fi
12 done 12 done
13 fi # icc 13 fi # icc
14-test -z "$cc_vendor" && die "compiler not found" 14-test -z "$cc_vendor" && die "compiler not found"
15-test "$cc_fail" = "yes" && die "unsupported compiler version" 15-test "$cc_fail" = "yes" && die "unsupported compiler version"
16  16
17 log_start "compiler working with default options" 17 log_start "compiler working with default options"
18 if ! cc_check_cflag; then 18 if ! cc_check_cflag; then
19@@ -660,6 +658,16 @@ elif test "$OPT_OPENSSL" = "auto" || tes 19@@ -660,6 +658,16 @@ elif test "$OPT_OPENSSL" = "auto" || tes
20 finish_check "$ALLOW_RUNTIME_LINKING" 20 finish_check "$ALLOW_RUNTIME_LINKING"
21 fi 21 fi
22  22
23+start_check "libc provides aligned_alloc" 23+start_check "libc provides aligned_alloc"
24+HAS_STDC_ALIGNED_ALLOC=no 24+HAS_STDC_ALIGNED_ALLOC=no
25+if cc_check_statement "stdlib.h" 'aligned_alloc(256, 1024);' "-Werror -Wno-unused-result"; then 25+if cc_check_statement "stdlib.h" 'aligned_alloc(256, 1024);' "-Werror -Wno-unused-result"; then
26+ HAS_STDC_ALIGNED_ALLOC=yes 26+ HAS_STDC_ALIGNED_ALLOC=yes
27+fi 27+fi
28+if test "$HAS_STDC_ALIGNED_ALLOC" = "no"; then 28+if test "$HAS_STDC_ALIGNED_ALLOC" = "no"; then
29+ BUILD_EXTRA_CFLAGS=$(join_params $BUILD_EXTRA_CFLAGS -DNOPE_DOES_NOT_HAS_STDC_ALIGNED_ALLOC) 29+ BUILD_EXTRA_CFLAGS=$(join_params $BUILD_EXTRA_CFLAGS -DNO_STDC_ALIGNED_ALLOC)
30+fi 30+fi
31+finish_check "$HAS_STDC_ALIGNED_ALLOC" 31+finish_check "$HAS_STDC_ALIGNED_ALLOC"
32+ 32+
33 SHARED_VSCRIPT= 33 SHARED_VSCRIPT=
34 if ! darwin; then 34 if ! darwin; then
35 start_check "linker support for --version-script" 35 start_check "linker support for --version-script"