[147490] trunk/dports/science/netcdf/Portfile
mcalhoun at macports.org
mcalhoun at macports.org
Tue Apr 5 09:05:20 PDT 2016
Revision: 147490
https://trac.macports.org/changeset/147490
Author: mcalhoun at macports.org
Date: 2016-04-05 09:05:20 -0700 (Tue, 05 Apr 2016)
Log Message:
-----------
netcdf: allow universal build
no revbump since netcdf builds correctly or not at all
Modified Paths:
--------------
trunk/dports/science/netcdf/Portfile
Modified: trunk/dports/science/netcdf/Portfile
===================================================================
--- trunk/dports/science/netcdf/Portfile 2016-04-05 15:18:51 UTC (rev 147489)
+++ trunk/dports/science/netcdf/Portfile 2016-04-05 16:05:20 UTC (rev 147490)
@@ -5,6 +5,7 @@
PortGroup mpi 1.0
PortGroup github 1.0
PortGroup cmake 1.0
+PortGroup muniversal 1.0
mpi.enforce_variant hdf5
@@ -61,6 +62,22 @@
-DENABLE_DAP_REMOTE_TESTS=OFF
}
+if { [variant_exists universal] && [variant_isset universal] } {
+
+ pre-configure {
+ # record configure date (as cmake does) but ensure date will be the same for achitectures
+ # helps ensure libnetcdf.settings is the same for all architectures
+ set date [exec "/bin/date"]
+ reinplace "s|@CONFIG_DATE@|${date}|g" ${worksrcpath}/libnetcdf.settings.in
+ }
+
+ merger-post-destroot {
+ foreach arch ${universal_archs_to_use} {
+ reinplace "s|${build.dir}-${arch}|${build.dir}|g" ${destroot}-${arch}${prefix}/lib/libnetcdf.settings
+ }
+ }
+}
+
notes "
As of version 4.2 c++ and fortran interfaces are separate ports,\
netcdf-cxx and netcdf-fortran, respectively.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160405/03181f56/attachment.html>
More information about the macports-changes
mailing list