Skip to content
Permalink
Browse files

wgrib2: update to 2.0.7

  • Loading branch information
tenomoto committed Mar 10, 2018
1 parent 7e65208 commit f6e6923c71e845bcf5d047e1cb64025fe4c69f0b
@@ -4,29 +4,28 @@ PortSystem 1.0
PortGroup compilers 1.0

name wgrib2
version 2.0.5
revision 4
version 2.0.7
platforms darwin
maintainers takeshi
license public-domain
categories science
description program to read atmospheric data files in GRIB2
homepage http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/
master_sites ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/ \
http://www.ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/
distname ${name}_nolib.tgz.v${version}
distname ${name}.tgz.v${version}
extract.suffix
set version_iplib 2012
set version_iplib v3.0.0
set version_g2clib 1.4.0
checksums rmd160 a7fc9942d51153933b8bc19c2b5df3f2ab0f6289 \
sha256 453e7e1c2b0d42f5b3d09a44ca1a4fe7c3fd0be4babfd6cf6e4968d0f04184a7
homepage http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/
checksums rmd160 1aaef76c16ff871645da243a5799cae6631faea4 \
sha256 d7f1a4f9872922c62b3c7818c022465532cca1f5666b75d3ac5735f0b2747793
long_description \
wgrib2 is a swiss army knife for grib2 files. \
GRIB-2 has arrived and has begun replacing the the older standard GRIB-1. \
GRIB-2 can reduce the file size by up to 80% (NAM, JPEG2000 compression).

compilers.choose fc f77 f90
compilers.setup
compilers.setup require_fortran -dragonegg -clang -llvm

depends_build port:gctpc
depends_lib port:jasper \
@@ -41,7 +40,6 @@ worksrcdir grib2
patchfiles patch-makefile.diff \
patch-g2clib-makefile.diff \
patch-iplib-makefile.diff \
patch-wgrib2-enc_jpeg2000_clone.c.diff \
patch-g2clib-1.4.0-enc_jpeg2000.c.diff
use_configure no
use_parallel_build no
@@ -51,7 +49,7 @@ set lipolate ${ip}/libipolate.a
set g2c ${worksrcpath}/g2clib-${version_g2clib}
set lg2c ${g2c}/libgrib2c.a

