diff options
author | gson <gson@pkgsrc.org> | 2016-01-22 14:57:41 +0000 |
---|---|---|
committer | gson <gson@pkgsrc.org> | 2016-01-22 14:57:41 +0000 |
commit | 1bf92aafdd3b463fa70e310522ab716744b7ce7c (patch) | |
tree | 06f587045756e9dca28e681100d6f83baaa9bab5 /math | |
parent | 636d6538fc9a3f2ddccbb6e1de19b7d3cc8f80ba (diff) | |
download | pkgsrc-1bf92aafdd3b463fa70e310522ab716744b7ce7c.tar.gz |
Initial import of ffts.
ffts is a BSD-licensed Fast Fourier Transform library based on dynamic
generation of SIMD code, supporting Intel SSE and ARM Neon.
Diffstat (limited to 'math')
-rw-r--r-- | math/ffts/DESCR | 2 | ||||
-rw-r--r-- | math/ffts/Makefile | 22 | ||||
-rw-r--r-- | math/ffts/PLIST | 4 | ||||
-rw-r--r-- | math/ffts/distinfo | 8 | ||||
-rw-r--r-- | math/ffts/patches/patch-src_codegen.c | 15 | ||||
-rw-r--r-- | math/ffts/patches/patch-tests_test.c | 33 |
6 files changed, 84 insertions, 0 deletions
diff --git a/math/ffts/DESCR b/math/ffts/DESCR new file mode 100644 index 00000000000..7220b2ddc56 --- /dev/null +++ b/math/ffts/DESCR @@ -0,0 +1,2 @@ +A BSD-licensed Fast Fourier Transform library based on dynamic +generation of SIMD code, supporting Intel SSE and ARM Neon. diff --git a/math/ffts/Makefile b/math/ffts/Makefile new file mode 100644 index 00000000000..114c242c0f6 --- /dev/null +++ b/math/ffts/Makefile @@ -0,0 +1,22 @@ +# $NetBSD: Makefile,v 1.1 2016/01/22 14:57:41 gson Exp $ + +GIT_COMMIT= fa1780c68593762b1e4bdbc46d83912db3eba27a + +DISTNAME= ${GIT_COMMIT} +PKGNAME= ffts-20140106 +CATEGORIES= math +MASTER_SITES= ${MASTER_SITE_GITHUB:=anthonix/}/ffts/archive/ + +MAINTAINER= gson@NetBSD.org +HOMEPAGE= https://github.com/anthonix/ffts +COMMENT= The Fastest Fourier Transform in the South +LICENSE= modified-bsd + +WRKSRC= ${WRKDIR}/ffts-${GIT_COMMIT} + +USE_LANGUAGES= c c++ +USE_LIBTOOL= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-sse --enable-single + +.include "../../mk/bsd.pkg.mk" diff --git a/math/ffts/PLIST b/math/ffts/PLIST new file mode 100644 index 00000000000..71782a52a24 --- /dev/null +++ b/math/ffts/PLIST @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1 2016/01/22 14:57:41 gson Exp $ +include/ffts/ffts.h +lib/libffts.la +lib/pkgconfig/ffts.pc diff --git a/math/ffts/distinfo b/math/ffts/distinfo new file mode 100644 index 00000000000..038e53a4e70 --- /dev/null +++ b/math/ffts/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2016/01/22 14:57:41 gson Exp $ + +SHA1 (fa1780c68593762b1e4bdbc46d83912db3eba27a.tar.gz) = 6dfb95b6c9575005d5cc06b6acb8b5cb47a27328 +RMD160 (fa1780c68593762b1e4bdbc46d83912db3eba27a.tar.gz) = 495ae3f6ffcd03740553765dbd0cff03b5f7e89b +SHA512 (fa1780c68593762b1e4bdbc46d83912db3eba27a.tar.gz) = 2bfab39f3661e53fb625a465f7c05986b2923af2679f8e2c493ec8130032e6dd68f379501bcb6ea28c728ce2d605faf9868cd57d96442e26507cd0e00f4d4b71 +Size (fa1780c68593762b1e4bdbc46d83912db3eba27a.tar.gz) = 414064 bytes +SHA1 (patch-src_codegen.c) = 09b9d234092607fbad9747ac08df0f0962df693d +SHA1 (patch-tests_test.c) = 14b291a46caaccb3d78462bedee171e0e9e01797 diff --git a/math/ffts/patches/patch-src_codegen.c b/math/ffts/patches/patch-src_codegen.c new file mode 100644 index 00000000000..796bf6348e5 --- /dev/null +++ b/math/ffts/patches/patch-src_codegen.c @@ -0,0 +1,15 @@ +$NetBSD: patch-src_codegen.c,v 1.1 2016/01/22 14:57:41 gson Exp $ + +Provide the appropriate arguents to mmap on NetBSD. + +--- src/codegen.c.orig 2014-01-05 22:32:16.000000000 +0000 ++++ src/codegen.c +@@ -181,6 +181,8 @@ void ffts_generate_func_code(ffts_plan_t + + #ifdef __APPLE__ + p->transform_base = mmap(NULL, p->transform_size, PROT_WRITE | PROT_READ, MAP_ANON | MAP_SHARED, -1, 0); ++#elif defined(__NetBSD__) ++ p->transform_base = mmap(NULL, p->transform_size, PROT_WRITE | PROT_READ | PROT_EXEC, MAP_ANON | MAP_SHARED, -1, 0); + #else + #define MAP_ANONYMOUS 0x20 + p->transform_base = mmap(NULL, p->transform_size, PROT_WRITE | PROT_READ, MAP_ANONYMOUS | MAP_SHARED, -1, 0); diff --git a/math/ffts/patches/patch-tests_test.c b/math/ffts/patches/patch-tests_test.c new file mode 100644 index 00000000000..ed0dc09bab1 --- /dev/null +++ b/math/ffts/patches/patch-tests_test.c @@ -0,0 +1,33 @@ +$NetBSD: patch-tests_test.c,v 1.1 2016/01/22 14:57:41 gson Exp $ + +NetBSD lacks sinl(), cosl(), and sqrtl(). + +--- tests/test.c.orig 2014-01-05 22:32:16.000000000 +0000 ++++ tests/test.c +@@ -44,7 +44,7 @@ + #define PI 3.1415926535897932384626433832795028841971693993751058209 + + float impulse_error(int N, int sign, float *data) { +-#ifdef __ANDROID__ ++#if defined(__ANDROID__) || defined(__NetBSD__) + double delta_sum = 0.0f; + double sum = 0.0f; + #else +@@ -54,7 +54,7 @@ float impulse_error(int N, int sign, flo + + int i; + for(i=0;i<N;i++) { +-#ifdef __ANDROID__ ++#if defined(__ANDROID__) || defined(__NetBSD__) + double re, im; + if(sign < 0) { + re = cos(2 * PI * (double)i / (double)N); +@@ -81,7 +81,7 @@ float impulse_error(int N, int sign, flo + delta_sum += re * re + im * im; + + } +-#ifdef __ANDROID__ ++#if defined(__ANDROID__) || defined(__NetBSD__) + return sqrt(delta_sum) / sqrt(sum); + #else + return sqrtl(delta_sum) / sqrtl(sum); |