Explorar el Código

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 hace 5 años
padre
commit
e16f05c0f0
Se han modificado 2 ficheros con 15 adiciones y 0 borrados
  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
 	help
 	  XSL transformation support
 	  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
 endmenu

+ 5 - 0
package/php/php.mk

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