php8: fix gettext and intl dependencies and build
authorDaniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Thu, 1 Jan 2026 06:17:32 +0000 (01:17 -0500)
committerMichael Heimpold <mhei@heimpold.de>
Fri, 16 Jan 2026 06:35:52 +0000 (07:35 +0100)
* Add a needed BUILD_DEPENDENCY on icu package, when PHP8_INTL is
  defined.
* Make PHP8_DOM selecting PHP8_LIBXML instead of depending on it.
* PHP8_INTL does not depend on PHP8_GETTEXT, it builds also
  without gettext.
* Always show option for choosing PHP8_FULLUCIDATA
* For php8-cgi, php-cli, etc, a libstdcpp dependency is only gained
when PHP8_INTL is selected, therefore update those conditional depends.

As some combinations of these changes can change the binaries output,
PKG_RELEASE has been bumped.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
lang/php8/Config.in
lang/php8/Makefile

index b9c02c274f19e6e5fa5b5c414712bc3f6a06a6b2..cc088e830df755ef44a34f30d0a9dbc202e21707 100644 (file)
@@ -7,7 +7,7 @@ config PHP8_LIBXML
 
 config PHP8_DOM
        bool "PHP8 DOM support"
-       depends on PHP8_LIBXML
+       select PHP8_LIBXML
        default y
        help
          Without php8-mod-dom, this option does not provide a PHP8
@@ -35,7 +35,6 @@ config PHP8_GETTEXT
 
 config PHP8_INTL
        bool "Enable Internationalization"
-       depends on PHP8_GETTEXT
        default y
        help
          Note that this option depends in ICU library which is built without data
@@ -51,7 +50,6 @@ config PHP8_INTL
 
 config PHP8_FULLICUDATA
        bool "Add dependency to full ICU Data"
-       depends on PHP8_INTL
        default n
 
 endmenu
index b4e1c6483c8abcebdcaeeac0c7701b6a25a1cf28..b2023168934af47fc95db681f3954c204540e270 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
 PKG_VERSION:=8.4.16
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 PKG_LICENSE:=PHP-3.01
@@ -47,6 +47,8 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_PHP8_LIBXML \
        CONFIG_PHP8_SYSTEMTZDATA
 
+PKG_BUILD_DEPENDS:= PHP8_INTL:icu
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
 
@@ -88,7 +90,7 @@ endef
 
 define Package/php8-cli
   $(call Package/php8/Default)
-  DEPENDS+= +PHP8_GETTEXT:libstdcpp +riscv64:libatomic
+  DEPENDS+= +PHP8_INTL:libstdcpp +riscv64:libatomic
   TITLE+= (CLI)
 endef
 
@@ -99,7 +101,7 @@ endef
 
 define Package/php8-cgi
   $(call Package/php8/Default)
-  DEPENDS+= +PHP8_GETTEXT:libstdcpp +riscv64:libatomic
+  DEPENDS+= +PHP8_INTL:libstdcpp +riscv64:libatomic
   TITLE+= (CGI & FastCGI)
 endef
 
@@ -121,7 +123,7 @@ endef
 
 define Package/php8-fpm
   $(call Package/php8/Default)
-  DEPENDS+= +PHP8_GETTEXT:libstdcpp +riscv64:libatomic
+  DEPENDS+= +PHP8_INTL:libstdcpp +riscv64:libatomic
   TITLE+= (FPM)
 endef