Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package zlib-ng for openSUSE:Factory checked 
in at 2023-07-18 22:07:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zlib-ng (Old)
 and      /work/SRC/openSUSE:Factory/.zlib-ng.new.3193 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zlib-ng"

Tue Jul 18 22:07:31 2023 rev:13 rq:1099094 version:2.1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/zlib-ng/zlib-ng.changes  2023-06-27 
23:17:50.203804756 +0200
+++ /work/SRC/openSUSE:Factory/.zlib-ng.new.3193/zlib-ng.changes        
2023-07-18 22:07:42.626850158 +0200
@@ -1,0 +2,13 @@
+Sun Jul 16 11:56:44 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2.1.3:
+  * Fix endless loop bug in chunkcopy_safe. #1526
+  * Support using distro-supplied Gtest #1519
+  * Minor code cleanup of deflate.c #1500
+  * Improve buildsystem detection of ARM Cortex #1521
+  * Cross-compiling and little-endian fixes #1518 #1520
+  * Optimize compare256 using RVV #1498
+  * Optimize slide_hash using RVV #1522
+- drop 1526.patch (upstream)
+
+-------------------------------------------------------------------

Old:
----
  1526.patch
  zlib-ng-2.1.2.tar.gz

New:
----
  zlib-ng-2.1.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zlib-ng.spec ++++++
--- /var/tmp/diff_new_pack.xpb22j/_old  2023-07-18 22:07:43.358854250 +0200
+++ /var/tmp/diff_new_pack.xpb22j/_new  2023-07-18 22:07:43.362854273 +0200
@@ -30,15 +30,13 @@
 %define soversion 2
 %endif
 Name:           zlib-ng%{?compat_suffix}
-Version:        2.1.2
+Version:        2.1.3
 Release:        0
 Summary:        Zlib replacement with SIMD optimizations
 License:        Zlib
 URL:            https://github.com/zlib-ng/zlib-ng
 Source0:        
https://github.com/zlib-ng/zlib-ng/archive/refs/tags/%{version}.tar.gz#/zlib-ng-%{version}.tar.gz
 Source1:        baselibs.conf
-# https://github.com/zlib-ng/zlib-ng/pull/1526 - boo#1212735
-Patch1:         1526.patch
 BuildRequires:  cmake
 BuildRequires:  gcc
 BuildRequires:  gcc-c++

++++++ zlib-ng-2.1.2.tar.gz -> zlib-ng-2.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/.github/workflows/cmake.yml 
new/zlib-ng-2.1.3/.github/workflows/cmake.yml
--- old/zlib-ng-2.1.2/.github/workflows/cmake.yml       2023-06-07 
21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/.github/workflows/cmake.yml       2023-06-29 
10:23:11.000000000 +0200
@@ -223,12 +223,41 @@
             ldflags: -static
             codecov: ubuntu_gcc_ppc64
 
+          - name: Ubuntu GCC PPC64 Power9
+            os: ubuntu-latest
+            cmake-args: 
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64-power9.cmake
+            packages: qemu qemu-user gcc-powerpc64-linux-gnu 
g++-powerpc64-linux-gnu libc-dev-ppc64-cross
+            ldflags: -static
+            codecov: ubuntu_gcc_ppc64_power9
+
+          - name: Ubuntu Clang PPC64 Power9
+            os: ubuntu-latest
+            cmake-args: 
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64-clang.cmake
+            packages: qemu qemu-user clang binutils-powerpc64-linux-gnu 
libc-dev-ppc64-cross libgcc-11-dev-ppc64-cross libstdc++-11-dev-ppc64-cross
+
           - name: Ubuntu GCC PPC64LE
             os: ubuntu-20.04
             cmake-args: 
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64le.cmake
             packages: qemu qemu-user gcc-powerpc64le-linux-gnu 
g++-powerpc64le-linux-gnu libc-dev-ppc64el-cross
             codecov: ubuntu_gcc_ppc64le
 
+          - name: Ubuntu GCC PPC64LE No VSX
+            os: ubuntu-latest
+            cmake-args: 
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64le-power9.cmake 
-DWITH_POWER8=OFF -DWITH_POWER9=OFF
+            packages: qemu qemu-user gcc-powerpc64le-linux-gnu 
g++-powerpc64le-linux-gnu libc-dev-ppc64el-cross
+            codecov: ubuntu_gcc_ppc64le_novsx
+
+          - name: Ubuntu GCC PPC64LE Power9
+            os: ubuntu-latest
+            cmake-args: 
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64le-power9.cmake
+            packages: qemu qemu-user gcc-powerpc64le-linux-gnu 
g++-powerpc64le-linux-gnu libc-dev-ppc64el-cross
+            codecov: ubuntu_gcc_ppc64le_power9
+
+          - name: Ubuntu Clang PPC64LE Power9
+            os: ubuntu-latest
+            cmake-args: 
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64le-clang.cmake
+            packages: qemu qemu-user clang binutils-powerpc64le-linux-gnu 
libc-dev-ppc64el-cross libgcc-11-dev-ppc64el-cross 
libstdc++-11-dev-ppc64el-cross
+
           - name: Ubuntu GCC SPARC64
             os: ubuntu-20.04
             cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-sparc64.cmake
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/CMakeLists.txt 
new/zlib-ng-2.1.3/CMakeLists.txt
--- old/zlib-ng-2.1.2/CMakeLists.txt    2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/CMakeLists.txt    2023-06-29 10:23:11.000000000 +0200
@@ -210,24 +210,27 @@
         if(BASEARCH_ARM_FOUND)
             if("${ARCH}" MATCHES "arm" AND NOT CMAKE_C_FLAGS MATCHES 
"-mfloat-abi")
                 # Auto-detect support for ARM floating point ABI
