[130198] trunk/dports/math/petsc/Portfile

sean at macports.org sean at macports.org
Sun Dec 28 12:43:57 PST 2014


Revision: 130198
          https://trac.macports.org/changeset/130198
Author:   sean at macports.org
Date:     2014-12-28 12:43:57 -0800 (Sun, 28 Dec 2014)
Log Message:
-----------
petsc: fix hwloc with complex and install pkgconfig file; fixes #46175

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

Modified: trunk/dports/math/petsc/Portfile
===================================================================
--- trunk/dports/math/petsc/Portfile	2014-12-28 20:43:52 UTC (rev 130197)
+++ trunk/dports/math/petsc/Portfile	2014-12-28 20:43:57 UTC (rev 130198)
@@ -6,7 +6,7 @@
 PortGroup           mpi 1.0
 
 bitbucket.setup     petsc petsc 3.5.2 v
-revision            1
+revision            2
 categories          math science
 maintainers         sean
 license             BSD
@@ -28,8 +28,7 @@
 
 depends_build-append \
                     port:sowing \
-                    port:c2html \
-                    port:hwloc
+                    port:c2html
 
 patchfiles-append   patch-env.diff
 
@@ -76,9 +75,17 @@
                     --with-fc=0 \
                     --with-shared-libraries \
                     --with-c2html-dir=${prefix} \
-                    --without-x \
-                    --with-hwloc-dir=${prefix}
+                    --without-x
 
+post-destroot {
+    set dev ""
+    if {[string first "-devel" $subport] > 0} {
+        set dev "-devel"
+    }
+
+    move ${destroot}${prefix}/lib/${name}/lib/pkgconfig/PETSc.pc ${destroot}${prefix}/lib/pkgconfig/PETSc${dev}.pc
+}
+
 variant accelerate description {Use Accelerate framework for LAPACK} conflicts atlas {
     configure.args-append --with-blas-lapack-lib=/System/Library/Frameworks/Accelerate.framework/Versions/Current/Accelerate
 }
@@ -87,11 +94,16 @@
     configure.args-append --with-blas-lapack-lib=${prefix}/lib/libtatlas.dylib
 }
 
-variant complex description {Build with support for complex numbers} conflicts sundials {
+variant complex description {Build with support for complex numbers} conflicts sundials hwloc {
     configure.args-append --with-scalar-type=complex
     configure.args-append --with-clanguage=C++
 }
 
+variant hwloc description {Build with hwloc} conflicts complex {
+    depends_build-append  port:hwloc
+    configure.args-append --with-hwloc-dir=${prefix}
+}
+
 variant suitesparse description {Build with CHOLDMOD and UMFPACK} {
     depends_lib-append    port:SuiteSparse
     configure.args-append --with-suitesparse-dir=${prefix}
@@ -184,4 +196,8 @@
     default_variants +accelerate
 }
 
+if {![variant_isset complex]} {
+    default_variants +hwloc
+}
+
 destroot.destdir    DESTDIR=${destroot}${prefix}/lib/${name}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141228/44117aa6/attachment.html>


More information about the macports-changes mailing list