From 30191b4e0621674a20646d86d0223c32d694587a Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 25 Jul 2006 20:02:26 +0000 Subject: [PATCH] - Taking over as maintainer since Anvil has other priorities - Add a patch to fix asm detection on i386 (bug 145882, 145893). Thanks to Carlo Marcelo Arenas Belon for the initial patch. - Removed unused build dependency on nasm - Remove static lib - Cleanup %doc a bit --- lzo-1.08-asm.patch | 80 ++++++++++++++++++++++++++++++++++++++ lzo-1.08-noexecstack.patch | 11 ++++++ lzo.spec | 70 +++++++++++++++++++++------------ 3 files changed, 137 insertions(+), 24 deletions(-) create mode 100644 lzo-1.08-asm.patch create mode 100644 lzo-1.08-noexecstack.patch diff --git a/lzo-1.08-asm.patch b/lzo-1.08-asm.patch new file mode 100644 index 0000000..7a4bbbf --- /dev/null +++ b/lzo-1.08-asm.patch @@ -0,0 +1,80 @@ +--- lzo-1.08/configure.asm 2006-07-24 16:26:28.000000000 +0200 ++++ lzo-1.08/configure 2006-07-24 16:54:29.000000000 +0200 +@@ -12177,13 +12177,13 @@ + #include + int test() { + #if defined(__GNUC__) +- __asm__ __volatile__ (" +- .align 4 +-mfx_a1: +- .byte 0 +- .align 4 +-mfx_a2: +- "); ++ __asm__ __volatile__ ( ++ ".align 4\n" ++"mfx_a1:\n" ++ ".byte 0\n" ++ ".align 4\n" ++"mfx_a2:\n" ++ ); + #endif + return 0; + } +@@ -12253,11 +12253,11 @@ + #endif + int mfx_asm_func(); + static void test() { +- __asm__ __volatile__(" +- .globl mfx_asm_func +- mfx_asm_func: +- .byte 0 +- "); ++ __asm__ __volatile__( ++ ".globl mfx_asm_func\n" ++ "mfx_asm_func:\n" ++ ".byte 0\n" ++ ); + } + + #ifdef F77_DUMMY_MAIN +--- lzo-1.08/configure.in.asm 2006-07-24 16:26:15.000000000 +0200 ++++ lzo-1.08/configure.in 2006-07-24 16:26:22.000000000 +0200 +@@ -319,13 +319,13 @@ + [AC_TRY_RUN([#include + int test() { + #if defined(__GNUC__) +- __asm__ __volatile__ (" +- .align 4 +-mfx_a1: +- .byte 0 +- .align 4 +-mfx_a2: +- "); ++ __asm__ __volatile__ ( ++ ".align 4\n" ++"mfx_a1:\n" ++ ".byte 0\n" ++ ".align 4\n" ++"mfx_a2:\n" ++ ); + #endif + return 0; + } +@@ -363,11 +363,11 @@ + #endif + int mfx_asm_func(); + static void test() { +- __asm__ __volatile__(" +- .globl mfx_asm_func +- mfx_asm_func: +- .byte 0 +- "); ++ __asm__ __volatile__( ++ ".globl mfx_asm_func\n" ++ "mfx_asm_func:\n" ++ ".byte 0\n" ++ ); + } + ], [ + return mfx_asm_func(); diff --git a/lzo-1.08-noexecstack.patch b/lzo-1.08-noexecstack.patch new file mode 100644 index 0000000..db1d195 --- /dev/null +++ b/lzo-1.08-noexecstack.patch @@ -0,0 +1,11 @@ +--- lzo-1.08/src/i386/src/leave.sh~ 2006-07-24 17:47:49.000000000 +0200 ++++ lzo-1.08/src/i386/src/leave.sh 2006-07-24 17:47:49.000000000 +0200 +@@ -94,6 +94,8 @@ + .L_end: + + ++.section .note.GNU-stack,"",@progbits ++ + /* + vi:ts=4 + */ diff --git a/lzo.spec b/lzo.spec index a7830fe..32b9af7 100644 --- a/lzo.spec +++ b/lzo.spec @@ -1,20 +1,15 @@ -Summary: Data compression library with very fast (de)compression -Name: lzo -Version: 1.08 -Release: 6%{?dist} - -License: GPL -Group: System Environment/Libraries -URL: http://www.oberhumer.com/opensource/lzo/ -Source0: http://www.oberhumer.com/opensource/lzo/download/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot -BuildRequires: nasm zlib-devel - -%package devel -Summary: Development files for the lzo library -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: zlib-devel +Summary: Data compression library with very fast (de)compression +Name: lzo +Version: 1.08 +Release: 7%{?dist} +License: GPL +Group: System Environment/Libraries +URL: http://www.oberhumer.com/opensource/lzo/ +Source0: http://www.oberhumer.com/opensource/lzo/download/%{name}-%{version}.tar.gz +Patch0: lzo-1.08-asm.patch +Patch1: lzo-1.08-noexecstack.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +BuildRequires: zlib-devel %description LZO is a portable lossless data compression library written in ANSI C. @@ -23,42 +18,69 @@ Decompression requires no memory. In addition there are slower compression levels achieving a quite competitive compression ratio while still decompressing at this very high speed. + +%package devel +Summary: Development files for the lzo library +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: zlib-devel + %description devel LZO is a portable lossless data compression library written in ANSI C. It offers pretty fast compression and very fast decompression. This package contains development files needed for lzo. + %prep %setup -q +%patch0 -p1 -z .asm +%patch1 -p1 -z .execstack + %build -%configure --enable-shared +%configure --disable-dependency-tracking --disable-static --enable-shared make %{?_smp_mflags} + + +%check || : make check test + %install -rm -rf %{buildroot} -%makeinstall +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +rm $RPM_BUILD_ROOT%{_libdir}/liblzo.la + %clean -rm -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig + %files %defattr(-,root,root,-) -%doc AUTHORS README COPYING ChangeLog THANKS NEWS +%doc AUTHORS COPYING THANKS NEWS %{_libdir}/liblzo.so.* %files devel %defattr(-,root,root,-) -%exclude %{_libdir}/liblzo.la +%doc doc/LZOAPI.TXT doc/LZO.FAQ doc/LZO.TXT %{_includedir}/lzo*.h %{_libdir}/liblzo.so -%{_libdir}/liblzo.a + %changelog +* Mon Jul 24 2006 Hans de Goede 1.08-7 +- Taking over as maintainer since Anvil has other priorities +- Add a patch to fix asm detection on i386 (bug 145882, 145893). Thanks to + Carlo Marcelo Arenas Belon for the initial patch. +- Removed unused build dependency on nasm +- Remove static lib +- Cleanup %%doc a bit + * Thu Mar 16 2006 Dams - 1.08-6.fc5 - Rebuild for new gcc