Ticket #49436: Portfile-jags.diff

File Portfile-jags.diff, 3.5 KB (added by dstrubbe (David Strubbe), 9 years ago)
  • Portfile

     
    22# $Id$
    33
    44PortSystem          1.0
     5PortGroup           compilers 1.0
    56
    67name                jags
    7 version             3.3.0
    8 revision            1
     8version             4.0.0
    99set major           [lindex [split ${version} .] 0]
    1010categories          science
     11license             GPL-2
    1112platforms           darwin
    12 maintainers         uchicago.edu:dmeliza
     13maintainers         uchicago.edu:dmeliza openmaintainer
    1314description         Just Another Gibbs Sampler
    1415long_description    JAGS is a program for analysis of Bayesian hierarchical \
    15                     models using Markov Chain Monte Carlo (MCMC) simulation \
     16                    models using Markov Chain Monte Carlo (MCMC) simulation, \
    1617                    not wholly unlike BUGS.
    1718homepage            http://mcmc-jags.sourceforge.net/
    1819master_sites        sourceforge:project/mcmc-jags/JAGS/${major}.x/Source
    1920distname            JAGS-${version}
    2021
    21 checksums           rmd160  7ddefa48dd9b3c837a69e7f0c17da7a5724da87f \
    22                     sha256  8a3755c8e8cd5a2d68a465d56f054f1380fa7e2b602bfe65d360eb23e5b6101a
     22checksums           rmd160  21b82152f8a112f5dc1544a46396c6758207c1a2 \
     23                    sha256  a1d572269029d90d4e8b25757fd7ae9678994bd682937ec505ddcf06185d2c4c
    2324
    24 depends_build       port:bison \
    25                     port:libtool
     25depends_build       port:libtool
    2626
     27compilers.choose   cc cxx f77
     28compilers.setup    require_fortran
     29
    2730universal_variant   no
    2831
    29 configure.args      --with-blas='-framework vecLib' \
    30                     --with-lapack='-framework vecLib'
     32# note: BLAS/LAPACK is an optional dependency
     33configure.args      --with-blas='-framework Accelerate'
    3134
    32 set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
    33 set default_fortran_variant +gcc48
     35# note: actually seems to contain source of SuiteSparse, which is another port
    3436
    35 foreach ver ${gcc_versions} {
    36     set ver_no_dot [join [split ${ver} "."] ""]
    37 
    38     set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}"}
    39 
    40     foreach over ${gcc_versions} {
    41         if {${ver} == ${over}} {
    42             continue
    43         }
    44 
    45         set over_no_dot [join [split ${over} "."] ""]
    46         append variant_line " conflicts gcc${over_no_dot}"
    47     }
    48     append variant_line { {}}
    49 
    50     eval $variant_line
    51 
    52     if {[variant_isset gcc${ver_no_dot}]} {
    53         if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
    54             set default_fortran_variant ""
    55         }
    56     }
    57 }
    58 
    59 if {${default_fortran_variant} != ""} {
    60     default_variants-append "${default_fortran_variant}"
    61 }
    62 
    63 foreach 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 
    76 build.env-append    CC="${configure.cc}" \
    77                     CXX="${configure.cxx}" \
    78                     F77="${configure.f77}"
    79 
    80 destroot.env-append CC="${configure.cc}" \
    81                     CXX="${configure.cxx}" \
    82                     F77="${configure.f77}"
    83 
    8437livecheck.type          sourceforge
    8538livecheck.name          mcmc-jags
    8639livecheck.regex         /JAGS-(\[0-9.\]+)${extract.suffix}