Merge pull request #11879 from mjwoods/netcdf-4.9.0
netcdf: update to v4.9.0
This commit is contained in:
@@ -4,7 +4,7 @@ _realname=eccodes
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2.19.1
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
pkgdesc="ECMWF's GRIB and BUFR encoding/decoding library (mingw-w64)"
|
||||
|
||||
@@ -6,7 +6,7 @@ _releases=2021-05-12
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=8.11
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="EXODUS is a model developed to store and retrieve data for finite element analyses (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
|
||||
@@ -22,9 +22,11 @@ makedepends=("unzip"
|
||||
url="https://gsjaardema.github.io/seacas/"
|
||||
license=('BSD')
|
||||
source=("https://github.com/gsjaardema/seacas/archive/v${_releases}.zip"
|
||||
"cmake-fix.patch")
|
||||
"cmake-fix.patch"
|
||||
"netcdf-4.9.0-fix.patch")
|
||||
sha256sums=('818f9eff35a4fae682cf3b81897d49736c332cb3549ae2b2fc22678b21ee06ee'
|
||||
'5248fe9045d203770eb18510b4746c47e10d269db691adc98f43aa419c2b9aa4')
|
||||
'5248fe9045d203770eb18510b4746c47e10d269db691adc98f43aa419c2b9aa4'
|
||||
'c88343e7c943fdd1e8f1d0969b8a3b61b02cbdae936884f66ea97352e0a3219b')
|
||||
noextract=("v${_releases}.zip") # bsdtar could not unpack this archive
|
||||
|
||||
prepare() {
|
||||
@@ -34,6 +36,9 @@ prepare() {
|
||||
sed -i 's:-pedantic:/:g' cmake-exodus
|
||||
|
||||
patch -Np1 -i "${srcdir}/cmake-fix.patch"
|
||||
# Patch for netcdf-4.9.0 based on
|
||||
# https://github.com/sandialabs/seacas/commit/5e1b19181110c52b76d13e3f60da2c8cf678c941:
|
||||
patch -Np1 -i "${srcdir}/netcdf-4.9.0-fix.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
17
mingw-w64-libexodus/netcdf-4.9.0-fix.patch
Normal file
17
mingw-w64-libexodus/netcdf-4.9.0-fix.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
--- seacas-2021-05-12/packages/seacas/libraries/exodus/src/ex_utils.c
|
||||
+++ seacas-2021-05-12/packages/seacas/libraries/exodus/src/ex_utils.c
|
||||
@@ -1741,8 +1741,12 @@ void ex__compress_variable(int exoid, int varid, int type)
|
||||
for details on SZIP library and parameters.
|
||||
*/
|
||||
|
||||
- /* const int NC_SZIP_EC = 4; */ /* Selects entropy coding method for szip. */
|
||||
- const int NC_SZIP_NN = 32; /* Selects nearest neighbor coding method for szip. */
|
||||
+#if !defined(NC_SZIP_EC)
|
||||
+ const int NC_SZIP_EC = 4; /* Selects entropy coding method for szip. */
|
||||
+#endif
|
||||
+#if !defined(NC_SZIP_NN)
|
||||
+ const int NC_SZIP_NN = 32; /* Selects nearest neighbor coding method for szip. */
|
||||
+#endif
|
||||
/* Even and between 4 and 32; typical values are 8, 10, 16, 32 */
|
||||
const int SZIP_PIXELS_PER_BLOCK =
|
||||
file->compression_level == 0 ? 32 : file->compression_level;
|
||||
@@ -1,57 +0,0 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
# Set Memory test program for non-MSVC based builds.
|
||||
# Assume valgrind for now.
|
||||
-IF(NOT MSVC)
|
||||
+IF((NOT MSVC) AND (NOT MINGW))
|
||||
SET(CTEST_MEMORYCHECK_COMMAND valgrind CACHE STRING "")
|
||||
ENDIF()
|
||||
|
||||
@@ -255,10 +255,14 @@
|
||||
|
||||
ADD_DEFINITIONS()
|
||||
|
||||
+# Add specific flags for environments that use the windows runtime (MSVC and MINGW)
|
||||
# Suppress CRT Warnings.
|
||||
-# Only necessary for Windows
|
||||
-IF(MSVC)
|
||||
+# specify tempfile
|
||||
+# specify exceptions in sscanf
|
||||
+IF(MSVC OR MINGW)
|
||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
|
||||
+ SET (HAVE_WIN_TEMP ON)
|
||||
+ SET (HAVE_WIN_SSCANF ON)
|
||||
ENDIF()
|
||||
|
||||
#####
|
||||
@@ -278,7 +282,7 @@
|
||||
# Configuration for post-install RPath
|
||||
# Adapted from http://www.cmake.org/Wiki/CMake_RPATH_handling
|
||||
##
|
||||
-IF(NOT MSVC AND BUILD_SHARED_LIBS)
|
||||
+IF(NOT WIN32 AND BUILD_SHARED_LIBS)
|
||||
# use, i.e. don't skip the full RPATH for the build tree
|
||||
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
|
||||
@@ -1083,7 +1087,7 @@
|
||||
SET(NC_CTEST_DROP_LOC_PREFIX "" CACHE STRING "Prefix for Dashboard location on remote server when using CTest-based testing.")
|
||||
|
||||
FIND_PROGRAM(HOSTNAME_CMD NAMES hostname)
|
||||
- IF(NOT MSVC)
|
||||
+ IF(NOT WIN32)
|
||||
SET(HOSTNAME_ARG "-s")
|
||||
ENDIF()
|
||||
IF(HOSTNAME_CMD)
|
||||
@@ -1576,7 +1580,9 @@
|
||||
CHECK_FUNCTION_EXISTS(strndup HAVE_STRNDUP)
|
||||
CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL)
|
||||
CHECK_FUNCTION_EXISTS(strtoull HAVE_STRTOULL)
|
||||
-CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
|
||||
+IF (NOT MINGW)
|
||||
+ CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
|
||||
+ENDIF(NOT MINGW)
|
||||
CHECK_FUNCTION_EXISTS(mktemp HAVE_MKTEMP)
|
||||
CHECK_FUNCTION_EXISTS(random HAVE_RANDOM)
|
||||
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
@@ -1,19 +0,0 @@
|
||||
--- netcdf-4.6.0/include/ncconfigure.h.orig 2018-03-05 20:39:39.189518100 +0100
|
||||
+++ netcdf-4.6.0/include/ncconfigure.h 2018-03-05 20:44:07.802389700 +0100
|
||||
@@ -47,7 +47,16 @@
|
||||
#endif
|
||||
|
||||
#ifndef strlcat
|
||||
+#if defined(DLL_NETCDF)
|
||||
+# if defined(DLL_EXPORT)
|
||||
+# define GTOPT_EXTRA __declspec(dllexport)
|
||||
+# else
|
||||
+# define GTOPT_EXTRA __declspec(dllimport)
|
||||
+# endif
|
||||
+GTOPT_EXTRA extern size_t strlcat(char* dst, const char* src, size_t dsize);
|
||||
+#else
|
||||
extern size_t strlcat(char*,const char*,size_t);
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#ifndef snprintf
|
||||
@@ -1,20 +0,0 @@
|
||||
--- netcdf-4.6.0/ncgen/cvt.c.orig 2018-03-13 21:50:55.762607800 +0100
|
||||
+++ netcdf-4.6.0/ncgen/cvt.c 2018-03-13 21:52:12.171941700 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
Constvalue tmp;
|
||||
unsigned char* bytes = NULL;
|
||||
size_t bytelen;
|
||||
-#ifdef _MSC_VER
|
||||
+#ifdef HAVE_WIN_SSCANF
|
||||
int byteval;
|
||||
#endif
|
||||
|
||||
@@ -411,7 +411,7 @@
|
||||
break;
|
||||
|
||||
/* Conversion of a string to e.g. an integer should be what?*/
|
||||
-#ifdef _MSC_VER
|
||||
+#ifdef HAVE_WIN_SSCANF
|
||||
case CASE(NC_STRING,NC_BYTE):
|
||||
sscanf(src->value.stringv.stringv,"%d",&byteval); tmp.int8v = (char)byteval; break;
|
||||
case CASE(NC_STRING,NC_UBYTE):
|
||||
@@ -1,14 +0,0 @@
|
||||
--- a/config.h.cmake.in
|
||||
+++ b/config.h.cmake.in
|
||||
@@ -80,6 +80,11 @@
|
||||
#define strtoll _strtoi64
|
||||
#endif /*_MSC_VER */
|
||||
|
||||
+/* define flags needed when windows runtime is used (MINGW and MSVC) */
|
||||
+#cmakedefine MINGW
|
||||
+#cmakedefine HAVE_WIN_TEMP
|
||||
+#cmakedefine HAVE_WIN_SSCANF
|
||||
+
|
||||
#cmakedefine const
|
||||
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
@@ -1,17 +0,0 @@
|
||||
--- a/include/XGetopt.h
|
||||
+++ b/include/XGetopt.h
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
+#if !defined(__GETOPT_H__)
|
||||
#if 0
|
||||
#ifdef _MSC_VER
|
||||
# ifdef DLL_EXPORT
|
||||
@@ -36,5 +37,6 @@
|
||||
GTOPT_EXTRA extern int optind, opterr;
|
||||
GTOPT_EXTRA extern TCHAR* optarg;
|
||||
GTOPT_EXTRA extern int getopt(int argc, TCHAR *argv[], TCHAR *optstring);
|
||||
+#endif
|
||||
|
||||
#endif //XGETOPT_H
|
||||
@@ -3,28 +3,21 @@
|
||||
_realname=netcdf
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=4.8.1
|
||||
pkgrel=4
|
||||
pkgver=4.9.0
|
||||
pkgrel=2
|
||||
pkgdesc="Interface for scientific data access to large binary data (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
license=('custom')
|
||||
url="https://www.unidata.ucar.edu/software/netcdf/"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-curl"
|
||||
"${MINGW_PACKAGE_PREFIX}-hdf5")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-cc")
|
||||
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/Unidata/netcdf-c/archive/v${pkgver}.tar.gz"
|
||||
0001-mingw-cmake.patch
|
||||
0003-ncconfigure-strlcat-export.patch
|
||||
0006-cvt-conversion.patch
|
||||
0007-mingw-config.patch
|
||||
0009-mingw-getopt.patch)
|
||||
sha256sums=('bc018cc30d5da402622bf76462480664c6668b55eb16ba205a0dfb8647161dd0'
|
||||
'298bfdad7fb9f3f8c17ebd1fec71d875c33f06e4f8a1e539d7cb0888ca71352d'
|
||||
'0116525b0b513b91c22519c38d9010a4eff0a7319cc2a3d882b296389119b632'
|
||||
'f5f5291c2486e9e765a93975d99871cee584bdd3d64e16745982aadeb799f00c'
|
||||
'3da38cb9beb1b075a407f698cb9ce5af14c67c1a9d1e75a70e73eec349d353c8'
|
||||
'476b49818daf6e81d6a4102749c8484f7efc4f76ba6ca1fb53aedb17749579ea')
|
||||
"${MINGW_PACKAGE_PREFIX}-hdf5"
|
||||
"${MINGW_PACKAGE_PREFIX}-zlib")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
checkdepends=("unzip")
|
||||
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/Unidata/netcdf-c/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('9f4cb864f3ab54adb75409984c6202323d2fc66c003e5308f3cdf224ed41c0a6')
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
apply_patch_with_msg() {
|
||||
@@ -38,12 +31,7 @@ apply_patch_with_msg() {
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-c-${pkgver}"
|
||||
|
||||
apply_patch_with_msg \
|
||||
0001-mingw-cmake.patch \
|
||||
0003-ncconfigure-strlcat-export.patch \
|
||||
0006-cvt-conversion.patch \
|
||||
0007-mingw-config.patch \
|
||||
0009-mingw-getopt.patch
|
||||
#apply_patch_with_msg *.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
@@ -57,9 +45,8 @@ build() {
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DENABLE_DLL=OFF \
|
||||
-DBUILD_UTILITIES=OFF \
|
||||
-DENABLE_EXAMPLES=OFF \
|
||||
-DENABLE_TESTS=OFF \
|
||||
-DENABLE_TESTS=ON \
|
||||
-DENABLE_DAP_REMOTE_TESTS=OFF \
|
||||
-DENABLE_DAP=ON \
|
||||
-DENABLE_NETCDF_4=ON \
|
||||
-Wno-dev \
|
||||
@@ -77,6 +64,7 @@ build() {
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DENABLE_EXAMPLES=OFF \
|
||||
-DENABLE_TESTS=OFF \
|
||||
-DENABLE_DAP_REMOTE_TESTS=OFF \
|
||||
-DENABLE_DAP=ON \
|
||||
-DENABLE_NETCDF_4=ON \
|
||||
-DENABLE_LOGGING=ON \
|
||||
@@ -85,6 +73,11 @@ build() {
|
||||
cmake --build .
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/build-static-${MSYSTEM}"
|
||||
ctest
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR=${pkgdir} cmake --install build-static-${MSYSTEM}
|
||||
|
||||
@@ -98,10 +91,14 @@ package() {
|
||||
sed -e "s|${PREFIX_WIN}|\$\{_IMPORT_PREFIX\}|g" -i ${_f}
|
||||
done
|
||||
|
||||
for pcfile in "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/*.pc; do
|
||||
sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i "${pcfile}"
|
||||
local SRCDIR_WIN=$(cygpath -wm "${srcdir}")
|
||||
for file in \
|
||||
"${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/*.pc \
|
||||
"${pkgdir}${MINGW_PREFIX}/bin/nc-config" \
|
||||
"${pkgdir}${MINGW_PREFIX}/lib/libnetcdf.settings" \
|
||||
"${pkgdir}${MINGW_PREFIX}/lib/cmake/netCDF/netCDFConfig.cmake" \
|
||||
; do
|
||||
sed -i -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \
|
||||
-e "s|${SRCDIR_WIN}|\$\{_SRCDIR\}|g" "$file"
|
||||
done
|
||||
|
||||
sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i "${pkgdir}${MINGW_PREFIX}/bin/nc-config"
|
||||
sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i "${pkgdir}${MINGW_PREFIX}/lib/libnetcdf.settings"
|
||||
}
|
||||
|
||||
11
mingw-w64-seacas/0002-cmake-findHDF5.patch
Normal file
11
mingw-w64-seacas/0002-cmake-findHDF5.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/cmake/tribits/common_tpls/find_modules/FindHDF5.cmake
|
||||
+++ b/cmake/tribits/common_tpls/find_modules/FindHDF5.cmake
|
||||
@@ -258,7 +258,7 @@
|
||||
endforeach()
|
||||
|
||||
# Now match all the -I flags
|
||||
- if (${_cflags})
|
||||
+ if (_cflags)
|
||||
string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" _inc_path_flags ${_cflags})
|
||||
|
||||
# Loop through each
|
||||
17
mingw-w64-seacas/0003-libexodus-netcdf-4.9.0.patch
Normal file
17
mingw-w64-seacas/0003-libexodus-netcdf-4.9.0.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
--- a/packages/seacas/libraries/exodus/src/ex_utils.c
|
||||
+++ b/packages/seacas/libraries/exodus/src/ex_utils.c
|
||||
@@ -1741,8 +1741,12 @@ void ex__compress_variable(int exoid, int varid, int type)
|
||||
for details on SZIP library and parameters.
|
||||
*/
|
||||
|
||||
- /* const int NC_SZIP_EC = 4; */ /* Selects entropy coding method for szip. */
|
||||
- const int NC_SZIP_NN = 32; /* Selects nearest neighbor coding method for szip. */
|
||||
+#if !defined(NC_SZIP_EC)
|
||||
+ const int NC_SZIP_EC = 4; /* Selects entropy coding method for szip. */
|
||||
+#endif
|
||||
+#if !defined(NC_SZIP_NN)
|
||||
+ const int NC_SZIP_NN = 32; /* Selects nearest neighbor coding method for szip. */
|
||||
+#endif
|
||||
/* Even and between 4 and 32; typical values are 8, 10, 16, 32 */
|
||||
const int SZIP_PIXELS_PER_BLOCK =
|
||||
file->compression_level == 0 ? 32 : file->compression_level;
|
||||
@@ -5,7 +5,7 @@ _releases=2022-05-16
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=${_releases//-/.}
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="The Sandia Engineering Analysis Code Access System (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
@@ -24,9 +24,13 @@ makedepends=("unzip"
|
||||
url="https://gsjaardema.github.io/seacas/"
|
||||
license=('BSD')
|
||||
source=("https://github.com/gsjaardema/seacas/archive/refs/tags/v${_releases}.zip"
|
||||
"0001-cmake-add-libs.patch")
|
||||
"0001-cmake-add-libs.patch"
|
||||
"0002-cmake-findHDF5.patch"
|
||||
"0003-libexodus-netcdf-4.9.0.patch")
|
||||
sha256sums=('80F6B0DEE91766AB207A366B8EEA546CC1AFA33CEA24DEEBAA6583F283D80FAB'
|
||||
'a3561756bfdeb942fc62add0aefa542b0e689b76a7f0d2d357e299465ee344d2')
|
||||
'a3561756bfdeb942fc62add0aefa542b0e689b76a7f0d2d357e299465ee344d2'
|
||||
'09c4406d57c5ca18b0d2f16161dd6f5e2c5d56f0f73e83bd77272d876569d5cc'
|
||||
'd893283361b88984b40b5ada4f2756c989e3f20e16e3fe9535c9cd31216be074')
|
||||
noextract=("v${_releases}.zip") # bsdtar could not unpack this archive
|
||||
|
||||
prepare() {
|
||||
@@ -35,6 +39,10 @@ prepare() {
|
||||
|
||||
cd "${srcdir}/seacas-${_releases}"
|
||||
patch -p1 -i "${srcdir}/0001-cmake-add-libs.patch"
|
||||
patch -p1 -i "${srcdir}/0002-cmake-findHDF5.patch"
|
||||
# Patch for netcdf-4.9.0 in libexodus based on
|
||||
# https://github.com/sandialabs/seacas/commit/5e1b19181110c52b76d13e3f60da2c8cf678c941:
|
||||
patch -p1 -i "${srcdir}/0003-libexodus-netcdf-4.9.0.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
@@ -5,7 +5,7 @@ _realname=vtk
|
||||
pkgbase="mingw-w64-${_realname}"
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=8.2.0
|
||||
pkgrel=12
|
||||
pkgrel=13
|
||||
pkgdesc="A software system for 3D computer graphics, image processing and visualization (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
|
||||
Reference in New Issue
Block a user