Skip to content

Commit 736e23a

Browse files
author
Greg Beaver
committed
MF5.3: install headers, use correct zip version
1 parent 42b320b commit 736e23a

3 files changed

Lines changed: 37 additions & 1 deletion

File tree

‎ext/zip/Makefile.frag‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
phpincludedir=$(prefix)/include/php
2+
3+
ZIP_HEADER_FILES= \
4+
zip.h \
5+
zipint.h \
6+
zip_alias.h \
7+
zipint_alias.h
8+
9+
install-zip-headers:
10+
@echo "Installing ZIP headers: $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib"
11+
@$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib
12+
@for f in $(ZIP_HEADER_FILES); do \
13+
if test -f "$(top_srcdir)/lib/$$f"; then \
14+
$(INSTALL_DATA) $(top_srcdir)/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
15+
elif test -f "$(top_builddir)/lib/$$f"; then \
16+
$(INSTALL_DATA) $(top_builddir)/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
17+
elif test -f "$(top_srcdir)/ext/zip/lib/$$f"; then \
18+
$(INSTALL_DATA) $(top_srcdir)/ext/zip/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
19+
elif test -f "$(top_builddir)/ext/zip/lib/$$f"; then \
20+
$(INSTALL_DATA) $(top_builddir)/ext/zip/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
21+
else \
22+
echo "hmmm"; \
23+
fi \
24+
done;
25+
26+
# mini hack
27+
install: $(all_targets) $(install_targets) install-zip-headers
28+

‎ext/zip/config.m4‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,12 @@ if test "$PHP_ZIP" != "no"; then
6666
PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c $PHP_ZIP_SOURCES, $ext_shared)
6767
PHP_ADD_BUILD_DIR($ext_builddir/lib, 1)
6868
PHP_SUBST(ZIP_SHARED_LIBADD)
69+
ifdef([PHP_INSTALL_HEADERS],
70+
[
71+
dnl Sadly, this is a complete NOP for pecl extensions
72+
PHP_INSTALL_HEADERS(ext/zip/lib, [lib/zip.h lib/zipint.h lib/zip_alias.h lib/zipint_alias.h])
73+
])
74+
75+
dnl so we always include the known-good working hack.
76+
PHP_ADD_MAKEFILE_FRAGMENT
6977
fi

‎ext/zip/php_zip.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ zend_module_entry zip_module_entry = {
654654
NULL,
655655
NULL,
656656
PHP_MINFO(zip),
657-
"1.4.0",
657+
"2.0.0",
658658
STANDARD_MODULE_PROPERTIES
659659
};
660660
/* }}} */

0 commit comments

Comments
 (0)