Update netcdf to 4.8.1.

This commit is contained in:
martin 2022-04-16 11:18:44 +00:00
parent d05e8e0d40
commit e1ca228c11
15 changed files with 59 additions and 111 deletions

View File

@ -1,14 +1,13 @@
COMMENT= library for machine-independent, array-oriented data access
V= 4.7.4
V= 4.8.1
NAME= netcdf
DISTNAME= ${NAME}-c-${V}
PKGNAME= ${NAME}-${V}
REVISION= 2
CATEGORIES= math
SHARED_LIBS= netcdf 7.0 # 18.0
SHARED_LIBS= netcdf 8.0 # 19.0
HOMEPAGE= http://www.unidata.ucar.edu/software/netcdf/
@ -17,29 +16,31 @@ MAINTAINER= Martin Reindl <martin@catai.org>
# BSD
PERMIT_PACKAGE= Yes
WANTLIB= c m z pthread
WANTLIB+= curl crypto nghttp2 ssl
WANTLIB= c m z pthread execinfo
WANTLIB+= crypto ssl
WANTLIB+= hdf5 hdf5_hl
LIB_DEPENDS = net/curl \
math/hdf5
LIB_DEPENDS = math/hdf5
TEST_DEPENDS= shells/bash \
TEST_DEPENDS= net/curl \
shells/bash \
textproc/gdiff
COMPILER = base-clang ports-gcc base-gcc
MASTER_SITES= ftp://ftp.unidata.ucar.edu/pub/netcdf/
MASTER_SITES= https://downloads.unidata.ucar.edu/netcdf-c/$V/
MODULES= fortran
CONFIGURE_STYLE= gnu
CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib" \
CPPFLAGS="-I${LOCALBASE}/include"
CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib -lexecinfo" \
CPPFLAGS="-I${LOCALBASE}/include -DH5_USE_110_API"
CONFIGURE_ARGS+= --enable-shared \
--disable-doxygen \
--enable-netcdf-4 \
--enable-dap \
--prefix=${PREFIX}
--prefix=${PREFIX} \
FC=egfortran
USE_GMAKE= Yes
SEPARATE_BUILD= Yes

View File

@ -1,2 +1,2 @@
SHA256 (netcdf-c-4.7.4.tar.gz) = DkdvAK7tla+Hcf8nJ7ehWy3jU/t7swdKDTQLVcK9Tqg=
SIZE (netcdf-c-4.7.4.tar.gz) = 5999520
SHA256 (netcdf-c-4.8.1.tar.gz) = gIrDJt3syOC7cPO6NXR/1pB/K0RoF84UZSGZdKvkcrE=
SIZE (netcdf-c-4.8.1.tar.gz) = 6602964

View File

@ -1,17 +1,15 @@
Index: dap4_test/test_data.sh
--- dap4_test/test_data.sh.orig
+++ dap4_test/test_data.sh
@@ -21,8 +21,8 @@ for f in $F ; do
@@ -23,7 +23,7 @@ for f in $F ; do
fi
${NCDUMP} ./results_test_data/${f}.nc > ./results_test_data/${f}.d4d
if test "x${TEST}" = x1 ; then
- if ! diff -wBb ${BASELINE}/${f}.d4d ./results_test_data/${f}.d4d ; then
- failure "diff -wBb ${BASELINE}/${f}.d4d ./results_test_data/${f}.d4d"
+ if ! gdiff -wBb ${BASELINE}/${f}.d4d ./results_test_data/${f}.d4d ; then
+ failure "gdiff -wBb ${BASELINE}/${f}.d4d ./results_test_data/${f}.d4d"
fi
- diff -wBb ${BASELINE}/${f}.d4d ./results_test_data/${f}.d4d
+ gdiff -wBb ${BASELINE}/${f}.d4d ./results_test_data/${f}.d4d
elif test "x${RESET}" = x1 ; then
echo "${f}:"
cp ./results_test_data/${f}.d4d ${BASELINE}/${f}.d4d
@@ -77,13 +77,13 @@ if test "x${CDLDIFF}" = x1 ; then
echo "Not found: ${CDLTESTFILES}/${STEM}.cdl"
continue
@ -23,8 +21,8 @@ Index: dap4_test/test_data.sh
trim ./results_test_data/${f}.d4d ./r1
baseclean b1 b2
resultclean r1 r2
- if ! diff -wBb ./b2 ./r2 ; then
+ if ! gdiff -wBb ./b2 ./r2 ; then
failure "${f}"
fi
- diff -wBb ./b2 ./r2
+ gdiff -wBb ./b2 ./r2
done
fi

