Skip to content
Snippets Groups Projects
Commit 9da883c0 authored by Rocky Automation's avatar Rocky Automation :tv:
Browse files

import mingw-zlib-1.2.13-2.el9

parent 9aec4540
No related merge requests found
0354e310d90a9dc0b642a3e4881f772a519ee314238489b47ba839fc94f6534a
37d26cd1138597c866b8e3e137156c82a0f0f960 SOURCES/zlib-1.2.12.tar.xz
d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98 SOURCES/zlib-1.2.13.tar.xz
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")
%{?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 >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 <kkostiuk@redhat.com> - 1.2.12-2
- Fix changelog
Related: rhbz#2068371
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Dec 13 2022 Sandro Mani <manisandro@gmail.com> - 1.2.13-1
- Update to 1.2.13
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jun 30 2022 Sandro Mani <manisandro@gmail.com> - 1.2.12-1
- Update to 1.2.12
* Tue Jul 07 2022 Konstantin Kostiuk <kkostiuk@redhat.com> - 1.2.12-1
- Bump version to 1.2.12 to fix CVE-2018-25032
Related: rhbz#2068371
* Fri Mar 25 2022 Sandro Mani <manisandro@gmail.com> - 1.2.11-8
- Rebuild with mingw-gcc-12
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.11-7
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.11-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.11-6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.11-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.11-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment