chiark / gitweb /
qalc: Avoid depending on gnuplot
[termux-packages] / packages / fftw / build.sh
1 TERMUX_PKG_HOMEPAGE=http://www.fftw.org/
2 TERMUX_PKG_DESCRIPTION="Library for computing the Discrete Fourier Transform (DFT) in one or more dimensions"
3 TERMUX_PKG_VERSION=3.3.6
4 TERMUX_PKG_REVISION=2
5 TERMUX_PKG_SRCURL=http://www.fftw.org/fftw-${TERMUX_PKG_VERSION}-pl1.tar.gz
6 TERMUX_PKG_SHA256=1ef4aa8427d9785839bc767f3eb6a84fcb5e9a37c31ed77a04e7e047519a183d
7 # ac_cv_func_clock_gettime=no avoids having clock_gettime(CLOCK_SGI_CYCLE, &t)
8 # being used. It's not supported on Android but fails at runtime and, fftw
9 # does not check the return value so gets bogus values.
10 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-threads ac_cv_func_clock_gettime=no"
11 TERMUX_PKG_RM_AFTER_INSTALL="include/fftw*.f*"
12 TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="bin/ share/man/"
13
14 termux_step_post_make_install() {
15         local COMMON_ARGS="$TERMUX_PKG_EXTRA_CONFIGURE_ARGS"
16         local feature
17         for feature in float long-double; do
18                 make clean
19                 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="$COMMON_ARGS --enable-$feature"
20                 rm -Rf $TERMUX_PKG_TMPDIR/config-scripts
21                 termux_step_configure
22                 make -j $TERMUX_MAKE_PROCESSES install
23         done
24 }