Skip to content

Commit

Permalink
deps: update zlib-ng to 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Sep 17, 2024
1 parent ad766e6 commit 25cec64
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 14 deletions.
2 changes: 1 addition & 1 deletion deps/zlib-ng/include/zconf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
* Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
24 changes: 12 additions & 12 deletions deps/zlib-ng/include/zlib.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef ZLIB_H_
#define ZLIB_H_
/* zlib.h -- interface of the 'zlib-ng' compression library
Forked from and compatible with zlib 1.2.13
Forked from and compatible with zlib 1.3.1
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -49,20 +49,20 @@
extern "C" {
#endif

#define ZLIBNG_VERSION "2.1.6"
#define ZLIBNG_VERNUM 0x020106F0L /* MMNNRRSM: major minor revision status modified */
#define ZLIBNG_VERSION "2.2.2"
#define ZLIBNG_VERNUM 0x020202F0L /* MMNNRRSM: major minor revision status modified */
#define ZLIBNG_VER_MAJOR 2
#define ZLIBNG_VER_MINOR 1
#define ZLIBNG_VER_REVISION 6
#define ZLIBNG_VER_MINOR 2
#define ZLIBNG_VER_REVISION 2
#define ZLIBNG_VER_STATUS F /* 0=devel, 1-E=beta, F=Release (DEPRECATED) */
#define ZLIBNG_VER_STATUSH 0xF /* Hex values: 0=devel, 1-E=beta, F=Release */
#define ZLIBNG_VER_MODIFIED 0 /* non-zero if modified externally from zlib-ng */

#define ZLIB_VERSION "1.3.0.zlib-ng"
#define ZLIB_VERNUM 0x130f
#define ZLIB_VERSION "1.3.1.zlib-ng"
#define ZLIB_VERNUM 0x131f
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 3
#define ZLIB_VER_REVISION 0
#define ZLIB_VER_REVISION 1
#define ZLIB_VER_SUBREVISION 15 /* 15=fork (0xf) */

/*
Expand Down Expand Up @@ -220,7 +220,7 @@ typedef gz_header *gz_headerp;
#define Z_DEFLATED 8
/* The deflate compression method (the only one supported in this version) */

#define Z_NULL NULL /* for compatibility with zlib, was for initializing zalloc, zfree, opaque */
#define Z_NULL 0 /* for compatibility with zlib, was for initializing zalloc, zfree, opaque */

#define zlib_version zlibVersion()
/* for compatibility with versions < 1.0.2 */
Expand Down Expand Up @@ -1732,14 +1732,14 @@ Z_EXTERN unsigned long Z_EXPORT crc32_combine(unsigned long crc1, unsigned long
seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
len2.
len2. len2 must be non-negative.
*/

/*
Z_EXTERN unsigned long Z_EXPORT crc32_combine_gen(z_off_t len2);
Return the operator corresponding to length len2, to be used with
crc32_combine_op().
crc32_combine_op(). len2 must be non-negative.
*/

Z_EXTERN unsigned long Z_EXPORT crc32_combine_op(unsigned long crc1, unsigned long crc2,
Expand Down
48 changes: 48 additions & 0 deletions deps/zlib-ng/lib/cmake/ZLIB/zlib-config-version.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
# The variable CVF_VERSION must be set before calling configure_file().

set(PACKAGE_VERSION "1.3.1")

if (PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()
else()
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
endif()


# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()

# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
return()
endif()

# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
math(EXPR installedBits "8 * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
36 changes: 36 additions & 0 deletions deps/zlib-ng/lib/cmake/ZLIB/zlib-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
set(ZLIB_VERSION 1.3.1)


####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
####### Any changes to this file will be overwritten by the next CMake run ####
####### The input file was zlib-config.cmake.in ########

get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)

macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()

macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()

####################################################################################

set_and_check(ZLIB_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")
set(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
set_and_check(ZLIB_LIB_DIR "${PACKAGE_PREFIX_DIR}/lib")
set(ZLIB_LIBRARIES ZLIB::ZLIB)

include("${CMAKE_CURRENT_LIST_DIR}/ZLIB.cmake")

check_required_components(ZLIB)
Binary file modified deps/zlib-ng/lib/libz.a
Binary file not shown.
2 changes: 1 addition & 1 deletion deps/zlib-ng/lib/pkgconfig/zlib.pc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ includedir=${prefix}/include

Name: zlib
Description: zlib-ng compression library
Version: 1.3.0.zlib-ng
Version: 1.3.1.zlib-ng

Requires:
Libs: -L${libdir} -L${sharedlibdir} -lz
Expand Down

0 comments on commit 25cec64

Please sign in to comment.