From: Greg Beaver Date: Fri, 18 Jan 2008 00:33:15 +0000 (+0000) Subject: MF5.3: install headers, use correct zip version X-Git-Tag: RELEASE_2_0_0a1~854 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44173ebb5ea1107cb10002c4000fa80dd6c17c38;p=php MF5.3: install headers, use correct zip version --- diff --git a/ext/zip/Makefile.frag b/ext/zip/Makefile.frag new file mode 100644 index 0000000000..b3781e3e7b --- /dev/null +++ b/ext/zip/Makefile.frag @@ -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 + diff --git a/ext/zip/config.m4 b/ext/zip/config.m4 index c5edaa725e..271bd2faa0 100644 --- a/ext/zip/config.m4 +++ b/ext/zip/config.m4 @@ -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 diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 8110f2b3af..4e491816f4 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -654,7 +654,7 @@ zend_module_entry zip_module_entry = { NULL, NULL, PHP_MINFO(zip), - "1.4.0", + "2.0.0", STANDARD_MODULE_PROPERTIES }; /* }}} */