php8: add php8 depends and move compile option to Config.in
authorFlorian Eckert <redacted>
Thu, 18 Dec 2025 12:11:23 +0000 (13:11 +0100)
committerMichael Heimpold <redacted>
Sun, 11 Jan 2026 19:45:13 +0000 (20:45 +0100)
The php8 Makefile is already quite large. To improve readability, move
config section to a separate 'Config.in' file. To ensure that the PHP8
option is only saved in '.config' if PHP8 has been selected for building. A
depends on 'PACKAGE_php8' is added to the configuration option in the
'Config.in' file.

Signed-off-by: Florian Eckert <redacted>
lang/php8/Config.in [new file with mode: 0644]
lang/php8/Makefile

diff --git a/lang/php8/Config.in b/lang/php8/Config.in
new file mode 100644 (file)
index 0000000..5859b05
--- /dev/null
@@ -0,0 +1,36 @@
+menu "Configuration"
+       depends on PACKAGE_php8
+
+config PHP8_LIBXML
+       bool "PHP8 LIBXML support"
+       default y
+
+config PHP8_DOM
+       bool "PHP8 DOM support"
+       depends on PHP8_LIBXML
+       default y
+
+config PHP8_SYSTEMTZDATA
+       bool "Use system timezone data instead of php's built-in database"
+       depends on PACKAGE_php8-cli || PACKAGE_php8-cgi || PACKAGE_apache-mod-php8
+       default y
+       help
+         Enabling this feature automatically selects the zoneinfo-core package
+         which contains data for UTC timezone. To use other timezones you have
+         to install the corresponding zoneinfo-... package(s).
+
+config PHP8_GETTEXT
+       bool "Enable gettext"
+       default y
+
+config PHP8_INTL
+       bool "Enable Internationalization"
+       depends on PHP8_GETTEXT
+       default y
+
+config PHP8_FULLICUDATA
+       bool "Add dependency to full ICU Data"
+       depends on PHP8_INTL
+       default n
+
+endmenu
index 70c45f93e3efd6d884593dfb350bc22b17360803..ac5b9ab733441e4eef87823d9e183806d5125bda 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
 PKG_VERSION:=8.4.16
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 PKG_LICENSE:=PHP-3.01
@@ -61,38 +61,7 @@ define Package/php8/Default/description
 endef
 
 define Package/php8/config
-       config PHP8_LIBXML
-               bool "PHP8 LIBXML support"
-               default y
-
-       config PHP8_DOM
-               bool "PHP8 DOM support"
-    depends on PHP8_LIBXML
-               default y
-
-       config PHP8_SYSTEMTZDATA
-               bool "Use system timezone data instead of php's built-in database"
-               depends on PACKAGE_php8-cli || PACKAGE_php8-cgi || PACKAGE_apache-mod-php8
-               default y
-               help
-                       Enabling this feature automatically selects the zoneinfo-core package
-                       which contains data for UTC timezone. To use other timezones you have
-                       to install the corresponding zoneinfo-... package(s).
-
-       config PHP8_GETTEXT
-               bool "Enable gettext"
-               default y
-
-       config PHP8_INTL
-               bool "Enable Internationalization"
-    depends on PHP8_GETTEXT
-               default y
-
-       config PHP8_FULLICUDATA
-               bool "Add dependency to full ICU Data"
-               depends on PHP8_INTL
-               default n
-
+  source "$(SOURCE)/Config.in"
 endef
 
 define Package/php8
git clone https://git.99rst.org/PROJECT