From 3f880708c6e4666ddf187035c60e907b74368603 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Aug 26 2010 13:08:20 +0000 Subject: Fixed rpath Signed-off-by: Peter Lemenkov --- diff --git a/chmlib-0001-Patch-to-fix-integer-types-problem-by-Goswin-von-Bre.patch b/chmlib-0001-Patch-to-fix-integer-types-problem-by-Goswin-von-Bre.patch new file mode 100644 index 0000000..6efc554 --- /dev/null +++ b/chmlib-0001-Patch-to-fix-integer-types-problem-by-Goswin-von-Bre.patch @@ -0,0 +1,72 @@ +From 11f50f16714a584c482b6f7b469fb7edd611f869 Mon Sep 17 00:00:00 2001 +From: Jed Wing +Date: Wed, 27 May 2009 18:25:42 -0700 +Subject: [PATCH 1/4] Patch to fix integer types problem by Goswin von Brederlow. + +This came from Goswin von Brederlow via +Kartik Mistry, the maintainer of the Debian package of chmlib. +--- + src/chm_lib.c | 30 +++++++++++++----------------- + 1 files changed, 13 insertions(+), 17 deletions(-) + +diff --git a/src/chm_lib.c b/src/chm_lib.c +index 6c6736c..ffd213c 100644 +--- a/src/chm_lib.c ++++ b/src/chm_lib.c +@@ -56,6 +56,7 @@ + + #include "lzx.h" + ++#include + #include + #include + #ifdef CHM_DEBUG +@@ -149,22 +150,9 @@ typedef unsigned __int32 UInt32; + typedef __int64 Int64; + typedef unsigned __int64 UInt64; + +-/* I386, 32-bit, non-Windows */ +-/* Sparc */ +-/* MIPS */ +-/* PPC */ +-#elif __i386__ || __sun || __sgi || __ppc__ +-typedef unsigned char UChar; +-typedef short Int16; +-typedef unsigned short UInt16; +-typedef long Int32; +-typedef unsigned long UInt32; +-typedef long long Int64; +-typedef unsigned long long UInt64; +- + /* x86-64 */ + /* Note that these may be appropriate for other 64-bit machines. */ +-#elif __x86_64__ || __ia64__ ++#elif defined(__LP64__) + typedef unsigned char UChar; + typedef short Int16; + typedef unsigned short UInt16; +@@ -173,10 +161,18 @@ typedef unsigned int UInt32; + typedef long Int64; + typedef unsigned long UInt64; + ++/* I386, 32-bit, non-Windows */ ++/* Sparc */ ++/* MIPS */ ++/* PPC */ + #else +- +-/* yielding an error is preferable to yielding incorrect behavior */ +-#error "Please define the sized types for your platform in chm_lib.c" ++typedef unsigned char UChar; ++typedef short Int16; ++typedef unsigned short UInt16; ++typedef long Int32; ++typedef unsigned long UInt32; ++typedef long long Int64; ++typedef unsigned long long UInt64; + #endif + + /* GCC */ +-- +1.7.2.1 + diff --git a/chmlib-0003-Fix-for-extract_chmLib-confusing-empty-files-with-di.patch b/chmlib-0003-Fix-for-extract_chmLib-confusing-empty-files-with-di.patch new file mode 100644 index 0000000..3bc4466 --- /dev/null +++ b/chmlib-0003-Fix-for-extract_chmLib-confusing-empty-files-with-di.patch @@ -0,0 +1,39 @@ +From 9b479b4f3bbb08e8ab340d6ad626f3549b51d929 Mon Sep 17 00:00:00 2001 +From: Jed Wing +Date: Wed, 27 May 2009 18:41:10 -0700 +Subject: [PATCH 3/4] Fix for extract_chmLib confusing empty files with directories. + +Patch from Paul Wise via Kartik Mistry, the maintainer of the +Debian chmlib package. +--- + src/extract_chmLib.c | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/src/extract_chmLib.c b/src/extract_chmLib.c +index 078cc35..478c892 100644 +--- a/src/extract_chmLib.c ++++ b/src/extract_chmLib.c +@@ -102,6 +102,7 @@ int _extract_callback(struct chmFile *h, + struct chmUnitInfo *ui, + void *context) + { ++ LONGUINT64 ui_path_len; + char buffer[32768]; + struct extract_context *ctx = (struct extract_context *)context; + char *i; +@@ -119,7 +120,11 @@ int _extract_callback(struct chmFile *h, + if (snprintf(buffer, sizeof(buffer), "%s%s", ctx->base_path, ui->path) > 1024) + return CHM_ENUMERATOR_FAILURE; + +- if (ui->length != 0) ++ /* Get the length of the path */ ++ ui_path_len = strlen(ui->path)-1; ++ ++ /* Distinguish between files and dirs */ ++ if (ui->path[ui_path_len] != '/' ) + { + FILE *fout; + LONGINT64 len, remain=ui->length; +-- +1.7.2.1 + diff --git a/chmlib-chm_lib-fix_for_multiarch.diff b/chmlib-chm_lib-fix_for_multiarch.diff deleted file mode 100644 index 1cd4186..0000000 --- a/chmlib-chm_lib-fix_for_multiarch.diff +++ /dev/null @@ -1,46 +0,0 @@ ---- src/chm_lib.c 2007-08-05 09:03:27.000000000 +0400 -+++ src/chm_lib.c 2007-08-05 09:07:04.000000000 +0400 -@@ -148,35 +148,15 @@ - typedef unsigned __int32 UInt32; - typedef __int64 Int64; - typedef unsigned __int64 UInt64; -- --/* I386, 32-bit, non-Windows */ --/* Sparc */ --/* MIPS */ --/* PPC */ --#elif __i386__ || __sun || __sgi || __ppc__ --typedef unsigned char UChar; --typedef short Int16; --typedef unsigned short UInt16; --typedef long Int32; --typedef unsigned long UInt32; --typedef long long Int64; --typedef unsigned long long UInt64; -- --/* x86-64 */ --/* Note that these may be appropriate for other 64-bit machines. */ --#elif __x86_64__ || __ia64__ --typedef unsigned char UChar; --typedef short Int16; --typedef unsigned short UInt16; --typedef int Int32; --typedef unsigned int UInt32; --typedef long Int64; --typedef unsigned long UInt64; -- - #else -- --/* yielding an error is preferable to yielding incorrect behavior */ --#error "Please define the sized types for your platform in chm_lib.c" -+#include -+typedef uint8_t UChar; -+typedef int16_t Int16; -+typedef uint16_t UInt16; -+typedef int32_t Int32; -+typedef uint32_t UInt32; -+typedef int64_t Int64; -+typedef uint64_t UInt64; - #endif - - /* GCC */ diff --git a/chmlib.spec b/chmlib.spec index 7baa1f7..42b17ec 100644 --- a/chmlib.spec +++ b/chmlib.spec @@ -1,12 +1,13 @@ Name: chmlib Summary: Library for dealing with ITSS/CHM format files Version: 0.40 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ Group: Development/Libraries Url: http://www.jedrea.com/chmlib/ -Source: http://www.jedrea.com/chmlib/%{name}-%{version}.tar.bz2 -Patch0: chmlib-chm_lib-fix_for_multiarch.diff +Source0: http://www.jedrea.com/chmlib/%{name}-%{version}.tar.bz2 +Patch1: chmlib-0001-Patch-to-fix-integer-types-problem-by-Goswin-von-Bre.patch +Patch3: chmlib-0003-Fix-for-extract_chmLib-confusing-empty-files-with-di.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description @@ -26,23 +27,26 @@ Files needed for developing apps using chmlib. %prep %setup -q -%patch0 -p0 +%patch1 -p1 -b .types +%patch3 -p1 -b .files_dirs %build %configure --enable-examples --disable-static -%{__make} %{?_smp_mflags} +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +make %{?_smp_mflags} %install -%{__rm} -rf %{buildroot} -%{__make} DESTDIR=%{buildroot} install -%{__rm} -f %{buildroot}/%{_libdir}/*.la +rm -rf %{buildroot} +make DESTDIR=%{buildroot} install +rm -f %{buildroot}/%{_libdir}/*.la %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean -%{__rm} -rf %{buildroot} +rm -rf %{buildroot} %files %defattr(-,root,root,-) @@ -60,57 +64,61 @@ Files needed for developing apps using chmlib. %{_libdir}/libchm.so %changelog +* Thu Aug 26 2010 Peter Lemenkov - 0.40-3 +- Removed rpath (see rhbz #569128) +- Patches rebased + * Fri Jul 24 2009 Fedora Release Engineering - 0.40-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild -* Thu May 28 2009 Peter Lemenkov 0.40-1 +* Thu May 28 2009 Peter Lemenkov - 0.40-1 - Ver. 0.40 * Mon Feb 23 2009 Fedora Release Engineering - 0.39-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild -* Sat Mar 29 2008 Peter Lemenkov 0.39-7 +* Sat Mar 29 2008 Peter Lemenkov - 0.39-7 - Enable utilities (close BZ#437151) -* Sat Feb 9 2008 Peter Lemenkov 0.39-6 +* Sat Feb 9 2008 Peter Lemenkov - 0.39-6 - Rebuild for GCC 4.3 -* Sun Sep 30 2007 Peter Lemenkov 0.39-5 +* Sun Sep 30 2007 Peter Lemenkov - 0.39-5 - Changel license tag from LGPL to LGPLv2+ -* Sun Aug 5 2007 Peter Lemenkov 0.39-4 +* Sun Aug 5 2007 Peter Lemenkov - 0.39-4 - Better fix for multi-arch issues -* Sat Aug 4 2007 Peter Lemenkov 0.39-3 +* Sat Aug 4 2007 Peter Lemenkov - 0.39-3 - Upstream URL changed -* Thu Aug 02 2007 Oliver Falk 0.39-2 +* Thu Aug 02 2007 Oliver Falk - 0.39-2 - Add alpha fix -* Thu Feb 1 2007 Peter Lemenkov 0.39-1 +* Thu Feb 1 2007 Peter Lemenkov - 0.39-1 - Ver. 0.39 -* Tue Sep 12 2006 Peter Lemenkov 0.38-2%{?dist} +* Tue Sep 12 2006 Peter Lemenkov - 0.38-2 - rebuild for FC6 -* Wed Jun 28 2006 Peter Lemenkov 0.38-1%{?dist} +* Wed Jun 28 2006 Peter Lemenkov - 0.38-1 - Version 0.38 -* Thu Mar 30 2006 Peter Lemenkov 0.37.4-6%{?dist} +* Thu Mar 30 2006 Peter Lemenkov - 0.37.4-6 - rebuild -* Mon Mar 27 2006 Peter Lemenkov 0.37.4-5%{?dist} +* Mon Mar 27 2006 Peter Lemenkov - 0.37.4-5 - rebuild -* Tue Jan 10 2006 Peter Lemenkov 0.37.4-4%{?dist} -- Next try to fix powerpc-arch +* Tue Jan 10 2006 Peter Lemenkov - 0.37.4-4 +- Next try to fix powerpc-arch -* Mon Jan 09 2006 Peter Lemenkov 0.37.4-3%{?dist} +* Mon Jan 09 2006 Peter Lemenkov - 0.37.4-3 - Typo fix -* Mon Jan 09 2006 Peter Lemenkov 0.37.4-2%{?dist} +* Mon Jan 09 2006 Peter Lemenkov - 0.37.4-2 - Fix for PPC-arch -* Sat Nov 12 2005 Peter Lemenkov 0.37.4-1 +* Sat Nov 12 2005 Peter Lemenkov - 0.37.4-1 - Initial build for FC-Extras