summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--amqp-178.patch79
-rw-r--r--amqp-179.patch22
2 files changed, 101 insertions, 0 deletions
diff --git a/amqp-178.patch b/amqp-178.patch
new file mode 100644
index 0000000..493be50
--- /dev/null
+++ b/amqp-178.patch
@@ -0,0 +1,79 @@
+From e7699fb159dca1d68d419255acee4ea9f532bfa2 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Fri, 18 Sep 2015 11:38:15 +0200
+Subject: [PATCH] fix build with librabbitmq 0.5, fix #177
+
+---
+ amqp.c | 4 ++++
+ amqp_connection.c | 4 ++++
+ amqp_connection.h | 4 +++-
+ 3 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/amqp.c b/amqp.c
+index 4c8769b..087e5cd 100644
+--- a/amqp.c
++++ b/amqp.c
+@@ -493,6 +493,10 @@ zend_function_entry amqp_connection_class_functions[] = {
+ PHP_ME(amqp_connection_class, getUsedChannels, arginfo_amqp_connection_class_getUsedChannels, ZEND_ACC_PUBLIC)
+ PHP_ME(amqp_connection_class, getMaxChannels, arginfo_amqp_connection_class_getMaxChannels, ZEND_ACC_PUBLIC)
+ PHP_ME(amqp_connection_class, isPersistent, arginfo_amqp_connection_class_isPersistent, ZEND_ACC_PUBLIC)
++#if AMQP_VERSION_MAJOR * 100 + AMQP_VERSION_MINOR * 10 + AMQP_VERSION_PATCH > 52
++ PHP_ME(amqp_connection_class, getHeartbeatInterval, arginfo_amqp_connection_class_getHeartbeatInterval, ZEND_ACC_PUBLIC)
++ PHP_ME(amqp_connection_class, getMaxFrameSize, arginfo_amqp_connection_class_getMaxFrameSize, ZEND_ACC_PUBLIC)
++#endif
+
+ {NULL, NULL, NULL} /* Must be the last line in amqp_functions[] */
+ };
+diff --git a/amqp_connection.c b/amqp_connection.c
+index cae9c12..f65fe3b 100644
+--- a/amqp_connection.c
++++ b/amqp_connection.c
+@@ -141,6 +141,7 @@ HashTable *amqp_connection_object_get_debug_info(zval *object, int *is_temp TSRM
+ }
+ zend_hash_add(debug_info, "max_channel_id", sizeof("max_channel_id"), &value, sizeof(zval *), NULL);
+
++#if AMQP_VERSION_MAJOR * 100 + AMQP_VERSION_MINOR * 10 + AMQP_VERSION_PATCH > 52
+ MAKE_STD_ZVAL(value);
+ if (connection->connection_resource) {
+ ZVAL_LONG(value, amqp_get_frame_max(connection->connection_resource->connection_state));
+@@ -156,6 +157,7 @@ HashTable *amqp_connection_object_get_debug_info(zval *object, int *is_temp TSRM
+ ZVAL_NULL(value);
+ }
+ zend_hash_add(debug_info, "heartbeat_interval", sizeof("heartbeat_interval"), &value, sizeof(zval *), NULL);
++#endif
+
+ /* Start adding values */
+ return debug_info;
+@@ -1361,6 +1363,7 @@ PHP_METHOD(amqp_connection_class, getMaxChannels)
+ }
+ /* }}} */
+
++#if AMQP_VERSION_MAJOR * 100 + AMQP_VERSION_MINOR * 10 + AMQP_VERSION_PATCH > 52
+ /* {{{ proto amqp::getMaxFrameSize()
+ Get max supported frame size per connection in bytes */
+ PHP_METHOD(amqp_connection_class, getMaxFrameSize)
+@@ -1408,6 +1411,7 @@ PHP_METHOD(amqp_connection_class, getHeartbeatInterval)
+ RETURN_LONG(amqp_get_heartbeat(connection->connection_resource->connection_state));
+ }
+ /* }}} */
++#endif
+
+ /* {{{ proto amqp::isPersistent()
+ check whether amqp connection is persistent */
+diff --git a/amqp_connection.h b/amqp_connection.h
+index 277e5ff..2c6ef92 100644
+--- a/amqp_connection.h
++++ b/amqp_connection.h
+@@ -68,9 +68,11 @@ PHP_METHOD(amqp_connection_class, getWriteTimeout);
+ PHP_METHOD(amqp_connection_class, setWriteTimeout);
+
+ PHP_METHOD(amqp_connection_class, getUsedChannels);
+-PHP_METHOD(amqp_connection_class, getMaxFrameSize);
+ PHP_METHOD(amqp_connection_class, getMaxChannels);
++#if AMQP_VERSION_MAJOR * 100 + AMQP_VERSION_MINOR * 10 + AMQP_VERSION_PATCH > 52
+ PHP_METHOD(amqp_connection_class, getHeartbeatInterval);
++PHP_METHOD(amqp_connection_class, getMaxFrameSize);
++#endif
+ PHP_METHOD(amqp_connection_class, isPersistent);
+
+ /*
diff --git a/amqp-179.patch b/amqp-179.patch
new file mode 100644
index 0000000..58c7678
--- /dev/null
+++ b/amqp-179.patch
@@ -0,0 +1,22 @@
+From 0205ec625f6d585848933d710a2ea267c8c72071 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Fri, 18 Sep 2015 11:41:58 +0200
+Subject: [PATCH] honour --with-libdir option
+
+---
+ config.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config.m4 b/config.m4
+index d5b5999..c219769 100644
+--- a/config.m4
++++ b/config.m4
+@@ -80,7 +80,7 @@ if test "$PHP_AMQP" != "no"; then
+ fi
+ fi
+
+- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $AMQP_DIR/lib, AMQP_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $AMQP_DIR/$PHP_LIBDIR, AMQP_SHARED_LIBADD)
+ PHP_SUBST(AMQP_SHARED_LIBADD)
+
+ AMQP_SOURCES="amqp.c amqp_exchange.c amqp_queue.c amqp_connection.c amqp_connection_resource.c amqp_channel.c amqp_envelope.c amqp_object_store.c"