View File

@ -1,14 +1,12 @@
Index: dap4_test/test_parse.sh
--- dap4_test/test_parse.sh.orig
+++ dap4_test/test_parse.sh
@@ -20,18 +20,18 @@ for f in $F ; do
failure "${f}"
fi
@@ -20,16 +20,16 @@ for f in $F ; do
echo "testing: $f"
${VG} ${execdir}/test_parse ${DMRTESTFILES}/${f}.dmr > ./results_test_parse/${f}.d4p
if test "x${TEST}" = x1 ; then
- if ! diff -wBb ${BASELINE}/${f}.d4p ./results_test_parse/${f}.d4p ; then
+ if ! gdiff -wBb ${BASELINE}/${f}.d4p ./results_test_parse/${f}.d4p ; then
failure "${f}"
fi
- diff -wBb ${BASELINE}/${f}.d4p ./results_test_parse/${f}.d4p
+ gdiff -wBb ${BASELINE}/${f}.d4p ./results_test_parse/${f}.d4p
elif test "x${DIFF}" = x1 ; then
- echo "diff -wBb ${DMRTESTFILES}/${f}.dmr ./results_test_parse/${f}.d4p"
+ echo "gdiff -wBb ${DMRTESTFILES}/${f}.dmr ./results_test_parse/${f}.d4p"
@ -18,8 +16,8 @@ Index: dap4_test/test_parse.sh
| sed -e '/<\/Dimensions>/d' -e '/<\/Types>'/d -e '/<\/Variables>'/d -e '/<\/Groups>'/d \
| sed -e '/_edu.ucar.opaque.size/,+2d' \
| cat > ./tmp
- if ! diff -wBb ${DMRTESTFILES}/${f}.dmr ./tmp ; then
+ if ! gdiff -wBb ${DMRTESTFILES}/${f}.dmr ./tmp ; then
failure "${f}"
fi
- diff -wBb ${DMRTESTFILES}/${f}.dmr ./tmp
+ gdiff -wBb ${DMRTESTFILES}/${f}.dmr ./tmp
elif test "x${RESET}" = x1 ; then
echo "${f}:"
cp ./results_test_parse/${f}.d4p ${BASELINE}/${f}.d4p

View File

@ -1,7 +1,7 @@
Index: dap4_test/test_raw.sh
--- dap4_test/test_raw.sh.orig
+++ dap4_test/test_raw.sh
@@ -51,8 +51,8 @@ for f in $F ; do
@@ -52,8 +52,8 @@ for f in $F ; do
failure "${URL}"
fi
if test "x${TEST}" = x1 ; then
@ -12,7 +12,7 @@ Index: dap4_test/test_raw.sh
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"
@@ -60,8 +60,8 @@ for f in $F ; do
@@ -61,8 +61,8 @@ for f in $F ; do
elif test "x${DIFF}" = x1 ; then
echo "hdrtest: ${f}"
baseclean

View File

@ -1,17 +0,0 @@
Fix build on BE_ARCHS, see:
https://github.com/Unidata/netcdf-c/pull/1688
Index: libdispatch/dfilter.c
--- libdispatch/dfilter.c.orig
+++ libdispatch/dfilter.c
@@ -40,6 +40,10 @@ Unified filter related code
/* Forward */
static int gettype(const int q0, const int q1, int* unsignedp);
+#ifdef WORDS_BIGENDIAN
+static void byteswap8(unsigned char* mem);
+static void byteswap4(unsigned char* mem);
+#endif
const struct LegalFormat {
const char* tag;

View File

@ -1,15 +0,0 @@
Index: nc_test4/tst_camrun.c
--- nc_test4/tst_camrun.c.orig
+++ nc_test4/tst_camrun.c
@@ -685,10 +685,10 @@ get_mem_used2(int *mem_used)
fscanf(pf, "%u %u %u %u %u %u", &size, &resident, &share,
&text, &lib, &data);
*mem_used = (data * page_size) / MEGABYTE;
+ fclose(pf);
}
else
*mem_used = -1;
- fclose(pf);
}
int

