Sun May 13 03:22:33 2018 UTC ()
devel/blosc: Make this package build on Darwin again

test_common.h has a seperate #elif branch to handle Darwin. Let blosc
use it on Darwin, rather than the C11 branch.


(minskim)
diff -r1.5 -r1.6 pkgsrc/devel/blosc/distinfo
diff -r1.3 -r1.4 pkgsrc/devel/blosc/patches/patch-tests_test__common.h

cvs diff -r1.5 -r1.6 pkgsrc/devel/blosc/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/blosc/distinfo 2018/05/12 14:04:00 1.5
+++ pkgsrc/devel/blosc/distinfo 2018/05/13 03:22:33 1.6
@@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
1$NetBSD: distinfo,v 1.5 2018/05/12 14:04:00 maya Exp $ 1$NetBSD: distinfo,v 1.6 2018/05/13 03:22:33 minskim Exp $
2 2
3SHA1 (blosc-1.14.2.tar.gz) = ba8bc63c2f0cdc62077a45b5e44216abd098020a 3SHA1 (blosc-1.14.2.tar.gz) = ba8bc63c2f0cdc62077a45b5e44216abd098020a
4RMD160 (blosc-1.14.2.tar.gz) = 4e75ba5f5cee49410cde42e0bef75d2f7e3d78d8 4RMD160 (blosc-1.14.2.tar.gz) = 4e75ba5f5cee49410cde42e0bef75d2f7e3d78d8
5SHA512 (blosc-1.14.2.tar.gz) = fb0346e3c2c6101d17963771643a114302034a5389e2ffd9498c6b6367fe6f138ec59edbf039f89a57ce44a63e1f70324ad3906a39884ecc9d54ee2987a1b39c 5SHA512 (blosc-1.14.2.tar.gz) = fb0346e3c2c6101d17963771643a114302034a5389e2ffd9498c6b6367fe6f138ec59edbf039f89a57ce44a63e1f70324ad3906a39884ecc9d54ee2987a1b39c
6Size (blosc-1.14.2.tar.gz) = 759731 bytes 6Size (blosc-1.14.2.tar.gz) = 759731 bytes
7SHA1 (patch-CMakeLists.txt) = 70dfc44c1541b1fccd200905acbd16e17a9313e1 7SHA1 (patch-CMakeLists.txt) = 70dfc44c1541b1fccd200905acbd16e17a9313e1
8SHA1 (patch-tests_test__common.h) = a5f7e117c5de05059203a79dda9b4f1fbd850b3b 8SHA1 (patch-tests_test__common.h) = 2eb2b756bcb67453de6fe526c31a974940098856

cvs diff -r1.3 -r1.4 pkgsrc/devel/blosc/patches/patch-tests_test__common.h (expand / switch to unified diff)

--- pkgsrc/devel/blosc/patches/patch-tests_test__common.h 2018/05/12 14:04:00 1.3
+++ pkgsrc/devel/blosc/patches/patch-tests_test__common.h 2018/05/13 03:22:33 1.4
@@ -1,30 +1,30 @@ @@ -1,30 +1,30 @@
1$NetBSD: patch-tests_test__common.h,v 1.3 2018/05/12 14:04:00 maya Exp $ 1$NetBSD: patch-tests_test__common.h,v 1.4 2018/05/13 03:22:33 minskim Exp $
2 2
3Use posix_memalign on SunOS with __EXTENSIONS__. 3Use posix_memalign on SunOS with __EXTENSIONS__.
4Use a standard C11 test. 4Use a standard C11 test.
5Prefer posix_memalign over C11 aligned_alloc because we are invoking undefined 5Prefer posix_memalign over C11 aligned_alloc because we are invoking undefined
6behaviour (C11 7.22.3.1). 6behaviour (C11 7.22.3.1).
7 7
8--- tests/test_common.h.orig 2017-07-19 08:08:12.000000000 +0000 8--- tests/test_common.h.orig 2017-07-19 08:08:12.000000000 +0000
9+++ tests/test_common.h 9+++ tests/test_common.h
10@@ -61,16 +61,15 @@ static void* blosc_test_malloc(const siz 10@@ -61,16 +61,15 @@ static void* blosc_test_malloc(const siz
11 const int32_t clean_value = 0x99; 11 const int32_t clean_value = 0x99;
12 void *block = NULL; 12 void *block = NULL;
13 int32_t res = 0; 13 int32_t res = 0;
14- 14-
15-#if defined(_ISOC11_SOURCE) || (defined(__FreeBSD__) && __STDC_VERSION__ >= 201112L) 15-#if defined(_ISOC11_SOURCE) || (defined(__FreeBSD__) && __STDC_VERSION__ >= 201112L)
16+#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__EXTENSIONS__) 16+#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__EXTENSIONS__)
17+ /* Platform does have an implementation of posix_memalign */ 17+ /* Platform does have an implementation of posix_memalign */
18+ res = posix_memalign(&block, alignment, size); 18+ res = posix_memalign(&block, alignment, size);
19+#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L 19+#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__APPLE__)
20 /* C11 aligned allocation. 'size' must be a multiple of the alignment. */ 20 /* C11 aligned allocation. 'size' must be a multiple of the alignment. */
21 block = aligned_alloc(alignment, size); 21 block = aligned_alloc(alignment, size);
22 #elif defined(_WIN32) 22 #elif defined(_WIN32)
23 /* A (void *) cast needed for avoiding a warning with MINGW :-/ */ 23 /* A (void *) cast needed for avoiding a warning with MINGW :-/ */
24 block = (void *)_aligned_malloc(size, alignment); 24 block = (void *)_aligned_malloc(size, alignment);
25-#elif _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 25-#elif _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
26- /* Platform does have an implementation of posix_memalign */ 26- /* Platform does have an implementation of posix_memalign */
27- res = posix_memalign(&block, alignment, size); 27- res = posix_memalign(&block, alignment, size);
28 #elif defined(__APPLE__) 28 #elif defined(__APPLE__)
29 /* Mac OS X guarantees 16-byte alignment in small allocs */ 29 /* Mac OS X guarantees 16-byte alignment in small allocs */
30 block = malloc(size); 30 block = malloc(size);