[Buildroot] [PATCH] package/php: support --with-config-file-scan-dir

Dan Walkes danwalkes at trellis-logic.com
Sun May 19 00:19:42 UTC 2019


To support using multiple php configuration files, allow
setting of a config file scan director via menuconfig.

For php option details see link at [1].

[1] https://www.php.net/manual/en/configuration.file.php

Signed-off-by: Dan Walkes <danwalkes at trellis-logic.com>
---
 package/php/Config.in | 5 +++++
 package/php/php.mk    | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/package/php/Config.in b/package/php/Config.in
index 2469573..6157d4a 100644
--- a/package/php/Config.in
+++ b/package/php/Config.in
@@ -45,6 +45,11 @@ config BR2_PACKAGE_PHP_SAPI_FPM
 	help
 	  PHP-FPM (FastCGI Process Manager)
 
+config BR2_PACKAGE_PHP_WITH_CONFIG_FILE_SCAN_DIR
+	string "Specify --with-config-file-scan-dir"
+	help
+	  An additional directory containing php.ini files (e.g. /etc/php.d)
+
 source "package/php/Config.ext"
 
 endif
diff --git a/package/php/php.mk b/package/php/php.mk
index ed71c96..24499e8 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -318,6 +318,10 @@ PHP_CONF_OPTS += \
 PHP_DEPENDENCIES += jpeg libpng freetype
 endif
 
+ifneq ($(call qstrip,$(BR2_PACKAGE_PHP_WITH_CONFIG_FILE_SCAN_DIR)),)
+PHP_CONF_OPTS += --with-config-file-scan-dir=$(BR2_PACKAGE_PHP_WITH_CONFIG_FILE_SCAN_DIR)
+endif
+
 ifeq ($(BR2_PACKAGE_PHP_SAPI_FPM),y)
 define PHP_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 $(@D)/sapi/fpm/init.d.php-fpm \
-- 
2.7.4



More information about the buildroot mailing list