- Split fftw3 in to master/slave ports this patch is set up to support -float and -long but the -long port does not fully work because freebsd does not currently support long double trigonometric routines so I will wait to submit fftw3-long Fix: -- Begin math-fftw3.patch -- -- End math-fftw3.patch -- -- Begin math-fftw3-float.shar -- -- End math-fftw3-float.shar ----YHrnKbPNPnmCC1XmNX0b5nwGLeAYDLe1RknjyAzeIr1MLASu Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" Index: Makefile =================================================================== RCS file: /usr/opt/cvs/freebsd-src/ports/math/fftw3/Makefile,v retrieving revision 1.25 diff -u -r1.25 Makefile --- Makefile 22 Aug 2004 12:25:36 -0000 1.25 +++ Makefile 2 Sep 2004 04:43:43 -0000 @@ -7,34 +7,43 @@ PORTNAME= fftw3 PORTVERSION= 3.0.1 -PORTREVISION= 1 +PORTREVISION?= 2 CATEGORIES= math MASTER_SITES= ftp://ftp.fftw.org/pub/fftw/ \ http://www.fftw.org/ \ ftp://theory.lcs.mit.edu/pub/fftw/ \ ftp://pm.cse.rmit.edu.au/pub/dsp/fftw/ +PKGNAMESUFFIX= ${FFTW3_PKGNAMESUFFIX} DISTNAME= fftw-${PORTVERSION} -MAINTAINER= ahze@ahze.net -COMMENT= Fast C routines to compute the Discrete Fourier Transform +MAINTAINER?= ahze@ahze.net +COMMENT?= Fast C routines to compute the Discrete Fourier Transform + +# current flavors: default, float, and long +FFTW3_FLAVOR?= default +FFTW3_SUFX= USE_GMAKE= yes -USE_INC_LIBTOOL_VER=15 +USE_LIBTOOL_VER=15 USE_GNOME= gnomehack gnomeprefix gnometarget lthack pkgconfig USE_REINPLACE= yes USE_PERL5_BUILD=yes INSTALLS_SHLIB= yes -MAN1= fftw-wisdom-to-conf.1 fftw-wisdom.1 fftwf-wisdom.1 +.if defined(FFTW3_FLAVOR) && ${FFTW3_FLAVOR}=="default" +MAN1= fftw-wisdom-to-conf.1 fftw-wisdom.1 INFO= fftw3 +.else +MAN1= fftw${FFTW3_SUFX}-wisdom.1 +.endif CONFIGURE_ARGS= --enable-shared CONFIGURE_ENV= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \ LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS}" -# FFTW --enable-single Options -CONFIGURE_ARGS_FFTW3F=--enable-single ${CONFIGURE_ARGS:N--enable-sse2} -FFTW3F_WRKSRC= ${WRKDIR}/${DISTNAME}-3F -FFTW3F_INSTALL_TARGET=install-pkgconfigDATA install-libLTLIBRARIES install-exec + +.if defined(FFTW3_FLAVOR) && ${FFTW3_FLAVOR}!="default" +INSTALL_TARGET=install-pkgconfigDATA install-libLTLIBRARIES install-exec +.endif OPTIONS= OPTIMIZED_CFLAGS "Enable optimized CFLAGS" off \ SMP_THREADS "Enable FFTW SMP threads library" off @@ -62,8 +71,13 @@ .if ${OSVERSION} < 500000 USE_GCC= 3.3 .endif +.if ${FFTW3_FLAVOR}=="default" CONFIGURE_ARGS+=--enable-sse2 -CONFIGURE_ARGS_FFTW3F+=--enable-sse +.else +.if ${FFTW3_FLAVOR}=="float" +CONFIGURE_ARGS+=--enable-sse +.endif +.endif CONFIGURE_ENV+= CFLAGS="${CFLAGS:N-O:N-O*} -O2" .endif @@ -71,6 +85,28 @@ CONFIGURE_ARGS+=--enable-threads .endif +.if defined(FFTW3_FLAVOR) +.if ${FFTW3_FLAVOR}=="float" +FFTW3_SUFX= f +FFTW3_PKGNAMESUFFIX= -float +CONFIGURE_ARGS+=--enable-float +.else +.if ${FFTW3_FLAVOR}=="long" +FFTW3_SUFX= l +FFTW3_PKGNAMESUFFIX= -long +CONFIGURE_ARGS+=--enable-long-double +.endif +.endif +.endif + +.if ${FFTW3_FLAVOR}=="default" +PLIST_SUB+= DEF="" +.else +PLIST_SUB+= DEF="@comment " +.endif + +PLIST_SUB+= FFTW3_SUFX="${FFTW3_SUFX}" + post-patch: @${REINPLACE_CMD} -e \ 's|/etc/fftw|${PREFIX}/etc/fftw|' \ @@ -79,37 +115,18 @@ ${WRKSRC}/doc/fftw3* \ ${WRKSRC}/tools/fftw*wisdom.1 @${FIND} ${WRKSRC} -name \*.bak -type f -exec ${RM} -f {} \; - -pre-configure: - @${CP} -Rf ${WRKSRC} ${FFTW3F_WRKSRC} +.if defined(FFTW3_FLAVOR) && ${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||' \ - ${FFTW3F_WRKSRC}/tools/Makefile.in + ${WRKSRC}/tools/Makefile.in +.endif -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} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) - -do-install: - @(cd ${WRKSRC} && \ - ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) - @(cd ${FFTW3F_WRKSRC} && \ - ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${FFTW3F_INSTALL_TARGET}) - @${INSTALL_MAN} ${FFTW3F_WRKSRC}/tools/fftwf-wisdom.1 ${PREFIX}/man/man1 +.if defined(FFTW3_FLAVOR) && ${FFTW3_FLAVOR}!="default" +post-install: + @${INSTALL_MAN} ${WRKSRC}/tools/fftw${FFTW3_SUFX}-wisdom.1 ${PREFIX}/man/man1 +.endif .include <bsd.port.post.mk> Index: pkg-plist =================================================================== RCS file: /usr/opt/cvs/freebsd-src/ports/math/fftw3/pkg-plist,v retrieving revision 1.8 diff -u -r1.8 pkg-plist --- pkg-plist 14 Aug 2004 15:24:20 -0000 1.8 +++ pkg-plist 2 Sep 2004 04:43:06 -0000 @@ -1,15 +1,8 @@ -bin/fftw-wisdom -bin/fftw-wisdom-to-conf -bin/fftwf-wisdom -include/fftw3.f -include/fftw3.h -lib/libfftw3.a -lib/libfftw3.la -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 +bin/fftw%%FFTW3_SUFX%%-wisdom +%%DEF%%bin/fftw-wisdom-to-conf +%%DEF%%include/fftw3.f +%%DEF%%include/fftw3.h +lib/libfftw3%%FFTW3_SUFX%%.a +lib/libfftw3%%FFTW3_SUFX%%.so +lib/libfftw3%%FFTW3_SUFX%%.so.3 +libdata/pkgconfig/fftw3%%FFTW3_SUFX%%.pc
Responsible Changed From-To: freebsd-ports-bugs->ahze Mine
State Changed From-To: open->closed Committed!