public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/netcdf-cxx4] epel10: Apply upstream patch to not use netcdf logging if not enabled
@ 2026-10-15 14:10 Orion Poplawski
  0 siblings, 0 replies; only message in thread
From: Orion Poplawski @ 2026-10-15 14:10 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/netcdf-cxx4
Branch : epel10
Commit : b477fd818d707f3652b3f3f33f441e5fd351e7be
Author : Orion Poplawski <orion@nwra.com>
Date   : 2025-07-31T19:11:25-06:00
Stats  : +42/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/netcdf-cxx4/c/b477fd818d707f3652b3f3f33f441e5fd351e7be?branch=epel10

Log:
Apply upstream patch to not use netcdf logging if not enabled

---
diff --git a/netcdf-cxx4-logging.patch b/netcdf-cxx4-logging.patch
new file mode 100644
index 0000000..a7574e7
--- /dev/null
+++ b/netcdf-cxx4-logging.patch
@@ -0,0 +1,38 @@
+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);

diff --git a/netcdf-cxx4.spec b/netcdf-cxx4.spec
index 3584f59..a5590d0 100644
--- a/netcdf-cxx4.spec
+++ b/netcdf-cxx4.spec
@@ -21,6 +21,9 @@ Source0:        https://github.com/Unidata/netcdf-cxx4/archive/v%{version}/%{nam
 # Fix tests on big-endian
 # https://github.com/Unidata/netcdf-cxx4/issues/45
 Patch0:         netcdf-cxx4-bigendian.patch
+# Do not use netcdf logging if not enabled
+# https://github.com/Unidata/netcdf-cxx4/pull/162
+Patch1:         netcdf-cxx4-logging.patch
 
 BuildRequires:  gcc-c++
 BuildRequires:  make
@@ -133,8 +136,7 @@ NetCDF parallel openmpi static libraries
 
 
 %prep
-%setup -q
-%patch -P0 -p1 -b .bigendian
+%autosetup -p1
 # Fix line endings
 sed -i -e 's/\r//' examples/*.cpp
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-15 14:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15 14:10 [rpms/netcdf-cxx4] epel10: Apply upstream patch to not use netcdf logging if not enabled Orion Poplawski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox