pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/math split fftw package into -long and -quad precision...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/69100147c453
branches:  trunk
changeset: 452801:69100147c453
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun May 16 10:14:09 2021 +0000

description:
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:

 math/fftw-long/DESCR         |   7 ++++
 math/fftw-long/Makefile      |  16 ++++++++++
 math/fftw-long/PLIST         |  10 ++++++
 math/fftw-long/buildlink3.mk |  14 +++++++++
 math/fftw-quad/DESCR         |   6 +++
 math/fftw-quad/Makefile      |  17 +++++++++++
 math/fftw-quad/PLIST         |   9 +++++
 math/fftw-quad/buildlink3.mk |  14 +++++++++
 math/fftw/DESCR              |  16 ++++-----
 math/fftw/Makefile           |  63 ++--------------------------------------
 math/fftw/Makefile.common    |  67 ++++++++++++++++++++++++++++++++++++++++++++
 math/fftw/PLIST              |  19 +-----------
 math/fftw/options.mk         |  18 +----------
 13 files changed, 174 insertions(+), 102 deletions(-)

diffs (truncated from 371 to 300 lines):

diff -r 20e5ed20261b -r 69100147c453 math/fftw-long/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fftw-long/DESCR      Sun May 16 10:14:09 2021 +0000
@@ -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 -r 20e5ed20261b -r 69100147c453 math/fftw-long/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fftw-long/Makefile   Sun May 16 10:14:09 2021 +0000
@@ -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 -r 20e5ed20261b -r 69100147c453 math/fftw-long/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fftw-long/PLIST      Sun May 16 10:14:09 2021 +0000
@@ -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 -r 20e5ed20261b -r 69100147c453 math/fftw-long/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fftw-long/buildlink3.mk      Sun May 16 10:14:09 2021 +0000
@@ -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 -r 20e5ed20261b -r 69100147c453 math/fftw-quad/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fftw-quad/DESCR      Sun May 16 10:14:09 2021 +0000
@@ -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 -r 20e5ed20261b -r 69100147c453 math/fftw-quad/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fftw-quad/Makefile   Sun May 16 10:14:09 2021 +0000
@@ -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 -r 20e5ed20261b -r 69100147c453 math/fftw-quad/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fftw-quad/PLIST      Sun May 16 10:14:09 2021 +0000
@@ -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 -r 20e5ed20261b -r 69100147c453 math/fftw-quad/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fftw-quad/buildlink3.mk      Sun May 16 10:14:09 2021 +0000
@@ -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 -r 20e5ed20261b -r 69100147c453 math/fftw/DESCR
--- a/math/fftw/DESCR   Sun May 16 10:11:07 2021 +0000
+++ b/math/fftw/DESCR   Sun May 16 10:14:09 2021 +0000
@@ -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 -r 20e5ed20261b -r 69100147c453 math/fftw/Makefile
--- a/math/fftw/Makefile        Sun May 16 10:11:07 2021 +0000
+++ b/math/fftw/Makefile        Sun May 16 10:14:09 2021 +0000
@@ -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@localhost
-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 -r 20e5ed20261b -r 69100147c453 math/fftw/Makefile.common
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fftw/Makefile.common Sun May 16 10:14:09 2021 +0000
@@ -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@localhost
+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 -r 20e5ed20261b -r 69100147c453 math/fftw/PLIST
--- a/math/fftw/PLIST   Sun May 16 10:11:07 2021 +0000
+++ b/math/fftw/PLIST   Sun May 16 10:14:09 2021 +0000
@@ -1,9 +1,7 @@
-@comment $NetBSD: PLIST,v 1.15 2021/05/07 12:31:22 thor Exp $



Home | Main Index | Thread Index | Old Index