pkgsrc/math/fftw/Makefile.common
wiz 6f2c057073 fftw*: update to 3.3.10.
FFTW 3.3.10:

* Fix bug that would cause 2-way SIMD (notably SSE2 in double precision)
  to attempt unaligned accesses in certain obscure cases, causing
  segfaults.

  The following test triggers the bug (SSE2, double precision):

    ./tests/bench -oexhaustive r4*2:5:3

  This test computes a pair of length-4 real->complex transforms where
  the second input is 5 real numbers away from the first input.  That
  is, there is a gap of one real number between the first and second
  input array.  The -oexhaustive level allow FFTW to attempt to
  compute this transform by reducing it to a pair of complex
  transforms of length 2, but now the second input is not aligned to a
  complex-number boundary.  The fact that 5 is odd is the problem.

  The bug cannot occur in complex->complex transforms because the
  complex interface accepts strides in units of complex numbers, so
  strides are aligned by construction.

  This bug has been around at least since fftw-3.1.2 (July 2006), and
  probably since fftw-3.0 (2003).
2021-09-29 13:34:48 +00:00

67 lines
1.7 KiB
Text

# $NetBSD: Makefile.common,v 1.5 2021/09/29 13:34:48 wiz Exp $
# used by math/fftw/Makefile
# used by math/fftw-long/Makefile
# used by math/fftw-quad/Makefile
DISTNAME= fftw-3.3.10
CATEGORIES= math
MASTER_SITES= ftp://ftp.fftw.org/pub/fftw/
MASTER_SITES+= http://www.fftw.org/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.fftw.org/
LICENSE= gnu-gpl-v2
DISTINFO_FILE= ${.CURDIR}/../../math/fftw/distinfo
#PATCHDIR= ${.CURDIR}/../../math/fftw/patches
USE_LANGUAGES= c
USE_LIBTOOL= yes
USE_TOOLS+= gmake
USE_TOOLS+= perl
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-shared
TEST_TARGET= check
.include "../../mk/bsd.prefs.mk"
PKGCONFIG_OVERRIDE+= fftw.pc.in
INFO_FILES= yes
.include "options.mk"
# Test will only use the default build.
USE_TOOLS+= perl:test sed
PLIST_VARS+= pthreads
PTHREAD_OPTS= native
.include "../../mk/pthread.buildlink3.mk"
.if ${PTHREAD_TYPE} == "native"
CONFIGURE_ARGS+= --enable-threads
PLIST.pthreads= yes
.endif
CONFIGURE_SCRIPT= ./configure
.for p in ${FFTW_PRECISION}
CONFIGURE_DIRS+= build/${p}
MAKE_DIRS+= build/${p}
.endfor
pre-configure:
.for d in ${CONFIGURE_DIRS}
mkdir -p ${WRKSRC:Q}/${d}
. if ${d} == "build/float"
printf '#!/bin/sh\nexec ../../configure "$$@" --enable-${d:S,build/,,} ${FFTW_FLOAT_OPTS}' \
> ${WRKSRC:Q}/${d}/configure
. elif ${d} == "build/double"
printf '#!/bin/sh\nexec ../../configure "$$@" ${FFTW_DOUBLE_OPTS}' \
> ${WRKSRC:Q}/${d}/configure
. elif ${d} == "build/quad-precision"
printf '#!/bin/sh\nexec ../../configure "$$@" --enable-${d:S,build/,,} --disable-mpi\n' \
> ${WRKSRC:Q}/${d}/configure
. else
printf '#!/bin/sh\nexec ../../configure "$$@" --enable-${d:S,build/,,}\n' \
> ${WRKSRC:Q}/${d}/configure
. endif
chmod +x ${WRKSRC:Q}/${d}/configure
.endfor