package/php: add option to enable libsodium support
authorPascal de Bruijn <p.debruijn@unilogic.nl>
Fri, 8 Nov 2019 09:17:00 +0000 (10:17 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 9 Nov 2019 13:51:28 +0000 (14:51 +0100)
Signed-off-by: Pascal de Bruijn <p.debruijn@unilogic.nl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/php/Config.ext
package/php/php.mk

index c7f0332fd80742df4ce3de56603a2978d46da0b6..0c6ed4b40138c7bd6d59cb54428c70923cb1b8bf 100644 (file)
@@ -70,6 +70,12 @@ config BR2_PACKAGE_PHP_EXT_HASH
        help
          HASH message digest framework
 
+config BR2_PACKAGE_PHP_EXT_LIBSODIUM
+       bool "libsodium"
+       select BR2_PACKAGE_LIBSODIUM
+       help
+         libsodium support
+
 config BR2_PACKAGE_PHP_EXT_MCRYPT
        bool "mcrypt"
        select BR2_PACKAGE_LIBMCRYPT
index b679531238283dc12ab7c6c062255c9bf2947095..85bf2075aeef7aee3177384b992228e5ff1d3260 100644 (file)
@@ -122,6 +122,11 @@ PHP_CONF_OPTS += \
        $(if $(BR2_PACKAGE_PHP_EXT_MBSTRING),--enable-mbstring) \
        $(if $(BR2_PACKAGE_PHP_EXT_PHAR),--enable-phar)
 
+ifeq ($(BR2_PACKAGE_PHP_EXT_LIBSODIUM),y)
+PHP_CONF_OPTS += --with-sodium=$(STAGING_DIR)/usr
+PHP_DEPENDENCIES += libsodium
+endif
+
 ifeq ($(BR2_PACKAGE_PHP_EXT_MCRYPT),y)
 PHP_CONF_OPTS += --with-mcrypt=$(STAGING_DIR)/usr
 PHP_DEPENDENCIES += libmcrypt