summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlain2021-04-19 13:48:09 -0700
committerlain2021-04-19 13:48:09 -0700
commit341a58c12fa587a06f7d311441f51c71364a95b2 (patch)
tree23e5e8adbf89426087ec1259e1234c0019b3cd63
parent08c96c7f498dab5ebe9f945a70446be4f4f2c73d (diff)
downloadaur-341a58c12fa587a06f7d311441f51c71364a95b2.tar.gz
Add cmake build dependency. Apply fix for non-SSE2 machines.
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD24
-rw-r--r--fix-non-sse2.patch29
3 files changed, 53 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 48e80cf85625..e4bc197b7a19 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,18 @@
pkgbase = ffts-git
pkgdesc = The Fastest Fourier Transform in the South
pkgver = r799.fe86885
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/anthonix/ffts
- arch = i686
- arch = x86_64
- arch = arm
+ arch = any
license = BSD
makedepends = git
+ makedepends = cmake
provides = ffts
conflicts = ffts
source = git+https://github.com/anthonix/ffts.git
+ source = fix-non-sse2.patch
md5sums = SKIP
+ md5sums = e7711b3c9f73a2f36fbf405663c05c9d
pkgname = ffts-git
diff --git a/PKGBUILD b/PKGBUILD
index 19c0ef011571..9c1d80d41a0b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,37 @@
# Maintainer: lain <aur@hacktheinter.net>
pkgname=ffts-git
pkgver=r799.fe86885
-pkgrel=2
+pkgrel=3
pkgdesc="The Fastest Fourier Transform in the South"
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
-arch=('i686' 'x86_64' 'arm')
+arch=('any')
url='https://github.com/anthonix/ffts'
-md5sums=('SKIP')
license=('BSD')
depends=()
-makedepends=('git')
-source=('git+https://github.com/anthonix/ffts.git')
+makedepends=('git' 'cmake')
+source=(
+ 'git+https://github.com/anthonix/ffts.git'
+ 'fix-non-sse2.patch'
+)
+md5sums=(
+ 'SKIP'
+ 'e7711b3c9f73a2f36fbf405663c05c9d'
+)
pkgver() {
cd ffts
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare() {
+ cd ffts
+ # Patch to fix compilation on non-SSE2 machines
+ # Source: https://github.com/anthonix/ffts/pull/78
+ # (has no effect on SSE2 machines, so we can just always apply the patch)
+ git apply $srcdir/fix-non-sse2.patch
+}
+
build() {
mkdir -p ffts/build
cd ffts/build
diff --git a/fix-non-sse2.patch b/fix-non-sse2.patch
new file mode 100644
index 000000000000..9170da041381
--- /dev/null
+++ b/fix-non-sse2.patch
@@ -0,0 +1,29 @@
+From e0fe4b14a5cf6d6389df40d92c8505d68ffa042e Mon Sep 17 00:00:00 2001
+From: Nishidha Panpaliya <nishidha@us.ibm.com>
+Date: Wed, 8 Jan 2020 10:22:37 +0000
+Subject: [PATCH] Fixed compilation error on Linux ppc64le
+
+---
+ src/ffts_trig.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ffts_trig.c b/src/ffts_trig.c
+index 1094be4..cd59d9f 100644
+--- a/src/ffts_trig.c
++++ b/src/ffts_trig.c
+@@ -881,7 +881,7 @@ int
+ ffts_generate_cosine_sine_pow2_32f(ffts_cpx_32f *const table, int table_size)
+ {
+ const ffts_cpx_64f *FFTS_RESTRICT ct;
+- const double_t *FFTS_RESTRICT hs;
++ const ffts_double_t *FFTS_RESTRICT hs;
+ ffts_cpx_64f FFTS_ALIGN(16) w[32];
+ int i, log_2, offset;
+
+@@ -1136,4 +1136,4 @@ ffts_generate_table_1d_real_32f(struct _ffts_plan_t *const p,
+ }
+
+ return 0;
+-}
+\ No newline at end of file
++}