summaryrefslogtreecommitdiff
path: root/math/fftw
diff options
context:
space:
mode:
authortsutsui <tsutsui@pkgsrc.org>2013-06-29 18:59:43 +0000
committertsutsui <tsutsui@pkgsrc.org>2013-06-29 18:59:43 +0000
commit35ab0f85cd34d94f5cda592fea0862b3ea6d5376 (patch)
treeb35706dccec3c3bf2b0102f77823aee5e2c0b3b6 /math/fftw
parent3e1073f11d8a902f833a4014add10127ee6f3938 (diff)
downloadpkgsrc-35ab0f85cd34d94f5cda592fea0862b3ea6d5376.tar.gz
Make fortran support an option and enable it only on supported platforms.
Fixes build failure on platforms that are not supported by g95, including NetBSD/arm 6.1. PR/47965 Ok'ed by wiz@.
Diffstat (limited to 'math/fftw')
-rw-r--r--math/fftw/Makefile8
-rw-r--r--math/fftw/options.mk19
2 files changed, 21 insertions, 6 deletions
diff --git a/math/fftw/Makefile b/math/fftw/Makefile
index 4a5071a97ac..c8bb4ef2cb0 100644
--- a/math/fftw/Makefile
+++ b/math/fftw/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2013/06/07 13:28:56 gdt Exp $
+# $NetBSD: Makefile,v 1.45 2013/06/29 18:59:43 tsutsui Exp $
DISTNAME= fftw-3.3.3
PKGREVISION= 1
@@ -19,11 +19,7 @@ USE_TOOLS+= gmake
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-shared
-# The next lines are fodder for a fortran option.
-# Swapping the comments doesn't change the PLIST. So what's the
-# benefit of not?
-USE_LANGUAGES+= fortran77
-# CONFIGURE_ARGS+= --disable-fortran
+.include "options.mk"
PKGCONFIG_OVERRIDE+= fftw.pc.in
INFO_FILES= yes
diff --git a/math/fftw/options.mk b/math/fftw/options.mk
new file mode 100644
index 00000000000..14d3612eb48
--- /dev/null
+++ b/math/fftw/options.mk
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1 2013/06/29 18:59:43 tsutsui Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.fftw
+PKG_SUPPORTED_OPTIONS= fftw-fortran
+# Enable fortran support by default on platforms supported by lang/g95.
+.if (!empty(MACHINE_ARCH:Mi386) || !empty(MACHINE_ARCH:Mx86_64) || \
+ !empty(MACHINE_ARCH:Mia64) || !empty(MACHINE_ARCH:Mpowerpc*) || \
+ !empty(MACHINE_ARCH:Mhppa) || !empty(MACHINE_ARCH:Msparc*) || \
+ !empty(MACHINE_ARCH:Malpha) || !empty(MACHINE_ARCH:Mmips*))
+PKG_SUGGESTED_OPTIONS= fftw-fortran
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mfftw-fortran)
+USE_LANGUAGES+= fortran77
+.else
+CONFIGURE_ARGS+= --disable-fortran
+.endif