diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | package.xml | 687 | ||||
| -rw-r--r-- | php-pecl-zip.spec | 240 | ||||
| -rw-r--r-- | zip-systemlibzip.patch | 233 | 
4 files changed, 287 insertions, 875 deletions
@@ -1,4 +1,4 @@  SRCDIR := $(shell pwd)  NAME := $(shell basename $(SRCDIR)) -include ../common/Makefile +include ../../../common/Makefile diff --git a/package.xml b/package.xml deleted file mode 100644 index 53523ef..0000000 --- a/package.xml +++ /dev/null @@ -1,687 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<package packagerversion="1.8.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> - <name>zip</name> - <channel>pecl.php.net</channel> - <summary>A zip management extension</summary> - <description>Zip is an extension to create, modify and read zip files.</description> - <lead> -  <name>Pierre-Alain Joye</name> -  <user>pajoye</user> -  <email>pajoye@php.net</email> -  <active>yes</active> - </lead> - <date>2009-08-11</date> - <time>19:25:04</time> - <version> -  <release>1.10.2</release> -  <api>2.0.0</api> - </version> - <stability> -  <release>stable</release> -  <api>stable</api> - </stability> - <license uri="http://www.php.net/license">PHP License</license> - <notes> -- #49072, feof never returns true for damaged file in zip  -- Fix possible crash when zip stream are used, the file entry stream was desroyed after the archive. - </notes> - <contents> -  <dir name="/"> -   <file md5sum="7eb164bbee4235d5568200be1a639281" name="lib/zip.h" role="src" /> -   <file md5sum="da9d568f8bc141026277058a78b49a01" name="lib/zipint.h" role="src" /> -   <file md5sum="0f880193fb8317116f447c70c93ff129" name="lib/zip_add.c" role="src" /> -   <file md5sum="a6f6ae38cbf659aa96555874c5348a6c" name="lib/zip_close.c" role="src" /> -   <file md5sum="2745d8e4e5ffc0e2a8279f4394ce3ca7" name="lib/zip_delete.c" role="src" /> -   <file md5sum="edf1c727a674b15167d1ce70d50a79e6" name="lib/zip_dirent.c" role="src" /> -   <file md5sum="557596a89bab62088c32db3d9ba658b3" name="lib/zip_entry_free.c" role="src" /> -   <file md5sum="c044d98ed338224cbaf95fa98abd4668" name="lib/zip_entry_new.c" role="src" /> -   <file md5sum="d2f37a79234c9b5f66f74b07008eee8b" name="lib/zip_error.c" role="src" /> -   <file md5sum="8c19e4bea3c31af3cacc389083694820" name="lib/zip_error_get.c" role="src" /> -   <file md5sum="d56ba2f1693e6a6dbe4cf92e90d2273c" name="lib/zip_error_get_sys_type.c" role="src" /> -   <file md5sum="537e3423f4eb19e094a956193e902bb0" name="lib/zip_error_strerror.c" role="src" /> -   <file md5sum="f8c56d45c5896920abf6e01e2a30837c" name="lib/zip_error_to_str.c" role="src" /> -   <file md5sum="1f4281d531cb86b62ac29d4d5f5e3c8f" name="lib/zip_err_str.c" role="src" /> -   <file md5sum="4ccfdcb5e3329669e6c4eec6ef782592" name="lib/zip_fclose.c" role="src" /> -   <file md5sum="d755ccb5228b9655f412e361bb871043" name="lib/zip_file_error_get.c" role="src" /> -   <file md5sum="dd752864a240f066c37b76bb6c8d441e" name="lib/zip_file_get_offset.c" role="src" /> -   <file md5sum="9f57e7897afeec38405c6561328c0167" name="lib/zip_file_strerror.c" role="src" /> -   <file md5sum="fd3cbbc1b92576d9a517ffb0384d3cf8" name="lib/zip_fopen.c" role="src" /> -   <file md5sum="bbda445dd6e34eb9d6ee6ad98a77007e" name="lib/zip_fopen_index.c" role="src" /> -   <file md5sum="1fa5d7f858a8d28e7c15e785c419a323" name="lib/zip_filerange_crc.c" role="src" /> -   <file md5sum="043f2baa853191c3c5657f76737488f3" name="lib/zip_fread.c" role="src" /> -   <file md5sum="a65e2f48fd4852691acf342f152f46cb" name="lib/zip_free.c" role="src" /> -   <file md5sum="ba556fc5353423a34d5b91326ca318db" name="lib/zip_get_archive_comment.c" role="src" /> -   <file md5sum="8ab1bb09322fd5e8ec9232305cc0581f" name="lib/zip_get_archive_flag.c" role="src" /> -   <file md5sum="835ce4e1032539b45fc5896d11714b15" name="lib/zip_get_file_comment.c" role="src" /> -   <file md5sum="38f819b76efb742962582800aba097c5" name="lib/zip_get_name.c" role="src" /> -   <file md5sum="8332c0e239e92b65cc6ceea17a6ffee2" name="lib/zip_get_num_files.c" role="src" /> -   <file md5sum="9d5ef9d9e9b407ce3ec3cbd49b41a671" name="lib/zip_memdup.c" role="src" /> -   <file md5sum="241e2db462f04416027e86a339ed3468" name="lib/zip_name_locate.c" role="src" /> -   <file md5sum="66ace642d1776149ef56bc2bc28f944c" name="lib/zip_new.c" role="src" /> -   <file md5sum="c4aef7ffead99eda2c7225d20c24d85a" name="lib/zip_open.c" role="src" /> -   <file md5sum="7d5145dbd57b2bf7e7d7cc083283a4c0" name="lib/zip_rename.c" role="src" /> -   <file md5sum="02161292a7d3bca5e35df6eec0ca83b1" name="lib/zip_replace.c" role="src" /> -   <file md5sum="4231739a9b8f2a04751eeb14e4a717c8" name="lib/zip_set_archive_flag.c" role="src" /> -   <file md5sum="902d98deec23609ba0e2899d1d4fbe5d" name="lib/zip_set_archive_comment.c" role="src" /> -   <file md5sum="98722d807cb2d7fe29e14fa5998ae401" name="lib/zip_set_file_comment.c" role="src" /> -   <file md5sum="51092cc8f8702ca28cb7fd657099b11d" name="lib/zip_set_name.c" role="src" /> -   <file md5sum="778039f261d0674cf4ad86554816c59c" name="lib/zip_source_buffer.c" role="src" /> -   <file md5sum="358f46f42af6a4e386829a0fbffa6fc4" name="lib/zip_source_file.c" role="src" /> -   <file md5sum="76dc7ffcb5f0454e39c0feff9ec41e73" name="lib/zip_source_filep.c" role="src" /> -   <file md5sum="13f9e31f4226e5e84b033578a6c1c286" name="lib/zip_source_free.c" role="src" /> -   <file md5sum="1c34d73bb861712e6fb1305a17bf4d9e" name="lib/zip_source_function.c" role="src" /> -   <file md5sum="42ab468978842d3aaca636e82c048aa6" name="lib/zip_source_zip.c" role="src" /> -   <file md5sum="5ba1509c24ad622a7320674f48b45fda" name="lib/zip_stat.c" role="src" /> -   <file md5sum="839ddb0bfed447cf22a314fc29a086ee" name="lib/zip_stat_index.c" role="src" /> -   <file md5sum="0c9ede2b0cc1f82af2bcfdb272769165" name="lib/zip_strerror.c" role="src" /> -   <file md5sum="1d34cde90bf6e9d4274de4743abf1ff5" name="lib/zip_unchange.c" role="src" /> -   <file md5sum="c3cec32ea25ad1b83371a51cdaf7c640" name="lib/zip_unchange_archive.c" role="src" /> -   <file md5sum="dd33d1cbf943ab1c1d66d04b48a5c186" name="lib/zip_unchange_all.c" role="src" /> -   <file md5sum="b05ff23f0b369e4acaa5508b6638046e" name="lib/zip_unchange_data.c" role="src" /> -   <file md5sum="d3ae28cce0dc0dc50cfe15aa9c99f9d1" name="lib/zip_win32.h" role="src" /> -   <file md5sum="c44bd895b2ba0cdb5b845479121bc7c8" name="lib/zip_add_dir.c" role="src" /> -   <file md5sum="713cd95c53807d7c9ed9cc42636d40a4" name="lib/zip_error_clear.c" role="src" /> -   <file md5sum="6997c0f789f14b9d2a14bee34223e77a" name="lib/zip_file_error_clear.c" role="src" /> -   <file md5sum="ea76d3169dfaa4ff0a303696117d6217" name="lib/zip_stat_init.c" role="src" /> -   <file md5sum="550d6049c0f6476b6ecf5ad11b270943" name="examples/odt.php" role="doc" /> -   <file md5sum="2b912c9c64a897e24fd81dae06abfc5a" name="examples/test_with_comment.zip" role="doc" /> -   <file md5sum="2c758421b94d8cfb35cd04d1bde80a63" name="examples/test.zip" role="doc" /> -   <file md5sum="9414180bb1d67ba35a93227fb121c2fd" name="examples/test1.zip" role="doc" /> -   <file md5sum="c9576fd56fc40d0c84ec68076217678d" name="examples/oldapi.php" role="doc" /> -   <file md5sum="f98c014253576311f9e8582e477abfed" name="examples/create.php" role="doc" /> -   <file md5sum="542b8c1d715ec3f0454aaf92eafe4235" name="examples/dir.php" role="doc" /> -   <file md5sum="77e0097af1173f8437117883f8c14589" name="examples/extract.php" role="doc" /> -   <file md5sum="fcd5f72fd36acdd6b5ef1032ae7c1a3b" name="examples/extractAll.php" role="doc" /> -   <file md5sum="9a0cc04a56a720ed6e6d45af630e8c03" name="examples/fopen.php" role="doc" /> -   <file md5sum="026f3216dffaf358cce375013fc409cf" name="examples/too.php" role="doc" /> -   <file md5sum="02cd025f25e7a99bf924ea1671030e3f" name="examples/comment.php" role="doc" /> -   <file md5sum="11b2fc6236e413f10ecd7d32cd9c7637" name="examples/get_set_comments.php" role="doc" /> -   <file md5sum="1ffd4512aa9ef027e5e8064a874a4491" name="examples/addglob.php" role="doc" /> -   <file md5sum="866c88754493b5f7ed669b578bca55f8" name="examples/addpattern.php" role="doc" /> -   <file md5sum="cd98aa09e275ead4f9d37622772bd288" name="tests/utils.inc" role="test" /> -   <file md5sum="391568601fdc6c49690a7255411cdce9" name="tests/001.phpt" role="test" /> -   <file md5sum="b50a75a1a29eb232918085c1d2a6b603" name="tests/oo_ext_zip.phpt" role="test" /> -   <file md5sum="81422257a002afa88af40b38faf3d047" name="tests/oo_open.phpt" role="test" /> -   <file md5sum="02ef7cd2ddc52e3cf4a4951b5824f470" name="tests/oo_close.phpt" role="test" /> -   <file md5sum="fc8922307c956791a78b2f85ed8109a7" name="tests/oo_addfile.phpt" role="test" /> -   <file md5sum="27a6c9ef3d8d2a2407c892b4d43ec280" name="tests/oo_delete.phpt" role="test" /> -   <file md5sum="d857e4a6ec7cf1822f91b9b8f949fdd8" name="tests/oo_rename.phpt" role="test" /> -   <file md5sum="4241722811c4086e03c3af4ba738e826" name="tests/oo_namelocate.phpt" role="test" /> -   <file md5sum="2c758421b94d8cfb35cd04d1bde80a63" name="tests/test_procedural.zip" role="test" /> -   <file md5sum="1d01104cd41978850b0db7aff0501bf1" name="tests/zip_close.phpt" role="test" /> -   <file md5sum="4705d91196d22b28e712ee4b96925628" name="tests/zip_entry_compressedsize.phpt" role="test" /> -   <file md5sum="e1c3162aceec81975575a16d31ad47f6" name="tests/zip_entry_compressionmethod.phpt" role="test" /> -   <file md5sum="9d2916ee2defd344574671b3ae46c4bb" name="tests/zip_entry_filesize.phpt" role="test" /> -   <file md5sum="2cbc265caff79ace2bec487a41316fe5" name="tests/zip_entry_name.phpt" role="test" /> -   <file md5sum="369cabf57d2514200f7ec144d202676c" name="tests/zip_entry_open.phpt" role="test" /> -   <file md5sum="626339fb3d345d91839e3e4481ca8e5e" name="tests/zip_entry_read.phpt" role="test" /> -   <file md5sum="dd01d0873543be4da03a9ffdd8969477" name="tests/zip_open.phpt" role="test" /> -   <file md5sum="d47b3eb7818b30fabd247976dfdb6686" name="tests/zip_read.phpt" role="test" /> -   <file md5sum="a4bbd4e2bec36f166848f8f7cf66c029" name="tests/bug7214.phpt" role="test" /> -   <file md5sum="45835d252bd97c86f15f809619a732b8" name="tests/bug7658.phpt" role="test" /> -   <file md5sum="9080623d7a541cdc6fe5ce3060b4e787" name="tests/bug7658.odt" role="test" /> -   <file md5sum="b2900b56101516b0beba3dc2dce3a2c4" name="tests/bug8009.phpt" role="test" /> -   <file md5sum="b413cbe6306baf5561b88746a41e9d54" name="tests/bug8009.zip" role="test" /> -   <file md5sum="dd6b6a8aa0a5faa4d2743f32b7ac9fdf" name="tests/bug8700.phpt" role="test" /> -   <file md5sum="bcb14a32abcc48c5db94e891422ff012" name="tests/binarynull.zip" role="test" /> -   <file md5sum="cb753d0a812b2edb386bdcbc4cd7d131" name="tests/test.zip" role="test" /> -   <file md5sum="9c89008db7a584aff45d90924a281cf3" name="tests/bug38943.phpt" role="test" /> -   <file md5sum="68581de6cf13851de3cb88ec0be36083" name="tests/bug38943_2.phpt" role="test" /> -   <file md5sum="7304685a2695fc37a60d5a015fab5895" name="tests/bug38944.phpt" role="test" /> -   <file md5sum="1166f43a93cc4560d7367295cd8ee41b" name="tests/oo_addemptydir.phpt" role="test" /> -   <file md5sum="a3ad654e7359e734499fddef241ba539" name="tests/oo_extract.phpt" role="test" /> -   <file md5sum="df4c66046fea3199789ab87203d8423c" name="tests/oo_getcomment.phpt" role="test" /> -   <file md5sum="c6b5ee1766e6d930a2028d4b153b0a77" name="tests/oo_getnameindex.phpt" role="test" /> -   <file md5sum="1676ca3331c59a9c0b845f5d5984f0cd" name="tests/oo_setcomment.phpt" role="test" /> -   <file md5sum="66c1d7240aa42ef92ac41a1f14faee55" name="tests/oo_stream.phpt" role="test" /> -   <file md5sum="20e18c2b35c002cfdce131d15d83d64a" name="tests/test_with_comment.zip" role="test" /> -   <file md5sum="9e99afca095ab1c2c3b99fea469d0be4" name="tests/pecl12414.phpt" role="test" /> -   <file md5sum="640fefa31861e78df37308473d49aa8f" name="tests/pecl12414.zip" role="test" /> -   <file md5sum="fc7ed175023ac3eb746df98dc8bd09c8" name="tests/bug49072.phpt" role="test" /> -   <file md5sum="38cdb3fa2e6bab594c5ec6dffe8905f3" name="tests/bug49072.zip" role="test" /> -   <file md5sum="14cafaedff585cab4e48a5bde9610420" name="tests/bug14962.phpt" role="test" /> -   <file md5sum="1197587ab526918676979e8b92f33dba" name="config.m4" role="src" /> -   <file md5sum="1e92185e1e4ee4b7a0765670ff950507" name="config.w32" role="src" /> -   <file md5sum="77f68236092cca2d7139cb264d9bc4af" name="CREDITS" role="doc" /> -   <file md5sum="e9e2552fe0178b72d0491d45942d02e0" name="php_zip.c" role="src"> -    <tasks:replace from="@PACKAGE_VERSION@" to="version" type="package-info" /> -   </file> -   <file md5sum="4ac98f4213c36f5e230676bb623e4f6d" name="zip_stream.c" role="src" /> -   <file md5sum="7d0e782f8da7a8b8c993a04501abefba" name="php_zip.h" role="src" /> -  </dir> - </contents> - <dependencies> -  <required> -   <php> -    <min>4.3.0</min> -   </php> -   <pearinstaller> -    <min>1.7.0</min> -   </pearinstaller> -  </required> - </dependencies> - <providesextension>zip</providesextension> - <extsrcrelease /> - <changelog> -  <release> -   <date>2009-07-20</date> -   <version> -    <release>1.10.1</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- #48763, ZipArchive produces corrupted archive (dani dot church at gmail dot com) -- Fixed regression in the overwrite mode -- Fixed binary mode with FCGI on Windows -   </notes> -  </release> -  <release> -   <date>2008-12-24</date> -   <version> -    <release>1.10.0</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- #12965, archive files with many root entries cannot be opened -- #12414, extracting files from damaged archives -- fix test for OOo stream test -- Sync Code with 0.8.x  (and port our php zip fixes) -   </notes> -  </release> -  <release> -   <date>2007-01-18</date> -   <version> -    <release>1.9.1</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- #40228, extractTo does not create recursive empty path (empty1/empty2/) -   </notes> -  </release> -  <release> -   <date>2007-01-18</date> -   <version> -    <release>1.9.0</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- fix some memleaks and double-free()s on error conditions (Nuno Lopes) -- Add experimental support for addGlob and addPattern. They use respectively -glob or regexp patterns to add entries. They also accept options like remove_path -, add_path or remove_all_path. See the examples addglob and addpattern.php -- requires pcre -   </notes> -  </release> -  <release> -   <date>2006-12-17</date> -   <version> -    <release>1.8.4</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Use phplibdir in config.m4 (for lib64 or other custom location) -- Add path length sanity checks (Ilia, Tony) -- Update year, happy new year -   </notes> -  </release> -  <release> -   <date>2006-12-17</date> -   <version> -    <release>1.8.3</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Fixed threadsafe issue with localtime function, it uses now the - php php_localtime_r (Ron Korving, Ilia) -   </notes> -  </release> -  <release> -   <date>2006-12-02</date> -   <version> -    <release>1.8.2</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- restore compatibility with php 5.1.0 to 5.1.2 (other versions are not affected) -   </notes> -  </release> -  <release> -   <date>2006-11-28</date> -   <version> -    <release>1.8.1</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- PECL #9278, Binary access issues on Windows in any SAPI but CGI, CLI and embed -(windows API does not respect "b" mode given to fopen) -- Fixed a possible leak in the entries managements (Nuno Lopes) -- createEmptyDir returns true one success -- Use static for each internal functions when possible (Nuno Lopes) -- Update protos in the sources -   </notes> -  </release> -  <release> -   <date>2006-11-01</date> -   <version> -    <release>1.8.0</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Fixed a possible leak in statName and statIndex -- Added zipArchive::adEmptyDir() method, creates an empty directory -- Fixed setComment when used with a freshly added entry -- setComment now returns the expected value (boolean) (Hannes) -   </notes> -  </release> -  <release> -   <date>2006-10-25</date> -   <version> -    <release>1.7.5</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- PECL Bug #9082, wrong entry name like "a/b//file.txt" cannot be extracted on windows -  A "bug" in php mkdir was the cause, a work around has been introduced for php versions before 5.2.0 -   </notes> -  </release> -  <release> -   <version> -    <release>1.7.4</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- PHP Bug #38943, properties in extended class cannot be set -- PHP Bug #38944, freshly created archive has no comment or cdir -   </notes> -  </release> -  <release> -   <date>2006-09-16</date> -   <version> -    <release>1.7.3</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- PECL Bug #8700, zipArchive::getFromIndex fails -- PECL Bug #8676, zipArchive::addFile was not updated and still used VCWD_REALPATH, it now uses expand_filename -- Fixed wrong internal types for comment lenghts, does not affect userland script (Nuno Lopes) -   </notes> -  </release> -  <release> -   <date>2006-09-06</date> -   <version> -    <release>2.0.0</release> -    <api>2.0.0</api> -   </version> -   <stability> -    <release>stable</release> -    <api>stable</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Fix wrong internal types for comment lenghts, does not affect userland script (Nuno Lopes) -   </notes> -  </release> -  <release> -   <date>2006-08-24</date> -   <version> -    <release>1.7.2</release> -    <api>1.7.0</api> -   </version> -   <stability> -    <release>beta</release> -    <api>beta</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Previous release was broken in non threaded environment. -This release works smoothly in threaded and non threaded. -Thanks to "FamilleCollet dot com" (Fedora-Extra maintainer for the -head up) -   </notes> -  </release> -  <release> -   <date>2006-08-24</date> -   <version> -    <release>1.7.1</release> -    <api>1.7.0</api> -   </version> -   <stability> -    <release>beta</release> -    <api>beta</api> -   </stability> -   <notes> -- Fix issues with relative path in threaded environment, -VCWD_REALPATH is used in ZipArchive::open() and ::addFile -   </notes> -  </release> -  <release> -   <date>2006-07-14</date> -   <version> -    <release>1.7.0</release> -    <api>1.7.0</api> -   </version> -   <stability> -    <release>beta</release> -    <api>beta</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Add ZIPARCHIVE::OVERWRITE mode for ::open(), creates a new -archive and write over an existing file -- locateName do not change anymore the state, it can now be used to test an entry -- fix possilbe crashes when two entries with the same name have been added -- Enhanced safemode support -- fix builds against php 6.0 (HEAD) -- fix compiler warning (Ilia, Tony) -- cleanup phpinfo() output (Ilia) -   </notes> -  </release> -  <release> -   <date>2006-07-14</date> -   <version> -    <release>1.6.0</release> -    <api>1.6.0</api> -   </version> -   <stability> -    <release>beta</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Rename Class Zip to ZipArchive, required to be bundled -in php 5.2.0 (Zip being a ZipCode in US), making the role of -this class more obvious *Gah* -   </notes> -  </release> -  <release> -   <date>2006-07-14</date> -   <version> -    <release>1.5.0</release> -    <api>1.5.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- bring consistency to the method names: - - rename zip::delete() to deleteIndex() - - add zip::deleteName() - - rename zip::statPath to zip::statName() - - rename zip::rename to zip::renameIndex() - - add zip::renameName(); -- add zip::locateName(), returns the index of an entry, allows case insensitive -  or directory free lookup (ZIP::FL_NOCASE, ZIP::FL_NODIR) -- add zip::unchangeName(), ::unchangeIndex(), unchangeAll() and unchangeArchive() -  revert changes to an entry, to all entries or the archive -- add zip::getNameIndex(), get the name of the entry at the given position -- Bug #7658, Modify zip archives causes corruption if the data descriptor is used -  (bit 3 of the general flags) -- fix a bug when in the delete and rename methods when the index is lower than 1 -- zip::addFile() must return true on success -- zip::open() returns now the error code on error and true on success -   </notes> -  </release> -  <release> -   <date>2006-06-28</date> -   <version> -    <release>1.4.1</release> -    <api>1.4.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Add missing files in the package release -   </notes> -  </release> -  <release> -   <date>2006-06-28</date> -   <version> -    <release>1.4.0</release> -    <api>1.4.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Add write mode to the archive comment (zip::comment property) -- Add zip::setCommentName and ::setCommentIndex, add or remove entrie comment -- Add zip::getCommentName and ::getCommentIndex, get an entrie comment -- Add zip::setArchiveComment -- Full sync with zip-0.7.1 -- #8009, modify archives on windows cannot be closed -   </notes> -   <release> -    <date>2006-04-26</date> -    <version> -     <release>1.3.1</release> -     <api>1.3.0</api> -    </version> -    <stability> -     <release>alpha</release> -     <api>alpha</api> -    </stability> -    <license uri="http://www.php.net/license">PHP License</license> -    <notes>- #7500, Fix build with php 5.1.0, 5.1.1 and 5.1.2</notes> -   </release> -  </release> -  <release> -   <date>2006-04-26</date> -   <version> -    <release>1.3.0</release> -    <api>1.3.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <notes> -- Fix possible leak with __set/__get in classes extending the Zip -intern object (tony2001[at]php.net) -- Added getFromName(), return the contents of an entry using its name -- Added getFromIndex(), return the contents of an entry using its index -   </notes> -  </release> -  <release> -   <date>2006-03-30</date> -   <version> -    <release>1.2.3</release> -    <api>1.2.1</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- #7214, use binary safe string as return value, 0x00 was considered as -the end of the content, affected only the procedural API -   </notes> -  </release> -  <release> -   <date>2006-03-22</date> -   <time>21:15:00</time> -   <version> -    <release>1.2.2</release> -    <api>1.2.1</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- fix a bug in internal zip_close, new archives were not written -- ::open returns now false on error -- update the "create.php" example, status and returned codes are now checked -- fix a leak when the ::open method is called twice or more with the same -object -   </notes> -  </release> -  <release> -   <date>2006-03-19</date> -   <time>00:23:32</time> -   <version> -    <release>1.2.1</release> -    <api>1.2.1</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- fixed a possible build problem (mkstemp missing) -- fix a bug where extending the Zip class does allow -to write to a property, see php bugs #36743 (array) -   </notes> -  </release> -  <release> -   <date>2006-03-12</date> -   <time>00:23:32</time> -   <version> -    <release>1.2.0</release> -    <api>1.2.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- enable stream by default, -  * use uri like zip:///path/to/my.zip#entryname.dat -  (the URI format may change in future version) -- add support for print_r/var_dump (Zip object) -- add tests for the OO (still need more) -- add more example, like using xmlreader and zip -   stream to parse OpenDocument meta info -   </notes> -  </release> -  <release> -   <date>2006-03-05</date> -   <time>00:14:59</time> -   <version> -    <release>1.1.2</release> -    <api>1.1.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- do not create empty file when a zip entry is only -a directory (empty or not) -   </notes> -  </release> -  <release> -   <date>2006-03-02</date> -   <time>00:14:59</time> -   <version> -    <release>1.1.1</release> -    <api>1.1.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- Fix PHP 5.1 detection at compiletie -- fix possible build errors with gcc other than 4.0.x -- add better zlib detection -- "--with-zlib-dir=[DIR]" added -   </notes> -  </release> -  <release> -   <date>2006-03-01</date> -   <time>00:14:59</time> -   <version> -    <release>1.1.0</release> -    <api>1.1.0</api> -   </version> -   <stability> -    <release>alpha</release> -    <api>alpha</api> -   </stability> -   <license uri="http://www.php.net/license">PHP License</license> -   <notes> -- replace the old zip extensions - * 100% compatible with the old API - * added zip creation support (write mode) - * added OO interface - * Stream support, getStream method -   returns a file handler -- bundled libzip and drop zzlib usage -	(see http://www.nih.at/libzip/) -   </notes> -  </release> - </changelog> -</package> diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec index 203fbd5..2573c3e 100644 --- a/php-pecl-zip.spec +++ b/php-pecl-zip.spec @@ -1,37 +1,51 @@ -%{!?__pecl:     %{expand: %%global __pecl     %{_bindir}/pecl}} -%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}} - -%global pecl_name zip - - -Summary:      A zip management extension +# spec file for php-pecl-zip +# +# Copyright (c) 2013 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/3.0/ +# +# Please, preserve the changelog entries +# +%global pecl_name      zip +%global with_libzip    1 +%global with_zts       0%{?__ztsphp:1} + +Summary:      A ZIP archive management extension  Summary(fr):  Une extension de gestion des ZIP  Name:         php-pecl-zip -Version:      1.10.2 +Version:      1.12.1  Release:      1%{?dist}  License:      PHP  Group:        Development/Languages  URL:          http://pecl.php.net/package/zip  Source:       http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -# http://svn.php.net/viewvc/pecl/zip/trunk/tests/bug38943.inc?view=co -# http://pecl.php.net/bugs/22604 - missing file -Source1:      bug38943.inc -Source2:      xml2changelog +# use system libzip 0.11 instead of bundled copy  Patch0:       zip-systemlibzip.patch -BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: php-devel, zlib-devel -BuildRequires: php-pear(PEAR) >= 1.7.0 -BuildRequires: libzip2-devel +BuildRequires: php-devel +%if %{with_libzip} +BuildRequires: libzip-devel >= 0.11.1 +%else +BuildRequires: zlib-devel +%endif +BuildRequires: php-pear -Requires(post): %{__pecl} -Requires(postun): %{__pecl} +Requires(post): %{_bindir}/pecl +Requires(postun): %{_bindir}/pecl  Requires:     php(zend-abi) = %{php_zend_api}  Requires:     php(api) = %{php_core_api} -Provides:     php-pecl(%{pecl_name}) = %{version}, php-pecl(%{pecl_name})%{?_isa} = %{version} -Provides:     php-%{pecl_name} = %{version}-%{release}, php-%{pecl_name}%{?_isa} = %{version}-%{release} + +Provides:     php-pecl(%{pecl_name}) = %{version} +Provides:     php-pecl(%{pecl_name})%{?_isa} = %{version} +Provides:     php-%{pecl_name} = %{version}-%{release} +Provides:     php-%{pecl_name}%{?_isa} = %{version}-%{release} + +# Filter private shared +%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} +%{?filter_setup} +  %description  Zip is an extension to create and read zip files. @@ -43,54 +57,97 @@ Zip est une extension pour créer et lire les archives au format ZIP.  %prep   %setup -c -q -%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 10 -%{__cp} %{SOURCE1} %{pecl_name}-%{version}/tests/bug38943.inc -  cd %{pecl_name}-%{version} + +%if %{with_libzip}  %patch0 -p1 -b .systemlibzip +rm -rf lib +%endif + +cd .. +: Create the configuration file +cat >%{pecl_name}.ini << 'EOF' +; Enable ZIP extension module +extension=%{pecl_name}.so +EOF + +%if %{with_zts} +: Duplicate sources tree for ZTS build +cp -pr %{pecl_name}-%{version} %{pecl_name}-zts +%endif  %build +export PHP_RPATH=no +  cd %{pecl_name}-%{version} -phpize -%configure --with-libzip-dir=%{_prefix} -%{__make} %{?_smp_mflags} +%{_bindir}/phpize +%configure \ +  --with-php-config=%{_bindir}/php-config \ +%if %{with_libzip} +  --with-libzip +%endif +make %{?_smp_mflags} -%install -cd %{pecl_name}-%{version} -%{__rm} -rf %{buildroot} -%{__make} install INSTALL_ROOT=%{buildroot} +%if %{with_zts} +cd ../%{pecl_name}-zts +%{_bindir}/zts-phpize +%configure \ +  --with-php-config=%{_bindir}/zts-php-config \ +%if %{with_libzip} +  --with-libzip +%endif + +make %{?_smp_mflags} +%endif -# Drop in the bit of configuration -%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d -%{__cat} > %{buildroot}%{_sysconfdir}/php.d/%{pecl_name}.ini << 'EOF' -; Enable ZIP extension module -extension=%{pecl_name}.so -EOF + +%install +make -C %{pecl_name}-%{version} install INSTALL_ROOT=%{buildroot} +install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini  # Install XML package description -%{__mkdir_p} %{buildroot}%{pecl_xmldir} -%{__install} -m 644 ../package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml +install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml + +%if %{with_zts} +make -C %{pecl_name}-zts install INSTALL_ROOT=%{buildroot} +install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini +%endif  %check  cd %{pecl_name}-%{version} -php --no-php-ini \ +: minimal load test of NTS extension +%{_bindir}/php --no-php-ini \      --define extension_dir=modules \      --define extension=%{pecl_name}.so \      --modules | grep %{pecl_name} +: upstream test suite for NTS extension  TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ -   REPORT_EXIT_STATUS=1 \ -   NO_INTERACTION=1 \ -   TEST_PHP_EXECUTABLE=%{_bindir}/php \ -   %{_bindir}/php \ +REPORT_EXIT_STATUS=1 \ +NO_INTERACTION=1 \ +TEST_PHP_EXECUTABLE=%{_bindir}/php \ +%{_bindir}/php \     run-tests.php +%if %{with_zts} +cd ../%{pecl_name}-zts +: minimal load test of NTS extension +%{_bindir}/zts-php --no-php-ini \ +    --define extension_dir=modules \ +    --define extension=%{pecl_name}.so \ +    --modules | grep %{pecl_name} -%clean -%{__rm} -rf %{buildroot} +: upstream test suite for NTS extension +TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ +REPORT_EXIT_STATUS=1 \ +NO_INTERACTION=1 \ +TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ +%{_bindir}/php \ +   run-tests.php +%endif  %post @@ -104,93 +161,18 @@ fi  %files -%defattr(-, root, root, -) -# http://pecl.php.net/bugs/22603 - License file -%doc CHANGELOG   %doc %{pecl_name}-%{version}/CREDITS  %doc %{pecl_name}-%{version}/examples -%config(noreplace) %{_sysconfdir}/php.d/%{pecl_name}.ini -%{php_extdir}/%{pecl_name}.so  %{pecl_xmldir}/%{name}.xml +%config(noreplace) %{php_inidir}/%{pecl_name}.ini +%{php_extdir}/%{pecl_name}.so +%if %{with_zts} +%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini +%{php_ztsextdir}/%{pecl_name}.so +%endif -%changelog -* Sun Mar 20 2011 Remi Collet <Fedora@FamilleCollet.com> 1.10.2-1 -- Version 1.10.2 (stable) - API 2.0.0 (stable) -- mostly rewriten for latest PHP Guidelines - -* Thu Jun 07 2007 Remi Collet <Fedora@FamilleCollet.com> 1.8.10-1 -- update to 1.8.10 - -* Sun Mar 25 2007 Remi Collet <Fedora@FamilleCollet.com> 1.8.8-1 -- update to 1.8.8 - -* Mon Feb 26 2007 Remi Collet <Fedora@FamilleCollet.com> 1.8.6-1 -- update to 1.8.6 - -* Sat Feb 24 2007 Remi Collet <Fedora@FamilleCollet.com> 1.8.5-1 -- update to 1.8.5 -- requires php(zend-abi) and php(api) when available - -* Sat Dec 02 2006 Remi Collet <Fedora@FamilleCollet.com> 1.8.2-1 -- update to 1.8.2 - -* Thu Nov 02 2006 Remi Collet <Fedora@FamilleCollet.com> 1.8.0-1 -- update to 1.8.0 - -* Tue Oct 24 2006 Remi Collet <Fedora@FamilleCollet.com> 1.7.5-1 -- update to 1.7.5 - -* Wed Sep 27 2006 Remi Collet <Fedora@FamilleCollet.com> 1.7.4-1 -- update to 1.7.4 - -* Sun Sep 17 2006 Remi Collet <Fedora@FamilleCollet.com> 1.7.3-1 -- update to 1.7.3 -- remove PECL from sumnary -- change to %%setup -c -q -- add generated CHANGELOG to %%doc - -* Mon Aug 28 2006 Remi Collet <Fedora@FamilleCollet.com> 1.7.2-2 -- rebuild for FE6 - -* Sun Aug 27 2006 Remi Collet <Fedora@FamilleCollet.com> 1.7.2-1 -- update to 1.7.2 - -* Sat Aug 26 2006 Remi Collet <Fedora@FamilleCollet.com> 1.7.1-2 -- use php_zip.c version 1.73 from CVS  -- see http://pecl.php.net/bugs/bug.php?id=8564 - -* Fri Aug 25 2006 Remi Collet <Fedora@FamilleCollet.com> 1.7.1-1 -- update to 1.7.1 -- change macros to conform to PHP Guidelines - -* Sun Aug 20 2006 Remi Collet <Fedora@FamilleCollet.com> 1.7.0-1 -- update to 1.7.0 - -* Sun Jul 30 2006 Remi Collet <Fedora@FamilleCollet.com> 1.6.0-1 -- update to 1.6.0 (Big change : Rename Class Zip to ZipArchive) - -* Sun Jul 16 2006 Remi Collet <Fedora@FamilleCollet.com> 1.5.0-1 -- update to 1.5.0 -- Requires: php-api - -* Thu Jun 29 2006 Remi Collet <Fedora@FamilleCollet.com> 1.4.1-1 -- update to 1.4.1 -- bundle the v3.01 PHP LICENSE file -- Suppr. Requires zip, Add Provides php-pecl(zip) and php-zip -- change defattr - -* Fri Apr 28 2006 Remi Collet <Fedora@FamilleCollet.com> 1.3.1-2 -- Add zlib(devel) to Requires - -* Thu Apr 27 2006 Remi Collet <Fedora@FamilleCollet.com> 1.3.1-1 -- update to 1.3.1 - -* Wed Apr 26 2006 Remi Collet <Fedora@FamilleCollet.com> 1.2.3-1 -- initial RPM for extras -- add french summary & description -- add examples to doc. - -* Tue Apr 11 2006 Remi Collet <RPMS@FamilleCollet.com> 1.2.3-1 -- initial RPM +%changelog +* Thu Aug 08 2013 Remi Collet <remi@redhat.com> 1.12.1-1 +- New spec for version 1.12.1 diff --git a/zip-systemlibzip.patch b/zip-systemlibzip.patch index 85946bc..b6d76b1 100644 --- a/zip-systemlibzip.patch +++ b/zip-systemlibzip.patch @@ -1,64 +1,181 @@ -diff -up zip-1.10.2/config.m4.orig zip-1.10.2/config.m4 ---- zip-1.10.2/config.m4.orig	2011-03-20 13:05:28.661443158 +0100 -+++ zip-1.10.2/config.m4	2011-03-20 13:16:37.676577789 +0100 -@@ -8,6 +8,8 @@ PHP_ARG_ENABLE(zip, for zip archive read - if test -z "$PHP_ZLIB_DIR"; then -   PHP_ARG_WITH(zlib-dir, for the location of libz, -   [  --with-zlib-dir[=DIR]     ZIP: Set the path to libz install prefix], no, no) -+  PHP_ARG_WITH(libzip-dir, for the location of libzip, -+  [  --with-libzip-dir[=DIR]   ZIP: Set the path to libzip install prefix], no, no) - fi -  +diff -up zip-1.12.1/config.m4.old zip-1.12.1/config.m4 +--- zip-1.12.1/config.m4.old	2013-04-29 11:18:17.000000000 +0200 ++++ zip-1.12.1/config.m4	2013-08-08 13:09:18.000000000 +0200 +@@ -13,8 +13,60 @@ fi   PHP_ARG_WITH(pcre-dir, pcre install prefix, -@@ -71,7 +73,20 @@ yes -     ]) - 	CPPFLAGS=$old_CPPFLAGS + [  --with-pcre-dir           ZIP: pcre install prefix], no, no) +  ++PHP_ARG_WITH(libzip, libzip, ++[ --with-libzip[=DIR]        ZIP: use libzip], no, no) ++ + if test "$PHP_ZIP" != "no"; then +  ++  if test "$PHP_LIBZIP" != "no"; then ++ ++    AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++ ++    dnl system libzip, depends on libzip ++    AC_MSG_CHECKING(for libzip) ++    if test -r $PHP_LIBZIP/include/zip.h; then ++      LIBZIP_CFLAGS="-I$PHP_LIBZIP/include" ++      LIBZIP_LIBDIR="$PHP_LIBZIP/$PHP_LIBDIR" ++      AC_MSG_RESULT(from option: found in $PHP_LIBZIP) ++ ++    elif test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libzip; then ++      LIBZIP_CFLAGS=`$PKG_CONFIG libzip --cflags` ++      LIBZIP_LIBDIR=`$PKG_CONFIG libzip --variable=libdir` ++      AC_MSG_RESULT(from pkgconfig: found in $LIBZIP_LIBDIR) ++ ++    else ++      for i in /usr/local /usr; do ++        if test -r $i/include/zip.h; then ++          LIBZIP_CFLAGS="-I$i/include" ++          LIBZIP_LIBDIR="$i/$PHP_LIBDIR" ++          AC_MSG_RESULT(in default path: found in $i) ++          break ++        fi ++      done ++    fi ++ ++    if test -z "$LIBZIP_LIBDIR"; then ++      AC_MSG_RESULT(not found) ++      AC_MSG_ERROR(Please reinstall the libzip distribution) ++    fi ++ ++    dnl Could not think of a simple way to check libzip for overwrite support ++    PHP_CHECK_LIBRARY(zip, zip_open, ++    [ ++      PHP_ADD_LIBRARY_WITH_PATH(zip, $LIBZIP_LIBDIR, ZIP_SHARED_LIBADD) ++      AC_DEFINE(HAVE_LIBZIP,1,[ ]) ++    ], [ ++      AC_MSG_ERROR(could not find usable libzip) ++    ], [ ++      -L$LIBZIP_LIBDIR ++    ]) ++ ++    AC_DEFINE(HAVE_ZIP,1,[ ])  ++    PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c, $ext_shared,, $LIBZIP_CFLAGS) ++    PHP_SUBST(ZIP_SHARED_LIBADD) ++  else ++ ++  dnl bundled libzip, depends on zlib +   if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then +     if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then +       PHP_ZLIB_DIR="$PHP_ZLIB_DIR" +@@ -94,6 +146,7 @@ yes +   PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c $PHP_ZIP_SOURCES, $ext_shared) +   PHP_ADD_BUILD_DIR($ext_builddir/lib, 1) +   PHP_SUBST(ZIP_SHARED_LIBADD) ++fi --	PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \ -+	if test "$PHP_LIBZIP_DIR" != "no" && test "$PHP_LIBZIP_DIR" != "yes"; then -+		if test -f "$PHP_LIBZIP_DIR/include/zip.h"; then -+			PHP_LIBZIP_DIR="$PHP_LIBZIP_DIR" -+			PHP_LIBZIP_INCDIR="$PHP_LIBZIP_DIR/include" -+		else -+      AC_MSG_ERROR([Can not find libzip headers under "$PHP_ZLIB_DIR"]) -+		fi -+	fi -+ -+	dnl # libzip -+	AC_MSG_CHECKING([for the location of libzip]) -+	if test "$PHP_LIBZIP_DIR" = "no"; then -+		AC_MSG_RESULT([bundled]) -+		PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \ -                          lib/zip_fread.c lib/zip_open.c lib/zip_source_filep.c  \ -                          lib/zip_strerror.c lib/zip_close.c lib/zip_error_get.c \ -                          lib/zip_file_error_get.c lib/zip_free.c lib/zip_rename.c \ -@@ -90,6 +105,13 @@ yes -                          lib/zip_set_archive_comment.c lib/zip_set_file_comment.c \ -                          lib/zip_unchange_archive.c lib/zip_memdup.c lib/zip_stat_init.c lib/zip_add_dir.c \ -                          lib/zip_error_clear.c lib/zip_file_error_clear.c" -+		AC_DEFINE(HAVE_LIBZIP,0,[ ]) -+	else -+		AC_MSG_RESULT([$PHP_LIBZIP_DIR]) -+		PHP_ADD_LIBRARY_WITH_PATH(zip, $PHP_LIBZIP_DIR/$PHP_LIBDIR, ZIP_SHARED_LIBADD) -+		PHP_ADD_INCLUDE($PHP_LIBZIP_INCDIR) -+		AC_DEFINE(HAVE_LIBZIP,1,[ ]) -+	fi - 	AC_DEFINE(HAVE_ZIP,1,[ ]) - 	PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c $PHP_ZIP_SOURCES, $ext_shared) -diff -up zip-1.10.2/php_zip.c.orig zip-1.10.2/php_zip.c ---- zip-1.10.2/php_zip.c.orig	2011-03-20 13:17:48.724908789 +0100 -+++ zip-1.10.2/php_zip.c	2011-03-20 13:18:29.019963522 +0100 -@@ -2672,7 +2672,11 @@ static PHP_MINFO_FUNCTION(zip) - 	php_info_print_table_row(2, "Zip", "enabled"); - 	php_info_print_table_row(2, "Extension Version","$Id: php_zip.c 284448 2009-07-20 15:26:54Z pajoye $"); - 	php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING); --	php_info_print_table_row(2, "Libzip version", "0.9.0"); -+#if HAVE_LIBZIP -+	php_info_print_table_row(2, "Libzip version", "system"); + AC_CHECK_TYPES([int8_t]) +diff -up zip-1.12.1/libzip-missing.h.old zip-1.12.1/libzip-missing.h +--- zip-1.12.1/libzip-missing.h.old	2013-08-08 13:31:19.000000000 +0200 ++++ zip-1.12.1/libzip-missing.h	2013-08-08 13:29:24.000000000 +0200 +@@ -0,0 +1,60 @@ ++/*** Private API copied from lib/zipint.h ***/ ++ ++/* error information */ ++ ++struct zip_error { ++    int zip_err;	/* libzip error code (ZIP_ER_*) */ ++    int sys_err;	/* copy of errno (E*) or zlib error code */ ++    char *str;		/* string representation or NULL */ ++}; ++ ++ ++/* zip archive, part of API */ ++ ++struct zip { ++    char *zn;				/* file name */ ++    FILE *zp;				/* file */ ++    unsigned int open_flags;		/* flags passed to zip_open */ ++    struct zip_error error;		/* error information */ ++ ++    unsigned int flags;			/* archive global flags */ ++    unsigned int ch_flags;		/* changed archive global flags */ ++ ++    char *default_password;		/* password used when no other supplied */ ++ ++    struct zip_string *comment_orig;	/* archive comment */ ++    struct zip_string *comment_changes; /* changed archive comment */ ++    int comment_changed;		/* whether archive comment was changed */ ++ ++    zip_uint64_t nentry;		/* number of entries */ ++    zip_uint64_t nentry_alloc;		/* number of entries allocated */ ++    struct zip_entry *entry;		/* entries */ ++ ++    unsigned int nfile;			/* number of opened files within archive */ ++    unsigned int nfile_alloc;		/* number of files allocated */ ++    struct zip_file **file;		/* opened files within archive */ ++     ++    char *tempdir;                      /* custom temp dir (needed e.g. for OS X sandboxing) */ ++}; ++ ++/* file in zip archive, part of API */ ++ ++struct zip_file { ++    struct zip *za;		/* zip archive containing this file */ ++    struct zip_error error;	/* error information */ ++    int eof; ++    struct zip_source *src;	/* data source */ ++}; ++ ++/*** Private API copied from lib/zip_error.c ***/ ++ ++void ++_zip_error_clear(struct zip_error *err) ++{ ++    if (err == NULL) ++	return; ++ ++    err->zip_err = ZIP_ER_OK; ++    err->sys_err = 0; ++} ++ +diff -up zip-1.12.1/php_zip.c.old zip-1.12.1/php_zip.c +--- zip-1.12.1/php_zip.c.old	2013-08-08 13:24:00.000000000 +0200 ++++ zip-1.12.1/php_zip.c	2013-08-08 13:26:43.000000000 +0200 +@@ -29,8 +29,14 @@ + #include "ext/standard/php_string.h" + #include "ext/pcre/php_pcre.h" + #include "php_zip.h" ++ ++#if defined(HAVE_LIBZIP) ++#include <zip.h> ++#include "libzip-missing.h" ++#else + #include "lib/zip.h" + #include "lib/zipint.h" ++#endif +  + /* zip_open is a macro for renaming libzip zipopen, so we need to use PHP_NAMED_FUNCTION */ + static PHP_NAMED_FUNCTION(zif_zip_open); +diff -up zip-1.12.1/php_zip.h.old zip-1.12.1/php_zip.h +--- zip-1.12.1/php_zip.h.old	2013-08-08 13:33:03.000000000 +0200 ++++ zip-1.12.1/php_zip.h	2013-08-08 13:33:34.000000000 +0200 +@@ -28,7 +28,11 @@ extern zend_module_entry zip_module_entr + #include "TSRM.h" + #endif +  ++#if defined(HAVE_LIBZIP) ++#include <zip.h>  +#else -+	php_info_print_table_row(2, "Libzip version", "0.9.0 bundled"); + #include "lib/zip.h"  +#endif - 	php_info_print_table_end(); - } + #define PHP_ZIP_VERSION_STRING "1.12.1" +  +diff -up zip-1.12.1/zip_stream.c.old zip-1.12.1/zip_stream.c +--- zip-1.12.1/zip_stream.c.old	2013-08-08 13:35:24.000000000 +0200 ++++ zip-1.12.1/zip_stream.c	2013-08-08 13:35:39.000000000 +0200 +@@ -6,8 +6,6 @@ + #if HAVE_ZIP + #ifdef ZEND_ENGINE_2 +  +-#include "lib/zip.h" +- + #include "php_streams.h" + #include "ext/standard/file.h" + #include "ext/standard/php_string.h"  | 
