From 42ec7548e85816b4c5e21c5be48fbd6ccbc3ae841128fe1dc5bf15a993bab7fa Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Tue, 28 Dec 2010 23:40:18 +0000 Subject: [PATCH] Accepting request 56541 from Base:System Accepted submit request 56541 from user msmeissn OBS-URL: https://build.opensuse.org/request/show/56541 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zlib?expand=0&rev=22 --- zlib-lfs.patch | 24 +++++++++++++++++++----- zlib-parallel.patch | 13 +++++++++++++ zlib.changes | 10 ++++++++++ zlib.spec | 20 +++++++++++++++++--- 4 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 zlib-parallel.patch diff --git a/zlib-lfs.patch b/zlib-lfs.patch index f9d06dc..0924150 100644 --- a/zlib-lfs.patch +++ b/zlib-lfs.patch @@ -1,7 +1,6 @@ -diff -up zlib-1.2.5/zlib.h.pom zlib-1.2.5/zlib.h ---- zlib-1.2.5/zlib.h.pom 2010-04-20 06:12:48.000000000 +0200 -+++ zlib-1.2.5/zlib.h 2010-06-16 13:08:59.000000000 +0200 -@@ -1578,7 +1578,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( +--- zlib.h.orig ++++ zlib.h +@@ -1582,7 +1582,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( # define gzoffset gzoffset64 # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 @@ -10,4 +9,19 @@ diff -up zlib-1.2.5/zlib.h.pom zlib-1.2.5/zlib.h ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - +--- Makefile.in.orig ++++ Makefile.in +@@ -133,11 +133,11 @@ minigzip64.o: minigzip.c zlib.h zconf.h + + .c.lo: + -@mkdir objs 2>/dev/null || test -d objs +- $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $< ++ $(CC) $(SFLAGS) $(CFLAGS) -DPIC -c -o objs/$*.o $< + -@mv objs/$*.o $@ + + $(SHAREDLIBV): $(PIC_OBJS) +- $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) ++ $(LDSHARED) $(SFLAGS) $(CFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) + rm -f $(SHAREDLIB) $(SHAREDLIBM) + ln -s $@ $(SHAREDLIB) + ln -s $@ $(SHAREDLIBM) diff --git a/zlib-parallel.patch b/zlib-parallel.patch new file mode 100644 index 0000000..774a7c3 --- /dev/null +++ b/zlib-parallel.patch @@ -0,0 +1,13 @@ +Index: zlib-1.2.5/Makefile.in +=================================================================== +--- zlib-1.2.5.orig/Makefile.in ++++ zlib-1.2.5/Makefile.in +@@ -136,7 +136,7 @@ minigzip64.o: minigzip.c zlib.h zconf.h + $(CC) $(SFLAGS) $(CFLAGS) -DPIC -c -o objs/$*.o $< + -@mv objs/$*.o $@ + +-$(SHAREDLIBV): $(PIC_OBJS) ++$(SHAREDLIBV): $(PIC_OBJS) libz.a + $(LDSHARED) $(SFLAGS) $(CFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) + rm -f $(SHAREDLIB) $(SHAREDLIBM) + ln -s $@ $(SHAREDLIB) diff --git a/zlib.changes b/zlib.changes index 59eec00..df30a8e 100644 --- a/zlib.changes +++ b/zlib.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Dec 21 16:12:56 CET 2010 - meissner@suse.de + +- Add dependency to make it build in a parallel world. + +------------------------------------------------------------------- +Tue Dec 7 17:18:43 UTC 2010 - cristian.rodriguez@opensuse.org + +- use compiler profile information to make libz slightly faster. + ------------------------------------------------------------------- Tue Sep 21 21:48:23 UTC 2010 - dimstar@opensuse.org diff --git a/zlib.spec b/zlib.spec index 6f367f9..48733b0 100644 --- a/zlib.spec +++ b/zlib.spec @@ -38,6 +38,8 @@ Source2: baselibs.conf Patch0: zlib-1.2.2-format.patch # PATCH-FIX-UPSTREAM zlib-lfs.patch dimstar@opensuse.org -- Properly define large file support. Patch taken from gentoo Patch1: zlib-lfs.patch +# PATCH-FIX-JENGELH-PARALLEL-MAKE zlib-parallel.patch meissner@novell.com -- shared library links with libz.a +Patch2: zlib-parallel.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: pkgconfig @@ -80,14 +82,26 @@ libraries. %prep %setup -q %patch0 -%patch1 -p1 +%patch1 +%patch2 -p1 %build -CFLAGS="%{optflags}" ./configure --shared +%if %{do_profiling} +profiledir=$(mktemp -d) +trap "rm -rf $profiledir" EXIT +./configure --shared +%{__make} CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_generate}=$profiledir" %{?_smp_mflags} +time make check +make clean +%{__make} CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_feedback}=$profiledir" %{?_smp_mflags} +%else +export CFLAGS="%optflags" +./configure --shared %{__make} %{?_smp_mflags} +%endif %check -make test +time make check %install mkdir -p %{buildroot}{/%{_lib},%{_libdir}}