summaryrefslogtreecommitdiff
path: root/user/fftw
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-04-26 17:37:15 +0000
committerZach van Rijn <me@zv.io>2022-10-21 18:33:58 -0500
commit629a901b9ae82afc2accb0918a3da2dea1b85e06 (patch)
tree14f1aa5bea988ed7d5d1cd4718ff71dfc929ea3d /user/fftw
parent923e1baa9ce4c6c6010812eae085c3c04c75e412 (diff)
downloadpackages-629a901b9ae82afc2accb0918a3da2dea1b85e06.tar.gz
packages-629a901b9ae82afc2accb0918a3da2dea1b85e06.tar.bz2
packages-629a901b9ae82afc2accb0918a3da2dea1b85e06.tar.xz
packages-629a901b9ae82afc2accb0918a3da2dea1b85e06.zip
user/fftw: bump { 3.3.8 --> 3.3.10 }. become maintainer. add patch for CLOCK_SGI_CYCLE. fixes #603.
Diffstat (limited to 'user/fftw')
-rw-r--r--user/fftw/APKBUILD11
-rw-r--r--user/fftw/clock-sgi-cycle.patch70
2 files changed, 77 insertions, 4 deletions
diff --git a/user/fftw/APKBUILD b/user/fftw/APKBUILD
index aba0de1a6..2c542ebd4 100644
--- a/user/fftw/APKBUILD
+++ b/user/fftw/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: William Pitcock <nenolod@dereferenced.org>
-# Maintainer:
+# Maintainer: Zach van Rijn <me@zv.io>
pkgname=fftw
-pkgver=3.3.8
+pkgver=3.3.10
_pkgver=$(printf '%s' "$pkgver" | sed 's/p/-pl/')
pkgrel=0
pkgdesc="Fastest fourier transform in the west"
@@ -13,7 +13,9 @@ makedepends="texinfo"
# order of the libs split functions are important because of lib naming
subpackages="$pkgname-dev $pkgname-doc $pkgname-single-libs:single
$pkgname-long-double-libs:long_double $pkgname-double-libs:double"
-source="http://www.fftw.org/$pkgname-$_pkgver.tar.gz"
+source="http://www.fftw.org/$pkgname-$_pkgver.tar.gz
+ clock-sgi-cycle.patch
+ "
builddir="$srcdir/$pkgname-$_pkgver"
_precision="single double long-double"
@@ -92,4 +94,5 @@ long_double() {
"$subpkgdir"/usr/lib/
}
-sha512sums="ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38 fftw-3.3.8.tar.gz"
+sha512sums="2d34b5ccac7b08740dbdacc6ebe451d8a34cf9d9bfec85a5e776e87adf94abfd803c222412d8e10fbaa4ed46f504aa87180396af1b108666cde4314a55610b40 fftw-3.3.10.tar.gz
+7683b31fd56c1883fd9ac553ced161b0e253163a97fb9f718f830da93ff1e45692dae4ddda3d9f3f238b8e8047f2cd62bd1933b67839328ccf386137f592f5b0 clock-sgi-cycle.patch"
diff --git a/user/fftw/clock-sgi-cycle.patch b/user/fftw/clock-sgi-cycle.patch
new file mode 100644
index 000000000..2fd37c837
--- /dev/null
+++ b/user/fftw/clock-sgi-cycle.patch
@@ -0,0 +1,70 @@
+From 8fdc7b71354fbbbbc68fa8b2b810610ee41e052f Mon Sep 17 00:00:00 2001
+From: Frank Hartmann <frank.hartmann@dreamchip.de>
+Date: Fri, 5 Jan 2018 21:27:23 +0100
+Subject: [PATCH 1/2] linux: avoid using CLOCK_SGI_CYCLE
+
+The call clock_gettime(CLOCK_SGI_CYCLE, &t) from function getticks() fails with EINVAL.
+See : http://elixir.free-electrons.com/linux/latest/source/include/uapi/linux/time.h#L62 - "The driver implementing this got removed. The clock ID is kept as a place holder. Do not reuse!"
+---
+ kernel/cycle.h | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/kernel/cycle.h b/kernel/cycle.h
+index fe3dd50d6..21d206e35 100644
+--- a/kernel/cycle.h
++++ b/kernel/cycle.h
+@@ -437,8 +437,18 @@ INLINE_ELAPSED(__inline)
+ #define HAVE_TICK_COUNTER
+ #endif
+ /*----------------------------------------------------------------*/
+-/* SGI/Irix */
+-#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE) && !defined(HAVE_TICK_COUNTER) && !defined(__ANDROID__)
++/* SGI/Irix/Linux but not android */
++#if !defined(__ANDROID__)
++#if defined(HAVE_CLOCK_GETTIME) && !defined(HAVE_TICK_COUNTER)
++#if defined(CLOCK_MONOTONIC)
++#define METHOD CLOCK_MONOTONIC
++#elif defined(CLOCK_REALTIME)
++#define METHOD CLOCK_REALTIME
++#elif defined(CLOCK_SGI_CYCLE)
++#define METHOD CLOCK_SGI_CYCLE
++#endif
++#endif
++
+ typedef struct timespec ticks;
+
+ static inline ticks getticks(void)
+
+From c68b27dedad182b0b222502d98cc9795787c2607 Mon Sep 17 00:00:00 2001
+From: Frank Hartmann <frank.hartmann@dreamchip.de>
+Date: Sun, 14 Jan 2018 16:52:30 +0100
+Subject: [PATCH 2/2] linux: avoid using CLOCK_SGI_CYCLE, use METHOD
+
+---
+ kernel/cycle.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/kernel/cycle.h b/kernel/cycle.h
+index 21d206e35..777d1cda5 100644
+--- a/kernel/cycle.h
++++ b/kernel/cycle.h
+@@ -438,8 +438,8 @@ INLINE_ELAPSED(__inline)
+ #endif
+ /*----------------------------------------------------------------*/
+ /* SGI/Irix/Linux but not android */
+-#if !defined(__ANDROID__)
+-#if defined(HAVE_CLOCK_GETTIME) && !defined(HAVE_TICK_COUNTER)
++#if !defined(__ANDROID__) && !defined(HAVE_TICK_COUNTER)
++#if defined(HAVE_CLOCK_GETTIME)
+ #if defined(CLOCK_MONOTONIC)
+ #define METHOD CLOCK_MONOTONIC
+ #elif defined(CLOCK_REALTIME)
+@@ -454,7 +454,7 @@ typedef struct timespec ticks;
+ static inline ticks getticks(void)
+ {
+ struct timespec t;
+- clock_gettime(CLOCK_SGI_CYCLE, &t);
++ clock_gettime(METHOD, &t);
+ return t;
+ }
+