[81047] trunk/dports/science/ncarg/Portfile

takeshi at macports.org takeshi at macports.org
Sun Jul 24 04:30:46 PDT 2011


Revision: 81047
          http://trac.macports.org/changeset/81047
Author:   takeshi at macports.org
Date:     2011-07-24 04:30:45 -0700 (Sun, 24 Jul 2011)
Log Message:
-----------
ncarg: added experimental accelerate variant

Modified Paths:
--------------
    trunk/dports/science/ncarg/Portfile

Modified: trunk/dports/science/ncarg/Portfile
===================================================================
--- trunk/dports/science/ncarg/Portfile	2011-07-24 08:52:00 UTC (rev 81046)
+++ trunk/dports/science/ncarg/Portfile	2011-07-24 11:30:45 UTC (rev 81047)
@@ -115,8 +115,18 @@
         reinplace "s|hdf\/||" ${worksrcpath}/${f}
     }
     reinplace "s|\$\(NCARGGKSCAIROLIB\) \$\(NCARGCLIB\)|\$(NCARGGKSCAIROLIB) \$(NCARGGKSLIB) \$(NCARGCLIB)|" ${worksrcpath}/config/Project
+    if {[variant_isset accelerate]} {
+        reinplace "s|-llapack_ncl|-framework Accelerate|g" ${worksrcpath}/config/Project
+        if {[variant_isset g95] || ([string match *64* $build_arch] && ${os.major} >= 10)} {
+            reinplace "s|-lblas_ncl|-ldotwrp -framework Accelerate|g" ${worksrcpath}/config/Project
+        } else {
+            reinplace "s|-lblas_ncl|-framework Accelerate|g" ${worksrcpath}/config/Project
+        }
+        reinplace "s|-L\$(LAPACKSRC)||" ${worksrcpath}/config/Project
+        reinplace "s|-L\$(BLASSRC)||" ${worksrcpath}/config/Project
+        reinplace "s|blas lapack ||" ${worksrcpath}/external/yMakefile
+    }
 }
-#define NetCDF4lib -lnetcdf -lhdf5_hl -lhdf5 -lz -lsz -lmfhdf -ldf -lcurl -lidn -lssl -lcrypto|" ${worksrcpath}/config/${f}
 
 pre-configure {
     system "cd ${workpath}/${g2clib_worksrcdir}; make all"
@@ -182,6 +192,15 @@
     default_variants +gcc44
 }
 
+variant accelerate description {use Accelerate.framework} {
+    if {![variant_isset g95]} {
+        configure.fflags-append -ff2c
+    }
+    if {[variant_isset g95] || ([string match *64* $build_arch] && ${os.major} >= 10)} {
+        depends_lib-append      port:dotwrp
+    }
+}
+
 livecheck.type              regex
 livecheck.url               ${homepage}
 livecheck.regex             {Current Version:.* .*([0-9]+\.[0-9]+\.[0-9]+)}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110724/1c6e4148/attachment.html>


More information about the macports-changes mailing list