From 3cc0f7e892b9f013d3f8d842adeda2d7c5f12fd0 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 21 Sep 2023 19:34:04 +0000 Subject: [PATCH] import CS mingw-zlib-1.2.13-2.el9 --- .gitignore | 2 +- .mingw-zlib.metadata | 2 +- SOURCES/mingw-zlib-cmake.patch | 21 +++++ SOURCES/mingw32-zlib-1.2.7-autotools.patch | 76 ---------------- SOURCES/mingw32-zlib-create-zlib1-dll.patch | 10 --- SOURCES/zlib-1.2.7-use-correct-def-file.patch | 8 -- SPECS/mingw-zlib.spec | 87 +++++++------------ 7 files changed, 52 insertions(+), 154 deletions(-) create mode 100644 SOURCES/mingw-zlib-cmake.patch delete mode 100644 SOURCES/mingw32-zlib-1.2.7-autotools.patch delete mode 100644 SOURCES/mingw32-zlib-create-zlib1-dll.patch delete mode 100644 SOURCES/zlib-1.2.7-use-correct-def-file.patch diff --git a/.gitignore b/.gitignore index 9ff66a1..90c3145 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/zlib-1.2.12.tar.xz +SOURCES/zlib-1.2.13.tar.xz diff --git a/.mingw-zlib.metadata b/.mingw-zlib.metadata index 3c414ea..4fe9bb3 100644 --- a/.mingw-zlib.metadata +++ b/.mingw-zlib.metadata @@ -1 +1 @@ -37d26cd1138597c866b8e3e137156c82a0f0f960 SOURCES/zlib-1.2.12.tar.xz +b459b42aa533968ae403c0002a255d62d3136954 SOURCES/zlib-1.2.13.tar.xz diff --git a/SOURCES/mingw-zlib-cmake.patch b/SOURCES/mingw-zlib-cmake.patch new file mode 100644 index 0000000..4ed1940 --- /dev/null +++ b/SOURCES/mingw-zlib-cmake.patch @@ -0,0 +1,21 @@ +diff -rupN --no-dereference zlib-1.2.13/CMakeLists.txt zlib-1.2.13-new/CMakeLists.txt +--- zlib-1.2.13/CMakeLists.txt 2022-10-13 07:06:55.000000000 +0200 ++++ zlib-1.2.13-new/CMakeLists.txt 2022-12-13 09:35:24.752040574 +0100 +@@ -163,12 +163,16 @@ if(NOT CYGWIN) + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) + endif() + +-if(UNIX) ++if(UNIX OR MINGW) + # On unix-like platforms the library is almost always called libz + set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) + if(NOT APPLE) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() ++ if(MINGW) ++ set_target_properties(zlib PROPERTIES PREFIX "") ++ set_target_properties(zlib PROPERTIES RUNTIME_OUTPUT_NAME "zlib1") ++ endif() + elseif(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version + set_target_properties(zlib PROPERTIES SUFFIX "1.dll") diff --git a/SOURCES/mingw32-zlib-1.2.7-autotools.patch b/SOURCES/mingw32-zlib-1.2.7-autotools.patch deleted file mode 100644 index aef74e1..0000000 --- a/SOURCES/mingw32-zlib-1.2.7-autotools.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -rupN --no-dereference zlib-1.2.11/configure.ac zlib-1.2.11-new/configure.ac ---- zlib-1.2.11/configure.ac 1970-01-01 01:00:00.000000000 +0100 -+++ zlib-1.2.11-new/configure.ac 2020-11-12 22:09:58.320508742 +0100 -@@ -0,0 +1,13 @@ -+# -*- Autoconf -*- -+# Process this file with autoconf to produce a configure script. -+ -+AC_INIT([zlib], [1.2.11], [bugzilla.redhat.com]) -+AC_CONFIG_SRCDIR([gzlib.c]) -+AC_CONFIG_MACRO_DIR([m4]) -+AM_INIT_AUTOMAKE([foreign subdir-objects]) -+LT_INIT -+ -+AC_SUBST([HAVE_UNISTD_H], [0]) -+AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], []) -+AC_CONFIG_FILES([Makefile zlib.pc zconf.h:zconf.h.in]) -+AC_OUTPUT -diff -rupN --no-dereference zlib-1.2.11/Makefile.am zlib-1.2.11-new/Makefile.am ---- zlib-1.2.11/Makefile.am 1970-01-01 01:00:00.000000000 +0100 -+++ zlib-1.2.11-new/Makefile.am 2020-11-12 22:09:58.320508742 +0100 -@@ -0,0 +1,37 @@ -+ACLOCAL_AMFLAGS = -I m4 --install -+ -+lib_LTLIBRARIES = libz.la -+ -+libz_la_SOURCES = \ -+ adler32.c \ -+ compress.c \ -+ crc32.c \ -+ crc32.h \ -+ gzclose.c \ -+ gzlib.c \ -+ gzread.c \ -+ gzwrite.c \ -+ uncompr.c \ -+ deflate.c \ -+ deflate.h \ -+ trees.c \ -+ trees.h \ -+ zutil.c \ -+ zutil.h \ -+ inflate.c \ -+ inflate.h \ -+ infback.c \ -+ inftrees.c \ -+ inftrees.h \ -+ inffast.c \ -+ inffast.h \ -+ infflate.h -+ -+# Use -version-number to match the file name used before autoconfiscation. -+libz_la_LDFLAGS = -version-number 1:2:11 -no-undefined -+ -+include_HEADERS = zlib.h -+nodist_include_HEADERS = zconf.h -+ -+dist_man_MANS = zlib.3 -+ -diff -rupN --no-dereference zlib-1.2.11/zlib.pc.in zlib-1.2.11-new/zlib.pc.in ---- zlib-1.2.11/zlib.pc.in 2010-04-18 08:48:15.000000000 +0200 -+++ zlib-1.2.11-new/zlib.pc.in 2020-11-12 22:09:58.320508742 +0100 -@@ -1,7 +1,6 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ --sharedlibdir=@sharedlibdir@ - includedir=@includedir@ - - Name: zlib -@@ -9,5 +8,5 @@ Description: zlib compression library - Version: @VERSION@ - - Requires: --Libs: -L${libdir} -L${sharedlibdir} -lz -+Libs: -L${libdir} -lz - Cflags: -I${includedir} diff --git a/SOURCES/mingw32-zlib-create-zlib1-dll.patch b/SOURCES/mingw32-zlib-create-zlib1-dll.patch deleted file mode 100644 index 9ee0935..0000000 --- a/SOURCES/mingw32-zlib-create-zlib1-dll.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- ltmain.sh.orig 2010-10-13 23:11:05.164935359 +0200 -+++ ltmain.sh 2010-10-13 23:33:31.572557755 +0200 -@@ -7431,6 +7431,7 @@ - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else -+ if test "$soname" = "libz-1.dll" ; then soname=zlib1.dll; fi - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi diff --git a/SOURCES/zlib-1.2.7-use-correct-def-file.patch b/SOURCES/zlib-1.2.7-use-correct-def-file.patch deleted file mode 100644 index 021ff75..0000000 --- a/SOURCES/zlib-1.2.7-use-correct-def-file.patch +++ /dev/null @@ -1,8 +0,0 @@ -diff -rupN --no-dereference zlib-1.2.11/win32/zlib.def zlib-1.2.11-new/win32/zlib.def ---- zlib-1.2.11/win32/zlib.def 2017-01-01 08:37:10.000000000 +0100 -+++ zlib-1.2.11-new/win32/zlib.def 2020-11-12 22:09:58.338508692 +0100 -@@ -1,3 +1,4 @@ -+LIBRARY zlib1.dll - ; zlib data compression library - EXPORTS - ; basic functions diff --git a/SPECS/mingw-zlib.spec b/SPECS/mingw-zlib.spec index db986b4..ef9ee2d 100644 --- a/SPECS/mingw-zlib.spec +++ b/SPECS/mingw-zlib.spec @@ -1,36 +1,26 @@ %{?mingw_package_header} Name: mingw-zlib -Version: 1.2.12 +Version: 1.2.13 Release: 2%{?dist} Summary: MinGW Windows zlib compression library -License: zlib +License: Zlib URL: http://www.zlib.net/ Source0: http://www.zlib.net/zlib-%{version}.tar.xz -# Replace the zlib build system with an autotools based one -Patch3: mingw32-zlib-1.2.7-autotools.patch -# The .def file contains an empty LIBRARY line which isn't valid -Patch5: zlib-1.2.7-use-correct-def-file.patch -# Libtool tries to make a libz-1.dll while we expect zlib1.dll -# Force this by hacking the ltmain.sh -Patch6: mingw32-zlib-create-zlib1-dll.patch +# Use UNIX naming convention for libraries +Patch0: mingw-zlib-cmake.patch BuildArch: noarch -BuildRequires: make +BuildRequires: cmake +BuildRequires: make + BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc -BuildRequires: mingw32-binutils BuildRequires: mingw64-filesystem >= 95 BuildRequires: mingw64-gcc -BuildRequires: mingw64-binutils - -BuildRequires: perl-interpreter -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool %description @@ -72,45 +62,20 @@ The mingw64-zlib-static package contains static library for mingw64-zlib develop %prep -%setup -q -n zlib-%{version} -%patch3 -p1 -b .atools -%patch5 -p1 -b .def -# patch cannot create an empty dir -mkdir m4 -iconv -f windows-1252 -t utf-8 ChangeLog.tmp - -autoreconf --install --force - -%patch6 -p0 -b .libtool +%autosetup -p1 -n zlib-%{version} %build -%mingw_configure +MINGW32_CMAKE_ARGS=-DINSTALL_PKGCONFIG_DIR=%{mingw32_libdir}/pkgconfig \ +MINGW64_CMAKE_ARGS=-DINSTALL_PKGCONFIG_DIR=%{mingw64_libdir}/pkgconfig \ +%mingw_cmake +%mingw_make_build %mingw_make_build %install -# Libtool tries to install a file called libz-1.dll -# but this isn't created anymore due to patch #6 -# Fool libtool until a proper fix has been found -touch build_win32/.libs/libz-1.dll build_win64/.libs/libz-1.dll %mingw_make_install -# Manually install the correct zlib.dll -install -m 0644 build_win32/.libs/zlib1.dll %{buildroot}%{mingw32_bindir}/ -install -m 0644 build_win64/.libs/zlib1.dll %{buildroot}%{mingw64_bindir}/ - -# Install the pkgconfig file -install -Dm 0644 build_win32/zlib.pc %{buildroot}%{mingw32_libdir}/pkgconfig/zlib.pc -install -Dm 0644 build_win64/zlib.pc %{buildroot}%{mingw64_libdir}/pkgconfig/zlib.pc - -# Drop the fake libz-1.dll -rm -f %{buildroot}%{mingw32_bindir}/libz-1.dll -rm -f %{buildroot}%{mingw64_bindir}/libz-1.dll - -# Drop all .la files -find %{buildroot} -name "*.la" -delete - # Drop the man pages rm -rf %{buildroot}%{mingw32_mandir} rm -rf %{buildroot}%{mingw64_mandir} @@ -140,20 +105,26 @@ rm -rf %{buildroot}%{mingw64_mandir} %changelog -* Mon Jul 11 2022 Konstantin Kostiuk - 1.2.12-2 -- Fix changelog - Related: rhbz#2068371 +* Thu Jan 19 2023 Fedora Release Engineering - 1.2.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild -* Tue Jul 07 2022 Konstantin Kostiuk - 1.2.12-1 -- Bump version to 1.2.12 to fix CVE-2018-25032 - Related: rhbz#2068371 +* Tue Dec 13 2022 Sandro Mani - 1.2.13-1 +- Update to 1.2.13 -* Mon Aug 09 2021 Mohan Boddu - 1.2.11-7 -- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Related: rhbz#1991688 +* Thu Jul 21 2022 Fedora Release Engineering - 1.2.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild -* Fri Apr 16 2021 Mohan Boddu - 1.2.11-6 -- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 +* Thu Jun 30 2022 Sandro Mani - 1.2.12-1 +- Update to 1.2.12 + +* Fri Mar 25 2022 Sandro Mani - 1.2.11-8 +- Rebuild with mingw-gcc-12 + +* Thu Jan 20 2022 Fedora Release Engineering - 1.2.11-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 1.2.11-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jan 26 2021 Fedora Release Engineering - 1.2.11-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild