diff options
author | Brendan Fabeny <bf@FreeBSD.org> | 2011-10-17 10:08:33 +0000 |
---|---|---|
committer | Brendan Fabeny <bf@FreeBSD.org> | 2011-10-17 10:08:33 +0000 |
commit | ac39d25cb13d645037681dbc65360f16ba857b56 (patch) | |
tree | ef5a113874cbd7573264f2676a0bdd4290666ea2 /math/fftw3 | |
parent | a6cfe1d5456c7ee8c837e328c9fe08404d9fbbea (diff) | |
download | ports-ac39d25cb13d645037681dbc65360f16ba857b56.tar.gz ports-ac39d25cb13d645037681dbc65360f16ba857b56.zip |
- update fftw3* to 3.3 [1], and adjust dependent ports
- make use of optimizations by default, where possible
(quad flavor to follow shortly, and mpi at a later date)
Suggestions and patches from: ache, C. Burns, wen
Notes
Notes:
svn path=/head/; revision=283695
Diffstat (limited to 'math/fftw3')
-rw-r--r-- | math/fftw3/Makefile | 87 | ||||
-rw-r--r-- | math/fftw3/distinfo | 4 | ||||
-rw-r--r-- | math/fftw3/pkg-plist | 9 |
3 files changed, 59 insertions, 41 deletions
diff --git a/math/fftw3/Makefile b/math/fftw3/Makefile index 1a2f79e8011c..e911ace117d5 100644 --- a/math/fftw3/Makefile +++ b/math/fftw3/Makefile @@ -6,8 +6,7 @@ # $MCom: ports-experimental/math/fftw3/Makefile,v 1.1 2006/03/28 00:08:57 ahze Exp $ PORTNAME= fftw3 -PORTVERSION= 3.2.2 -PORTREVISION?= 1 +PORTVERSION= 3.3 CATEGORIES= math MASTER_SITES= ftp://ftp.fftw.org/pub/fftw/ \ ftp://ftp.fftw.org/pub/fftw/old/ @@ -26,19 +25,23 @@ USE_GNOME= gnomehack pkgconfig USE_PERL5_BUILD=yes USE_LDCONFIG= yes -CONFIGURE_ARGS= --enable-shared --enable-threads -CPPFLAGS+= ${PTHREAD_CFLAGS} -LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} +CONFIGURE_ARGS = --enable-openmp --enable-shared --enable-threads \ + --disable-fortran +CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ + PTHREAD_LIBS="${PTHREAD_LIBS}" .if ${FFTW3_FLAVOR} == "default" MAN1= fftw-wisdom-to-conf.1 fftw-wisdom.1 INFO= fftw3 .else +#For non-default flavors, only build and install the flavor-dependent components, +#so that these flavors may coexist with the default flavor MAN1= fftw${FFTW3_SUFX}-wisdom.1 INSTALL_TARGET= install-pkgconfigDATA install-libLTLIBRARIES install-exec .endif -OPTIONS= OPTIMIZED_CFLAGS "Enable optimized CFLAGS" off +OPTIONS= G77_WRAPPERS "Alter Fortran wrappers for use with g77" off \ + OPTIMIZED_CFLAGS "Enable optimized CFLAGS" on .include <bsd.port.pre.mk> @@ -47,34 +50,27 @@ CFLAGS+= -O3 -ffast-math -fstrict-aliasing . if !defined(WITH_DEBUG) CFLAGS+= -fomit-frame-pointer . endif -. if empty(CC:Mclang) -CODELET_OPTIM += -fno-schedule-insns -fno-web -fno-loop-optimize \ - --param inline-unit-growth=1000 \ - --param large-function-growth=1000 -. endif . if ${ARCH} == "i386" CFLAGS+= -malign-double -CODELET_OPTIM += -O . endif -CONFIGURE_ENV += CODELET_OPTIM="${CODELET_OPTIM}" WITHOUT_NO_STRICT_ALIASING= yes -. if !empty(MACHINE_CPU:Msse2) && ${FFTW3_FLAVOR} == "default" -CONFIGURE_ARGS+=--enable-sse2 -. elif ${FFTW3_FLAVOR} == "float" -. if !empty(MACHINE_CPU:Msse) -CONFIGURE_ARGS+=--enable-sse -. elif !empty(ARCH:Mpowerpc*) -#users should set ALTIVEC_ARG to be empty if sysctl hw.altivec = 0 on the target machine -ALTIVEC_ARG?= --enable-altivec -CONFIGURE_ARGS+= ${ALTIVEC_ARG} -. endif -. endif .endif # end WITH_OPTIMIZED_CFLAGS -.if ${FFTW3_FLAVOR} == "float" +.if ${FFTW3_FLAVOR} == "default" +. if !empty(MACHINE_CPU:Msse2) +CONFIGURE_ARGS+=--enable-sse2 +. endif +.elif ${FFTW3_FLAVOR} == "float" FFTW3_SUFX= f FFTW3_PKGNAMESUFFIX= -float CONFIGURE_ARGS+=--enable-float +. if !empty(MACHINE_CPU:Msse) +CONFIGURE_ARGS+=--enable-sse +#Unfortunately, the user must add altivec to MACHINE_CPU when desired, +#because this is not currently done in bsd.cpu.mk +. elif !empty(ARCH:Mpowerpc*) && !empty(MACHINE_CPU:Maltivec) +CONFIGURE_ARGS+=--enable-altivec +. endif .elif ${FFTW3_FLAVOR} == "long" . if ${OSVERSION} < 800000 ONLY_FOR_ARCHS = i386 sparc64 @@ -83,6 +79,12 @@ LIB_DEPENDS+= ml.0:${PORTSDIR}/math/ldouble FFTW3_SUFX= l FFTW3_PKGNAMESUFFIX= -long CONFIGURE_ARGS+=--enable-long-double +.elif ${FFTW3_FLAVOR} == "quad" +FFTW3_SUFX= q +FFTW3_PKGNAMESUFFIX= -quad +CONFIGURE_ARGS+=--enable-quad-precision +ONLY_FOR_ARCHS = i386 amd64 +USE_GCC= 4.6+ .endif .if ${FFTW3_FLAVOR} == "default" @@ -102,30 +104,41 @@ post-patch: ${WRKSRC}/tools/* @${FIND} ${WRKSRC} -name \*.bak -type f -exec ${RM} -f {} \; .if ${FFTW3_FLAVOR} != "default" - @${REINPLACE_CMD} -e \ - 's|EXTRA_DIST = fftw-wisdom-to-conf.in||; \ - s|fftw-wisdom-to-conf.in||; \ - s|fftw-wisdom-to-conf: $(top_builddir)/config.status||; \ - s|bin_SCRIPTS = fftw-wisdom-to-conf||' \ + @${REINPLACE_CMD} -E -e \ + '/(DIST_COMMON|bin_SCRIPTS|BUILT_SOURCES|EXTRA_DIST) =/,\ + /[^\]$$/s/[^[:blank:]]*fftw-wisdom-to-conf[^[:blank:]]*//' \ ${WRKSRC}/tools/Makefile.in . if ${FFTW3_FLAVOR} == "long" && ${OSVERSION} < 800000 @${REINPLACE_CMD} -e 's|cosl sinl tanl||' ${WRKSRC}/configure - @${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -E -e \ - 's|@LIBS@|-lml @LIBS@|' + @${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -e \ + 's|@LIBS@|-L${LOCALBASE}/lib -lml &|' . endif .endif post-configure: - @echo "#define F77_FUNC(name,NAME) name ## _" >>${WRKSRC}/config.h - @echo "#define F77_FUNC_(name,NAME) name ## _" >>${WRKSRC}/config.h - @echo "#define F77_FUNC_EQUIV 1" >>${WRKSRC}/config.h +#After issuing --disable-fortran in order to avoid using a Fortran compiler +#during configuration, edit config.h to provide Fortran wrappers appropriate for +#gfortran, with ac_cv_f77_mangling="lower case, underscore, no extra underscore" + @${REINPLACE_CMD} -e '/DISABLE_FORTRAN/d' ${WRKSRC}/config.h + @${ECHO_CMD} "#define F77_FUNC(name,NAME) name ## _" >> ${WRKSRC}/config.h + @${ECHO_CMD} "#define F77_FUNC_(name,NAME) name ## _" >> ${WRKSRC}/config.h + @${ECHO_CMD} "#define F77_FUNC_EQUIV 1" >> ${WRKSRC}/config.h +.if defined(WITH_G77_WRAPPERS) + @${ECHO_CMD} "#define WITH_G77_WRAPPERS 1" >> ${WRKSRC}/config.h +.endif .if ${FFTW3_FLAVOR} != "default" post-install: @${INSTALL_MAN} ${WRKSRC}/tools/fftw${FFTW3_SUFX}-wisdom.1 ${PREFIX}/man/man1 .endif -check regression-test test: build - @cd ${WRKSRC}/tests && ${SETENV} ${MAKE_ENV} ${MAKE} smallcheck +regression-test test: smallcheck + +.for t in bigcheck check exhaustive-check paranoid-check smallcheck +${t}: build + @cd ${WRKSRC}/tests; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \ + ${MAKE_ARGS} ${t} + +.endfor .include <bsd.port.post.mk> diff --git a/math/fftw3/distinfo b/math/fftw3/distinfo index def3668d1380..c8b925f8fb69 100644 --- a/math/fftw3/distinfo +++ b/math/fftw3/distinfo @@ -1,2 +1,2 @@ -SHA256 (fftw-3.2.2.tar.gz) = 6aa7ae65ee49eb99004f15899f9bb77f54759122f1a350041e81e096157d768f -SIZE (fftw-3.2.2.tar.gz) = 3495117 +SHA256 (fftw-3.3.tar.gz) = d25a98521a13933e678ce19319d03ddc915826764e1e59abd12d172c239b6aea +SIZE (fftw-3.3.tar.gz) = 3965713 diff --git a/math/fftw3/pkg-plist b/math/fftw3/pkg-plist index 4b7967b27056..06ac6afadfa1 100644 --- a/math/fftw3/pkg-plist +++ b/math/fftw3/pkg-plist @@ -1,13 +1,18 @@ bin/fftw%%FFTW3_SUFX%%-wisdom %%DEF%%bin/fftw-wisdom-to-conf %%DEF%%include/fftw3.f +%%DEF%%include/fftw3.f03 %%DEF%%include/fftw3.h lib/libfftw3%%FFTW3_SUFX%%.a lib/libfftw3%%FFTW3_SUFX%%.la lib/libfftw3%%FFTW3_SUFX%%.so -lib/libfftw3%%FFTW3_SUFX%%.so.5 +lib/libfftw3%%FFTW3_SUFX%%.so.6 +lib/libfftw3%%FFTW3_SUFX%%_omp.a +lib/libfftw3%%FFTW3_SUFX%%_omp.la +lib/libfftw3%%FFTW3_SUFX%%_omp.so +lib/libfftw3%%FFTW3_SUFX%%_omp.so.6 lib/libfftw3%%FFTW3_SUFX%%_threads.a lib/libfftw3%%FFTW3_SUFX%%_threads.la lib/libfftw3%%FFTW3_SUFX%%_threads.so -lib/libfftw3%%FFTW3_SUFX%%_threads.so.5 +lib/libfftw3%%FFTW3_SUFX%%_threads.so.6 libdata/pkgconfig/fftw3%%FFTW3_SUFX%%.pc |