diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-08-29 08:14:21 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-08-29 08:14:21 +0200 |
commit | 88e9909a7b75fd086cc159aeb77b418ed9d7336c (patch) | |
tree | 4316e28b8ea1c8e5827f7cfb478074c8a56e0ae8 | |
parent | cdfd32201bde6c40260c30b665ba66cd5a8955b9 (diff) |
php-pecl-igbinary: cleanups
-rw-r--r-- | igbinary-apcu.patch | 222 | ||||
-rw-r--r-- | php-pecl-igbinary.spec | 14 |
2 files changed, 4 insertions, 232 deletions
diff --git a/igbinary-apcu.patch b/igbinary-apcu.patch deleted file mode 100644 index a5ee6d6..0000000 --- a/igbinary-apcu.patch +++ /dev/null @@ -1,222 +0,0 @@ -From 3dfeb1ce45bb87da31cc11613c9dd088a67300df Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Thu, 4 Jul 2013 16:56:16 +0200 -Subject: [PATCH 1/2] allow to build with APC or APCU - ---- - config.m4 | 13 +++++++++---- - igbinary.c | 12 ++++++++++++ - 2 files changed, 21 insertions(+), 4 deletions(-) - -diff --git a/config.m4 b/config.m4 -index d1e739f..158a222 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -20,10 +20,15 @@ if test "$PHP_IGBINARY" != "no"; then - AC_CHECK_HEADERS([stddef.h],, AC_MSG_ERROR([stddef.h not exists])) - AC_CHECK_HEADERS([stdint.h],, AC_MSG_ERROR([stdint.h not exists])) - -- AC_MSG_CHECKING([for apc includes]) -- if test -f "$phpincludedir/ext/apc/apc_serializer.h"; then -- apc_inc_path="$phpincludedir" -- AC_MSG_RESULT([$apc_inc_path]) -+ AC_MSG_CHECKING([for APC/APCU includes]) -+ if test -f "$phpincludedir/ext/apcu/apc_api.h"; then -+ apc_inc_path="$phpincludedir" -+ AC_MSG_RESULT([APCU in $apc_inc_path]) -+ AC_DEFINE(HAVE_APC_SUPPORT,1,[Whether to enable apc support]) -+ AC_DEFINE(HAVE_APCU_SUPPORT,1,[Whether to enable apc support via apcu]) -+ elif test -f "$phpincludedir/ext/apc/apc_serializer.h"; then -+ apc_inc_path="$phpincludedir" -+ AC_MSG_RESULT([APC in $apc_inc_path]) - AC_DEFINE(HAVE_APC_SUPPORT,1,[Whether to enable apc support]) - elif test -f "${srcdir}/apc_serializer.h"; then - AC_MSG_RESULT([apc_serializer.h bundled]) -diff --git a/igbinary.c b/igbinary.c -index 0c2eab1..157531b 100644 ---- a/igbinary.c -+++ b/igbinary.c -@@ -28,6 +28,9 @@ - - #include "ext/standard/php_incomplete_class.h" - -+#ifdef HAVE_APCU_SUPPORT -+# include "ext/apcu/apc_api.h" -+#else - #ifdef HAVE_APC_SUPPORT - # if USE_BUNDLED_APC - # include "apc_serializer.h" -@@ -35,6 +38,7 @@ - # include "ext/apc/apc_serializer.h" - # endif - #endif /* HAVE_APC_SUPPORT */ -+#endif /* HAVE_APCU_SUPPORT */ - #include "php_igbinary.h" - - #include "igbinary.h" -@@ -242,9 +246,13 @@ struct igbinary_unserialize_data { - #ifdef HAVE_PHP_SESSION - ZEND_MOD_REQUIRED("session") - #endif -+#ifdef HAVE_APCU_SUPPORT -+ ZEND_MOD_REQUIRED("apcu") -+#else - #ifdef HAVE_APC_SUPPORT - ZEND_MOD_OPTIONAL("apc") - #endif -+#endif - {NULL, NULL, NULL} - }; - #endif -@@ -339,11 +347,15 @@ static void php_igbinary_init_globals(zend_igbinary_globals *igbinary_globals) { - php_info_print_table_start(); - php_info_print_table_row(2, "igbinary support", "enabled"); - php_info_print_table_row(2, "igbinary version", IGBINARY_VERSION); -+#ifdef HAVE_APCU_SUPPORT -+ php_info_print_table_row(2, "igbinary APCU serializer ABI", "yes"); -+#else - #ifdef HAVE_APC_SUPPORT - php_info_print_table_row(2, "igbinary APC serializer ABI", APC_SERIALIZER_ABI); - #else - php_info_print_table_row(2, "igbinary APC serializer ABI", "no"); - #endif -+#endif - #if HAVE_PHP_SESSION - php_info_print_table_row(2, "igbinary session support", "yes"); - #else --- -1.8.1.6 - - -From 2d95bc51e8b9f84f823d17d32a26e244afd4cda8 Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Sat, 27 Jul 2013 14:45:56 +0200 -Subject: [PATCH 2/2] improve APCU build (now that APCU have restored APC - serializers ABI) - ---- - config.m4 | 5 ++--- - igbinary.c | 20 ++++++++++---------- - 2 files changed, 12 insertions(+), 13 deletions(-) - -diff --git a/config.m4 b/config.m4 -index 158a222..4a551f2 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -21,11 +21,10 @@ if test "$PHP_IGBINARY" != "no"; then - AC_CHECK_HEADERS([stdint.h],, AC_MSG_ERROR([stdint.h not exists])) - - AC_MSG_CHECKING([for APC/APCU includes]) -- if test -f "$phpincludedir/ext/apcu/apc_api.h"; then -+ if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then - apc_inc_path="$phpincludedir" - AC_MSG_RESULT([APCU in $apc_inc_path]) -- AC_DEFINE(HAVE_APC_SUPPORT,1,[Whether to enable apc support]) -- AC_DEFINE(HAVE_APCU_SUPPORT,1,[Whether to enable apc support via apcu]) -+ AC_DEFINE(HAVE_APCU_SUPPORT,1,[Whether to enable apcu support]) - elif test -f "$phpincludedir/ext/apc/apc_serializer.h"; then - apc_inc_path="$phpincludedir" - AC_MSG_RESULT([APC in $apc_inc_path]) -diff --git a/igbinary.c b/igbinary.c -index 157531b..bc7aa6d 100644 ---- a/igbinary.c -+++ b/igbinary.c -@@ -29,8 +29,9 @@ - #include "ext/standard/php_incomplete_class.h" - - #ifdef HAVE_APCU_SUPPORT --# include "ext/apcu/apc_api.h" --#else -+# include "ext/apcu/apc_serializer.h" -+#endif /* HAVE_APCU_SUPPORT */ -+ - #ifdef HAVE_APC_SUPPORT - # if USE_BUNDLED_APC - # include "apc_serializer.h" -@@ -38,7 +39,7 @@ - # include "ext/apc/apc_serializer.h" - # endif - #endif /* HAVE_APC_SUPPORT */ --#endif /* HAVE_APCU_SUPPORT */ -+ - #include "php_igbinary.h" - - #include "igbinary.h" -@@ -60,7 +61,7 @@ - PS_SERIALIZER_FUNCS(igbinary); - #endif /* HAVE_PHP_SESSION */ - --#ifdef HAVE_APC_SUPPORT -+#if defined(HAVE_APC_SUPPORT) || defined(HAVE_APCU_SUPPORT) - /** Apc serializer function prototypes */ - static int APC_SERIALIZER_NAME(igbinary) (APC_SERIALIZER_ARGS); - static int APC_UNSERIALIZER_NAME(igbinary) (APC_UNSERIALIZER_ARGS); -@@ -247,12 +248,11 @@ struct igbinary_unserialize_data { - ZEND_MOD_REQUIRED("session") - #endif - #ifdef HAVE_APCU_SUPPORT -- ZEND_MOD_REQUIRED("apcu") --#else -+ ZEND_MOD_OPTIONAL("apcu") -+#endif - #ifdef HAVE_APC_SUPPORT - ZEND_MOD_OPTIONAL("apc") - #endif --#endif - {NULL, NULL, NULL} - }; - #endif -@@ -312,7 +312,7 @@ static void php_igbinary_init_globals(zend_igbinary_globals *igbinary_globals) { - PS_SERIALIZER_DECODE_NAME(igbinary)); - #endif - --#ifdef HAVE_APC_SUPPORT -+#if defined(HAVE_APC_SUPPORT) || defined(HAVE_APCU_SUPPORT) - apc_register_serializer("igbinary", - APC_SERIALIZER_NAME(igbinary), - APC_UNSERIALIZER_NAME(igbinary), -@@ -348,7 +348,7 @@ static void php_igbinary_init_globals(zend_igbinary_globals *igbinary_globals) { - php_info_print_table_row(2, "igbinary support", "enabled"); - php_info_print_table_row(2, "igbinary version", IGBINARY_VERSION); - #ifdef HAVE_APCU_SUPPORT -- php_info_print_table_row(2, "igbinary APCU serializer ABI", "yes"); -+ php_info_print_table_row(2, "igbinary APCU serializer ABI", APC_SERIALIZER_ABI); - #else - #ifdef HAVE_APC_SUPPORT - php_info_print_table_row(2, "igbinary APC serializer ABI", APC_SERIALIZER_ABI); -@@ -604,7 +604,7 @@ IGBINARY_API int igbinary_unserialize(const uint8_t *buf, size_t buf_len, zval * - /* }}} */ - #endif /* HAVE_PHP_SESSION */ - --#ifdef HAVE_APC_SUPPORT -+#if defined(HAVE_APC_SUPPORT) || defined(HAVE_APCU_SUPPORT) - /* {{{ apc_serialize function */ - static int APC_SERIALIZER_NAME(igbinary) ( APC_SERIALIZER_ARGS ) { - (void)config; --- -1.8.1.6 - -From 272e78821b96815fc40d364f9971add10a0bf66e Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Sat, 27 Jul 2013 15:03:06 +0200 -Subject: [PATCH] fix test when APCU used - ---- - tests/igbinary_029.phpt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/igbinary_029.phpt b/tests/igbinary_029.phpt -index 9027638..f1941d2 100644 ---- a/tests/igbinary_029.phpt -+++ b/tests/igbinary_029.phpt -@@ -19,6 +19,6 @@ echo implode("\n", $array); - igbinary - igbinary support => enabled - igbinary version => %s --igbinary APC serializer ABI => %s -+igbinary AP%s serializer ABI => %s - igbinary session support => %s - igbinary.compact_strings => %s => %s --- -1.8.3.1 - diff --git a/php-pecl-igbinary.spec b/php-pecl-igbinary.spec index d990387..360b00b 100644 --- a/php-pecl-igbinary.spec +++ b/php-pecl-igbinary.spec @@ -37,9 +37,6 @@ Group: System Environment/Libraries URL: http://pecl.php.net/package/igbinary -# https://github.com/igbinary/igbinary/pull/24 -Patch0: igbinary-apcu.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-devel >= 5.2.0 @@ -110,16 +107,12 @@ These are the files needed to compile programs using Igbinary mv igbinary-%{commit}/package.xml . mv igbinary-%{commit} NTS sed -e '/release/s/-dev/dev/' -i package.xml - -cd %{extname}-%{version} - -%patch0 -p1 -b .apcu - %else mv %{extname}-%{version} NTS -cd NTS %endif +cd NTS + # Check version sed -e '/IGBINARY_VERSION/s/1.1.2-dev/%{version}/' -i igbinary.h @@ -274,7 +267,8 @@ fi %changelog * Thu Aug 28 2014 Remi Collet <remi@fedoraproject.org> - 1.2.0-1 -- update to 1.1.1 +- update to 1.2.0 +- open https://github.com/igbinary/igbinary/pull/36 * Sun Aug 24 2014 Remi Collet <remi@fedoraproject.org> - 1.1.2-0.11.git3b8ab7e - improve SCL stuff |