-                set(CMAKE_REQUIRED_FLAGS -mfloat-abi=softfp)
-                check_c_source_compiles(
-                    "#include <features.h>
-                    int main() { return 0; }"
-                    HAVE_FLOATABI_SOFTFP)
-                if(HAVE_FLOATABI_SOFTFP)
-                    set(FLOATABI -mfloat-abi=softfp)
-                else()
-                    set(CMAKE_REQUIRED_FLAGS -mfloat-abi=hard)
+                check_include_file(features.h HAVE_FEATURES_H)
+                if(HAVE_FEATURES_H)
+                    set(CMAKE_REQUIRED_FLAGS -mfloat-abi=softfp)
                     check_c_source_compiles(
                         "#include <features.h>
                         int main() { return 0; }"
-                        HAVE_FLOATABI_HARD)
-                    if(HAVE_FLOATABI_HARD)
-                        set(FLOATABI -mfloat-abi=hard)
+                        HAVE_FLOATABI_SOFTFP)
+                    if(HAVE_FLOATABI_SOFTFP)
+                        set(FLOATABI -mfloat-abi=softfp)
+                    else()
+                        set(CMAKE_REQUIRED_FLAGS -mfloat-abi=hard)
+                        check_c_source_compiles(
+                            "#include <features.h>
+                            int main() { return 0; }"
+                            HAVE_FLOATABI_HARD)
+                        if(HAVE_FLOATABI_HARD)
+                            set(FLOATABI -mfloat-abi=hard)
+                        endif()
                     endif()
+                    set(CMAKE_REQUIRED_FLAGS)
                 endif()
-                set(CMAKE_REQUIRED_FLAGS)
                 if(FLOATABI)
                     message(STATUS "ARM floating point arch: ${FLOATABI}")
                     add_compile_options(${FLOATABI})
@@ -731,6 +734,11 @@
                 add_definitions(-DRISCV_RVV)
                 list(APPEND ZLIB_ARCH_HDRS ${ARCHDIR}/riscv_features.h)
                 list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/riscv_features.c)
+                # FIXME: we will not set compile flags for riscv_features.c 
when 
+                # the kernels update hwcap or hwprobe for riscv
+                set(RVV_SRCS ${ARCHDIR}/riscv_features.c 
${ARCHDIR}/compare256_rvv.c ${ARCHDIR}/slide_hash_rvv.c)
+                list(APPEND ZLIB_ARCH_SRCS ${RVV_SRCS})
+                set_property(SOURCE ${RVV_SRCS} PROPERTY COMPILE_FLAGS 
"${RISCVFLAG} ${NOLTOFLAG}")
             else()
                 set(WITH_RVV OFF)
             endif()
