[packages/netcdf-cxx4] - upstream fix for disabled development logging; release 4 (netcdf 4.9.3)

qboosh qboosh at pld-linux.org
Fri Sep 26 20:03:56 CEST 2025


commit 1c6ef8242714ba718c76df2d8459edddb263a178
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Sep 26 20:07:02 2025 +0200

    - upstream fix for disabled development logging; release 4 (netcdf 4.9.3)

 netcdf-cxx4-nc_set_log_level.patch | 49 ++++++++++++++++++++++++++++++++++++++
 netcdf-cxx4.spec                   |  9 ++++---
 2 files changed, 55 insertions(+), 3 deletions(-)
---
diff --git a/netcdf-cxx4.spec b/netcdf-cxx4.spec
index 373fed0..599a95c 100644
--- a/netcdf-cxx4.spec
+++ b/netcdf-cxx4.spec
@@ -7,12 +7,14 @@ Summary:	NetCDF C++ library
 Summary(pl.UTF-8):	Biblioteka NetCDF dla języka C++
 Name:		netcdf-cxx4
 Version:	4.3.1
-Release:	3
+Release:	4
 License:	BSD-like
 Group:		Libraries
+#Source0Download: https://github.com/Unidata/netcdf-cxx4/releases
 Source0:	https://downloads.unidata.ucar.edu/netcdf-cxx/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	19cccc27a24fc9095ddbe84bf90ebc83
 Patch0:		%{name}-link.patch
+Patch1:		%{name}-nc_set_log_level.patch
 URL:		https://www.unidata.ucar.edu/software/netcdf/
 BuildRequires:	autoconf >= 2.66
 BuildRequires:	automake
@@ -75,6 +77,7 @@ Statyczna wersja biblioteki netCDF dla języka C++.
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
 
 %build
 %{__libtoolize}
@@ -112,12 +115,12 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc COPYRIGHT README.md RELEASE_NOTES.md
 %attr(755,root,root) %{_libdir}/libnetcdf_c++4.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libnetcdf_c++4.so.1
+%ghost %{_libdir}/libnetcdf_c++4.so.1
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/ncxx4-config
-%attr(755,root,root) %{_libdir}/libnetcdf_c++4.so
+%{_libdir}/libnetcdf_c++4.so
 %{_includedir}/ncAtt.h
 %{_includedir}/ncByte.h
 %{_includedir}/ncChar.h
diff --git a/netcdf-cxx4-nc_set_log_level.patch b/netcdf-cxx4-nc_set_log_level.patch
new file mode 100644
index 0000000..ad1d65a
--- /dev/null
+++ b/netcdf-cxx4-nc_set_log_level.patch
@@ -0,0 +1,49 @@
+From b819b3616b96352d23cdf0840df9e6674437948c Mon Sep 17 00:00:00 2001
+From: Orion Poplawski <orion at nwra.com>
+Date: Mon, 17 Feb 2025 15:17:28 -0700
+Subject: [PATCH] Use HAVE_NC_SET_LOG_LEVEL to determine usage of
+ nc_set_log_level (fixes #161)
+
+---
+ cxx4/test_filter.cpp                | 2 ++
+ examples/pres_temp_4D_plugin_wr.cpp | 4 ++++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/cxx4/test_filter.cpp b/cxx4/test_filter.cpp
+index 879ba71..f442c64 100644
+--- a/cxx4/test_filter.cpp
++++ b/cxx4/test_filter.cpp
+@@ -30,7 +30,9 @@ int main()
+   try
+     {
+       NcFile test("pres_temp_plugin_4D.nc", NcFile::replace);
++#ifdef HAVE_NC_SET_LOG_LEVEL
+       nc_set_log_level(5);
++#endif
+       // Define the dimensions. NetCDF will hand back an ncDim object for
+       // each.
+       NcDim latDim = test.addDim(LAT_NAME, NLAT);
+diff --git a/examples/pres_temp_4D_plugin_wr.cpp b/examples/pres_temp_4D_plugin_wr.cpp
+index 832d2a6..584e8be 100644
+--- a/examples/pres_temp_4D_plugin_wr.cpp
++++ b/examples/pres_temp_4D_plugin_wr.cpp
+@@ -71,7 +71,9 @@ string LON_UNITS = "degrees_east";
+ 
+ int main()
+ {
++#ifdef HAVE_NC_SET_LOG_LEVEL
+   nc_set_log_level(5);
++#endif
+   // We will write latitude and longitude fields.
+    float lats[NLAT],lons[NLON];
+ 
+@@ -103,7 +105,9 @@ int main()
+ 
+       // Create the file.
+       NcFile test(FILE_NAME, NcFile::replace);
++#ifdef HAVE_NC_SET_LOG_LEVEL
+       nc_set_log_level(5);
++#endif
+       // Define the dimensions. NetCDF will hand back an ncDim object for
+       // each.
+       NcDim lvlDim = test.addDim(LVL_NAME, NLVL);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/netcdf-cxx4.git/commitdiff/1c6ef8242714ba718c76df2d8459edddb263a178



More information about the pld-cvs-commit mailing list