From 713fb06ad23f88efcb125365af91ab4d1f4d5de6ee5dbac73708d6e080a73ba7 Mon Sep 17 00:00:00 2001
From: Danilo Spinella <danilo.spinella@suse.com>
Date: Mon, 12 Dec 2022 10:46:22 +0000
Subject: [PATCH] Accepting request 1042192 from
 home:dirkmueller:branches:openSUSE:Factory:Rings:1-MinimalX

- build zlib with optflags again

OBS-URL: https://build.opensuse.org/request/show/1042192
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zlib?expand=0&rev=84
---
 zlib.changes |  5 +++++
 zlib.spec    | 16 ++++++++--------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/zlib.changes b/zlib.changes
index 6c9f265..6de0411 100644
--- a/zlib.changes
+++ b/zlib.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Sun Dec 11 16:41:51 UTC 2022 - Dirk Müller <dmueller@suse.com>
+
+- build zlib with optflags again 
+
 -------------------------------------------------------------------
 Mon Oct 10 10:08:02 UTC 2022 - Danilo Spinella <danilo.spinella@suse.com>
 
diff --git a/zlib.spec b/zlib.spec
index c6385e3..1dfff0f 100644
--- a/zlib.spec
+++ b/zlib.spec
@@ -164,7 +164,7 @@ cp %{SOURCE4} .
 %global _lto_cflags %{_lto_cflags} -ffat-lto-objects
 export LDFLAGS="-Wl,-z,relro,-z,now"
 # For sure not autotools build
-CC="cc" ./configure \
+CC="cc" CFLAGS="%{optflags}" ./configure \
     --shared \
     --prefix=%{_prefix} \
     --libdir=%{_libdir} \
@@ -177,12 +177,12 @@ CC="cc" ./configure \
 # Profiling flags breaks tests, as of 1.2.12
 # In particular, gzseek does not work as intended
 #%if %{do_profiling}
-#  make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}"
-#  make check %{?_smp_mflags}
-#  make %{?_smp_mflags} clean
-#  make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}"
+#  %make_build CFLAGS="%{optflags} %{cflags_profile_generate}"
+#  %make_build check
+#  %make_build clean
+#  %make_build %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}"
 #%else
-  make %{?_smp_mflags}
+  %make_build
 #%endif
 
 # And build minizip
@@ -191,10 +191,10 @@ autoreconf -fvi
 %configure \
     --disable-static \
     --disable-silent-rules
-make %{?_smp_mflags}
+%make_build
 
 %check
-make check %{?_smp_mflags}
+%make_build check
 
 %install
 mkdir -p %{buildroot}%{_libdir}