packages: php/php.spec, php/system-libzip.patch - fix system zlib patch, re...

glen glen at pld-linux.org
Tue Sep 27 00:30:56 CEST 2011


Author: glen                         Date: Mon Sep 26 22:30:56 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix system zlib patch, really link with -lzip

---- Files affected:
packages/php:
   php.spec (1.954 -> 1.955) , system-libzip.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/php/php.spec
diff -u packages/php/php.spec:1.954 packages/php/php.spec:1.955
--- packages/php/php.spec:1.954	Mon Sep 26 23:33:08 2011
+++ packages/php/php.spec	Tue Sep 27 00:30:51 2011
@@ -110,7 +110,7 @@
 %undefine	with_filter
 %endif
 
-%define		rel	5
+%define		rel	6
 Summary:	PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):	Le langage de script embarque-HTML PHP
 Summary(pl.UTF-8):	Język skryptowy PHP
@@ -3217,6 +3217,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.955  2011/09/26 22:30:51  glen
+- fix system zlib patch, really link with -lzip
+
 Revision 1.954  2011/09/26 21:33:08  glen
 - use system libzip in zip extension
 

================================================================
Index: packages/php/system-libzip.patch
diff -u packages/php/system-libzip.patch:1.1 packages/php/system-libzip.patch:1.2
--- packages/php/system-libzip.patch:1.1	Mon Sep 26 23:33:08 2011
+++ packages/php/system-libzip.patch	Tue Sep 27 00:30:51 2011
@@ -2,26 +2,44 @@
 https://bugzilla.redhat.com/show_bug.cgi?id=551513
 https://bugs.php.net/bug.php?id=39388
 http://spot.fedorapeople.org/php-5.3.6-libzip.patch
+pld fixes: link with -lzip when using system lib, -lz otherwise
 
-diff -up php-5.3.6/ext/zip/config.m4.libzip php-5.3.6/ext/zip/config.m4
---- php-5.3.6/ext/zip/config.m4.libzip	2008-08-08 05:47:15.000000000 -0400
-+++ php-5.3.6/ext/zip/config.m4	2011-07-20 15:21:05.759490602 -0400
-@@ -15,6 +15,9 @@ PHP_ARG_WITH(pcre-dir, pcre install pref
+--- php-5.3.8/ext/zip/config.m4~	2008-08-08 12:47:15.000000000 +0300
++++ php-5.3.8/ext/zip/config.m4	2011-09-27 01:18:53.258197363 +0300
+@@ -13,8 +13,72 @@
+ PHP_ARG_WITH(pcre-dir, pcre install prefix,
+ [  --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
- 
-+  PHP_ARG_WITH(libzip, libzip,
-+  [  --with-libzip[=DIR]     Use libzip], no, no)
++  dnl This is PECL build, check if bundled PCRE library is used
++  old_CPPFLAGS=$CPPFLAGS
++  CPPFLAGS=$INCLUDES
++  AC_EGREP_CPP(yes,[
++#include <main/php_config.h>
++#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
++yes
++#endif
++  ],[
++    PHP_PCRE_REGEX=yes
++  ],[
++    AC_EGREP_CPP(yes,[
++#include <main/php_config.h>
++#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE)
++yes
++#endif
++    ],[
++      PHP_PCRE_REGEX=pecl
++    ],[
++      PHP_PCRE_REGEX=no
++    ])
++  ])
++  CPPFLAGS=$old_CPPFLAGS
 +
-   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"
-@@ -71,7 +74,43 @@ yes
-   ])
-   CPPFLAGS=$old_CPPFLAGS
- 
--  PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \
 +  if test "$PHP_LIBZIP" != "no"; then
++    dnl system libzip, depends on libzip
 +    if test -r $PHP_LIBZIP/include/zip.h; then
 +      LIBZIP_DIR=$PHP_LIBZIP
 +    else
@@ -39,12 +57,12 @@
 +      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_INCLUDE($LIBZIP_DIR/include)
-+      PHP_ADD_LIBRARY_WITH_PATH(zip, $LIBZIP_DIR/$PHP_LIBDIR, LIBZIP_SHARED_LIBADD)
++      PHP_ADD_LIBRARY_WITH_PATH(zip, $LIBZIP_DIR/$PHP_LIBDIR, ZIP_SHARED_LIBADD)
 +      AC_DEFINE(HAVE_LIBZIP,1,[ ])
 +    ], [
 +      AC_MSG_ERROR(could not find usable libzip)
@@ -54,14 +72,47 @@
 +
 +    AC_DEFINE(HAVE_ZIP,1,[ ])
 +    PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c, $ext_shared)
-+    PHP_SUBST(LIBZIP_SHARED_LIBADD)
 +    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"
+@@ -47,31 +111,7 @@
+     PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR)
+   fi
+ 
+-  dnl This is PECL build, check if bundled PCRE library is used
+-  old_CPPFLAGS=$CPPFLAGS
+-  CPPFLAGS=$INCLUDES
+-  AC_EGREP_CPP(yes,[
+-#include <main/php_config.h>
+-#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
+-yes
+-#endif
+-  ],[
+-    PHP_PCRE_REGEX=yes
+-  ],[
+-    AC_EGREP_CPP(yes,[
+-#include <main/php_config.h>
+-#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE)
+-yes
+-#endif
+-    ],[
+-      PHP_PCRE_REGEX=pecl
+-    ],[
+-      PHP_PCRE_REGEX=no
+-    ])
+-  ])
+-  CPPFLAGS=$old_CPPFLAGS
+-
+-  PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \
 +    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 \
-@@ -91,10 +130,11 @@ yes
+@@ -91,10 +131,11 @@
                           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"
  
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php/php.spec?r1=1.954&r2=1.955&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php/system-libzip.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list