aboutsummaryrefslogtreecommitdiff
path: root/math/fftw3
diff options
context:
space:
mode:
authorBrendan Fabeny <bf@FreeBSD.org>2011-10-22 08:03:34 +0000
committerBrendan Fabeny <bf@FreeBSD.org>2011-10-22 08:03:34 +0000
commit33f5240ccf818a906a44748f24e8c4cd43a9e4d6 (patch)
treea49f5b20a56c49021ae899da52924c0140b25be6 /math/fftw3
parent3986be6ce8ccee747b5560763417c876d9548a05 (diff)
downloadports-33f5240ccf818a906a44748f24e8c4cd43a9e4d6.tar.gz
ports-33f5240ccf818a906a44748f24e8c4cd43a9e4d6.zip
Notes
Diffstat (limited to 'math/fftw3')
-rw-r--r--math/fftw3/Makefile38
-rw-r--r--math/fftw3/pkg-plist8
2 files changed, 30 insertions, 16 deletions
diff --git a/math/fftw3/Makefile b/math/fftw3/Makefile
index e911ace117d5..44885a7ac6b9 100644
--- a/math/fftw3/Makefile
+++ b/math/fftw3/Makefile
@@ -7,6 +7,7 @@
PORTNAME= fftw3
PORTVERSION= 3.3
+PORTREVISION?= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.fftw.org/pub/fftw/ \
ftp://ftp.fftw.org/pub/fftw/old/
@@ -25,8 +26,7 @@ USE_GNOME= gnomehack pkgconfig
USE_PERL5_BUILD=yes
USE_LDCONFIG= yes
-CONFIGURE_ARGS = --enable-openmp --enable-shared --enable-threads \
- --disable-fortran
+CONFIGURE_ARGS = --enable-shared --enable-threads --disable-fortran
CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
@@ -41,10 +41,19 @@ INSTALL_TARGET= install-pkgconfigDATA install-libLTLIBRARIES install-exec
.endif
OPTIONS= G77_WRAPPERS "Alter Fortran wrappers for use with g77" off \
+ OPENMP "Build OpenMP variant of multithreaded libraries" off \
OPTIMIZED_CFLAGS "Enable optimized CFLAGS" on
.include <bsd.port.pre.mk>
+.if defined(WITH_OPENMP)
+CONFIGURE_ARGS+= --enable-openmp
+PLIST_SUB+= OPENMP=""
+.else
+CONFIGURE_ARGS+= --disable-openmp
+PLIST_SUB+= OPENMP="@comment "
+.endif
+
.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS+= -O3 -ffast-math -fstrict-aliasing
. if !defined(WITH_DEBUG)
@@ -96,25 +105,30 @@ PLIST_SUB+= DEF="@comment "
PLIST_SUB+= FFTW3_SUFX="${FFTW3_SUFX}"
post-patch:
- @${REINPLACE_CMD} -e \
- 's|/etc/fftw|${PREFIX}/etc/fftw|' \
+ @${REINPLACE_CMD} -e 's|/etc/fftw|${PREFIX}/etc/fftw|' \
${WRKSRC}/Makefile.in \
${WRKSRC}/api/import-system-wisdom.c \
${WRKSRC}/doc/fftw3* \
${WRKSRC}/tools/*
- @${FIND} ${WRKSRC} -name \*.bak -type f -exec ${RM} -f {} \;
+ @${REINPLACE_CMD} \
+ -e '/libfftw3@PREC_SUFFIX@_threads\.la:/{N; \
+ s/$$(LIBS)/$$(PTHREAD_LIBS) &/;}' \
+ ${WRKSRC}/threads/Makefile.in
.if ${FFTW3_FLAVOR} != "default"
- @${REINPLACE_CMD} -E -e \
- '/(DIST_COMMON|bin_SCRIPTS|BUILT_SOURCES|EXTRA_DIST) =/,\
- /[^\]$$/s/[^[:blank:]]*fftw-wisdom-to-conf[^[:blank:]]*//' \
- ${WRKSRC}/tools/Makefile.in
+ @${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 \
- 's|@LIBS@|-L${LOCALBASE}/lib -lml &|'
+ @${REINPLACE_CMD} -e 's|-lm |-L${LOCALBASE}/lib -lml &|' \
+ ${WRKSRC}/configure
. endif
.endif
+post-patch-script:
+ @${FIND} ${WRKSRC} -type f \( -name \*.bak -or -name \*.orig \) \
+ -exec ${RM} -f {} \;
+
post-configure:
#After issuing --disable-fortran in order to avoid using a Fortran compiler
#during configuration, edit config.h to provide Fortran wrappers appropriate for
diff --git a/math/fftw3/pkg-plist b/math/fftw3/pkg-plist
index 06ac6afadfa1..aa24cce38313 100644
--- a/math/fftw3/pkg-plist
+++ b/math/fftw3/pkg-plist
@@ -7,10 +7,10 @@ lib/libfftw3%%FFTW3_SUFX%%.a
lib/libfftw3%%FFTW3_SUFX%%.la
lib/libfftw3%%FFTW3_SUFX%%.so
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
+%%OPENMP%%lib/libfftw3%%FFTW3_SUFX%%_omp.a
+%%OPENMP%%lib/libfftw3%%FFTW3_SUFX%%_omp.la
+%%OPENMP%%lib/libfftw3%%FFTW3_SUFX%%_omp.so
+%%OPENMP%%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