[143304] trunk/dports/math/itsol/Portfile
dstrubbe at macports.org
dstrubbe at macports.org
Sat Dec 12 09:25:13 PST 2015
Revision: 143304
https://trac.macports.org/changeset/143304
Author: dstrubbe at macports.org
Date: 2015-12-09 19:15:59 -0800 (Wed, 09 Dec 2015)
Log Message:
-----------
itsol: Use compilers portgroup for Fortran variants.
Modified Paths:
--------------
trunk/dports/math/itsol/Portfile
Modified: trunk/dports/math/itsol/Portfile
===================================================================
--- trunk/dports/math/itsol/Portfile 2015-12-10 02:56:09 UTC (rev 143303)
+++ trunk/dports/math/itsol/Portfile 2015-12-10 03:15:59 UTC (rev 143304)
@@ -3,6 +3,7 @@
PortSystem 1.0
PortGroup muniversal 1.0
+PortGroup compilers 1.0
name itsol
version 2.0.0
@@ -38,22 +39,9 @@
patch-makefile.diff \
patch-TESTS-matfile.diff
-depends_lib path:lib/libgcc/libgcc_s.1.dylib:libgcc
+compilers.choose fc
+compilers.setup require_fortran
-#########################
-# set up fortran variants
-
-set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
-set gcc_default "4.8"
-
-# create g95 variant, with full conflicts of GCC versions
-
-set gcc_conflicts ""
-foreach ver ${gcc_versions} {
- set gcc_ver_no_dot gcc[join [split ${ver} "."] ""]
- set gcc_conflicts "${gcc_conflicts} ${gcc_ver_no_dot}"
-}
-
# atlas does not provide a +g95 variant, so if +g95 is used,
# +accelerate must also be used. +accelerate will work with +gccXY,
# so this is all a bit complex to check for. Setting 'requires' here
@@ -61,38 +49,6 @@
# it out does work, so doing that and checking for this condition
# later, for now.
-eval [subst {
- variant g95 conflicts ${gcc_conflicts} \
- description "Build with MacPorts g95 as the Fortran Compiler" {
- depends_build-append port:g95
- configure.fc ${prefix}/bin/g95
- }
-}]
-
-# create GCC variants, with partial conflicts of other GCC versions
-
-foreach ver1 ${gcc_versions} {
-
- set gcc_ver1_no_dot gcc[join [split ${ver1} "."] ""]
-
- set gcc_conflicts "conflicts g95"
- foreach ver2 ${gcc_versions} {
- if {${ver1} == ${ver2}} {
- continue
- }
- set gcc_ver2_no_dot gcc[join [split ${ver2} "."] ""]
- set gcc_conflicts "${gcc_conflicts} ${gcc_ver2_no_dot}"
- }
-
- eval [subst {
- variant ${gcc_ver1_no_dot} ${gcc_conflicts} \
- description {Build with the MacPorts ${gcc_ver1_no_dot} as the Fortran Compiler} {
- depends_build-append port:${gcc_ver1_no_dot}
- configure.fc ${prefix}/bin/gfortran-mp-${ver1}
- }
- }]
-}
-
######################
# set up BLAS variants
@@ -110,43 +66,6 @@
##################
# variant checking
-set gcc_default_no_dot gcc[join [split ${gcc_default} "."] ""]
-
-set fortran_variant_selection ""
-if {[variant_isset g95]} {
- set fortran_variant_selection "g95"
-} else {
- foreach ver ${gcc_versions} {
- set gcc_ver_no_dot gcc[join [split ${ver} "."] ""]
- if {[variant_isset ${gcc_ver_no_dot}]} {
- set fortran_variant_selection "${gcc_ver_no_dot}"
- }
- }
-}
-
-if {${fortran_variant_selection} eq ""} {
- default_variants +${gcc_default_no_dot}
-
- # check for -${gcc_default_no_dot} alone
-
- set fortran_variant_selection ""
- if {[variant_isset g95]} {
- set fortran_variant_selection "g95"
- } else {
- foreach ver ${gcc_versions} {
- set gcc_ver_no_dot gcc[join [split ${ver} "."] ""]
- if {[variant_isset ${gcc_ver_no_dot}]} {
- set fortran_variant_selection "${gcc_ver_no_dot}"
- }
- }
- }
-
- if {${fortran_variant_selection} eq ""} {
- ui_error "\n\nYou cannot use the -${gcc_default_no_dot} variant alone; a Fortran compiler is required.\n"
- return -code error "Invalid variant selection"
-s }
-}
-
# check for BLAS default variant, use +atlas if nothing else
set blas_variant_selection ""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/9bdef528/attachment.html>
More information about the macports-changes
mailing list