View File

@ -1,18 +0,0 @@
Fix build on BE_ARCHS, see:
https://github.com/Unidata/netcdf-c/pull/1688
Index: nc_test4/tst_filterparser.c
--- nc_test4/tst_filterparser.c.orig
+++ nc_test4/tst_filterparser.c
@@ -122,6 +122,11 @@ static const char* spectype[] = {"i", "b", "ub", "s",
static int nerrs = 0;
+#ifdef WORDS_BIGENDIAN
+static void byteswap8(unsigned char* mem);
+static void byteswap4(unsigned char* mem);
+#endif
+
static void
mismatch(size_t i, unsigned int *params, const char* tag)
{

View File

@ -0,0 +1,12 @@
Index: ncdump/test_scope.sh
--- ncdump/test_scope.sh.orig
+++ ncdump/test_scope.sh
@@ -27,7 +27,7 @@ setup() {
testcycle() {
${NCCOPY} ${execdir}/$1.nc ${execdir}/$1_copy.nc
${NCDUMP} -h -n $1 ${execdir}/$1_copy.nc > copy_$1.cdl
-diff -wB ${srcdir}/$1.cdl ${execdir}/copy_$1.cdl
+gdiff -wB ${srcdir}/$1.cdl ${execdir}/copy_$1.cdl
}
typescope() {

View File

@ -1,6 +1,6 @@
Index: ncgen3/ncgenyy.c
--- ncgen3/ncgenyy.c.orig
+++ ncgen3/ncgenyy.c
Index: ncgen3/ncgenl.c
--- ncgen3/ncgenl.c.orig
+++ ncgen3/ncgenl.c
@@ -1081,8 +1081,6 @@ char *yytext;
We include lexical definitions for all three, but use the second version.
*/

View File

@ -1,6 +1,6 @@
Index: ncgen3/ncgentab.c
--- ncgen3/ncgentab.c.orig
+++ ncgen3/ncgentab.c
Index: ncgen3/ncgeny.c
--- ncgen3/ncgeny.c.orig
+++ ncgen3/ncgeny.c
@@ -84,8 +84,6 @@ static char SccsId[] = "$Id: ncgen.y,v 1.34 2010/03/31
#include "ncgen.h"
#include "genlib.h" /* for grow_darray() et al */

View File

@ -1,9 +1,9 @@
Index: ncgen/ncgen.l
--- ncgen/ncgen.l.orig
+++ ncgen/ncgen.l
@@ -38,8 +38,6 @@
#include "ncgen.h"
@@ -39,8 +39,6 @@
#include "ncgeny.h"
#include "isnan.h"
-EXTERNL int fileno(FILE*);
-

View File

@ -1,9 +1,9 @@
Index: ncgen/ncgenl.c
--- ncgen/ncgenl.c.orig
+++ ncgen/ncgenl.c
@@ -1204,8 +1204,6 @@ char *ncgtext;
#include "ncgen.h"
@@ -1439,8 +1439,6 @@ char *yytext;
#include "ncgeny.h"
#include "isnan.h"
-EXTERNL int fileno(FILE*);
-

View File

@ -1,14 +0,0 @@
Fix build on BE_ARCHS, see:
https://github.com/Unidata/netcdf-c/pull/1688
Index: plugins/H5Zutil.c
--- plugins/H5Zutil.c.orig
+++ plugins/H5Zutil.c
@@ -4,6 +4,7 @@
*/
+#include "config.h"
#include <hdf5.h>
/*

View File

@ -1,12 +1,15 @@
bin/nc-config
@bin bin/nc4print
@bin bin/nccopy
@bin bin/ncdump
@bin bin/ncgen
@bin bin/ncgen3
@bin bin/ocprint
include/netcdf.h
include/netcdf_aux.h
include/netcdf_dispatch.h
include/netcdf_filter.h
include/netcdf_filter_build.h
include/netcdf_mem.h
include/netcdf_meta.h
@static-lib lib/libnetcdf.a