summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-11-14 15:21:02 +0100
committerRemi Collet <fedora@famillecollet.com>2012-11-14 15:21:02 +0100
commit25fa5be87258fe3521441eb6dbdb74e2267df516 (patch)
tree1dce1a326d4db26b784d82270a1443e127542a82
parent83eb17b4fe582c8bceaa541777a64f53cc0999cd (diff)
php 5.4: sync with rawhide
-rw-r--r--php-5.4.5-system-libzip.patch33
-rw-r--r--php54.spec10
2 files changed, 30 insertions, 13 deletions
diff --git a/php-5.4.5-system-libzip.patch b/php-5.4.5-system-libzip.patch
index a347a2f..897fb87 100644
--- a/php-5.4.5-system-libzip.patch
+++ b/php-5.4.5-system-libzip.patch
@@ -1,7 +1,7 @@
diff -up php-5.4.5RC1/ext/zip/config.m4.systzip php-5.4.5RC1/ext/zip/config.m4
--- php-5.4.5RC1/ext/zip/config.m4.systzip 2012-07-04 07:43:14.000000000 +0200
+++ php-5.4.5RC1/ext/zip/config.m4 2012-07-07 15:56:41.418171233 +0200
-@@ -13,65 +13,105 @@ fi
+@@ -13,65 +13,116 @@
PHP_ARG_WITH(pcre-dir, pcre install prefix,
[ --with-pcre-dir ZIP: pcre install prefix], no, no)
@@ -18,22 +18,34 @@ diff -up php-5.4.5RC1/ext/zip/config.m4.systzip php-5.4.5RC1/ext/zip/config.m4
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
+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_DIR=$PHP_LIBZIP
++ 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
- AC_MSG_ERROR([Can not find zlib headers under "$PHP_ZLIB_DIR"])
-+ AC_MSG_CHECKING(for libzip in default path)
+ for i in /usr/local /usr; do
+ if test -r $i/include/zip.h; then
-+ LIBZIP_DIR=$i
-+ AC_MSG_RESULT(found in $i)
++ 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_DIR"; then
++ if test -z "$LIBZIP_LIBDIR"; then
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(Please reinstall the libzip distribution)
fi
@@ -41,17 +53,16 @@ diff -up php-5.4.5RC1/ext/zip/config.m4.systzip php-5.4.5RC1/ext/zip/config.m4
+ dnl Could not think of a simple way to check libzip for overwrite support
+ PHP_CHECK_LIBRARY(zip, zip_open,
+ [
-+ PHP_ADD_INCLUDE($LIBZIP_DIR/include)
-+ PHP_ADD_LIBRARY_WITH_PATH(zip, $LIBZIP_DIR/$PHP_LIBDIR, ZIP_SHARED_LIBADD)
++ 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_DIR/$PHP_LIBDIR
++ -L$LIBZIP_LIBDIR
+ ])
+
+ AC_DEFINE(HAVE_ZIP,1,[ ])
-+ PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c, $ext_shared)
++ PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c, $ext_shared,, $LIBZIP_CFLAGS)
+ PHP_SUBST(ZIP_SHARED_LIBADD)
else
- for i in /usr/local /usr; do
@@ -149,7 +160,7 @@ diff -up php-5.4.5RC1/ext/zip/config.m4.systzip php-5.4.5RC1/ext/zip/config.m4
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 \
-@@ -98,10 +138,11 @@ yes
+@@ -98,10 +149,11 @@
lib/zip_source_open.c lib/zip_source_pkware.c lib/zip_source_pop.c \
lib/zip_source_read.c lib/zip_source_stat.c"
diff --git a/php54.spec b/php54.spec
index 7cbb86f..56f4ec8 100644
--- a/php54.spec
+++ b/php54.spec
@@ -1613,11 +1613,17 @@ fi
%changelog
-* Wed Nov 14 2012 Remi Collet <remi@fedoraproject.org> 5.4.9-0.3.RC1
+* Wed Nov 14 2012 Remi Collet <rcollet@redhat.com> 5.4.9-0.3.RC1
+- improve system libzip patch to use pkg-config
+
+* Wed Nov 14 2012 Remi Collet <rcollet@redhat.com> 5.4.9-0.2.RC1
+- use _httpd_moddir macro
+
+* Wed Nov 14 2012 Remi Collet <rcollet@redhat.com> 5.4.9-0.1.RC1
+- update to 5.4.9RC1
- improves php.conf (use FilesMatch + SetHandler)
- improves filter (httpd module)
- apply ldap_r patch on fedora >= 18 only
-- use _httpd_moddir macro
* Fri Nov 9 2012 Remi Collet <remi@fedoraproject.org> 5.4.9-0.2.RC1
- sync with rawhide