php8: add php8 depends and move compile option to Config.in

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 <fe@dev.tdt.de>
(cherry picked from commit 74a3da92b2)
This commit is contained in:
Florian Eckert
2025-12-18 13:11:23 +01:00
committed by Michael Heimpold
parent fa0d2a6cde
commit 1ab0b9917a
2 changed files with 38 additions and 33 deletions

36
lang/php8/Config.in Normal file
View File

@@ -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

View 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