]> granicus.if.org Git - php/commitdiff
MF5.3: install headers, use correct zip version
authorGreg Beaver <cellog@php.net>
Fri, 18 Jan 2008 00:33:15 +0000 (00:33 +0000)
committerGreg Beaver <cellog@php.net>
Fri, 18 Jan 2008 00:33:15 +0000 (00:33 +0000)
ext/zip/Makefile.frag [new file with mode: 0644]
ext/zip/config.m4
ext/zip/php_zip.c

diff --git a/ext/zip/Makefile.frag b/ext/zip/Makefile.frag
new file mode 100644 (file)
index 0000000..b3781e3
--- /dev/null
@@ -0,0 +1,28 @@
+phpincludedir=$(prefix)/include/php
+
+ZIP_HEADER_FILES= \
+       zip.h \
+       zipint.h \
+       zip_alias.h \
+       zipint_alias.h
+
+install-zip-headers:
+       @echo "Installing ZIP headers:          $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib"
+       @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib
+       @for f in $(ZIP_HEADER_FILES); do \
+               if test -f "$(top_srcdir)/lib/$$f"; then \
+                       $(INSTALL_DATA) $(top_srcdir)/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
+               elif test -f "$(top_builddir)/lib/$$f"; then \
+                       $(INSTALL_DATA) $(top_builddir)/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
+               elif test -f "$(top_srcdir)/ext/zip/lib/$$f"; then \
+                       $(INSTALL_DATA) $(top_srcdir)/ext/zip/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
+               elif test -f "$(top_builddir)/ext/zip/lib/$$f"; then \
+                       $(INSTALL_DATA) $(top_builddir)/ext/zip/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
+               else \
+                       echo "hmmm"; \
+               fi \
+       done;
+
+# mini hack
+install: $(all_targets) $(install_targets) install-zip-headers
+
index c5edaa725e29b2ced5deddbc8ce8a6624152aec5..271bd2faa056ceea4d21e956255b97722503b2ee 100644 (file)
@@ -66,4 +66,12 @@ if test "$PHP_ZIP" != "no"; then
        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)
+       ifdef([PHP_INSTALL_HEADERS],
+       [
+         dnl Sadly, this is a complete NOP for pecl extensions
+         PHP_INSTALL_HEADERS(ext/zip/lib, [lib/zip.h lib/zipint.h lib/zip_alias.h lib/zipint_alias.h])
+       ])
+       
+       dnl so we always include the known-good working hack.
+       PHP_ADD_MAKEFILE_FRAGMENT
 fi
index 8110f2b3af739f1749a0ac4c028511337a22c004..4e491816f48eb4a1391a4f6423af0561e3760794 100644 (file)
@@ -654,7 +654,7 @@ zend_module_entry zip_module_entry = {
        NULL,
        NULL,
        PHP_MINFO(zip),
-       "1.4.0",
+       "2.0.0",
        STANDARD_MODULE_PROPERTIES
 };
 /* }}} */