update to netcdf-4.6.3, from martin@ taking maintainer, various feedback

from landry@ and myself, ok with Tom Knienieder (outgoing maintainer)
This commit is contained in:
sthen 2019-03-13 20:27:40 +00:00
parent 0f7d89c2bb
commit 4d05e9c3ba
22 changed files with 352 additions and 75 deletions

View File

@ -1,45 +1,58 @@
# $OpenBSD: Makefile,v 1.33 2018/10/28 07:31:29 bentley Exp $
# $OpenBSD: Makefile,v 1.34 2019/03/13 20:27:40 sthen Exp $
BROKEN-powerpc= fails to build
BROKEN-hppa = fails to configure
# let's give it a chance?
#BROKEN-powerpc= fails to build
#BROKEN-hppa = fails to configure
COMMENT= library for machine-independent, array-oriented data access
DISTNAME= netcdf-3.6.2
REVISION = 7
V= 4.6.3
NAME= netcdf
DISTNAME= ${NAME}-c-${V}
PKGNAME= ${NAME}-${V}
CATEGORIES= math
SHARED_LIBS= netcdf 4.0 \
netcdff 4.0 \
netcdf_c++ 4.0
SHARED_LIBS= netcdf 5.0 # 4.0
HOMEPAGE= http://www.unidata.ucar.edu/software/netcdf/
MAINTAINER= Tom Knienieder <tom@knienieder.com>
MODULES = fortran
MODFORTRAN_COMPILER = g77
BUILD_DEPENDS = ${MODFORTRAN_BUILD_DEPENDS}
MAINTAINER= Martin Reindl <martin@catai.org>
# BSD-like
# BSD
PERMIT_PACKAGE_CDROM= Yes
WANTLIB= c m ${COMPILER_LIBCXX}
WANTLIB= c m z pthread
WANTLIB+= curl crypto nghttp2 ssl
WANTLIB+= hdf5 hdf5_hl
LIB_DEPENDS = net/curl \
math/hdf5
TEST_DEPENDS= shells/bash \
textproc/gdiff
COMPILER = base-clang ports-gcc base-gcc
MASTER_SITES= ftp://ftp.unidata.ucar.edu/pub/netcdf/
CONFIGURE_STYLE= gnu
CONFIGURE_ENV= CPPFLAGS="-Df2cFortran"
CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib" \
CPPFLAGS="-I${LOCALBASE}/include"
CONFIGURE_ARGS+= --enable-shared \
--disable-f90
--disable-doxygen \
--enable-netcdf-4 \
--enable-dap \
--prefix=${PREFIX}
USE_GMAKE= Yes
SEPARATE_BUILD= Yes
# https://github.com/Unidata/netcdf-c/issues/1347#issuecomment-467633543
# "Actually, I did not intend the .so files in netcdf-c/plugins to be
# installed. They are intended only for testing and examples"
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/netcdf
@cd ${WRKSRC}/man && ${INSTALL_DATA} *.txt *.pdf \
${PREFIX}/share/doc/netcdf
rm ${PREFIX}/lib/lib{bzip2,misc}.{a,la,so}
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (netcdf-3.6.2.tar.gz) = /qp2c/Np5ftX/MUUJuK+aUIo3cwUH8P9IDmSaftrkxE=
SIZE (netcdf-3.6.2.tar.gz) = 5312882
SHA256 (netcdf-c-4.6.3.tar.gz) = M1/fFtdTH0MK115zLtGpo/yDrT75H7M6cBGaVV3VQVw=
SIZE (netcdf-c-4.6.3.tar.gz) = 5961248

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-cxx_ncvalues_cpp,v 1.1 2018/10/28 07:31:29 bentley Exp $
Index: cxx/ncvalues.cpp
--- cxx/ncvalues.cpp.orig
+++ cxx/ncvalues.cpp
@@ -10,6 +10,7 @@
#include <config.h>
#include <iostream>
#include <string>
+#include <cstring>
#include "ncvalues.h"

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-dap4_test_test_data_sh,v 1.1 2019/03/13 20:27:40 sthen Exp $
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
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
elif test "x${RESET}" = x1 ; then
echo "${f}:"
@@ -77,13 +77,13 @@ if test "x${CDLDIFF}" = x1 ; then
echo "Not found: ${CDLTESTFILES}/${STEM}.cdl"
continue
fi
- echo "diff -wBb ${CDLTESTFILES}/${STEM}.cdl ./results_test_data/${f}.d4d"
+ echo "gdiff -wBb ${CDLTESTFILES}/${STEM}.cdl ./results_test_data/${f}.d4d"
rm -f ./b1 ./b2 ./r1 ./r2
trim ${CDLTESTFILES}/${STEM}.cdl ./b1
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
done

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-dap4_test_test_meta_sh,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: dap4_test/test_meta.sh
--- dap4_test/test_meta.sh.orig
+++ dap4_test/test_meta.sh
@@ -34,8 +34,8 @@ for f in ${F} ; do
fi
${NCDUMP} ${DUMPFLAGS} -h ./results_test_meta/${f} > ./results_test_meta/${f}.d4m
if test "x${TEST}" = x1 ; then
- if ! diff -wBb ${BASELINE}/${f}.d4m ./results_test_meta/${f}.d4m ; then
- failure "diff -wBb ${BASELINE}/${f}.ncdump ./results_test_meta/${f}.d4m"
+ if ! gdiff -wBb ${BASELINE}/${f}.d4m ./results_test_meta/${f}.d4m ; then
+ failure "gdiff -wBb ${BASELINE}/${f}.ncdump ./results_test_meta/${f}.d4m"
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"
@@ -45,12 +45,12 @@ done
if test "x${CDLDIFF}" = x1 ; then
for f in $CDL ; do
- echo "diff -wBb ${CDLTESTFILES}/${f}.cdl ./results_test_meta/${f}.d4m"
+ echo "gdiff -wBb ${CDLTESTFILES}/${f}.cdl ./results_test_meta/${f}.d4m"
rm -f ./tmp
cat ${CDLTESTFILES}/${f}.cdl \
cat >./tmp
- echo diff -wBbu ./tmp ./results_test_meta/${f}.d4m
- if ! diff -wBbu ./tmp ./results_test_meta/${f}.d4m ; then
+ echo gdiff -wBbu ./tmp ./results_test_meta/${f}.d4m
+ if ! gdiff -wBbu ./tmp ./results_test_meta/${f}.d4m ; then
failure "${f}"
fi
done

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-dap4_test_test_parse_sh,v 1.1 2019/03/13 20:27:40 sthen Exp $
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
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
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"
rm -f ./tmp
cat ./results_test_parse/${f}.d4p \
| sed -e '/<Dimensions>/d' -e '/<Types>'/d -e '/<Variables>'/d -e '/<Groups>'/d \
| 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
elif test "x${RESET}" = x1 ; then

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-dap4_test_test_raw_sh,v 1.1 2019/03/13 20:27:40 sthen Exp $
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
failure "${URL}"
fi
if test "x${TEST}" = x1 ; then
- if ! diff -wBb ${BASELINERAW}/${f}.dmp ${builddir}/results_test_raw/${f}.dmp ; then
- failure "diff ${f}.dmp"
+ if ! gdiff -wBb ${BASELINERAW}/${f}.dmp ${builddir}/results_test_raw/${f}.dmp ; then
+ failure "gdiff ${f}.dmp"
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"
@@ -60,8 +60,8 @@ for f in $F ; do
elif test "x${DIFF}" = x1 ; then
echo "hdrtest: ${f}"
baseclean
- if ! diff -wBb ${BASELINERAW}/${f}.dmp ${BASELINE}/${f}.ncdump ; then
- failure diff -wBb ${BASELINERAW}/${f}.dmp ${BASELINE}/${f}.ncdump
+ if ! gdiff -wBb ${BASELINERAW}/${f}.dmp ${BASELINE}/${f}.ncdump ; then
+ failure gdiff -wBb ${BASELINERAW}/${f}.dmp ${BASELINE}/${f}.ncdump
fi
fi
done

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-dap4_test_test_remote_sh,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: dap4_test/test_remote.sh
--- dap4_test/test_remote.sh.orig
+++ dap4_test/test_remote.sh
@@ -77,8 +77,8 @@ for f in $F ; do
failure "${URL}"
fi
if test "x${TEST}" = x1 ; then
- if ! diff -wBb "${BASELINEREM}/${f}.dmp" "${builddir}/results_test_remote/${f}.dmp" ; then
- failure "diff ${f}.dmp"
+ if ! gdiff -wBb "${BASELINEREM}/${f}.dmp" "${builddir}/results_test_remote/${f}.dmp" ; then
+ failure "gdiff ${f}.dmp"
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-libdispatch_dfile_c,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: libdispatch/dfile.c
--- libdispatch/dfile.c.orig
+++ libdispatch/dfile.c
@@ -32,7 +32,6 @@
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
-extern int fileno(FILE*);
#include "ncdispatch.h"
#include "netcdf_mem.h"

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-libdispatch_dparallel_c,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: libdispatch/dparallel.c
--- libdispatch/dparallel.c.orig
+++ libdispatch/dparallel.c
@@ -10,7 +10,6 @@
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
-extern int fileno(FILE*);
/**
Create a netCDF file for parallel I/O.

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-nc_test4_tst_camrun_c,v 1.1 2019/03/13 20:27:40 sthen Exp $
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

@ -0,0 +1,11 @@
$OpenBSD: patch-ncdap_test_tst_remote3_sh,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: ncdap_test/tst_remote3.sh
--- ncdap_test/tst_remote3.sh.orig
+++ ncdap_test/tst_remote3.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
if test "x$SETX" = x1 ; then set -x ; fi

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-ncdap_test_tst_urls_sh,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: ncdap_test/tst_urls.sh
--- ncdap_test/tst_urls.sh.orig
+++ ncdap_test/tst_urls.sh
@@ -8,7 +8,7 @@
# Define various sets of test targets
# Figure our dst server; if none, then just stop
-DTS=`${execdir}/findtestserver dap2 dts`
+DTS=`./findtestserver dap2 dts`
if test "x$DTS" = "x" ; then
echo "WARNING: Cannot locate test server for dts"
exit 1

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-ncgen3_ncgen_l,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: ncgen3/ncgen.l
--- ncgen3/ncgen.l.orig
+++ ncgen3/ncgen.l
@@ -25,8 +25,6 @@
We include lexical definitions for all three, but use the second version.
*/
-extern int fileno(FILE*);
-
/* lex specification for tokens for ncgen */
/* Fill value used by ncdump from version 2.4 and later. Should match

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-ncgen3_ncgen_y,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: ncgen3/ncgen.y
--- ncgen3/ncgen.y.orig
+++ ncgen3/ncgen.y
@@ -19,8 +19,6 @@ static char SccsId[] = "$Id: ncgen.y,v 1.34 2010/03/31
#include "ncgen.h"
#include "genlib.h" /* for grow_darray() et al */
-extern int fileno(FILE*);
-
typedef struct Symbol { /* symbol table entry */
char *name;
struct Symbol *next;

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-ncgen3_ncgentab_c,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: ncgen3/ncgentab.c
--- ncgen3/ncgentab.c.orig
+++ ncgen3/ncgentab.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 */
-extern int fileno(FILE*);
-
typedef struct Symbol { /* symbol table entry */
char *name;
struct Symbol *next;

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-ncgen3_ncgenyy_c,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: ncgen3/ncgenyy.c
--- ncgen3/ncgenyy.c.orig
+++ ncgen3/ncgenyy.c
@@ -865,8 +865,6 @@ char *ncgtext;
We include lexical definitions for all three, but use the second version.
*/
-extern int fileno(FILE*);
-
/* lex specification for tokens for ncgen */
/* Fill value used by ncdump from version 2.4 and later. Should match

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-ncgen_ncgen_1,v 1.1 2017/05/08 13:31:58 schwarze Exp $
Index: ncgen/ncgen.1
--- ncgen/ncgen.1.orig
+++ ncgen/ncgen.1
@@ -339,7 +339,7 @@ are all acceptable \fIfloat\fP constants:
-2.0f
3.14159265358979f // will be truncated to less precision
1.f
-.1f
+\&.1f
.fi
.RE
.LP

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-ncgen_ncgen_l,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: ncgen/ncgen.l
--- ncgen/ncgen.l.orig
+++ ncgen/ncgen.l
@@ -38,8 +38,6 @@
#include "ncgen.h"
#include "ncgeny.h"
-EXTERNL int fileno(FILE*);
-
#define FILL_STRING "_"
#define XDR_INT32_MIN (-2147483647-1)
#define XDR_INT32_MAX 2147483647

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-ncgen_ncgenl_c,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: ncgen/ncgenl.c
--- ncgen/ncgenl.c.orig
+++ ncgen/ncgenl.c
@@ -1420,8 +1420,6 @@ char *yytext;
#include "ncgen.h"
#include "ncgeny.h"
-EXTERNL int fileno(FILE*);
-
#define FILL_STRING "_"
#define XDR_INT32_MIN (-2147483647-1)
#define XDR_INT32_MAX 2147483647

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-oc2_ocdump_c,v 1.1 2019/03/13 20:27:40 sthen Exp $
Index: oc2/ocdump.c
--- oc2/ocdump.c.orig
+++ oc2/ocdump.c
@@ -10,8 +10,6 @@
#include <sys/stat.h>
#endif
-extern int fileno(FILE*);
-
#include "ocinternal.h"
#include "ocdebug.h"

View File

@ -1,36 +1,27 @@
@comment $OpenBSD: PLIST,v 1.6 2015/03/16 18:07:50 naddy Exp $
@comment $OpenBSD: PLIST,v 1.7 2019/03/13 20:27:40 sthen Exp $
bin/nc-config
@bin bin/nccopy
@bin bin/ncdump
@bin bin/ncgen
include/ncvalues.h
@bin bin/ncgen3
include/netcdf.h
include/netcdf.hh
include/netcdf.inc
include/netcdfcpp.h
include/netcdf_aux.h
include/netcdf_filter.h
include/netcdf_mem.h
include/netcdf_meta.h
@comment lib/libbzip2.a
@comment lib/libbzip2.la
@comment lib/libbzip2.so
@comment lib/libmisc.a
@comment lib/libmisc.la
@comment lib/libmisc.so
lib/libnetcdf.a
lib/libnetcdf.la
lib/libnetcdf.settings
@lib lib/libnetcdf.so.${LIBnetcdf_VERSION}
lib/libnetcdf_c++.a
lib/libnetcdf_c++.la
@lib lib/libnetcdf_c++.so.${LIBnetcdf_c++_VERSION}
lib/libnetcdff.a
lib/libnetcdff.la
@lib lib/libnetcdff.so.${LIBnetcdff_VERSION}
lib/pkgconfig/netcdf.pc
@man man/man1/nccopy.1
@man man/man1/ncdump.1
@man man/man1/ncgen.1
@man man/man1/ncgen3.1
@man man/man3/netcdf.3
@man man/man3/netcdf_f77.3
share/doc/netcdf/
share/doc/netcdf/netcdf-c.pdf
share/doc/netcdf/netcdf-c.txt
share/doc/netcdf/netcdf-cxx.pdf
share/doc/netcdf/netcdf-cxx.txt
share/doc/netcdf/netcdf-f77.pdf
share/doc/netcdf/netcdf-f77.txt
share/doc/netcdf/netcdf-f90.pdf
share/doc/netcdf/netcdf-f90.txt
share/doc/netcdf/netcdf-install.pdf
share/doc/netcdf/netcdf-install.txt
share/doc/netcdf/netcdf-tutorial.pdf
share/doc/netcdf/netcdf-tutorial.txt
share/doc/netcdf/netcdf.pdf
share/doc/netcdf/netcdf.txt