[116312] trunk/dports/science/sparskit/Portfile
sean at macports.org
sean at macports.org
Thu Jan 23 12:09:33 PST 2014
Revision: 116312
https://trac.macports.org/changeset/116312
Author: sean at macports.org
Date: 2014-01-23 12:09:33 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
sparskit: use compilers portgroup
Modified Paths:
--------------
trunk/dports/science/sparskit/Portfile
Modified: trunk/dports/science/sparskit/Portfile
===================================================================
--- trunk/dports/science/sparskit/Portfile 2014-01-23 20:09:30 UTC (rev 116311)
+++ trunk/dports/science/sparskit/Portfile 2014-01-23 20:09:33 UTC (rev 116312)
@@ -2,6 +2,7 @@
# $Id$
PortSystem 1.0
+PortGroup compilers 1.0
name sparskit
version 2
@@ -32,6 +33,9 @@
patch-INOUT-makefile.diff \
patch-MATGEN-FEM-makefile.diff
+compilers.choose fc f77 f90
+compilers.setup require_fortran
+
build.args OPT="-c -O3"
use_parallel_build yes
@@ -40,72 +44,19 @@
test.args FFLAGS=-O3
# test requires FC, FFLAGS set because test makefiles lack explicit rule for .f -> .o and these are in the implicit rule
-destroot {
- xinstall ${worksrcpath}/libskit.a ${destroot}${prefix}/lib/
+if {![fortran_variant_isset]} {
+ default_variants-append +gcc48
}
-set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
-set default_fortran_variant +gcc48
-set g95_conflicts {}
-
-foreach ver ${gcc_versions} {
- set ver_no_dot [join [split ${ver} "."] ""]
-
- set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
-
- foreach over ${gcc_versions} {
- if {${ver} == ${over}} {
- continue
- }
-
- set over_no_dot [join [split ${over} "."] ""]
- append variant_line " conflicts gcc${over_no_dot}"
- }
- append variant_line { {}}
-
- eval $variant_line
-
- append g95_conflicts " conflicts gcc${ver_no_dot}"
-
- if {[variant_isset gcc${ver_no_dot}]} {
- if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
- set default_fortran_variant ""
- }
- }
+post-fetch {
+ build.args-append F77=${configure.f77}
+ test.args-append F77=${configure.f77} FC=${configure.fc}
}
-eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
-
-if {[variant_isset g95]} {
- if {${default_fortran_variant} != "+g95"} {
- set default_fortran_variant ""
- }
+destroot {
+ xinstall ${worksrcpath}/libskit.a ${destroot}${prefix}/lib/
}
-if {${default_fortran_variant} != ""} {
- default_variants-append "${default_fortran_variant}"
-}
-
-foreach ver ${gcc_versions} {
- set ver_no_dot [join [split ${ver} "."] ""]
-
- if {[variant_isset gcc${ver_no_dot}]} {
- depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
- depends_build-append port:gcc${ver_no_dot}
-
- build.args-append F77=${prefix}/bin/gfortran-mp-${ver}
- test.args-append F77=${prefix}/bin/gfortran-mp-${ver} FC=${prefix}/bin/gfortran-mp-${ver}
- }
-}
-
-if {[variant_isset g95]} {
- depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
- depends_build-append port:g95
-
- build.args-append F77=${prefix}/bin/g95
- test.args-append F77=${prefix}/bin/g95 FC=${prefix}/bin/g95
-}
-
livecheck.type regex
livecheck.url [lindex ${master_sites} 0]
livecheck.regex SPARSKIT(\[0-9.\]+)${extract.suffix}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140123/3ff673b7/attachment.html>
More information about the macports-changes
mailing list