libexodus: patch for netcdf-4.9.0

This commit is contained in:
Milton Woods
2022-06-21 10:11:26 +10:00
parent 861c7827a7
commit 0f90d65c8d
2 changed files with 22 additions and 2 deletions

View File

@@ -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,7 @@ prepare() {
sed -i 's:-pedantic:/:g' cmake-exodus
patch -Np1 -i "${srcdir}/cmake-fix.patch"
patch -Np1 -i "${srcdir}/netcdf-4.9.0-fix.patch"
}
build() {

View 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;