Ticket #44744: Portfile

File Portfile, 2.8 KB (added by Yogesh.Sharma@…, 10 years ago)

Added version of GPL to portfile

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5
6license             GPL-2
7name                harminv
8categories          science
9version             1.3.1
10platforms           darwin
11maintainers         saabusa.com:Yogesh.Sharma
12description         MIT Eletromagnetic Equation Propagation
13long_description    solve the problem of harmonic inversion  given a discrete-time, finite-length signal that consists of a sum of finitely-many sinusoids (possibly exponentially decaying) \
14                    in a given bandwidth, it determines the frequencies, decay constants, amplitudes, and phases of those sinusoids
15homepage            http://ab-initio.mit.edu/harminv
16master_sites        http://ab-initio.mit.edu/harminv
17checksums           md5     d3f49f1c90856b3b2e8b77dc4a99c37a \
18                    sha1    ef75161233df92393110b783d2945b5915c8291a \
19                    rmd160  340de65da54b197f70adec43ecd2907a757d6d35
20depends_lib         port:guile
21set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
22set default_fortran_variant +gcc48
23set g95_conflicts {}
24
25foreach ver ${gcc_versions} {
26    set ver_no_dot [join [split ${ver} "."] ""]
27
28    set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
29
30    foreach over ${gcc_versions} {
31        if {${ver} == ${over}} {
32            continue
33        }
34
35        set over_no_dot [join [split ${over} "."] ""]
36        append variant_line " conflicts gcc${over_no_dot}"
37    }
38    append variant_line { {}}
39
40    eval $variant_line
41
42    append g95_conflicts " conflicts gcc${ver_no_dot}"
43
44    if {[variant_isset gcc${ver_no_dot}]} {
45        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
46            set default_fortran_variant ""
47        }
48    }
49}
50
51eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
52
53if {[variant_isset g95]} {
54    if {${default_fortran_variant} != "+g95"} {
55        set default_fortran_variant ""
56    }
57}
58
59if {${default_fortran_variant} != ""} {
60    default_variants-append "${default_fortran_variant}"
61}
62
63foreach ver ${gcc_versions} {
64    set ver_no_dot [join [split ${ver} "."] ""]
65
66    if {[variant_isset gcc${ver_no_dot}]} {
67        depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
68        depends_build-append port:gcc${ver_no_dot}
69
70        configure.fc  ${prefix}/bin/gfortran-mp-${ver}
71        configure.f77 ${prefix}/bin/gfortran-mp-${ver}
72        configure.f90 ${prefix}/bin/gfortran-mp-${ver}
73    }
74}
75
76if {[variant_isset g95]} {
77    depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
78    depends_build-append port:g95
79
80    configure.fc ${prefix}/bin/g95
81    configure.f77 ${prefix}/bin/g95
82    configure.f90 ${prefix}/bin/g95
83}