[100496] trunk/dports/math/slepc/Portfile

mmoll at macports.org mmoll at macports.org
Fri Dec 14 06:23:42 PST 2012


Revision: 100496
          https://trac.macports.org/changeset/100496
Author:   mmoll at macports.org
Date:     2012-12-14 06:23:42 -0800 (Fri, 14 Dec 2012)
Log Message:
-----------
math/slepc: version bump, use conflicts_build port group, simplify check for fortran lib

Modified Paths:
--------------
    trunk/dports/math/slepc/Portfile

Modified: trunk/dports/math/slepc/Portfile
===================================================================
--- trunk/dports/math/slepc/Portfile	2012-12-14 14:22:12 UTC (rev 100495)
+++ trunk/dports/math/slepc/Portfile	2012-12-14 14:23:42 UTC (rev 100496)
@@ -1,9 +1,10 @@
 # $Id$
 
 PortSystem      1.0
+PortGroup       conflicts_build 1.0
 
 name            slepc
-version         3.3-p1
+version         3.3-p3
 license         LGPL
 categories      math science
 maintainers     mmoll
@@ -25,9 +26,9 @@
 distname        ${name}-${version}
 universal_variant   no
 
-checksums           md5     37bf49713b1f333e1e3571283a9fc322 \
-                    sha1    729328a189b989bb85c3666e7348b5572bb41f13 \
-                    rmd160  38495777e8744a66a3598118e71647f572899eef
+checksums           md5     c6a9d7fe2f6eaff0ac65854d44c0bb57 \
+                    sha1    9af6b377cb8fe15ec33ea36ce6f1a4ea9ff81308 \
+                    rmd160  1fc621a1f88c9fcb1f288f9c51127c0f5305b6a8
 
 depends_lib-append  port:petsc
 
@@ -36,46 +37,26 @@
 destroot.env-append   PETSC_DIR=${prefix}/lib/petsc PETSC_ARCH=arch-installed-petsc SLEPC_DIR=${worksrcpath}
 destroot.cmd-append   SLEPC_DESTDIR=${destroot}${prefix}/lib/petsc
 
-pre-configure { 
-    if {[file exists ${prefix}/lib/petsc/lib/libslepc.a]} { 
-        ui_error "slepc must be deactivated before upgrade." 
-        error "Please run `sudo port deactivate slepc` and try again." 
-    } 
-}
+conflicts_build     slepc
 
 variant arpack description {compile with ARPACK support} {
     pre-fetch {
         if {![file exists ${prefix}/lib/libparpack.a]} {
-            return -code error "Please install the openmpi variant of arpack first."
+            ui_error "Please install the openmpi or mpich2 variant of arpack first."
         }
     }
     # This is a rather fragile way to figure out where the fortran library can be
     # found that is needed to link against libparpack.a:
-    if {[file exists ${prefix}/lib/gcc46]} {
-        set fortrandir ${prefix}/lib/gcc46
-    } else {
-        if {[file exists ${prefix}/lib/gcc45]} {
-            set fortrandir ${prefix}/lib/gcc45
-        } else {
-            if {[file exists ${prefix}/lib/gcc44]} {
-                set fortrandir ${prefix}/lib/gcc44
-            } else {
-                if {[file exists ${prefix}/lib/gcc43]} {
-                    set fortrandir ${prefix}/lib/gcc43
-                } else {
-                    if {[file exists ${prefix}/lib/gcc42]} {
-                        set fortrandir ${prefix}/lib/gcc42
-                    } else {
-                        if {[file exists ${prefix}/lib/g95]} {
-                            set fortrandir ${prefix}/lib/g95
-                        } else {
-                            return -code error "Please install a fortran compiler by installing one of the following ports: gcc42, gcc43, gcc44, gcc45, gcc46, or g95."
-                        }
-                    }
-                }
-            }
+    set fortrandirs {g95 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48}
+    set fortrandir ""
+    foreach dir ${fortrandirs} {
+        if {[file exists ${prefix}/lib/${dir}]} {
+            set fortrandir ${prefix}/lib/${dir}
         }
     }
+    if {${fortrandir} == ""} {
+        ui_error "Please install a fortran compiler by installing one of the following ports:\n\tgcc42, gcc43, gcc44, gcc45, gcc46, gcc47, gcc48, or g95."
+    }
     depends_lib-append      port:arpack
     configure.args-append   --with-arpack-dir=${fortrandir} \
                 --with-arpack-flags=-lparpack,-larpack,-lgfortran,-lmpi_f77
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121214/39731eb6/attachment.html>


More information about the macports-changes mailing list