configure.cppflags-prepend -I${prefix}/include/gctpc -I${prefix}/lib/libaec/include
configure.cppflags-prepend -I${prefix}/include/gctpc -I${prefix}/lib/libaec/include -DJAS_VERSION_MAJOR=2
configure.ldflags-prepend -L${prefix}/lib/libaec/lib
variant universal {}
if {[variant_isset universal]} {
@@ -61,12 +59,11 @@ if {[variant_isset universal]} {
set cflags "${configure.cflags} ${configure.cc_archflags}"
set ldflags "${configure.ldflags} ${configure.cc_archflags}"
}
build.args -f makefile
build.args -f makefile

pre-build {
set fsymbol ""
if {[fortran_variant_isset]} {
set iip "-I${ip}"
if {[variant_isset g95]} {
set fsymbol -DG95
} else {
@@ -76,14 +73,11 @@ pre-build {
build.env FC=\"${configure.fc}\" \
F90=\"${configure.fc}\" \
FFLAGS=\"${configure.fflags}\"
} else {
set iip ""
}
build.env-append LDFLAGS=\"${configure.ldflags}\" \
CC=\"${configure.cc}\" \
CPPFLAGS=\"${fsymbol} ${configure.cppflags}\" \
CFLAGS=\"${cflags}\"
build.args-append iip=\"${iip}\"
}

destroot {
@@ -100,3 +94,5 @@ destroot {
xinstall -m 644 ${worksrcpath}/README.ipolates ${destroot}${prefix}/share/doc/${name}
}
}

livecheck.regex ${name}\\.tgz\\.v(\\d+(?:\\.\\d+)*)
@@ -1,10 +1,10 @@
--- iplib.2012/makefile.orig 2012-02-25 04:57:49.000000000 +0900
+++ iplib.2012/makefile 2014-06-15 08:31:21.000000000 +0900
@@ -32,6 +32,7 @@
--- iplib.v3.0.0/makefile.orig 2016-04-20 05:15:15.000000000 +0900
+++ iplib.v3.0.0/makefile 2018-03-10 17:02:36.000000000 +0900
@@ -23,6 +23,7 @@

$(LIB): $(objs)
ar $(ARFLAGS) ${LIB} $(objs)
+ ranlib ${LIB}

.f.o:
$(FC) ${FFLAGS} -c $<
.f90.mod:
${FC} ${FFLAGS} -c $<
@@ -1,7 +1,7 @@
--- makefile.orig 2016-07-27 23:18:28.000000000 +0900
+++ makefile 2016-11-15 15:24:10.000000000 +0900
@@ -104,20 +104,20 @@
#
--- makefile.orig 2017-12-30 00:14:43.000000000 +0900
+++ makefile 2018-03-10 17:19:24.000000000 +0900
@@ -107,21 +107,21 @@


# Warning do not set both USE_NETCDF3 and USE_NETCDF4 to one
-USE_NETCDF3=1
@@ -11,67 +11,67 @@
USE_REGEX=1
USE_TIGGE=1
USE_MYSQL=0
USE_IPOLATES=0
USE_IPOLATES=1
USE_UDF=0
USE_OPENMP=1
-USE_PROJ4=0
+USE_PROJ4=1
USE_WMO_VALIDATION=0
DISABLE_TIMEZONE=0
MAKE_FTN_API=0
MAKE_FTN_API=1
DISABLE_ALARM=0

-USE_G2CLIB=0
+USE_G2CLIB=1
USE_PNG=1
USE_JASPER=1
USE_AEC=1
@@ -337,9 +337,9 @@
@@ -417,8 +417,8 @@
# gctpc library
gctpc:=${cwd}/gctpc
gctpcdir:=${cwd}/gctpc
gctpcsrc:=gctpc20a.tgz
-gctpclib:=${lib}/libgeo.a
-wLDFLAGS+=-lgeo
-# wCPPFLAGS+=-I${gctpc}/source
+gctpclib:=${lib}/libgctpc.a
+wLDFLAGS+=-lgctpc
+# wCPPFLAGS+=-I${prefix}/include/gctpc
# wCPPFLAGS+=-I${gctpc}/source

# proj4 library
ifeq ($(USE_PROJ4),1)
@@ -503,11 +503,11 @@
@@ -566,11 +566,10 @@
w=wgrib2
prog=$w/wgrib2

-all: ${netcdf4src} ${hdf5src} ${prog} aux_progs/gmerge aux_progs/smallest_grib2 aux_progs/smallest_4
+all: ${prog} aux_progs/gmerge aux_progs/smallest_grib2 aux_progs/smallest_4

-${prog}: $w/*.c $w/*.h ${jlib} ${aeclib} ${nlib} ${zlib} ${plib} ${h5lib} ${glib} ${n4lib} ${iplib} ${gctpclib} ${proj4lib}
-
-${prog}: $w/*.c $w/*.h ${jlib} ${aeclib} ${netcdf3lib} ${pnglib} ${hdf5lib} ${g2clib} ${netcdf4lib} ${iplib} ${gctpclib} ${proj4lib}
- cd "$w" && export LDFLAGS="${wLDFLAGS}" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE}
+${prog}: $w/*.c $w/*.h ${glib} ${iplib}
+ cd "$w" && ${MAKE} CPPFLAGS="-I${g} ${iip} ${CPPFLAGS}" LDFLAGS="${LDFLAGS} ${wLDFLAGS}"
+${prog}: $w/*.c $w/*.h ${g2clib} ${iplib}
+ cd "$w" && ${MAKE} LDFLAGS="${LDFLAGS} ${wLDFLAGS}"

fast: $w/*.c $w/*.h ${jlib} ${aeclib} ${nlib} ${zlib} ${plib} ${h5lib} ${glib} ${n4lib} ${iplib} ${gctpclib} ${proj4lib}
fast: $w/*.c $w/*.h ${jlib} ${aeclib} ${netcdf3lib} ${pnglib} ${hdf5lib} ${g2clib} ${netcdf4lib} ${iplib} ${gctpclib} ${proj4lib}
cd "$w" && export LDFLAGS="${wLDFLAGS}" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE} fast
@@ -559,10 +559,11 @@
rm tmpz.tar
cd "$z" && export CFLAGS="${wCPPFLAGS}" && ./configure --prefix=${cwd} --static && ${MAKE} check install
@@ -626,8 +625,11 @@
${zlib}: ${zdir}
cd ${zdir} && export CFLAGS="${wCPPFLAGS}" && ./configure --prefix=${cwd} --static && ${MAKE} install

-${glib}: ${jlib} ${plib} ${zlib}
+${glib}:
touch ${glib}
rm ${glib}
cd "$g" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE} && cp libgrib2c.a ${lib}
+ ranlib ${glib}
-${g2clib}: ${jlib} ${pnglib} ${zlib}
- cd "$g2cdir" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE} && cp libgrib2c.a ${lib}
+${g2clib}:
+ touch ${g2clib}
+ rm ${g2clib}
+ cd "${g2cdir}" && ${MAKE} && cp libgrib2c.a ${lib}
+ ranlib ${g2clib}

${gctpclib}:
${gctpcdir}/source/makefile.gctpc:
cp ${gctpcsrc} tmpgctpc.tar.gz
@@ -610,7 +611,7 @@
$(error ERROR, get hdf5 source by "wget http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.16/src/hdf5-1.8.16.tar.gz" )
@@ -683,7 +685,7 @@


${iplib}:
- cd "${ip}" && export FFLAGS="${wFFLAGS}" && ${MAKE} && cp libipolate.a ${iplib}
+ cd "${ip}" && ${MAKE} && cp libipolate.a ${lib}
- cd "${ipdir}" && export FFLAGS="${wFFLAGS}" && ${MAKE} && cp libipolate.a ${iplib}
+ cd "${ipdir}" && ${MAKE} && cp libipolate.a ${lib}

aux_progs/gmerge: aux_progs/gmerge.c
cd aux_progs && ${MAKE} -f gmerge.make

This file was deleted.

0 comments on commit f6e6923

Please sign in to comment.
You can’t perform that action at this time.