#
# Conditional build:
-%bcond_without asmopt # without assembler optimization for i686+
+%bcond_with asmopt # without assembler optimization for i686+
+ # (asm is unsupported by upstream and unmaintained)
#
# disable asmopt where not applicable
%ifarch i386 i486 i586
Summary: Library for compression and decompression - MinGW32 cross version
Summary(pl.UTF-8): Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla MinGW32
Name: crossmingw32-%{realname}
-Version: 1.2.5
-Release: 3
+Version: 1.3.1
+Release: 1
License: BSD
Group: Development/Libraries
-Source0: http://www.zlib.net/current/%{realname}-%{version}.tar.gz
-# Source0-md5: c735eab2d659a96e5a594c9e8541ad63
-Patch0: %{name}-LFS.patch
-Patch1: %{realname}-lfs.patch
-URL: http://www.zlib.net/
+Source0: https://www.zlib.net/%{realname}-%{version}.tar.gz
+# Source0-md5: 9855b6d802d7fe5b7bd5b196a2271655
+URL: https://www.zlib.net/
BuildRequires: crossmingw32-gcc
BuildRequires: sed >= 4.0
Requires: crossmingw32-runtime
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define no_install_post_strip 1
+%define _enable_debug_packages 0
%define target i386-mingw32
%define target_platform i386-pc-mingw32
%define _dlldir /usr/share/wine/windows/system
%define __cc %{target}-gcc
%define __cxx %{target}-g++
+%define __pkgconfig_provides %{nil}
+%define __pkgconfig_requires %{nil}
%ifarch alpha sparc sparc64 sparcv9
%define optflags -O2
%endif
+# -z options are invalid for mingw linker, most of -f options are Linux-specific
+%define filterout_ld -Wl,-z,.*
+%define filterout_c -f[-a-z0-9=]*
+
%description
The 'zlib' compression library provides in-memory compression and
decompression functions, including integrity checks of the
%prep
%setup -q -n %{realname}-%{version}
-%patch0 -p1
-%patch1 -p1
%if %{with asmopt}
%ifarch i686 athlon
# Made by czarny czarny at pld-linux.org
# The name that we can dlopen(3).
-dlname='../bin/zlib1.dll'
+dlname='%{_dlldir}/zlib1.dll'
# Names of this library.
library_names='libz.dll.a'
install zlib1.dll $RPM_BUILD_ROOT%{_dlldir}
install zlib.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
-rm -rf $RPM_BUILD_ROOT%{_datadir}/man
-
%clean
rm -rf $RPM_BUILD_ROOT