瀏覽代碼

package/php: add FFI extension support

Signed-off-by: Tom Marcuzzi <tom.marcuzzi@orolia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tom Marcuzzi 5 年之前
父節點
當前提交
e16f05c0f0
共有 2 個文件被更改,包括 15 次插入0 次删除
  1. 10 0
      package/php/Config.ext
  2. 5 0
      package/php/php.mk

+ 10 - 0
package/php/Config.ext

@@ -427,4 +427,14 @@ config BR2_PACKAGE_PHP_EXT_XSL
 	help
 	  XSL transformation support
 
+config BR2_PACKAGE_PHP_EXT_FFI
+	bool "FFI"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_LIBFFI
+	help
+	  Foreign Function Interface support
+
+comment "PHP FFI extension needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
 endmenu

+ 5 - 0
package/php/php.mk

@@ -333,6 +333,11 @@ PHP_CONF_OPTS += \
 PHP_DEPENDENCIES += jpeg libpng freetype zlib
 endif
 
+ifeq ($(BR2_PACKAGE_PHP_EXT_FFI),y)
+PHP_CONF_OPTS += --with-ffi
+PHP_DEPENDENCIES += libffi
+endif
+
 ifeq ($(BR2_PACKAGE_PHP_SAPI_FPM),y)
 define PHP_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 $(@D)/sapi/fpm/init.d.php-fpm \