changeset 5870:9c858dd1990f

netcdf: update to v4.8.1 * src/netcdf-1-fixes.patch: remove patch * dist-files.mk: remove ref to patch * src/netcdf.mk: update version, checksum. Use github sources.
author John Donoghue <john.donoghue@ieee.org>
date Sun, 29 Aug 2021 10:47:00 -0400
parents ec73307e819c
children 1b10dc73d928
files dist-files.mk src/netcdf-1-fixes.patch src/netcdf.mk
diffstat 3 files changed, 12 insertions(+), 218 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Sat Aug 28 12:10:42 2021 -0400
+++ b/dist-files.mk	Sun Aug 29 10:47:00 2021 -0400
@@ -458,7 +458,6 @@
   native-gcc.mk \
   ncurses-1-gcc-5-fix.patch \
   ncurses.mk \
-  netcdf-1-fixes.patch \
   netcdf.mk \
   nettle-1-fixes.patch \
   nettle.mk \
--- a/src/netcdf-1-fixes.patch	Sat Aug 28 12:10:42 2021 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,206 +0,0 @@
-From 51fa5fce1b4ec3b414917b352c84976f3aa0f552 Mon Sep 17 00:00:00 2001
-From: Dennis Heimbigner <dmh@ucar.edu>
-Date: Tue, 18 May 2021 14:06:12 -0600
-Subject: [PATCH 1/6] Fix NCclosedir in dpathmgr.c
-
-re: Issue https://github.com/Unidata/netcdf-c/issues/1999
-
-NCclosedir code is incorrect. Fix.
-Note that this issue crops up when using a non-VisualStudio windows build
-such as Mingw because Mingq defines dirent.h, but Visual Studio does not.
----
- libdispatch/dpathmgr.c | 35 +----------------------------------
- 1 file changed, 1 insertion(+), 34 deletions(-)
-
-diff --git a/libdispatch/dpathmgr.c b/libdispatch/dpathmgr.c
-index 0a3e312eb7..6ab6588af6 100644
---- a/libdispatch/dpathmgr.c
-+++ b/libdispatch/dpathmgr.c
-@@ -356,10 +356,7 @@ int
- NCclosedir(DIR* ent)
- {
-     int stat = NC_NOERR;
--    char* cvtname = NCpathcvt(path);
--    if(cvtname == NULL) {errno = ENOENT; return -1;}
--    stat = closedir(cvtname);
--    free(cvtname);    
-+    if(closedir(ent) < 0) stat = errno;
-     return stat;
- }
- #endif
-@@ -911,33 +908,3 @@ printutf8hex(const char* s, char* sx)
-     }
-     *q = '\0';
- }
--
--/**************************************************/
--#if 0
--#ifdef HAVE_DIRENT_H
--EXTERNL
--DIR*
--NCopendir(const char* path)
--{
--    DIR* ent = NULL;
--    char* cvtpath = NCpathcvt(path);
--    if(cvtpath == NULL) return -1;
--    ent = opendir(cvtpath);
--    free(cvtpath);    
--    return ent;
--}
--
--EXTERNL
--int
--NCclosedir(DIR* ent)
--{
--    int stat = 0;
--    char* cvtpath = NCpathcvt(path);
--    if(cvtpath == NULL) return -1;
--    stat = closedir(cvtpath);
--    free(cvtpath);    
--    return stat;
--}
--#endif
--#endif /*0*/
--
-
-From edc2c7af98c4752555c873f4e1ad38e113184687 Mon Sep 17 00:00:00 2001
-From: Dennis Heimbigner <dmh@ucar.edu>
-Date: Wed, 19 May 2021 17:19:33 -0600
-Subject: [PATCH 4/6] fix cygwin build
-
----
- ncdump/Makefile.am | 6 +++++-
- test_common.in     | 1 +
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/ncdump/Makefile.am b/ncdump/Makefile.am
-index b5cd0438b7..017a00d994 100644
---- a/ncdump/Makefile.am
-+++ b/ncdump/Makefile.am
-@@ -66,7 +66,7 @@ bom tst_dimsizes nctrunc tst_rcmerge
- # Tests for classic and 64-bit offset files.
- TESTS = tst_inttags.sh run_tests.sh tst_64bit.sh ref_ctest	\
- ref_ctest64 tst_output.sh tst_lengths.sh tst_calendars.sh	\
--run_utf8_tests.sh test_unicode_directory.sh tst_nccopy3.sh tst_nccopy3_subset.sh		\
-+run_utf8_tests.sh tst_nccopy3.sh tst_nccopy3_subset.sh		\
- tst_charfill.sh tst_iter.sh tst_formatx3.sh tst_bom.sh		\
- tst_dimsizes.sh run_ncgen_tests.sh tst_ncgen4_classic.sh test_radix.sh test_rcmerge.sh
- 
-@@ -80,6 +80,10 @@ if USE_STRICT_NULL_BYTE_HEADER_PADDING
- XFAIL_TESTS += tst_null_byte_padding.sh
- endif
- 
-+if ! ISCYGWIN
-+TESTS += test_unicode_directory.sh 
-+endif
-+
- if LARGE_FILE_TESTS
- TESTS += tst_iter.sh
- endif
-diff --git a/test_common.in b/test_common.in
-index 539be6fdf5..5e36b301b1 100644
---- a/test_common.in
-+++ b/test_common.in
-@@ -10,6 +10,7 @@ TOPSRCDIR='@abs_top_srcdir@'
- TOPBUILDDIR='@abs_top_builddir@'
- FP_ISCMAKE=@ISCMAKE@
- FP_ISMSVC=@ISMSVC@
-+FP_ISCYGWIN=@ISCYGWIN@
- 
- # Feature flags
- FEATURE_HDF5=@HAS_HDF5@
-
-From 537f41aeb355fc4ee481fedf0e91f342c59e6b82 Mon Sep 17 00:00:00 2001
-From: Dennis Heimbigner <dmh@ucar.edu>
-Date: Wed, 19 May 2021 17:41:41 -0600
-Subject: [PATCH 5/6] Fix 2 for cygwin build
-
----
- libnczarr/zmap.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libnczarr/zmap.c b/libnczarr/zmap.c
-index 19e19a2cbe..ed162dead4 100644
---- a/libnczarr/zmap.c
-+++ b/libnczarr/zmap.c
-@@ -377,13 +377,16 @@ nczm_localize(const char* path, char** localpathp, int localize)
-     char* p;
-     int forward = 1;
-     int offset = 0;
-+    static const char* windrive = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
- 
- #ifdef _MSC_VER
-     forward = (localize?0:1);
- #endif
-     /* If path comes from a url, then it may start with: /x:/...
-        where x is a drive letter. If so, then remove leading / */
--    if(path[0] == '/' && NChasdriveletter(path+1))
-+    if(strlen(path) >= 4
-+       && path[0] == '/' && strchr(windrive,path[1]) != NULL
-+       && path[2] == ':' && path[3] == '/')
- 	offset = 1;
-     if((localpath = strdup(path+offset))==NULL) return NC_ENOMEM;
- 
-
-From 0e931f22a5c328ce6734cc1674a617c910a9db3e Mon Sep 17 00:00:00 2001
-From: Dennis Heimbigner <dmh@ucar.edu>
-Date: Wed, 19 May 2021 21:04:53 -0600
-Subject: [PATCH 6/6] More cygwin fixes
-
----
- configure.ac           |  8 ++++++--
- nc_test4/findplugin.in | 10 ++--------
- 2 files changed, 8 insertions(+), 10 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 25598e9deb..1283aa75ad 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1095,10 +1095,16 @@ AC_C_BIGENDIAN
- # Figure out platforms of special interest
- case "`uname`" in
-   CYGWIN*) ISCYGWIN=yes;;
-+  Darwin*) ISOSX=yes;;
-   WIN*) ISMSVC=yes;;
- esac
- AM_CONDITIONAL(ISCYGWIN, [test "x$ISCYGWIN" = xyes])
- AM_CONDITIONAL(ISMSVC, [test "x$ISMSVC" = xyes])
-+AM_CONDITIONAL(ISOSX, [test "x$ISOSX" = xyes])
-+
-+AC_SUBST([ISMSVC], [${ISMSVC}])
-+AC_SUBST([ISCYGWIN], [${ISCYGWIN}])
-+AC_SUBST([ISOSX], [${ISOSX}])
- 
- ###
- # Crude hack to work around an issue
-@@ -1722,8 +1728,6 @@ AC_DEFINE_UNQUOTED([NC_DISPATCH_VERSION], [${NC_DISPATCH_VERSION}], [Dispatch ta
- # End netcdf_meta.h definitions.
- #####
- 
--# This would be true for a visual studio build.
--AC_SUBST([ISMSVC], [${ISMSVC}])
- # This would be true for a cmake build.
- AC_SUBST([ISCMAKE], [])
- 
-diff --git a/nc_test4/findplugin.in b/nc_test4/findplugin.in
-index aafe051de8..9819659686 100644
---- a/nc_test4/findplugin.in
-+++ b/nc_test4/findplugin.in
-@@ -27,14 +27,8 @@ FP_NAME="$1"
- # Figure out the compiler (some values from ./configure)
- FP_ISCMAKE=@ISCMAKE@
- FP_ISMSVC=@ISMSVC@
--
--# Are we operating under OS-X? (test using uname)
--FP_OS=`uname | cut -d '_'  -f 1`
--if test "x$FP_OS" = xDarwin ; then FP_ISOSX=1; fi
--
--# Are we operating under CYGWIN? (test using uname)
--FP_OS=`uname | cut -d '_'  -f 1`
--if test "x$FP_OS" = xCYGWIN ; then FP_ISCYGWIN=1; fi
-+FP_ISCYGWIN=@ISCYGWIN@
-+FP_ISOSX=@ISOSX@
- 
- FP_PLUGINS="$TOPBUILDDIR/plugins"
- 
-
--- a/src/netcdf.mk	Sat Aug 28 12:10:42 2021 -0400
+++ b/src/netcdf.mk	Sun Aug 29 10:47:00 2021 -0400
@@ -3,22 +3,23 @@
 
 PKG             := netcdf
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 4.8.0
-$(PKG)_CHECKSUM := 727a8fa93da516567106266b4a16d9fd792cf443
+$(PKG)_VERSION  := 4.8.1
+$(PKG)_CHECKSUM := ae9e8741aebdb3ba4494a78a7f5a32e92516edc1
 $(PKG)_SUBDIR   := netcdf-c-$($(PKG)_VERSION)
 $(PKG)_FILE     := netcdf-c-$($(PKG)_VERSION).tar.gz
-$(PKG)_URL      := ftp://ftp.unidata.ucar.edu/pub/netcdf/$($(PKG)_FILE)
+$(PKG)_URL      := https://github.com/Unidata/netcdf-c/archive/v$($(PKG)_VERSION).tar.gz
 $(PKG)_DEPS     := curl hdf5
 
 define $(PKG)_UPDATE
-    $(WGET) -q -O- 'ftp://ftp.unidata.ucar.edu/pub/netcdf/' | \
-    $(SED) -n 's,.*netcdf-c-\([0-9]\.[^>]*\)\.tar.*,\1,p' | \
-    $(SORT) -V | \
-    tail -1
+    $(WGET) -q -O- 'https://github.com/Unidata/netcdf-c/tags' | \
+    $(SED) -n 's|.*releases/tag/v\([^"]*\).*|\1|p' | \
+    head -1
 endef
 
 ifeq ($(MXE_WINDOWS_BUILD),yes)
-  $(PKG)_CONFIGURE_OPTIONS := --enable-dll
+  $(PKG)_CONFIGURE_OPTIONS := CPPFLAGS='-DH5_USE_110_API -DDLL_NETCDF -I$(HOST_PREFIX)/include'
+else
+  $(PKG)_CONFIGURE_OPTIONS := CPPFLAGS='-DH5_USE_110_API -I$(HOST_PREFIX)/include'
 endif
 
 $(PKG)_CONFIGURE_POST_HOOK := $(CONFIGURE_POST_HOOK)
@@ -32,13 +33,13 @@
     fi
     cd '$(1)' && ./configure \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
-        CPPFLAGS='-DH5_USE_110_API -I$(HOST_PREFIX)/include' \
-        $(CONFIGURE_LDFLAGS) \
+	--enable-hdf5 --disable-testsets --disable-utilities \
+        $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
         $(ENABLE_SHARED_OR_STATIC) \
         --prefix='$(HOST_PREFIX)' \
         $($(PKG)_CONFIGURE_OPTIONS) \
 	&& $($(PKG)_CONFIGURE_POST_HOOK)
-    $(MAKE) -C '$(1)' -j '$(JOBS)' LDFLAGS='-no-undefined -L$(HOST_LIBDIR)'
+    $(MAKE) -C '$(1)' -j '$(JOBS)' LDFLAGS='-no-undefined -L$(HOST_LIBDIR)' $(MXE_DISABLE_PROGS) $(MXE_DISABLE_DOCS) V=1
     $(MAKE) -C '$(1)' -j 1 install LDFLAGS='-no-undefined -L$(HOST_LIBDIR)' $(MXE_DISABLE_PROGS) $(MXE_DISABLE_DOCS) DESTDIR='$(3)'
   
     if [ ! "x$(MXE_NATIVE_BUILD)" = "xyes" ]; then \