From 2378143ac93fefd19076d42b7139ebbbb3a41b9c Mon Sep 17 00:00:00 2001 From: Jos de Kloe Date: Thu, 26 May 2022 15:00:04 +0200 Subject: [PATCH] update to new version 2.26.0 --- eccodes-jasper3-use-wrapper-entry-point.patch | 74 ------------------- eccodes-soversion.patch | 15 ++-- eccodes.spec | 25 ++----- 3 files changed, 14 insertions(+), 100 deletions(-) delete mode 100644 eccodes-jasper3-use-wrapper-entry-point.patch diff --git a/eccodes-jasper3-use-wrapper-entry-point.patch b/eccodes-jasper3-use-wrapper-entry-point.patch deleted file mode 100644 index cebee2d..0000000 --- a/eccodes-jasper3-use-wrapper-entry-point.patch +++ /dev/null @@ -1,74 +0,0 @@ ---- eccodes-2.25.0-Source.unchanged/src/grib_jasper_encoding.c 2022-03-03 15:40:43.000000000 +0100 -+++ eccodes-2.25.0-Source/src/grib_jasper_encoding.c 2022-03-06 16:18:43.875617700 +0100 -@@ -30,7 +30,7 @@ int grib_jasper_decode(grib_context* c, - jas_matrix_t* matrix = NULL; - jas_image_cmpt_t* p; - int i, j, k; -- -+ jas_conf_clear(); jas_conf_set_max_mem_usage(jas_get_total_mem_size()); jas_init_library(); jas_init_thread(); - jpeg = jas_stream_memopen((char*)buf, *buflen); - if (!jpeg) { - code = GRIB_DECODING_ERROR; -@@ -39,7 +39,7 @@ int grib_jasper_decode(grib_context* c, - - grib_context_log(c, GRIB_LOG_DEBUG, "grib_jasper_decode: Jasper version %s", jas_getversion()); - -- image = jpc_decode(jpeg, NULL); -+ image = jas_image_decode (jpeg, -1, 0); - if (!image) { - code = GRIB_DECODING_ERROR; - goto cleanup; -@@ -77,7 +77,7 @@ cleanup: - jas_image_destroy(image); - if (jpeg) - jas_stream_close(jpeg); -- -+ jas_cleanup_thread(); jas_cleanup_library(); - return code; - } - -@@ -94,6 +94,7 @@ int grib_jasper_encode(grib_context* c, - long no_values = helper->no_values; - long bits8; - int i; -+ int fmt; - - size_t buflen = 0; - unsigned char* encoded = NULL; -@@ -156,7 +157,7 @@ int grib_jasper_encode(grib_context* c, - } - } - -- /*jas_init();*/ -+ jas_conf_clear(); jas_conf_set_max_mem_usage(jas_get_total_mem_size()); jas_init_library(); jas_init_thread(); - - opts[0] = 0; - -@@ -175,7 +176,8 @@ int grib_jasper_encode(grib_context* c, - cmpt.stream_ = istream; - - jpcstream = jas_stream_memopen((char*)helper->jpeg_buffer, helper->buffer_size); -- jaserr = jpc_encode(&image, jpcstream, opts); -+ fmt = jas_image_strtofmt("jpc"); -+ jaserr = jas_image_encode(&image, jpcstream, fmt, opts); - - if (jaserr != 0) { - /* increase the number of guard bits */ -@@ -189,7 +191,7 @@ int grib_jasper_encode(grib_context* c, - istream = jas_stream_memopen((char*)encoded, buflen); - cmpt.stream_ = istream; - jpcstream = jas_stream_memopen((char*)helper->jpeg_buffer, helper->buffer_size); -- jaserr = jpc_encode(&image, jpcstream, opts); -+ jaserr = jas_image_encode(&image, jpcstream, fmt, opts); - } - - if (jaserr != 0) { -@@ -210,7 +212,7 @@ cleanup: - jas_stream_close(istream); - if (jpcstream) - jas_stream_close(jpcstream); -- -+ jas_cleanup_thread(); jas_cleanup_library(); - return code; - } - diff --git a/eccodes-soversion.patch b/eccodes-soversion.patch index c1cd6b2..0cf8084 100644 --- a/eccodes-soversion.patch +++ b/eccodes-soversion.patch @@ -1,5 +1,5 @@ ---- eccodes-2.25.0-Source.unchanged/fortran/CMakeLists.txt 2022-03-03 15:40:42.000000000 +0100 -+++ eccodes-2.25.0-Source/fortran/CMakeLists.txt 2022-03-06 15:40:01.323606416 +0100 +--- eccodes-2.26.0-Source.unchanged/fortran/CMakeLists.txt 2022-05-18 13:20:10.000000000 +0200 ++++ eccodes-2.26.0-Source/fortran/CMakeLists.txt 2022-05-26 14:15:01.080533587 +0200 @@ -49,7 +49,8 @@ if( HAVE_FORTRAN ) GENERATED grib_f90.f90 eccodes_f90.f90 PUBLIC_INCLUDES $ @@ -10,13 +10,14 @@ if( DEFINED ecbuild_VERSION AND NOT ${ecbuild_VERSION} VERSION_LESS 3.1 ) # Installed module directory is not in the PUBLIC INCLUDES! ---- eccodes-2.25.0-Source.unchanged/src/CMakeLists.txt 2022-03-03 15:40:42.000000000 +0100 -+++ eccodes-2.25.0-Source/src/CMakeLists.txt 2022-03-06 15:40:01.324606392 +0100 -@@ -437,6 +437,7 @@ ecbuild_add_library( TARGET eccodes +--- eccodes-2.26.0-Source.unchanged/src/CMakeLists.txt 2022-05-18 13:20:10.000000000 +0200 ++++ eccodes-2.26.0-Source/src/CMakeLists.txt 2022-05-26 14:18:49.300260787 +0200 +@@ -437,6 +437,8 @@ ecbuild_add_library( TARGET eccodes PRIVATE_LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${AEC_LIBRARIES} ${PNG_LIBRARIES} PUBLIC_LIBS ${CMATH_LIBRARIES} ${THREADS_LIBRARIES} - TEMPLATES ${grib_api_extra_srcs} -+ SOVERSION ${ECCODES_SOVERSION} + TEMPLATES ${eccodes_extra_src_files} ++ SOVERSION ${ECCODES_SOVERSION} ++ INSTALL_HEADERS_LIST grib_api.h eccodes.h diff --git a/eccodes.spec b/eccodes.spec index 0ee87a0..d5c01de 100644 --- a/eccodes.spec +++ b/eccodes.spec @@ -1,12 +1,12 @@ Name: eccodes -Version: 2.25.0 -Release: 2%{?dist} +Version: 2.26.0 +Release: 1%{?dist} Summary: WMO data format decoding and encoding # force the shared libraries to have these so versions %global so_version 0.1 %global so_version_f90 0.1 -%global datapack_date 20200626 +%global datapack_date 20220526 # latest fedora-36 grib_api version is 1.27.0-12 # but this version number is to be updated as soon as we know @@ -47,13 +47,6 @@ Patch1: eccodes-soversion.patch # https://software.ecmwf.int/issues/browse/SUP-2073 # (and again, unfortunately this issue is not public) -# jasper3 now hides internal encoder / decoder. Use wrapper entry point -# c.f. https://github.com/jasper-software/jasper/commit/5fe57ac5829ec31396e7eaab59a688da014660af -# Also, now with jasper3, calling jas_stream_memopen (for example) always needs jasper -# library initialization -Patch2: eccodes-jasper3-use-wrapper-entry-point.patch - - BuildRequires: cmake3 BuildRequires: gcc BuildRequires: gcc-gfortran @@ -185,13 +178,6 @@ pushd %{_vpath_builddir} tar xf %SOURCE1 popd -# remove executable permissions from c files -chmod 644 tigge/*.c -chmod 644 tools/*.c - -# remove executable permissions from the authors and license file -chmod 644 AUTHORS LICENSE - %build #-- The following features are disabled by default and not switched on: @@ -270,8 +256,6 @@ rm %{buildroot}%{_datadir}/%{name}/definitions/installDefinitions.sh # copy the html documentation to the install directory mkdir -p %{buildroot}%{_datadir}/doc/%{name}/ cp -r html %{buildroot}%{_datadir}/doc/%{name}/ -# and remove an unneeded Makefile from the html directory -rm %{buildroot}%{_datadir}/doc/%{name}/html/Makefile.am # copy the example scripts/programs to the install directory # but dont copy the shell scripts and Makefiles, since these @@ -351,6 +335,9 @@ ctest3 -V %{?_smp_mflags} %doc %{_datadir}/doc/%{name}/ %changelog +* Thu May 26 2022 Jos de Kloe - 2.26.0-1 +- Upgrade to upstream version 2.26.0 + * Fri May 20 2022 Sandro Mani - 2.25.0-2 - Rebuild for gdal-3.5.0 and/or openjpeg-2.5.0