diff options
author | Remi Collet <fedora@famillecollet.com> | 2011-07-04 17:45:54 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2011-07-04 17:45:54 +0200 |
commit | 5bb48dbd2b5181860ba4efd4645e089f2ae5ec19 (patch) | |
tree | d00ca3220ed1fd221ef0c38b5a581c9abca534d0 | |
parent | 5b8bb01d13655ad70324f1a29600142c2790d1a0 (diff) |
libzip, try to merge php changes
-rw-r--r-- | libzip-php.patch | 68 | ||||
-rw-r--r-- | libzip.spec | 7 |
2 files changed, 74 insertions, 1 deletions
diff --git a/libzip-php.patch b/libzip-php.patch new file mode 100644 index 0000000..ca9cf7c --- /dev/null +++ b/libzip-php.patch @@ -0,0 +1,68 @@ +diff -ru libzip-0.10.orig/lib/zip_fclose.c libzip-0.10/lib/zip_fclose.c +--- libzip-0.10.orig/lib/zip_fclose.c 2010-03-08 13:27:48.000000000 +0100 ++++ libzip-0.10/lib/zip_fclose.c 2011-07-03 11:07:22.000000000 +0200 +@@ -47,7 +47,7 @@ + if (zf->src) + zip_source_free(zf->src); + +- for (i=0; i<zf->za->nfile; i++) { ++ if (zf->za) for (i=0; i<zf->za->nfile; i++) { + if (zf->za->file[i] == zf) { + zf->za->file[i] = zf->za->file[zf->za->nfile-1]; + zf->za->nfile--; +Seulement dans libzip-0.10/lib: zip_fclose.c~ +diff -ru libzip-0.10.orig/lib/zip.h libzip-0.10/lib/zip.h +--- libzip-0.10.orig/lib/zip.h 2011-03-04 18:17:43.000000000 +0100 ++++ libzip-0.10/lib/zip.h 2011-07-03 11:38:39.000000000 +0200 +@@ -59,6 +59,7 @@ + #define ZIP_CREATE 1 + #define ZIP_EXCL 2 + #define ZIP_CHECKCONS 4 ++#define ZIP_OVERWRITE 8 + + + /* flags for zip_name_locate, zip_fopen, zip_stat, ... */ +Seulement dans libzip-0.10/lib: zip.h~ +diff -ru libzip-0.10.orig/lib/zip_name_locate.c libzip-0.10/lib/zip_name_locate.c +--- libzip-0.10.orig/lib/zip_name_locate.c 2011-02-13 16:06:21.000000000 +0100 ++++ libzip-0.10/lib/zip_name_locate.c 2011-07-03 14:24:44.000000000 +0200 +@@ -91,6 +91,7 @@ + return i; + } + +- _zip_error_set(error, ZIP_ER_NOENT, 0); ++/* Look for an entry should not raise an error */ ++/* _zip_error_set(error, ZIP_ER_NOENT, 0);*/ + return -1; + } +Seulement dans libzip-0.10/lib: zip_name_locate.c~ +diff -ru libzip-0.10.orig/lib/zip_open.c libzip-0.10/lib/zip_open.c +--- libzip-0.10.orig/lib/zip_open.c 2011-03-16 12:18:44.000000000 +0100 ++++ libzip-0.10/lib/zip_open.c 2011-07-03 11:19:41.000000000 +0200 +@@ -62,9 +62,15 @@ + { + FILE *fp; + ++ if (flags & ZIP_OVERWRITE) { ++ return _zip_allocate_new(fn, zep); ++ } ++ + switch (_zip_file_exists(fn, flags, zep)) { + case -1: +- return NULL; ++ if (!(flags & ZIP_OVERWRITE)) { ++ return NULL; ++ } + case 0: + return _zip_allocate_new(fn, zep); + default: +@@ -482,7 +488,7 @@ + } + + if (stat(fn, &st) != 0) { +- if (flags & ZIP_CREATE) ++ if (flags & ZIP_CREATE || flags & ZIP_OVERWRITE) + return 0; + else { + set_error(zep, NULL, ZIP_ER_OPEN); +Seulement dans libzip-0.10/lib: zip_open.c~ diff --git a/libzip.spec b/libzip.spec index a7c55b8..2d5d9f7 100644 --- a/libzip.spec +++ b/libzip.spec @@ -10,6 +10,9 @@ Group: Applications/File License: BSD URL: http://www.nih.at/libzip/index.html Source0: http://www.nih.at/libzip/libzip-%{version}.tar.bz2 + +Patch0: libzip-php.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: automake libtool @@ -44,6 +47,8 @@ The %{name}-tools package contains tools that use %{name}. %prep %setup -q -n libzip-%{version} +%patch0 -p1 -b .forphp + # Avoid lib64 rpaths (FIXME: recheck this on newer releases) #if "%{_libdir}" != "/usr/lib" #sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure @@ -97,7 +102,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 20 2011 Remi Collet <Fedora@FamilleCollet.com> 0.10-1 - update to 0.10 -- rename to libzip2 and split tools in sub package +- rename to libzip2 and split libs in sub package * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |