From 152c0358229de6873185ea3557f2e93d53a3bb12 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Tue, 15 Mar 2011 00:52:00 +0100 Subject: [PATCH] fftw3: improved to also build single and long-double precision libraries using seperate build loops --- multimedia/fftw3/fftw3.conf | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/multimedia/fftw3/fftw3.conf b/multimedia/fftw3/fftw3.conf index 6b1b61009..f31445930 100644 --- a/multimedia/fftw3/fftw3.conf +++ b/multimedia/fftw3/fftw3.conf @@ -20,8 +20,23 @@ [ "$arch" = "x86" ] && var_append confopt " " "--enable-i386-hacks" var_append confopt " " "--enable-threads" -var_append confopt " " "--enable-float" if [ ! "`type -p f77`" ] ; then var_append confopt ' ' "--disable-fortran" fi + +# There are 3 APIs available which have to be build seperately +# 1. double precision (default) +# 2. single precision (--enable-single or --enable-float) +# 3. long-double precision (--enable-long-double) +buildloops=3 + +pkg_fftw3_preconf() { + if [ $buildloop -eq 2 ]; then + var_append extraconfopt " " "--enable-float" + elif [ $buildloop -eq 3 ]; then + var_remove extraconfopt " " "--enable-float" + var_append extraconfopt " " "--enable-long-double" + fi +} +hook_add preconf 5 'pkg_fftw3_preconf'