@@ -958,8 +966,15 @@
   set(PC_INC_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
 endif()
 
+if(APPLE)
+  option(WITH_RPATH "Enable RPATH for shared library" OFF)
+endif()
 if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
-  set(PC_LIB_INSTALL_DIR "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
+  if(APPLE AND WITH_RPATH)
+    set(PC_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+  else()
+    set(PC_LIB_INSTALL_DIR "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
+  endif()
 elseif(LIBDIR_POS EQUAL 0)
   string(SUBSTRING "${CMAKE_INSTALL_LIBDIR}" "${INSTALL_PREFIX_LEN}" "-1" 
LIBDIR_RELATIVE)
   set(PC_LIB_INSTALL_DIR "\${exec_prefix}/${LIBDIR_RELATIVE}")
@@ -1127,9 +1142,11 @@
         if(NOT APPLE)
             set_target_properties(zlib PROPERTIES LINK_FLAGS
                 
"-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib${SUFFIX}.map\"")
+        elseif(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}" OR NOT WITH_RPATH)
+            # Match configure/make's behavior (i.e. don't use @rpath on mac 
when using absolute path).
+            set_target_properties(zlib PROPERTIES INSTALL_NAME_DIR 
"@rpath/${CMAKE_INSTALL_FULL_LIBDIR}")
         else()
-            # Match configure/make's behavior (i.e. don't use @rpath on mac).
-            set_target_properties(zlib PROPERTIES INSTALL_NAME_DIR 
"${CMAKE_INSTALL_FULL_LIBDIR}")
+            set_target_properties(zlib PROPERTIES INSTALL_NAME_DIR 
"@rpath/${CMAKE_INSTALL_LIBDIR}")
         endif()
     endif()
     if(MSYS)
@@ -1166,6 +1183,10 @@
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/gzread.c.in
     ${CMAKE_CURRENT_BINARY_DIR}/gzread.c @ONLY)
 
+# Fix install directory after generating zlib.pc/zlib-ng.pc
+if (NOT IS_ABSOLUTE CMAKE_INSTALL_LIBDIR AND WITH_RPATH)
+    set(CMAKE_INSTALL_LIBDIR "/${CMAKE_INSTALL_LIBDIR}")
+endif()
 
 if (NOT ZLIB_SYMBOL_PREFIX STREQUAL "")
     add_feature_info(ZLIB_SYMBOL_PREFIX ON "Publicly exported symbols have a 
custom prefix")
@@ -1265,4 +1286,8 @@
 
 add_feature_info(INSTALL_UTILS INSTALL_UTILS "Copy minigzip and minideflate 
during install")
 
+if(APPLE)
+    add_feature_info(WITH_RPATH WITH_RPATH "Enable RPATH for shared library")
+endif()
+
 FEATURE_SUMMARY(WHAT ALL INCLUDE_QUIET_PACKAGES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/Makefile.in 
new/zlib-ng-2.1.3/Makefile.in
--- old/zlib-ng-2.1.2/Makefile.in       2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/Makefile.in       2023-06-29 10:23:11.000000000 +0200
@@ -29,7 +29,7 @@
 LDSHARED=$(CC)
 LDSHAREDFLAGS=-shared
 
-VER=2.1.2
+VER=2.1.3
 VER1=2
 
 STATICLIB=$(LIBNAME1).a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/README.md new/zlib-ng-2.1.3/README.md
--- old/zlib-ng-2.1.2/README.md 2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/README.md 2023-06-29 10:23:11.000000000 +0200
@@ -23,7 +23,7 @@
   * CRC32-B implementation using PCLMULQDQ, VPCLMULQDQ, ACLE, & IBM Z
   * Hash table implementation using CRC32-C intrinsics on x86 and ARM
   * Slide hash implementations using SSE2, AVX2, Neon, VMX & VSX
-  * Compare256 implementations using SSE2, AVX2, Neon, & POWER9
+  * Compare256 implementations using SSE2, AVX2, Neon, POWER9 & RVV
   * Inflate chunk copying using SSE2, SSSE3, AVX, Neon & VSX
   * Support for hardware-accelerated deflate using IBM Z DFLTCC
 * Unaligned memory read/writes and large bit buffer improvements
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/arch/power/adler32_vmx.c 
new/zlib-ng-2.1.3/arch/power/adler32_vmx.c
--- old/zlib-ng-2.1.2/arch/power/adler32_vmx.c  2023-06-07 21:12:16.000000000 
+0200
+++ new/zlib-ng-2.1.3/arch/power/adler32_vmx.c  2023-06-29 10:23:11.000000000 
+0200
@@ -1,6 +1,6 @@
 /* adler32_vmx.c -- compute the Adler-32 checksum of a data stream
  * Copyright (C) 1995-2011 Mark Adler
- * Copyright (C) 2017-2021 Mika T. Lindqvist <postmas...@raasu.org>
+ * Copyright (C) 2017-2023 Mika T. Lindqvist <postmas...@raasu.org>
  * Copyright (C) 2021 Adam Stylinski <kungfujesu...@gmail.com>
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
@@ -8,6 +8,7 @@
 #ifdef PPC_VMX
 #include <altivec.h>
 #include "zbuild.h"
+#include "zendian.h"
 #include "adler32_p.h"
 
 #define vmx_zero()  (vec_splat_u32(0))
@@ -34,7 +35,11 @@
     vector unsigned int  adacc, s2acc;
     vector unsigned int pair_vec = vec_ld(0, s);
     adacc = vec_perm(pair_vec, pair_vec, s0_perm);
+#if BYTE_ORDER == LITTLE_ENDIAN
+    s2acc = vec_sro(pair_vec, shift_vec);
+#else
     s2acc = vec_slo(pair_vec, shift_vec);
+#endif
 
     vector unsigned int zero = vmx_zero();
     vector unsigned int s3acc = zero;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/arch/power/chunkset_power8.c 
new/zlib-ng-2.1.3/arch/power/chunkset_power8.c
--- old/zlib-ng-2.1.2/arch/power/chunkset_power8.c      2023-06-07 
21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/arch/power/chunkset_power8.c      2023-06-29 
10:23:11.000000000 +0200
@@ -29,7 +29,7 @@
 static inline void chunkmemset_8(uint8_t *from, chunk_t *chunk) {
     uint64_t tmp;
     memcpy(&tmp, from, sizeof(tmp));
-    *chunk = (vector unsigned char)vec_splats(tmp);
+    *chunk = (vector unsigned char)vec_splats((unsigned long long)tmp);
 }
 
 static inline void loadchunk(uint8_t const *s, chunk_t *chunk) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/arch/power/compare256_power9.c 
new/zlib-ng-2.1.3/arch/power/compare256_power9.c
--- old/zlib-ng-2.1.2/arch/power/compare256_power9.c    2023-06-07 
21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/arch/power/compare256_power9.c    2023-06-29 
10:23:11.000000000 +0200
@@ -10,12 +10,14 @@
 
 /* Older versions of GCC misimplemented semantics for these bit counting 
builtins.
  * 
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=3f30f2d1dbb3228b8468b26239fe60c2974ce2ac
 */
-#if defined(__GNUC__) && (__GNUC__ < 12)
-#  define zng_vec_vctzlsbb(vc, len) __asm__ volatile("vctzlsbb %0, %1\n\t" : 
"=r" (len) : "v" (vc))
-#  define zng_vec_vclzlsbb(vc, len) __asm__ volatile("vclzlsbb %0, %1\n\t" : 
"=r" (len) : "v" (vc))
-#else
+#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 12)
+#if BYTE_ORDER == LITTLE_ENDIAN
 #  define zng_vec_vctzlsbb(vc, len) len = __builtin_vec_vctzlsbb(vc)
-#  define zng_vec_vclzlsbb(vc, len) len = __builtin_vec_vclzlsbb(vc)
+#else
+#  define zng_vec_vctzlsbb(vc, len) len = __builtin_vec_vclzlsbb(vc)
+#endif
+#else
+#  define zng_vec_vctzlsbb(vc, len) len = vec_cntlz_lsbb(vc)
 #endif
 
 static inline uint32_t compare256_power9_static(const uint8_t *src0, const 
uint8_t *src1) {
@@ -34,11 +36,7 @@
         /* Since the index of matching bytes will contain only zeroes
          * on vc (since we used cmpne), counting the number of consecutive
          * bytes where LSB == 0 is the same as counting the length of the 
match. */
-#if BYTE_ORDER == LITTLE_ENDIAN
         zng_vec_vctzlsbb(vc, cmplen);
-#else
-        zng_vec_vclzlsbb(vc, cmplen);
-#endif
         if (cmplen != 16)
             return len + cmplen;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/arch/power/power_features.c 
new/zlib-ng-2.1.3/arch/power/power_features.c
--- old/zlib-ng-2.1.2/arch/power/power_features.c       2023-06-07 
21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/arch/power/power_features.c       2023-06-29 
10:23:11.000000000 +0200
@@ -34,9 +34,13 @@
     hwcap2 = getauxval(AT_HWCAP2);
 #endif
 
+#ifdef POWER8_VSX
     if (hwcap2 & PPC_FEATURE2_ARCH_2_07)
         features->has_arch_2_07 = 1;
+#endif
+#ifdef POWER9
     if (hwcap2 & PPC_FEATURE2_ARCH_3_00)
         features->has_arch_3_00 = 1;
 #endif
+#endif
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/arch/riscv/compare256_rvv.c 
new/zlib-ng-2.1.3/arch/riscv/compare256_rvv.c
--- old/zlib-ng-2.1.2/arch/riscv/compare256_rvv.c       1970-01-01 
01:00:00.000000000 +0100
+++ new/zlib-ng-2.1.3/arch/riscv/compare256_rvv.c       2023-06-29 
10:23:11.000000000 +0200
@@ -0,0 +1,47 @@
+/* compare256_rvv.c - RVV version of compare256
+ * Copyright (C) 2023 SiFive, Inc. All rights reserved.
+ * Contributed by Alex Chiang <alex.chi...@sifive.com>
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#ifdef RISCV_RVV
+
+#include "../../zbuild.h"
+#include "fallback_builtins.h"
+
+#include <riscv_vector.h>
+
+static inline uint32_t compare256_rvv_static(const uint8_t *src0, const 
uint8_t *src1) {
+    uint32_t len = 0;
+    size_t vl;
+    long found_diff;
+    do {
+        vl = __riscv_vsetvl_e8m4(256 - len);
+        vuint8m4_t v_src0 = __riscv_vle8_v_u8m4(src0, vl);
+        vuint8m4_t v_src1 = __riscv_vle8_v_u8m4(src1, vl);
+        vbool2_t v_mask = __riscv_vmsne_vv_u8m4_b2(v_src0, v_src1, vl);
+        found_diff = __riscv_vfirst_m_b2(v_mask, vl);
+        if (found_diff >= 0) 
+            return len + (uint32_t)found_diff;
+        src0 += vl, src1 += vl, len += vl;
+    } while (len < 256);
+
+    return 256;
+}
+
+Z_INTERNAL uint32_t compare256_rvv(const uint8_t *src0, const uint8_t *src1) {
+    return compare256_rvv_static(src0, src1);
+}
+
+#define LONGEST_MATCH       longest_match_rvv
+#define COMPARE256          compare256_rvv_static
+
+#include "match_tpl.h"
+
+#define LONGEST_MATCH_SLOW
+#define LONGEST_MATCH       longest_match_slow_rvv
+#define COMPARE256          compare256_rvv_static
+
+#include "match_tpl.h"
+
+#endif // RISCV_RVV
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/arch/riscv/slide_hash_rvv.c 
new/zlib-ng-2.1.3/arch/riscv/slide_hash_rvv.c
--- old/zlib-ng-2.1.2/arch/riscv/slide_hash_rvv.c       1970-01-01 
01:00:00.000000000 +0100
+++ new/zlib-ng-2.1.3/arch/riscv/slide_hash_rvv.c       2023-06-29 
10:23:11.000000000 +0200
@@ -0,0 +1,34 @@
+/* slide_hash_rvv.c - RVV version of slide_hash
+ * Copyright (C) 2023 SiFive, Inc. All rights reserved.
+ * Contributed by Alex Chiang <alex.chi...@sifive.com>
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#ifdef RISCV_RVV
+
+#include <riscv_vector.h>
+
+#include "../../zbuild.h"
+#include "../../deflate.h"
+
+static inline void slide_hash_chain(Pos *table, uint32_t entries, uint16_t 
wsize) {
+    size_t vl;
+    while (entries > 0) {
+        vl = __riscv_vsetvl_e16m4(entries);
+        vuint16m4_t v_tab = __riscv_vle16_v_u16m4(table, vl);
+        vuint16m4_t v_diff = __riscv_vsub_vx_u16m4(v_tab, wsize, vl);
+        vbool4_t mask = __riscv_vmsltu_vx_u16m4_b4(v_tab, wsize, vl);
+        v_tab = __riscv_vmerge_vxm_u16m4(v_diff, 0, mask, vl);
+        __riscv_vse16_v_u16m4(table, v_tab, vl);
+        table += vl, entries -= vl;
+    }
+}
+
+Z_INTERNAL void slide_hash_rvv(deflate_state *s) {
+    uint16_t wsize = (uint16_t)s->w_size;
+
+    slide_hash_chain(s->head, HASH_SIZE, wsize);
+    slide_hash_chain(s->prev, wsize, wsize);
+}
+
+#endif // RISCV_RVV
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/cmake/detect-arch.cmake 
new/zlib-ng-2.1.3/cmake/detect-arch.cmake
--- old/zlib-ng-2.1.2/cmake/detect-arch.cmake   2023-06-07 21:12:16.000000000 
+0200
+++ new/zlib-ng-2.1.3/cmake/detect-arch.cmake   2023-06-29 10:23:11.000000000 
+0200
@@ -51,7 +51,7 @@
 if("${ARCH}" MATCHES "(x86_64|AMD64|i[3-6]86)")
     set(BASEARCH "x86")
     set(BASEARCH_X86_FOUND TRUE)
-elseif("${ARCH}" MATCHES "(arm(v[0-9])?|aarch64)")
+elseif("${ARCH}" MATCHES "(arm(v[0-9])?|aarch64|cortex)")
     set(BASEARCH "arm")
     set(BASEARCH_ARM_FOUND TRUE)
 elseif("${ARCH}" MATCHES "ppc(64(le)?)?|powerpc(64(le)?)?")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/cmake/detect-intrinsics.cmake 
new/zlib-ng-2.1.3/cmake/detect-intrinsics.cmake
--- old/zlib-ng-2.1.2/cmake/detect-intrinsics.cmake     2023-06-07 
21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/cmake/detect-intrinsics.cmake     2023-06-29 
10:23:11.000000000 +0200
@@ -393,8 +393,18 @@
     # Check if we have what we need for POWER9 optimizations
     set(CMAKE_REQUIRED_FLAGS "${POWER9FLAG} ${NATIVEFLAG}")
     check_c_source_compiles(
-        "int main() {
-            return 0;
+        "#include <sys/auxv.h>
+        #ifdef __FreeBSD__
+        #include <machine/cpu.h>
+        #endif
+        int main() {
+        #ifdef __FreeBSD__
+            unsigned long hwcap;
+            elf_aux_info(AT_HWCAP2, &hwcap, sizeof(hwcap));
+            return (hwcap & PPC_FEATURE2_ARCH_3_00);
+        #else
+            return (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_3_00);
+        #endif
         }"
         HAVE_POWER9_INTRIN
     )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/cmake/toolchain-powerpc64-clang.cmake 
new/zlib-ng-2.1.3/cmake/toolchain-powerpc64-clang.cmake
--- old/zlib-ng-2.1.2/cmake/toolchain-powerpc64-clang.cmake     1970-01-01 
01:00:00.000000000 +0100
+++ new/zlib-ng-2.1.3/cmake/toolchain-powerpc64-clang.cmake     2023-06-29 
10:23:11.000000000 +0200
@@ -0,0 +1,16 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR ppc64)
+set(CMAKE_SYSTEM_VERSION 1)
+
+set(CMAKE_C_COMPILER clang)
+set(CMAKE_C_COMPILER_TARGET powerpc64-linux-gnu)
+set(CMAKE_CXX_COMPILER clang++)
+set(CMAKE_CXX_COMPILER_TARGET powerpc64-linux-gnu)
+
+set(CMAKE_CROSSCOMPILING TRUE)
+set(CMAKE_CROSSCOMPILING_EMULATOR qemu-ppc64 -cpu power9 -L 
/usr/${CMAKE_C_COMPILER_TARGET}/)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/cmake/toolchain-powerpc64-power9.cmake 
new/zlib-ng-2.1.3/cmake/toolchain-powerpc64-power9.cmake
--- old/zlib-ng-2.1.2/cmake/toolchain-powerpc64-power9.cmake    1970-01-01 
01:00:00.000000000 +0100
+++ new/zlib-ng-2.1.3/cmake/toolchain-powerpc64-power9.cmake    2023-06-29 
10:23:11.000000000 +0200
@@ -0,0 +1,25 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR ppc64)
+set(CMAKE_SYSTEM_VERSION 1)
+
+set(CMAKE_C_COMPILER_TARGET powerpc64-linux-gnu)
+set(CMAKE_CXX_COMPILER_TARGET powerpc64-linux-gnu)
+
+set(CMAKE_CROSSCOMPILING TRUE)
+set(CMAKE_CROSSCOMPILING_EMULATOR qemu-ppc64 -cpu power9 -L 
/usr/${CMAKE_C_COMPILER_TARGET}/)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+find_program(C_COMPILER_FULL_PATH NAMES ${CMAKE_C_COMPILER_TARGET}-gcc)
+if(NOT C_COMPILER_FULL_PATH)
+    message(FATAL_ERROR "Cross-compiler for ${CMAKE_C_COMPILER_TARGET} not 
found")
+endif()
+set(CMAKE_C_COMPILER ${C_COMPILER_FULL_PATH})
+
+find_program(CXX_COMPILER_FULL_PATH NAMES g++-${CMAKE_CXX_COMPILER_TARGET} 
${CMAKE_CXX_COMPILER_TARGET}-g++)
+if(CXX_COMPILER_FULL_PATH)
+    set(CMAKE_CXX_COMPILER ${CXX_COMPILER_FULL_PATH})
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zlib-ng-2.1.2/cmake/toolchain-powerpc64le-clang.cmake 
new/zlib-ng-2.1.3/cmake/toolchain-powerpc64le-clang.cmake
--- old/zlib-ng-2.1.2/cmake/toolchain-powerpc64le-clang.cmake   1970-01-01 
01:00:00.000000000 +0100
+++ new/zlib-ng-2.1.3/cmake/toolchain-powerpc64le-clang.cmake   2023-06-29 
10:23:11.000000000 +0200
@@ -0,0 +1,16 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR ppc64le)
+set(CMAKE_SYSTEM_VERSION 1)
+
+set(CMAKE_C_COMPILER clang)
+set(CMAKE_C_COMPILER_TARGET powerpc64le-linux-gnu)
+set(CMAKE_CXX_COMPILER clang++)
+set(CMAKE_CXX_COMPILER_TARGET powerpc64le-linux-gnu)
+
+set(CMAKE_CROSSCOMPILING TRUE)
+set(CMAKE_CROSSCOMPILING_EMULATOR qemu-ppc64le -cpu power9 -L 
/usr/${CMAKE_C_COMPILER_TARGET}/)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zlib-ng-2.1.2/cmake/toolchain-powerpc64le-power9.cmake 
new/zlib-ng-2.1.3/cmake/toolchain-powerpc64le-power9.cmake
--- old/zlib-ng-2.1.2/cmake/toolchain-powerpc64le-power9.cmake  1970-01-01 
01:00:00.000000000 +0100
+++ new/zlib-ng-2.1.3/cmake/toolchain-powerpc64le-power9.cmake  2023-06-29 
10:23:11.000000000 +0200
@@ -0,0 +1,25 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR ppc64le)
+set(CMAKE_SYSTEM_VERSION 1)
+
+set(CMAKE_C_COMPILER_TARGET powerpc64le-linux-gnu)
+set(CMAKE_CXX_COMPILER_TARGET powerpc64le-linux-gnu)
+
+set(CMAKE_CROSSCOMPILING TRUE)
+set(CMAKE_CROSSCOMPILING_EMULATOR qemu-ppc64le -cpu power9 -L 
/usr/${CMAKE_C_COMPILER_TARGET}/)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+find_program(C_COMPILER_FULL_PATH NAMES ${CMAKE_C_COMPILER_TARGET}-gcc)
+if(NOT C_COMPILER_FULL_PATH)
+    message(FATAL_ERROR "Cross-compiler for ${CMAKE_C_COMPILER_TARGET} not 
found")
+endif()
+set(CMAKE_C_COMPILER ${C_COMPILER_FULL_PATH})
+
+find_program(CXX_COMPILER_FULL_PATH NAMES g++-${CMAKE_CXX_COMPILER_TARGET} 
${CMAKE_CXX_COMPILER_TARGET}-g++)
+if(CXX_COMPILER_FULL_PATH)
+    set(CMAKE_CXX_COMPILER ${CXX_COMPILER_FULL_PATH})
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/configure new/zlib-ng-2.1.3/configure
--- old/zlib-ng-2.1.2/configure 2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/configure 2023-06-29 10:23:11.000000000 +0200
@@ -513,7 +513,12 @@
              SHAREDLIBM=${LIBNAME}.$VER1$shared_ext
              SHAREDTARGET=$SHAREDLIBV
              LDSHARED=${LDSHARED-"$cc"}
-             LDSHAREDFLAGS="-dynamiclib -install_name $libdir/$SHAREDLIBM 
-compatibility_version $VER1 -current_version $VER3"
+             case ${libdir} in
+             /*)
+                 LDSHAREDFLAGS="-dynamiclib -install_name 
${libdir}/${SHAREDLIBM} -compatibility_version ${VER1} -current_version 
${VER3}" ;;
+             *)
+                 LDSHAREDFLAGS="-dynamiclib -install_name 
@rpath/${libdir}/${SHAREDLIBM} -compatibility_version ${VER1} -current_version 
${VER3}" ;;
+             esac
              if libtool -V 2>&1 | grep Apple > /dev/null; then
                  AR="libtool"
              else
@@ -1383,7 +1388,19 @@
 check_power9_intrinsics() {
     # Check whether features needed by POWER9 optimisations are available
     cat > $test.c << EOF
-int main() { return 0; }
+#ifdef __FreeBSD__
+#include <machine/cpu.h>
+#endif
+#include <sys/auxv.h>
+int main() {
+#ifdef __FreeBSD__
+  unsigned long hwcap;
+  elf_aux_info(AT_HWCAP2, &hwcap, sizeof(hwcap));
+  return (hwcap & PPC_FEATURE2_ARCH_3_00);
+#else
+  return (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_3_00);
+#endif
+}
 EOF
     if test $buildpower9 -eq 1 && try $CC -c $CFLAGS -mcpu=power9 $test.c; then
         HAVE_POWER9_INTRIN=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/cpu_features.h 
new/zlib-ng-2.1.3/cpu_features.h
--- old/zlib-ng-2.1.2/cpu_features.h    2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/cpu_features.h    2023-06-29 10:23:11.000000000 +0200
@@ -180,6 +180,9 @@
 #ifdef POWER9
 extern uint32_t compare256_power9(const uint8_t *src0, const uint8_t *src1);
 #endif
+#ifdef RISCV_RVV
+extern uint32_t compare256_rvv(const uint8_t *src0, const uint8_t *src1);
+#endif
 
 #ifdef DEFLATE_H_
 /* insert_string */
@@ -213,6 +216,9 @@
 #ifdef POWER9
 extern uint32_t longest_match_power9(deflate_state *const s, Pos cur_match);
 #endif
+#ifdef RISCV_RVV
+extern uint32_t longest_match_rvv(deflate_state *const s, Pos cur_match);
+#endif
 
 /* longest_match_slow */
 extern uint32_t longest_match_slow_c(deflate_state *const s, Pos cur_match);
@@ -235,6 +241,9 @@
 #ifdef POWER9
 extern uint32_t longest_match_slow_power9(deflate_state *const s, Pos 
cur_match);
 #endif
+#ifdef RISCV_RVV
+extern uint32_t longest_match_slow_rvv(deflate_state *const s, Pos cur_match);
+#endif
 
 /* quick_insert_string */
 extern Pos quick_insert_string_c(deflate_state *const s, const uint32_t str);
@@ -258,6 +267,9 @@
 #if defined(POWER8_VSX)
 extern void slide_hash_power8(deflate_state *s);
 #endif
+#if defined(RISCV_RVV)
+extern void slide_hash_rvv(deflate_state *s);
+#endif
 #ifdef X86_AVX2
 extern void slide_hash_avx2(deflate_state *s);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/deflate.c new/zlib-ng-2.1.3/deflate.c
--- old/zlib-ng-2.1.2/deflate.c 2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/deflate.c 2023-06-29 10:23:11.000000000 +0200
@@ -478,9 +478,7 @@
 
 /* ========================================================================= */
 int32_t Z_EXPORT PREFIX(deflateReset)(PREFIX3(stream) *strm) {
-    int ret;
-
-    ret = PREFIX(deflateResetKeep)(strm);
+    int ret = PREFIX(deflateResetKeep)(strm);
     if (ret == Z_OK)
         lm_init(strm->state);
     return ret;
@@ -692,9 +690,7 @@
     deflate_state *s = strm->state;
 
     zng_tr_flush_bits(s);
-    len = s->pending;
-    if (len > strm->avail_out)
-        len = strm->avail_out;
+    len = MIN(s->pending, strm->avail_out);
     if (len == 0)
         return;
 
@@ -1095,9 +1091,7 @@
  * (See also flush_pending()).
  */
 Z_INTERNAL unsigned PREFIX(read_buf)(PREFIX3(stream) *strm, unsigned char 
*buf, unsigned size) {
-    uint32_t len = strm->avail_in;
-
-    len = MIN(len, size);
+    uint32_t len = MIN(strm->avail_in, size);
     if (len == 0)
         return 0;
 
@@ -1109,11 +1103,10 @@
     } else if (strm->state->wrap == 2) {
         functable.crc32_fold_copy(&strm->state->crc_fold, buf, strm->next_in, 
len);
 #endif
+    } else if (strm->state->wrap == 1) {
+        strm->adler = functable.adler32_fold_copy(strm->adler, buf, 
strm->next_in, len);
     } else {
-        if (strm->state->wrap == 1)
-            strm->adler = functable.adler32_fold_copy(strm->adler, buf, 
strm->next_in, len);
-        else
-            memcpy(buf, strm->next_in, len);
+        memcpy(buf, strm->next_in, len);
     }
     strm->next_in  += len;
     strm->total_in += len;
@@ -1234,11 +1227,9 @@
             } else if (str >= 1) {
                 s->quick_insert_string(s, str + 2 - STD_MIN_MATCH);
             }
-            unsigned int count;
+            unsigned int count = s->insert;
             if (UNLIKELY(s->lookahead == 1)) {
-                count = s->insert - 1;
-            } else {
-                count = s->insert;
+                count -= 1;
             }
             if (count > 0) {
                 s->insert_string(s, str, count);
@@ -1313,8 +1304,6 @@
     int version_error = 0;
     int buf_error = 0;
     int stream_error = 0;
-    int ret;
-    int val;
 
     /* Initialize the statuses. */
     for (i = 0; i < count; i++)
@@ -1354,8 +1343,8 @@
 
     /* Apply changes, remember if there were errors. */
     if (new_level != NULL || new_strategy != NULL) {
-        ret = PREFIX(deflateParams)(strm, new_level == NULL ? s->level : *(int 
*)new_level->buf,
-                                    new_strategy == NULL ? s->strategy : *(int 
*)new_strategy->buf);
+        int ret = PREFIX(deflateParams)(strm, new_level == NULL ? s->level : 
*(int *)new_level->buf,
+                                        new_strategy == NULL ? s->strategy : 
*(int *)new_strategy->buf);
         if (ret != Z_OK) {
             if (new_level != NULL)
                 new_level->status = Z_STREAM_ERROR;
@@ -1365,7 +1354,7 @@
         }
     }
     if (new_reproducible != NULL) {
-        val = *(int *)new_reproducible->buf;
+        int val = *(int *)new_reproducible->buf;
         if (DEFLATE_CAN_SET_REPRODUCIBLE(strm, val)) {
             s->reproducible = val;
         } else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/functable.c 
new/zlib-ng-2.1.3/functable.c
--- old/zlib-ng-2.1.2/functable.c       2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/functable.c       2023-06-29 10:23:11.000000000 +0200
@@ -202,6 +202,17 @@
 #endif
 
 
+    // RISCV - RVV
+#ifdef RISCV_RVV
+    if (cf.riscv.has_rvv) {
+        ft.compare256 = &compare256_rvv;
+        ft.longest_match = &longest_match_rvv;
+        ft.longest_match_slow = &longest_match_slow_rvv;
+        ft.slide_hash = &slide_hash_rvv;
+    }
+#endif
+
+
     // S390
 #ifdef S390_CRC32_VX
     if (cf.s390.has_vx)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/inflate_p.h 
new/zlib-ng-2.1.3/inflate_p.h
--- old/zlib-ng-2.1.2/inflate_p.h       2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/inflate_p.h       2023-06-29 10:23:11.000000000 +0200
@@ -161,6 +161,11 @@
         return out + len;
     }
 
+    /* Complete overlap: Source == destination */
+    if (out == from) {
+        return out + len;
+    }
+
     /* We are emulating a self-modifying copy loop here. To do this in a way 
that doesn't produce undefined behavior,
      * we have to get a bit clever. First if the overlap is such that src 
falls between dst and dst+len, we can do the
      * initial bulk memcpy of the nonoverlapping region. Then, we can leverage 
the size of this to determine the safest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/test/CMakeLists.txt 
new/zlib-ng-2.1.3/test/CMakeLists.txt
--- old/zlib-ng-2.1.2/test/CMakeLists.txt       2023-06-07 21:12:16.000000000 
+0200
+++ new/zlib-ng-2.1.3/test/CMakeLists.txt       2023-06-29 10:23:11.000000000 
+0200
@@ -111,8 +111,6 @@
 endif()
 
 if(WITH_GTEST)
-    include(FetchContent)
-
     # Google test requires at least C++11
     set(CMAKE_CXX_STANDARD 11)
 
@@ -125,9 +123,13 @@
         # Must set include and compile options before fetching googletest
         include_directories($ENV{LLVM_BUILD_DIR}/include 
$ENV{LLVM_BUILD_DIR}/include/c++/v1)
         add_compile_options(-stdlib=libc++ -g)
+    elseif(NOT TARGET GTest::GTest)
+        find_package(GTest)
     endif()
 
     if(NOT TARGET GTest::GTest)
+        include(FetchContent)
+
         # Prevent overriding the parent project's compiler/linker settings for 
Windows
         set(gtest_force_shared_crt ON CACHE BOOL
             "Use shared (DLL) run-time lib even when Google Test is built as 
static lib." FORCE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zlib-ng-2.1.2/test/benchmarks/benchmark_compare256.cc 
new/zlib-ng-2.1.3/test/benchmarks/benchmark_compare256.cc
--- old/zlib-ng-2.1.2/test/benchmarks/benchmark_compare256.cc   2023-06-07 
21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/test/benchmarks/benchmark_compare256.cc   2023-06-29 
10:23:11.000000000 +0200
@@ -82,3 +82,6 @@
 #ifdef POWER9
 BENCHMARK_COMPARE256(power9, compare256_power9, 
test_cpu_features.power.has_arch_3_00);
 #endif
+#ifdef RISCV_RVV
+BENCHMARK_COMPARE256(rvv, compare256_rvv, test_cpu_features.riscv.has_rvv);
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/test/benchmarks/benchmark_slidehash.cc 
new/zlib-ng-2.1.3/test/benchmarks/benchmark_slidehash.cc
--- old/zlib-ng-2.1.2/test/benchmarks/benchmark_slidehash.cc    2023-06-07 
21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/test/benchmarks/benchmark_slidehash.cc    2023-06-29 
10:23:11.000000000 +0200
@@ -77,7 +77,9 @@
 #ifdef PPC_VMX
 BENCHMARK_SLIDEHASH(vmx, slide_hash_vmx, test_cpu_features.power.has_altivec);
 #endif
-
+#ifdef RISCV_RVV
+BENCHMARK_SLIDEHASH(rvv, slide_hash_rvv, test_cpu_features.riscv.has_rvv);
+#endif
 #ifdef X86_SSE2
 BENCHMARK_SLIDEHASH(sse2, slide_hash_sse2, test_cpu_features.x86.has_sse2);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/test/pkgcheck.sh 
new/zlib-ng-2.1.3/test/pkgcheck.sh
--- old/zlib-ng-2.1.2/test/pkgcheck.sh  2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/test/pkgcheck.sh  2023-06-29 10:23:11.000000000 +0200
@@ -47,10 +47,6 @@
 
 set -ex
 
-# Caller can also set CMAKE_ARGS or CONFIGURE_ARGS if desired
-CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib ${CMAKE_ARGS}"
-CONFIGURE_ARGS=${CONFIGURE_ARGS}
-
 case "$1" in
 --zlib-compat)
   suffix=""
@@ -85,6 +81,11 @@
   sysctl -n machdep.cpu.features
   sysctl -n machdep.cpu.leaf7_features
   sysctl -n machdep.cpu.extfeatures
+  CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib 
-DPKGCONFIG_INSTALL_DIR=/lib/pkgconfig -DWITH_RPATH=on ${CMAKE_ARGS}"
+  CONFIGURE_ARGS="--libdir=lib ${CONFIGURE_ARGS}"
+  ;;
+*)
+  CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib ${CMAKE_ARGS}"
   ;;
 esac
 
@@ -117,7 +118,7 @@
 # Original build system
 rm -rf btmp1 pkgtmp1
 mkdir btmp1 pkgtmp1
-export DESTDIR=$(pwd)/pkgtmp1
+export DESTDIR=$(pwd)/pkgtmp1/
 cd btmp1
   case $(uname) in
   Darwin)
@@ -130,13 +131,15 @@
 cd ..
 
 repack_ar() {
-  if ! cmp --silent pkgtmp1/usr/local/lib/libz$suffix.a 
pkgtmp2/usr/local/lib/libz$suffix.a
+  archive1=$(cd pkgtmp1; find . -type f -name '*.a'; cd ..)
+  archive2=$(cd pkgtmp2; find . -type f -name '*.a'; cd ..)
+  if ! cmp --silent pkgtmp1/$archive1 pkgtmp2/$archive2
   then
     echo "libz$suffix.a does not match.  Probably filenames differ (.o vs 
.c.o).  Unpacking and renaming..."
     # Note: %% is posix shell syntax meaning "Remove Largest Suffix Pattern", 
see
     # 
https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02
-    cd pkgtmp1; ar x usr/local/lib/libz$suffix.a; rm 
usr/local/lib/libz$suffix.a; cd ..
-    cd pkgtmp2; ar x usr/local/lib/libz$suffix.a; rm 
usr/local/lib/libz$suffix.a; for a in *.c.o; do mv $a ${a%%.c.o}.o; done; cd ..
+    cd pkgtmp1; ar x $archive1; rm $archive1; cd ..
+    cd pkgtmp2; ar x $archive2; rm $archive2; for a in *.c.o; do mv $a 
${a%%.c.o}.o; done; cd ..
     # Also, remove __.SYMDEF SORTED if present, as it has those funky .c.o 
names embedded in it.
     rm -f pkgtmp[12]/__.SYMDEF\ SORTED
   fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/test/test_compare256.cc 
new/zlib-ng-2.1.3/test/test_compare256.cc
--- old/zlib-ng-2.1.2/test/test_compare256.cc   2023-06-07 21:12:16.000000000 
+0200
+++ new/zlib-ng-2.1.3/test/test_compare256.cc   2023-06-29 10:23:11.000000000 
+0200
@@ -81,3 +81,6 @@
 #ifdef POWER9
 TEST_COMPARE256(power9, compare256_power9, 
test_cpu_features.power.has_arch_3_00)
 #endif
+#ifdef RISCV_RVV
+TEST_COMPARE256(rvv, compare256_rvv, test_cpu_features.riscv.has_rvv)
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/zlib-ng.h.in 
new/zlib-ng-2.1.3/zlib-ng.h.in
--- old/zlib-ng-2.1.2/zlib-ng.h.in      2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/zlib-ng.h.in      2023-06-29 10:23:11.000000000 +0200
@@ -48,11 +48,11 @@
 extern "C" {
 #endif
 
-#define ZLIBNG_VERSION "2.1.2"
-#define ZLIBNG_VERNUM 0x020102F0L   /* MMNNRRSM: major minor revision status 
modified */
+#define ZLIBNG_VERSION "2.1.3"
+#define ZLIBNG_VERNUM 0x020103F0L   /* MMNNRRSM: major minor revision status 
modified */
 #define ZLIBNG_VER_MAJOR 2
 #define ZLIBNG_VER_MINOR 1
-#define ZLIBNG_VER_REVISION 2
+#define ZLIBNG_VER_REVISION 3
 #define ZLIBNG_VER_STATUS F         /* 0=devel, 1-E=beta, F=Release */
 #define ZLIBNG_VER_MODIFIED 0       /* non-zero if modified externally from 
zlib-ng */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/zlib.h.in new/zlib-ng-2.1.3/zlib.h.in
--- old/zlib-ng-2.1.2/zlib.h.in 2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/zlib.h.in 2023-06-29 10:23:11.000000000 +0200
@@ -49,11 +49,11 @@
 extern "C" {
 #endif
 
-#define ZLIBNG_VERSION "2.1.2"
-#define ZLIBNG_VERNUM 0x020102F0L   /* MMNNRRSM: major minor revision status 
modified */
+#define ZLIBNG_VERSION "2.1.3"
+#define ZLIBNG_VERNUM 0x020103F0L   /* MMNNRRSM: major minor revision status 
modified */
 #define ZLIBNG_VER_MAJOR 2
 #define ZLIBNG_VER_MINOR 1
-#define ZLIBNG_VER_REVISION 2
+#define ZLIBNG_VER_REVISION 3
 #define ZLIBNG_VER_STATUS F         /* 0=devel, 1-E=beta, F=Release */
 #define ZLIBNG_VER_MODIFIED 0       /* non-zero if modified externally from 
zlib-ng */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.1.2/zutil.c new/zlib-ng-2.1.3/zutil.c
--- old/zlib-ng-2.1.2/zutil.c   2023-06-07 21:12:16.000000000 +0200
+++ new/zlib-ng-2.1.3/zutil.c   2023-06-29 10:23:11.000000000 +0200
@@ -21,7 +21,7 @@
 };
 
 const char PREFIX3(vstring)[] =
-    " zlib-ng 2.1.2";
+    " zlib-ng 2.1.3";
 
 #ifdef ZLIB_COMPAT
 const char * Z_EXPORT zlibVersion(void) {

Reply via email to