Ignore:
Timestamp:
Dec 14, 2012, 2:23:42 PM (7 years ago)
Author:
mmoll@…
Message:

math/slepc: version bump, use conflicts_build port group, simplify check for fortran lib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/slepc/Portfile

    r96224 r100496  
    22
    33PortSystem      1.0
     4PortGroup       conflicts_build 1.0
    45
    56name            slepc
    6 version         3.3-p1
     7version         3.3-p3
    78license         LGPL
    89categories      math science
     
    2627universal_variant   no
    2728
    28 checksums           md5     37bf49713b1f333e1e3571283a9fc322 \
    29                     sha1    729328a189b989bb85c3666e7348b5572bb41f13 \
    30                     rmd160  38495777e8744a66a3598118e71647f572899eef
     29checksums           md5     c6a9d7fe2f6eaff0ac65854d44c0bb57 \
     30                    sha1    9af6b377cb8fe15ec33ea36ce6f1a4ea9ff81308 \
     31                    rmd160  1fc621a1f88c9fcb1f288f9c51127c0f5305b6a8
    3132
    3233depends_lib-append  port:petsc
     
    3738destroot.cmd-append   SLEPC_DESTDIR=${destroot}${prefix}/lib/petsc
    3839
    39 pre-configure {
    40     if {[file exists ${prefix}/lib/petsc/lib/libslepc.a]} {
    41         ui_error "slepc must be deactivated before upgrade."
    42         error "Please run `sudo port deactivate slepc` and try again."
    43     }
    44 }
     40conflicts_build     slepc
    4541
    4642variant arpack description {compile with ARPACK support} {
    4743    pre-fetch {
    4844        if {![file exists ${prefix}/lib/libparpack.a]} {
    49             return -code error "Please install the openmpi variant of arpack first."
     45            ui_error "Please install the openmpi or mpich2 variant of arpack first."
    5046        }
    5147    }
    5248    # This is a rather fragile way to figure out where the fortran library can be
    5349    # found that is needed to link against libparpack.a:
    54     if {[file exists ${prefix}/lib/gcc46]} {
    55         set fortrandir ${prefix}/lib/gcc46
    56     } else {
    57         if {[file exists ${prefix}/lib/gcc45]} {
    58             set fortrandir ${prefix}/lib/gcc45
    59         } else {
    60             if {[file exists ${prefix}/lib/gcc44]} {
    61                 set fortrandir ${prefix}/lib/gcc44
    62             } else {
    63                 if {[file exists ${prefix}/lib/gcc43]} {
    64                     set fortrandir ${prefix}/lib/gcc43
    65                 } else {
    66                     if {[file exists ${prefix}/lib/gcc42]} {
    67                         set fortrandir ${prefix}/lib/gcc42
    68                     } else {
    69                         if {[file exists ${prefix}/lib/g95]} {
    70                             set fortrandir ${prefix}/lib/g95
    71                         } else {
    72                             return -code error "Please install a fortran compiler by installing one of the following ports: gcc42, gcc43, gcc44, gcc45, gcc46, or g95."
    73                         }
    74                     }
    75                 }
    76             }
     50    set fortrandirs {g95 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48}
     51    set fortrandir ""
     52    foreach dir ${fortrandirs} {
     53        if {[file exists ${prefix}/lib/${dir}]} {
     54            set fortrandir ${prefix}/lib/${dir}
    7755        }
     56    }
     57    if {${fortrandir} == ""} {
     58        ui_error "Please install a fortran compiler by installing one of the following ports:\n\tgcc42, gcc43, gcc44, gcc45, gcc46, gcc47, gcc48, or g95."
    7859    }
    7960    depends_lib-append      port:arpack
Note: See TracChangeset for help on using the changeset viewer.