if BR2_PACKAGE_PHP
if !BR2_STATIC_LIBS
menu "External php extensions"
+ source "package/php-amqp/Config.in"
source "package/php-geoip/Config.in"
source "package/php-gnupg/Config.in"
source "package/php-imagick/Config.in"
--- /dev/null
+config BR2_PACKAGE_PHP_AMQP
+ bool "php-amqp"
+ depends on BR2_PACKAGE_PHP
+ depends on BR2_TOOLCHAIN_HAS_THREADS # rabbitmq-c
+ depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX # rabbitmq-c
+ select BR2_PACKAGE_RABBITMQ_C
+ help
+ Communicate with any AMQP compliant server.
+
+ http://pecl.php.net/package/amqp
+
+comment "php-amqp needs a toolchain w/ threads"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
+ depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
--- /dev/null
+################################################################################
+#
+# php-amqp
+#
+################################################################################
+
+PHP_AMQP_VERSION = 1.7.1
+PHP_AMQP_SOURCE = amqp-$(PHP_AMQP_VERSION).tgz
+PHP_AMQP_SITE = https://pecl.php.net/get
+PHP_AMQP_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
+ --with-amqp=$(STAGING_DIR)/usr
+# phpize does the autoconf magic
+PHP_AMQP_DEPENDENCIES = rabbitmq-c php host-autoconf
+PHP_AMQP_LICENSE = PHP
+PHP_AMQP_LICENSE_FILES = LICENSE
+
+define PHP_AMQP_PHPIZE
+ (cd $(@D); \
+ PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \
+ PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \
+ $(STAGING_DIR)/usr/bin/phpize)
+endef
+
+PHP_AMQP_PRE_CONFIGURE_HOOKS += PHP_AMQP_PHPIZE
+
+$(eval $(autotools-package))