Update to 0.13.59.

This commit is contained in:
Matthias Saou 2010-12-04 16:41:22 +01:00
parent 368ff59d6c
commit 1c50ad0b0b
6 changed files with 66 additions and 96 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
zziplib-0.13.49.tar.bz2
/zziplib-0.13.59.tar.bz2

View File

@ -1 +1 @@
5f7b88ebb2bcd7e8044328482d079661 zziplib-0.13.49.tar.bz2
14b5a6fc229afe9916d48358479568d3 zziplib-0.13.59.tar.bz2

View File

@ -1,39 +0,0 @@
diff -Naupr zziplib-0.13.49.orig/zzip/_config.h zziplib-0.13.49/zzip/_config.h
--- zziplib-0.13.49.orig/zzip/_config.h 2007-03-18 12:59:51.000000000 +0100
+++ zziplib-0.13.49/zzip/_config.h 2008-12-22 10:02:32.351372027 +0100
@@ -130,9 +130,11 @@
/* whether the system defaults to 32bit off_t but can do 64bit when requested
*/
+#if __WORDSIZE == 32
#ifndef ZZIP_LARGEFILE_SENSITIVE
#define ZZIP_LARGEFILE_SENSITIVE 1
#endif
+#endif
/* Name of package */
#ifndef ZZIP_PACKAGE
@@ -171,7 +173,11 @@
/* The number of bytes in type long */
#ifndef ZZIP_SIZEOF_LONG
+#if __WORDSIZE == 32
#define ZZIP_SIZEOF_LONG 4
+#elif __WORDSIZE == 64
+#define ZZIP_SIZEOF_LONG 8
+#endif
#endif
/* The number of bytes in type short */
@@ -194,9 +200,11 @@
/* #undef WORDS_BIGENDIAN */
/* Number of bits in a file offset, on hosts where this is settable. */
+#if __WORDSIZE == 32
#ifndef ZZIP__FILE_OFFSET_BITS
#define ZZIP__FILE_OFFSET_BITS 64
#endif
+#endif
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */

View File

