- add cflags (#199379)

This commit is contained in:
Ivana Varekova 2006-07-19 08:34:35 +00:00
parent 8952550bf3
commit f00f7e8db1
2 changed files with 26 additions and 1 deletions

20
zlib-1.2.3-cflags.patch Normal file
View File

@ -0,0 +1,20 @@
--- zlib-1.2.3/configure.cflags 2005-07-11 22:11:57.000000000 +0200
+++ zlib-1.2.3/configure 2006-07-19 09:47:58.000000000 +0200
@@ -76,7 +76,7 @@
SFLAGS=${CFLAGS-"-fPIC -O3"}
CFLAGS="$cflags"
case `(uname -s || echo unknown) 2>/dev/null` in
- Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
+ Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc $CFLAGS -shared -Wl,-soname,libz.so.1"};;
CYGWIN* | Cygwin* | cygwin* | OS/2* )
EXE='.exe';;
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
@@ -97,7 +97,7 @@
SHAREDLIBV=libz.$VER$shared_ext
SHAREDLIBM=libz.$VER1$shared_ext
LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};;
- *) LDSHARED=${LDSHARED-"$cc -shared"};;
+ *) LDSHARED=${LDSHARED-"$cc $CFLAGS -shared"};;
esac
else
# find system name and corresponding cc options

View File

@ -1,10 +1,11 @@
Summary: The zlib compression and decompression library.
Name: zlib
Version: 1.2.3
Release: 2
Release: 3
Group: System Environment/Libraries
Source: ftp://ftp.info-zip.org/pub/infozip/zlib/zlib-%{version}.tar.gz
Patch0: zlib-1.1.4-make-test.patch
Patch1: zlib-1.2.3-cflags.patch
URL: http://www.gzip.org/zlib/
License: BSD
Prefix: %{_prefix}
@ -27,6 +28,7 @@ library.
%prep
%setup -q
%patch0 -p1 -b .make-test
%patch1 -p1 -b .cflags
%build
CFLAGS="$RPM_OPT_FLAGS -fPIC" ./configure --shared --prefix=%{_prefix}
@ -77,6 +79,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man3/zlib.3*
%changelog
* Wed Jul 19 2006 Ivana Varekova <varekova@redhat.com> 1.2.3-3
- add cflags (#199379)
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.2.3-2
- rebuild