summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-05-16 10:14:09 +0000
committernia <nia@pkgsrc.org>2021-05-16 10:14:09 +0000
commited3facdd2495ee506a5dc0b622ddabac2bd776b7 (patch)
treea1a2160562a300cf3d9af5d2b44498723b2212f3 /math
parentdbf978b9580df217e6b0821b55bcf3b96314d1a1 (diff)
downloadpkgsrc-ed3facdd2495ee506a5dc0b622ddabac2bd776b7.tar.gz
split fftw package into -long and -quad precision variants
the package previously used PKG_OPTIONS for this, but PKG_OPTIONS are harmful in the case that they effect the resulting ABI of library packages. this way, things that actually need fftwl and fftwq can depend on these sub-packages. this also fixes fftwq on NetBSD by making it pull in libquadmath. another thing about PKG_OPTIONS for library components is that they mean certain components don't get tested...
Diffstat (limited to 'math')
-rw-r--r--math/fftw-long/DESCR7
-rw-r--r--math/fftw-long/Makefile16
-rw-r--r--math/fftw-long/PLIST10
-rw-r--r--math/fftw-long/buildlink3.mk14
-rw-r--r--math/fftw-quad/DESCR6
-rw-r--r--math/fftw-quad/Makefile17
-rw-r--r--math/fftw-quad/PLIST9
-rw-r--r--math/fftw-quad/buildlink3.mk14
-rw-r--r--math/fftw/DESCR16
-rw-r--r--math/fftw/Makefile63
-rw-r--r--math/fftw/Makefile.common67
-rw-r--r--math/fftw/PLIST19
-rw-r--r--math/fftw/options.mk18
13 files changed, 174 insertions, 102 deletions
diff --git a/math/fftw-long/DESCR b/math/fftw-long/DESCR
new file mode 100644
index 00000000000..81626869fe1
--- /dev/null
+++ b/math/fftw-long/DESCR
@@ -0,0 +1,7 @@
+FFTW is a C subroutine library for computing the discrete Fourier transform
+(DFT) in one or more dimensions, of arbitrary input size, and of both real
+and complex data (as well as of even/odd data, i.e. the discrete cosine/sine
+transforms or DCT/DST).
+
+This package contains the long double precision floating point FFTW
+libraries.
diff --git a/math/fftw-long/Makefile b/math/fftw-long/Makefile
new file mode 100644
index 00000000000..edfa357d4dc
--- /dev/null
+++ b/math/fftw-long/Makefile
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1 2021/05/16 10:14:09 nia Exp $
+
+PKGNAME= ${DISTNAME:S/fftw-/fftw-long-/1}
+
+COMMENT= Fast C routines to compute DFTs (long double precision)
+
+FFTW_PRECISION= long-double
+
+post-install:
+ ${RM} -f ${DESTDIR}${PREFIX}/bin/fftw-wisdom-to-conf
+ ${RM} -f ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/fftw-wisdom-to-conf.1
+ ${RM} -rf ${DESTDIR}${PREFIX}/info ${DESTDIR}${PREFIX}/include
+
+.include "../../math/fftw/Makefile.common"
+.include "../../math/fftw/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/math/fftw-long/PLIST b/math/fftw-long/PLIST
new file mode 100644
index 00000000000..978ed2ec365
--- /dev/null
+++ b/math/fftw-long/PLIST
@@ -0,0 +1,10 @@
+@comment $NetBSD: PLIST,v 1.1 2021/05/16 10:14:09 nia Exp $
+bin/fftwl-wisdom
+lib/cmake/fftw3/FFTW3lConfig.cmake
+lib/cmake/fftw3/FFTW3lConfigVersion.cmake
+lib/libfftw3l.la
+${PLIST.mpi}lib/libfftw3l_mpi.la
+${PLIST.omp}lib/libfftw3l_omp.la
+${PLIST.pthreads}lib/libfftw3l_threads.la
+lib/pkgconfig/fftw3l.pc
+man/man1/fftwl-wisdom.1
diff --git a/math/fftw-long/buildlink3.mk b/math/fftw-long/buildlink3.mk
new file mode 100644
index 00000000000..e50a2a884a9
--- /dev/null
+++ b/math/fftw-long/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2021/05/16 10:14:09 nia Exp $
+
+BUILDLINK_TREE+= fftw-long
+
+.if !defined(FFTW_LONG_BUILDLINK3_MK)
+FFTW_LONG_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.fftw-long+= fftw-long>=3.3.9
+BUILDLINK_PKGSRCDIR.fftw-long?= ../../math/fftw-long
+
+.include "../../math/fftw/buildlink3.mk"
+.endif # FFTW_LONG_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -fftw-long
diff --git a/math/fftw-quad/DESCR b/math/fftw-quad/DESCR
new file mode 100644
index 00000000000..3c30037e174
--- /dev/null
+++ b/math/fftw-quad/DESCR
@@ -0,0 +1,6 @@
+FFTW is a C subroutine library for computing the discrete Fourier transform
+(DFT) in one or more dimensions, of arbitrary input size, and of both real
+and complex data (as well as of even/odd data, i.e. the discrete cosine/sine
+transforms or DCT/DST).
+
+This package contains the quad precision floating point FFTW libraries.
diff --git a/math/fftw-quad/Makefile b/math/fftw-quad/Makefile
new file mode 100644
index 00000000000..2cd4d0d9dea
--- /dev/null
+++ b/math/fftw-quad/Makefile
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2021/05/16 10:14:09 nia Exp $
+
+PKGNAME= ${DISTNAME:S/fftw-/fftw-quad-/1}
+
+COMMENT= Fast C routines to compute DFTs (quad precision)
+
+FFTW_PRECISION= quad-precision
+
+post-install:
+ ${RM} -f ${DESTDIR}${PREFIX}/bin/fftw-wisdom-to-conf
+ ${RM} -f ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/fftw-wisdom-to-conf.1
+ ${RM} -rf ${DESTDIR}${PREFIX}/info ${DESTDIR}${PREFIX}/include
+
+.include "../../math/fftw/Makefile.common"
+.include "../../math/fftw/buildlink3.mk"
+.include "../../math/libquadmath/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/math/fftw-quad/PLIST b/math/fftw-quad/PLIST
new file mode 100644
index 00000000000..a919d11143f
--- /dev/null
+++ b/math/fftw-quad/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2021/05/16 10:14:09 nia Exp $
+bin/fftwq-wisdom
+lib/cmake/fftw3/FFTW3qConfig.cmake
+lib/cmake/fftw3/FFTW3qConfigVersion.cmake
+lib/libfftw3q.la
+${PLIST.omp}lib/libfftw3q_omp.la
+${PLIST.pthreads}lib/libfftw3q_threads.la
+lib/pkgconfig/fftw3q.pc
+man/man1/fftwq-wisdom.1
diff --git a/math/fftw-quad/buildlink3.mk b/math/fftw-quad/buildlink3.mk
new file mode 100644
index 00000000000..094a46db55b
--- /dev/null
+++ b/math/fftw-quad/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2021/05/16 10:14:09 nia Exp $
+
+BUILDLINK_TREE+= fftw-quad
+
+.if !defined(FFTW_QUAD_BUILDLINK3_MK)
+FFTW_QUAD_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.fftw-quad+= fftw-quad>=3.3.9
+BUILDLINK_PKGSRCDIR.fftw-quad?= ../../math/fftw-quad
+
+.include "../../math/fftw/buildlink3.mk"
+.endif # FFTW_QUAD_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -fftw-quad
diff --git a/math/fftw/DESCR b/math/fftw/DESCR
index 72ebaaaca3c..ea211c2f300 100644
--- a/math/fftw/DESCR
+++ b/math/fftw/DESCR
@@ -1,9 +1,7 @@
-FFTW is a free collection of fast C routines for computing the
-Discrete Fourier Transform in one or more dimensions. It includes
-complex, real, symmetric, and parallel transforms, and can handle
-arbitrary array sizes efficiently. FFTW is typically faster than
-other publically-available FFT implementations, and is even
-competitive with vendor-tuned libraries. (See our web page for
-extensive benchmarks.) To achieve this performance, FFTW uses novel
-code-generation and runtime self-optimization techniques (along with
-many other tricks).
+FFTW is a C subroutine library for computing the discrete Fourier transform
+(DFT) in one or more dimensions, of arbitrary input size, and of both real
+and complex data (as well as of even/odd data, i.e. the discrete cosine/sine
+transforms or DCT/DST).
+
+This package contains the single and double precision floating point FFTW
+libraries.
diff --git a/math/fftw/Makefile b/math/fftw/Makefile
index c4ae12d430a..a942cb3d132 100644
--- a/math/fftw/Makefile
+++ b/math/fftw/Makefile
@@ -1,71 +1,16 @@
-# $NetBSD: Makefile,v 1.73 2021/05/16 08:44:33 nia Exp $
+# $NetBSD: Makefile,v 1.74 2021/05/16 10:14:09 nia Exp $
-DISTNAME= fftw-3.3.9
PKGREVISION= 6
-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/
-COMMENT= Collection of fast C routines to compute DFTs
-LICENSE= gnu-gpl-v2
+COMMENT= Fast C routines to compute DFTs (single and double precision)
SUPERSEDES= fftwf-[0-9]*
CONFLICTS+= fftwf-[0-9]*
-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
-
# The standard precision is double. We always build at least
-# single in addition. Others enabled by options.
+# single in addition.
FFTW_PRECISION= double float
-.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
+.include "Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/math/fftw/Makefile.common b/math/fftw/Makefile.common
new file mode 100644
index 00000000000..8429f6e3b5f
--- /dev/null
+++ b/math/fftw/Makefile.common
@@ -0,0 +1,67 @@
+# $NetBSD: Makefile.common,v 1.4 2021/05/16 10:14:09 nia Exp $
+# used by math/fftw/Makefile
+# used by math/fftw-long/Makefile
+# used by math/fftw-quad/Makefile
+
+DISTNAME= fftw-3.3.9
+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
diff --git a/math/fftw/PLIST b/math/fftw/PLIST
index 090db330621..9765d359ece 100644
--- a/math/fftw/PLIST
+++ b/math/fftw/PLIST
@@ -1,9 +1,7 @@
-@comment $NetBSD: PLIST,v 1.15 2021/05/07 12:31:22 thor Exp $
+@comment $NetBSD: PLIST,v 1.16 2021/05/16 10:14:09 nia Exp $
bin/fftw-wisdom
bin/fftw-wisdom-to-conf
bin/fftwf-wisdom
-${PLIST.long}bin/fftwl-wisdom
-${PLIST.quad}bin/fftwq-wisdom
${PLIST.mpi}include/fftw3-mpi.f03
${PLIST.mpi}include/fftw3-mpi.h
include/fftw3.f
@@ -17,10 +15,6 @@ lib/cmake/fftw3/FFTW3Config.cmake
lib/cmake/fftw3/FFTW3ConfigVersion.cmake
lib/cmake/fftw3/FFTW3fConfig.cmake
lib/cmake/fftw3/FFTW3fConfigVersion.cmake
-${PLIST.long}lib/cmake/fftw3/FFTW3lConfig.cmake
-${PLIST.long}lib/cmake/fftw3/FFTW3lConfigVersion.cmake
-${PLIST.quad}lib/cmake/fftw3/FFTW3qConfig.cmake
-${PLIST.quad}lib/cmake/fftw3/FFTW3qConfigVersion.cmake
lib/libfftw3.la
${PLIST.mpi}lib/libfftw3_mpi.la
${PLIST.omp}lib/libfftw3_omp.la
@@ -29,19 +23,8 @@ lib/libfftw3f.la
${PLIST.mpi}lib/libfftw3f_mpi.la
${PLIST.omp}lib/libfftw3f_omp.la
${PLIST.pthreads}lib/libfftw3f_threads.la
-${PLIST.long}lib/libfftw3l.la
-${PLIST.mpi}${PLIST.long}lib/libfftw3l_mpi.la
-${PLIST.omp}${PLIST.long}lib/libfftw3l_omp.la
-${PLIST.pthreads}${PLIST.long}lib/libfftw3l_threads.la
-${PLIST.quad}lib/libfftw3q.la
-${PLIST.omp}${PLIST.quad}lib/libfftw3q_omp.la
-${PLIST.pthreads}${PLIST.quad}lib/libfftw3q_threads.la
lib/pkgconfig/fftw3.pc
lib/pkgconfig/fftw3f.pc
-${PLIST.long}lib/pkgconfig/fftw3l.pc
-${PLIST.quad}lib/pkgconfig/fftw3q.pc
man/man1/fftw-wisdom-to-conf.1
man/man1/fftw-wisdom.1
man/man1/fftwf-wisdom.1
-${PLIST.long}man/man1/fftwl-wisdom.1
-${PLIST.quad}man/man1/fftwq-wisdom.1
diff --git a/math/fftw/options.mk b/math/fftw/options.mk
index 107932d0d3c..53ad33e276f 100644
--- a/math/fftw/options.mk
+++ b/math/fftw/options.mk
@@ -1,9 +1,7 @@
-# $NetBSD: options.mk,v 1.9 2021/05/16 08:44:33 nia Exp $
+# $NetBSD: options.mk,v 1.10 2021/05/16 10:14:09 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.fftw
-# fftw (double) and fftwf (single) are always built, you can add
-# fftwl (long) and fftwq (quad).
-PKG_SUPPORTED_OPTIONS= fftw-fortran openmp mpi fftw-long fftw-quad
+PKG_SUPPORTED_OPTIONS= fftw-fortran openmp mpi
.include "../../mk/bsd.prefs.mk"
@@ -56,15 +54,3 @@ PLIST.mpi= yes
CONFIGURE_ARGS+= --enable-mpi
.include "../../mk/mpi.buildlink3.mk"
.endif
-
-PLIST_VARS+= long
-.if !empty(PKG_OPTIONS:Mfftw-long)
-FFTW_PRECISION+= long-double
-PLIST.long= yes
-.endif
-
-PLIST_VARS+= quad
-.if !empty(PKG_OPTIONS:Mfftw-quad)
-FFTW_PRECISION+= quad-precision
-PLIST.quad= yes
-.endif