@ -1,45 +0,0 @@
diff -Naupr zziplib-0.13.49.orig/zzip/file.c zziplib-0.13.49/zzip/file.c
--- zziplib-0.13.49.orig/zzip/file.c 2007-03-18 16:20:12.000000000 +0100
+++ zziplib-0.13.49/zzip/file.c 2007-08-23 11:17:34.000000000 +0200
@@ -713,7 +713,7 @@ zzip_open_shared_io (ZZIP_FILE* stream,
{
zzip_plugin_io_t os = (o_modes & ZZIP_ALLOWREAL)
? zzip_get_default_io () : io;
- int fd = os->fd.open(filename, o_flags); /* io->fd.open */
+ int fd = (os->fd.open)(filename, o_flags); /* io->fd.open */
if (fd != -1)
{
ZZIP_FILE* fp = calloc (1, sizeof(ZZIP_FILE));
diff -Naupr zziplib-0.13.49.orig/zzip/write.c zziplib-0.13.49/zzip/write.c
--- zziplib-0.13.49.orig/zzip/write.c 2007-03-18 16:22:11.000000000 +0100
+++ zziplib-0.13.49/zzip/write.c 2007-08-23 11:17:46.000000000 +0200
@@ -163,7 +163,7 @@ zzip_dir_creat_ext_io(zzip_char_t* name,
if (! (exx_len = strlen (*exx)) || exx_len >= MAX_EXT_LEN) break;
memcpy (dir->realname+name_len, exx, exx_len); /* append! */
}____;
- fd = io->fd.open (dir->realname, O_CREAT|O_TRUNC|O_WRONLY, o_mode);
+ fd = (io->fd.open)(dir->realname, O_CREAT|O_TRUNC|O_WRONLY, o_mode);
dir->realname[name_len] = '\0'; /* keep ummodified */
if (fd != -1) { dir->fd = fd; return dir; }
error:
diff -Naupr zziplib-0.13.49.orig/zzip/zip.c zziplib-0.13.49/zzip/zip.c
--- zziplib-0.13.49.orig/zzip/zip.c 2007-03-18 16:27:49.000000000 +0100
+++ zziplib-0.13.49/zzip/zip.c 2007-08-23 11:17:22.000000000 +0200
@@ -688,7 +688,7 @@ __zzip_try_open(zzip_char_t* filename, i
for ( ; *ext ; ++ext)
{
strcpy (file+len, *ext);
- fd = io->fd.open(file, filemode);
+ fd = (io->fd.open)(file, filemode);
if (fd != -1) return fd;
}
return -1;
@@ -718,7 +718,7 @@ zzip_dir_open_ext_io(zzip_char_t* filena
if (! io) io = zzip_get_default_io();
if (! ext) ext = zzip_get_default_ext();
- fd = io->fd.open(filename, O_RDONLY|O_BINARY);
+ fd = (io->fd.open)(filename, O_RDONLY|O_BINARY);
if (fd != -1) {
return zzip_dir_fdopen_ext_io(fd, e, ext, io);
} else

View File

@ -0,0 +1,41 @@
diff -Naupr zziplib-0.13.59.orig/zzip/_config.h zziplib-0.13.59/zzip/_config.h
--- zziplib-0.13.59.orig/zzip/_config.h 2010-02-14 22:29:34.000000000 +0100
+++ zziplib-0.13.59/zzip/_config.h 2010-12-04 16:22:19.809534085 +0100
@@ -133,7 +133,10 @@
/* whether the system defaults to 32bit off_t but can do 64bit when requested
*/
-/* #undef LARGEFILE_SENSITIVE */
+#if __WORDSIZE == 32
+#ifndef ZZIP_LARGEFILE_SENSITIVE
+#define ZZIP_LARGEFILE_SENSITIVE 1
+#endif
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
@@ -178,8 +181,12 @@
/* The number of bytes in type long */
#ifndef ZZIP_SIZEOF_LONG
+#if __WORDSIZE == 32
+#define ZZIP_SIZEOF_LONG 4
+#elif __WORDSIZE == 64
#define ZZIP_SIZEOF_LONG 8
#endif
+#endif
/* The number of bytes in type short */
#ifndef ZZIP_SIZEOF_SHORT
@@ -209,7 +216,11 @@
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef _FILE_OFFSET_BITS */
+#if __WORDSIZE == 32
+#ifndef ZZIP__FILE_OFFSET_BITS
+#define ZZIP__FILE_OFFSET_BITS 64
+#endif
+#endif
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */

View File

@ -1,16 +1,22 @@
Summary: Lightweight library to easily extract data from zip files
Name: zziplib
Version: 0.13.49
Release: 8%{?dist}
Version: 0.13.59
Release: 1%{?dist}
License: LGPLv2+ or MPLv1.1
Group: Applications/Archiving
URL: http://zziplib.sourceforge.net/
Source: http://dl.sf.net/zziplib/zziplib-%{version}.tar.bz2
Patch0: zziplib-0.13.49-open.patch
Patch1: zziplib-0.13.49-multilib.patch
Patch0: zziplib-0.13.59-multilib.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: zlib-devel, zip, python, SDL-devel, xmlto, pkgconfig
BuildRequires: autoconf, automake
BuildRequires: perl
BuildRequires: python
BuildRequires: zip
BuildRequires: xmlto
BuildRequires: zlib-devel
BuildRequires: SDL-devel
BuildRequires: pkgconfig
#BuildRequires: autoconf
#BuildRequires: automake
%description
The zziplib library is intentionally lightweight, it offers the ability to
@ -38,7 +44,10 @@ This packages contains all the utilities that come with the zziplib library.
%package devel
Summary: Development files for the zziplib library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}, pkgconfig, zlib-devel, SDL-devel
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Requires: zlib-devel
Requires: SDL-devel
%description devel
The zziplib library is intentionally lightweight, it offers the ability to
@ -54,7 +63,6 @@ zziplib library.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# Save the common patched _config.h file to overwrite the generated one
%{__cp} -a zzip/_config.h _config.h
@ -67,8 +75,7 @@ zziplib library.
# Remove rpath on 64bit archs
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
# Disable _smp_mflags because docs fail to build (as of 0.13.49)
%{__make}
%{__make} %{?_smp_mflags}
%install
@ -105,11 +112,16 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' */libtool
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/aclocal/*.m4
%{_datadir}/zziplib/
%{_mandir}/man3/*
%changelog
* Sat Dec 4 2010 Matthias Saou <http://freshrpms.net/> 0.13.59-1
- Update to 0.13.59.
- Remove no longer needed 'open' patch.
- Rebase the multilib patch, still required.
- Re-enable _smp_mflags, build works again with it apparently.
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.49-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild