[BACK]Return to Makefile.common CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / math / fftw

File: [cvs.NetBSD.org] / pkgsrc / math / fftw / Makefile.common (download)

Revision 1.5, Wed Sep 29 13:34:48 2021 UTC (14 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, HEAD
Changes since 1.4: +3 -3 lines

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).

# $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