diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-05-28 18:02:43 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-05-28 18:02:43 +0000 |
commit | c01ec2e566604c8ce7c7ec82f742c4cdbc2e88aa (patch) | |
tree | 6165df03ba5916b97dc6b5d952721c79f461be13 /math | |
parent | 87a32678ace250f951d38e2729215bd538d41612 (diff) | |
download | ports-c01ec2e566604c8ce7c7ec82f742c4cdbc2e88aa.tar.gz ports-c01ec2e566604c8ce7c7ec82f742c4cdbc2e88aa.zip |
- Build and install fftwf library
- Add new knob to enable SSE optimizations
PR: ports/67271
Submitted by: michael johnson <ahze@ahze.net> (maintainer)
Notes
Notes:
svn path=/head/; revision=110220
Diffstat (limited to 'math')
-rw-r--r-- | math/fftw3/Makefile | 61 | ||||
-rw-r--r-- | math/fftw3/pkg-plist | 6 |
2 files changed, 63 insertions, 4 deletions
diff --git a/math/fftw3/Makefile b/math/fftw3/Makefile index 1c568e3223a0..4085f0d76a15 100644 --- a/math/fftw3/Makefile +++ b/math/fftw3/Makefile @@ -7,6 +7,7 @@ PORTNAME= fftw3 PORTVERSION= 3.0.1 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= ftp://ftp.fftw.org/pub/fftw/ \ ftp://ftp.fftw.org/pub/fftw/old/ \ @@ -20,34 +21,86 @@ COMMENT= Fast C routines to compute the Discrete Fourier Transform USE_GMAKE= yes USE_LIBTOOL_VER=13 USE_GNOME= gnomehack gnomeprefix gnometarget lthack pkgconfig +USE_REINPLACE= yes INSTALLS_SHLIB= yes -MAN1= fftw-wisdom-to-conf.1 fftw-wisdom.1 +MAN1= fftw-wisdom-to-conf.1 fftw-wisdom.1 fftwf-wisdom.1 INFO= fftw3 -CONFIGURE_ARGS= --enable-shared +CONFIGURE_ARGS= --enable-shared --with-our-malloc16 CONFIGURE_ENV= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \ LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS}" +# FFTW --enable-single Options +CONFIGURE_ARGS_FFTW3F=--enable-single ${CONFIGURE_ARGS} +FFTW3F_WRKSRC= ${WRKDIR}/${DISTNAME}-3F +FFTW3F_INSTALL_TARGET=install-pkgconfigDATA install-libLTLIBRARIES install-exec OPTIONS= OPTIMIZED_CFLAGS "Enable optimized CFLAGS" off \ OPTIMIZED_ATHLON "Enable AMD K7(Athlon) optimizations" off \ + SSE "Enable SSE optimized routines" off \ SMP_THREADS "Enable FFTW SMP threads library" off .include <bsd.port.pre.mk> .if defined(WITH_OPTIMIZED_CFLAGS) && !defined(WITH_OPTIMIZED_ATHLON) -CONFIGURE_ENV+= CFLAGS="${CFLAGS} -O2 -ffast-math -fomit-frame-pointer" +CONFIGURE_ENV+= CFLAGS="${CFLAGS:N-O:N-O*} -O2 -ffast-math -fomit-frame-pointer" .endif .if defined(WITH_OPTIMIZED_ATHLON) CONFIGURE_ARGS+=--enable-k7 -CONFIGURE_ENV+= CFLAGS="${CFLAGS} -O3 -fomit-frame-pointer -fno-schedule-insns \ +CONFIGURE_ENV+= CFLAGS="${CFLAGS:N-O:N-O*} -O3 -fomit-frame-pointer -fno-schedule-insns \ -malign-double -fstrict-aliasing -mpreferred-stack-boundary=4 \ -ffast-math" .endif +.if defined(WITH_SSE) +CONFIGURE_ARGS_FFTW3F+=--enable-sse +CONFIGURE_ENV+= CFLAGS="${CFLAGS:N-O:N-O*} -O2" +.endif + .if defined(WITH_SMP_THREADS) CONFIGURE_ARGS+=--enable-threads .endif +post-patch: + @${REINPLACE_CMD} -e \ + 's|/etc/fftw|${PREFIX}/etc/fftw|' \ + ${WRKSRC}/Makefile.in \ + ${WRKSRC}/api/import-system-wisdom.c \ + ${WRKSRC}/doc/fftw3* \ + ${WRKSRC}/tools/fftw*wisdom.1 + @${FIND} ${WRKSRC} -name \*.bak -type f -exec ${RM} -f {} \; + +pre-configure: + @${CP} -Rf ${WRKSRC} ${FFTW3F_WRKSRC} + @${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||' \ + ${FFTW3F_WRKSRC}/tools/Makefile.in + +post-configure: + @${ECHO_MSG} "===> Configuring for ${PORTNAME}-${PORTVERSION} (short)" + @(cd ${FFTW3F_WRKSRC} && \ + ${SETENV} CC="${CC}" CXX="${CXX}" \ + CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \ + INSTALL_DATA="${INSTALL_DATA}" \ + INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ + INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ + ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS_FFTW3F}) + +post-build: + @${ECHO_MSG} "===> Building for ${PORTNAME}-${PORTVERSION} (short)" + @(cd ${FFTW3F_WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) + +do-install: + @(cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) + @(cd ${FFTW3F_WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${FFTW3F_INSTALL_TARGET}) + @${INSTALL_MAN} ${FFTW3F_WRKSRC}/tools/fftwf-wisdom.1 ${PREFIX}/man/man1 + .include <bsd.port.post.mk> diff --git a/math/fftw3/pkg-plist b/math/fftw3/pkg-plist index fb557031a211..18828aeb690e 100644 --- a/math/fftw3/pkg-plist +++ b/math/fftw3/pkg-plist @@ -1,8 +1,14 @@ bin/fftw-wisdom bin/fftw-wisdom-to-conf +bin/fftwf-wisdom include/fftw3.f include/fftw3.h lib/libfftw3.a lib/libfftw3.so lib/libfftw3.so.3 +lib/libfftw3f.a +lib/libfftw3f.la +lib/libfftw3f.so +lib/libfftw3f.so.3 libdata/pkgconfig/fftw3.pc +libdata/pkgconfig/fftw3f.pc |