[74417] trunk/dports/science/wgrib2/Portfile
takeshi at macports.org
takeshi at macports.org
Thu Dec 16 05:03:58 PST 2010
Revision: 74417
http://trac.macports.org/changeset/74417
Author: takeshi at macports.org
Date: 2010-12-16 05:03:52 -0800 (Thu, 16 Dec 2010)
Log Message:
-----------
wgrib2: updated for 1.9.1
Modified Paths:
--------------
trunk/dports/science/wgrib2/Portfile
Modified: trunk/dports/science/wgrib2/Portfile
===================================================================
--- trunk/dports/science/wgrib2/Portfile 2010-12-16 11:59:32 UTC (rev 74416)
+++ trunk/dports/science/wgrib2/Portfile 2010-12-16 13:03:52 UTC (rev 74417)
@@ -4,8 +4,7 @@
PortSystem 1.0
name wgrib2
-version 1.8.3
-revision 2
+version 1.9.1
platforms darwin
maintainers takeshi
categories science
@@ -13,11 +12,11 @@
master_sites ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/
distname ${name}.tgz.v${version}
extract.suffix
-set version_g2clib 1.1.8
+set version_g2clib 1.2.1
worksrcdir grib2/g2clib-${version_g2clib}
-checksums md5 b7ccf7dbd9c9a43cb6da59c978432ed2 \
- sha1 b2268a8a51675dabf12c20af98d6a9fdd2261138 \
- rmd160 89eaad5c0f351d5842cce888b7da01487622c934
+checksums md5 b595db0d73307d8a6c2ebc4519138e53 \
+ sha1 f79110257068d02c68c77aeb9ac82fda3111de84 \
+ rmd160 8a83a07de63f63c0d28341a42882a009273be1b8
homepage http://www.cpc.noaa.gov/products/wesley/wgrib2/
long_description \
wgrib2 is a swiss army knife for grib2 files. \
@@ -29,11 +28,18 @@
port:netcdf \
port:hdf5-18
+post-patch {
+ set f ${workpath}/grib2/${name}/config.h
+ reinplace "s|#define USE_NETCDF3|//#define USE_NETCDF3|" ${f}
+ reinplace "s|//#define USE_NETCDF4|#define USE_NETCDF4|" ${f}
+ if {![variant_isset g95] && ![variant_isset gcc44] && ![variant_isset gcc45]} {
+ reinplace "s|#define USE_IPOLATES|//#define USE_IPOLATES|" ${f}
+ }
+}
+
use_configure no
use_parallel_build no
-default_variants netcdf4
-
set cppflags ${configure.cppflags}
if {[variant_isset universal]} {
set cflags "${configure.cflags} ${configure.universal_cflags}"
@@ -46,13 +52,35 @@
post-build {
system "ranlib ${worksrcpath}/libgrib2c.a"
- system "cd ${worksrcpath}/../wgrib2; \
+ if {[variant_isset g95]} {
+ system "cd ${workpath}/grib2/iplib; \
+ make \
+ F90=${prefix}/bin/g95;
+ FFLAGS=${configure.fflags}"
+ set fsymbol -DG95
+ set flibs "-L../iplib -lipolate -lf95"
+ } elseif {[variant_isset gcc44]} {
+ system "cd ${workpath}/grib2/iplib; \
+ make \
+ F90=${prefix}/bin/gfortran-mp-4.4;
+ FFLAGS=${configure.fflags}"
+ set fsymbol -DGFORTRAN
+ set flibs "-L../iplib -lipolate -L${prefix}/lib/gcc45 -lgfortran"
+ } elseif {[variant_isset gcc45]} {
+ system "cd ${workpath}/grib2/iplib; \
+ make \
+ F90=${prefix}/bin/gfortran-mp-4.5;
+ FFLAGS=${configure.fflags}"
+ set fsymbol -DGFORTRAN
+ set flibs "-L../iplib -lipolate -L${prefix}/lib/gcc45 -lgfortran"
+ }
+ system "cd ${workpath}/grib2/${name}; \
make -f makefile ${name} \
CC=\"${configure.cc}\" \
- CFLAGS=\"-I../g2clib-${version_g2clib} -I${prefix}/include ${cppflags} ${cflags} \
- -DUSE_NETCDF4 -UUSE_NETCDF3\" \
+ DEFS=\"${fsymbol}\" \
+ CFLAGS=\"-I../g2clib-${version_g2clib} -I${prefix}/include ${cppflags} ${cflags}\" \
LDFLAGS=\"-L../g2clib-${version_g2clib} -L${prefix}/lib ${ldflags} \
- -lgrib2c -ljasper -lpng -lnetcdf -lhdf5_hl -lhdf5 -lz -lsz -lcurl -lidn -lssl -lcrypto\" "
+ -lgrib2c -ljasper -lpng -lnetcdf -lhdf5_hl -lhdf5 -lz -lsz -lcurl -lidn -lssl -lcrypto ${flibs}\" "
}
destroot {
@@ -60,3 +88,15 @@
xinstall -m 755 ${worksrcpath}/libgrib2c.a ${destroot}${prefix}/lib
xinstall -m 755 ${worksrcpath}/../${name}/${name} ${destroot}${prefix}/bin
}
+
+variant g95 description {build iplib with g95 (alpha)} {
+ depends_build-append port:g95
+}
+
+variant gcc44 description {build iplib with gcc44 (alpha)} {
+ depends_build-append port:gcc44
+}
+
+variant gcc45 description {build iplib with gcc45 (alpha)} {
+ depends_build-append port:gcc45
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101216/5a006eab/attachment.html>
More information about the macports-changes
mailing list