php: enable opcache extension in php.ini if selected
authorFloris Bos <bos@je-eigen-domein.nl>
Mon, 18 May 2015 19:52:01 +0000 (21:52 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 19 May 2015 19:41:10 +0000 (21:41 +0200)
Add a line to load the opcache extension in php.ini, at the
bottom of the "dynamic extensions" section.

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/php/php.mk

index bc3794af88f3cda5827f48fb5d6413bb8937a63d..6e0e216ea0cef48eb26051387780f608ff128d54 100644 (file)
@@ -301,6 +301,9 @@ define PHP_INSTALL_FIXUP
                $(TARGET_DIR)/etc/php.ini
        $(SED) 's%;date.timezone =.*%date.timezone = $(PHP_LOCALTIME)%' \
                $(TARGET_DIR)/etc/php.ini
+       $(if $(BR2_PACKAGE_PHP_EXT_OPCACHE),
+               $(SED) '/;extension=php_xsl.dll/azend_extension=opcache.so' \
+               $(TARGET_DIR)/etc/php.ini)
 endef
 
 PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FIXUP