[136479] trunk/dports/math/octave/Portfile

michaelld at macports.org michaelld at macports.org
Mon May 18 11:17:36 PDT 2015


Revision: 136479
          https://trac.macports.org/changeset/136479
Author:   michaelld at macports.org
Date:     2015-05-18 11:17:35 -0700 (Mon, 18 May 2015)
Log Message:
-----------
octave: when using "hdf5 +mpich", have to manually include "/opt/local/include/mpich-mp" in the cpath and set a configure flag. addresses ticket #47579.

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

Modified: trunk/dports/math/octave/Portfile
===================================================================
--- trunk/dports/math/octave/Portfile	2015-05-18 16:15:08 UTC (rev 136478)
+++ trunk/dports/math/octave/Portfile	2015-05-18 18:17:35 UTC (rev 136479)
@@ -107,6 +107,25 @@
     --enable-strict-warning-flags \
     --disable-silent-rules
 
+# when using "hdf5 +mpich", have to manually include
+# "/opt/local/include/mpich-mp". See also:
+# < https://trac.macports.org/ticket/47579 >
+
+pre-configure {
+    # is hdf5 installed and active?
+    if {![catch {set installed [lindex [registry_active hdf5] 0]}]} {
+        # yes: is this one installed with +mpich*?
+        set _variants [lindex ${installed} 3]
+        if {[string first {mpich} ${_variants}] != -1} {
+            # yes; set cpath for both configure and build stages
+            compiler.cpath-append ${prefix}/include/mpich-mp
+            # and, set the configure flag, just in case
+            configure.args-append \
+                "--with-hdf5-includedir=${prefix}/include/mpich-mp"
+        }
+    }
+}
+
 # octave uses a number of other ports to create sources from template:
 # perl, gawk, gsed, flex, bison, texinfo.  Make sure these are the
 # MacPorts' versions.  Python is not used if perl is available, so
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150518/8450ccba/attachment.html>


More information about the macports-changes mailing list