Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 74 additions & 43 deletions lang/php8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=php
PKG_VERSION:=8.4.15
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_LICENSE:=PHP-3.01
Expand Down Expand Up @@ -40,7 +40,8 @@ PHP8_MODULES= \

PKG_CONFIG_DEPENDS:= \
$(patsubst %,CONFIG_PACKAGE_php8-mod-%,$(PHP8_MODULES)) \
CONFIG_PHP8_LIBXML CONFIG_PHP8_SYSTEMTZDATA CONFIG_PACKAGE_apache-mod-php8
CONFIG_PHP8_LIBXML CONFIG_PHP8_SYSTEMTZDATA CONFIG_PHP8_GETTEXT \
CONFIG_PHP8_FULLICUDATA CONFIG_PHP8_INTL CONFIG_PACKAGE_apache-mod-php8

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
Expand All @@ -62,7 +63,12 @@ endef
define Package/php8/config
config PHP8_LIBXML
bool "PHP8 LIBXML support"
depends on PACKAGE_php8-cli || PACKAGE_php8-cgi
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"
Expand All @@ -72,6 +78,21 @@ define Package/php8/config
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

endef

define Package/php8
Expand All @@ -94,7 +115,7 @@ endef

define Package/php8-cli
$(call Package/php8/Default)
DEPENDS+= +PACKAGE_php8-mod-intl:libstdcpp +riscv64:libatomic
DEPENDS+= +PHP8_GETTEXT:libstdcpp +riscv64:libatomic
TITLE+= (CLI)
endef

Expand All @@ -105,7 +126,7 @@ endef

define Package/php8-cgi
$(call Package/php8/Default)
DEPENDS+= +PACKAGE_php8-mod-intl:libstdcpp +riscv64:libatomic
DEPENDS+= +PHP8_GETTEXT:libstdcpp +riscv64:libatomic
TITLE+= (CGI & FastCGI)
endef

Expand All @@ -127,7 +148,7 @@ endef

define Package/php8-fpm
$(call Package/php8/Default)
DEPENDS+= +PACKAGE_php8-mod-intl:libstdcpp +riscv64:libatomic
DEPENDS+= +PHP8_GETTEXT:libstdcpp +riscv64:libatomic
TITLE+= (FPM)
endef

Expand All @@ -136,13 +157,6 @@ define Package/php8-fpm/description
This package contains the FastCGI Process Manager of the PHP8 interpreter.
endef

define Package/php8-mod-intl/config
config PHP8_FULLICUDATA
bool "Add dependency to full ICU Data"
depends on PACKAGE_php8-mod-intl
default n
endef

define Package/php8-mod-intl/description
Note that this package depends in ICU library which is built without data
by default. This is to satisfy programs build and run dependencies but to
Expand All @@ -158,7 +172,7 @@ define Package/apache-mod-php8
SECTION:=net
CATEGORY:=Network
DEPENDS+=PACKAGE_apache-mod-php8:apache \
+PACKAGE_php8-mod-intl:libstdcpp \
+PHP8_GETTEXT:libstdcpp \
+riscv64:libatomic \
+libpcre2 +zlib
TITLE:=PHP8 module for Apache Web Server
Expand Down Expand Up @@ -203,6 +217,19 @@ ifneq ($(findstring riscv64,$(CONFIG_ARCH)),)
TARGET_LDFLAGS += -latomic
endif


ifeq ($(CONFIG_PHP8_GETTEXT),y)
CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full"
else
CONFIGURE_ARGS+= --without-gettext
endif

ifeq ($(CONFIG_PHP8_INTL),y)
CONFIGURE_ARGS+= --enable-intl=shared
else
CONFIGURE_ARGS+= --disable-intl
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-bcmath),)
CONFIGURE_ARGS+= --enable-bcmath=shared
else
Expand All @@ -227,7 +254,7 @@ else
CONFIGURE_ARGS+= --without-curl
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-dom),)
ifeq ($(CONFIG_PHP8_DOM),y)
CONFIGURE_ARGS+= --enable-dom=shared
else
CONFIGURE_ARGS+= --disable-dom
Expand Down Expand Up @@ -265,12 +292,6 @@ else
CONFIGURE_ARGS+= --disable-gd
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-gettext),)
CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full"
else
CONFIGURE_ARGS+= --without-gettext
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-gmp),)
CONFIGURE_ARGS+= --with-gmp=shared,"$(STAGING_DIR)/usr"
else
Expand All @@ -289,12 +310,6 @@ else
CONFIGURE_ARGS+= --without-iconv
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-intl),)
CONFIGURE_ARGS+= --enable-intl=shared
else
CONFIGURE_ARGS+= --disable-intl
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-ldap),)
CONFIGURE_ARGS+= \
--with-ldap=shared,"$(STAGING_DIR)/usr" \
Expand Down Expand Up @@ -389,8 +404,12 @@ else
CONFIGURE_ARGS+= --disable-shmop
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-simplexml),)
CONFIGURE_ARGS+= --enable-simplexml=shared
ifeq ($(CONFIG_PHP8_LIBXML),y)
ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-simplexml),)
CONFIGURE_ARGS+= --enable-simplexml=shared
else
CONFIGURE_ARGS+= --disable-simplexml
endif
else
CONFIGURE_ARGS+= --disable-simplexml
endif
Expand All @@ -404,8 +423,12 @@ else
CONFIGURE_ARGS+= --without-snmp
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-soap),)
CONFIGURE_ARGS+= --enable-soap=shared
ifeq ($(CONFIG_PHP8_LIBXML),y)
ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-soap),)
CONFIGURE_ARGS+= --enable-soap=shared
else
CONFIGURE_ARGS+= --disable-soap
endif
else
CONFIGURE_ARGS+= --disable-soap
endif
Expand Down Expand Up @@ -461,14 +484,22 @@ else
CONFIGURE_ARGS+= --disable-xml
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-xmlreader),)
CONFIGURE_ARGS+= --enable-xmlreader=shared,"$(STAGING_DIR)/usr"
ifeq ($(CONFIG_PHP8_LIBXML),y)
ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-xmlreader),)
CONFIGURE_ARGS+= --enable-xmlreader=shared,"$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS+= --disable-xmlreader
endif
else
CONFIGURE_ARGS+= --disable-xmlreader
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-xmlwriter),)
CONFIGURE_ARGS+= --enable-xmlwriter=shared,"$(STAGING_DIR)/usr"
ifeq ($(CONFIG_PHP8_LIBXML),y)
ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-xmlwriter),)
CONFIGURE_ARGS+= --enable-xmlwriter=shared,"$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS+= --disable-xmlwriter
endif
else
CONFIGURE_ARGS+= --disable-xmlwriter
endif
Expand All @@ -479,7 +510,7 @@ else
CONFIGURE_ARGS+= --without-zip
endif

ifneq ($(SDK)$(CONFIG_PHP8_LIBXML),)
ifeq ($(CONFIG_PHP8_LIBXML),y)
CONFIGURE_ARGS+= --with-libxml
else
CONFIGURE_ARGS+= --without-libxml
Expand Down Expand Up @@ -637,16 +668,16 @@ $(eval $(call BuildModule,bcmath,Bcmath))
$(eval $(call BuildModule,calendar,Calendar))
$(eval $(call BuildModule,ctype,Ctype))
$(eval $(call BuildModule,curl,cURL,+PACKAGE_php8-mod-curl:libcurl))
$(eval $(call BuildModule,dom,DOM,+@PHP8_LIBXML +PACKAGE_php8-mod-dom:libxml2))
$(eval $(call BuildModule,dom,DOM,@PHP8_LIBXML @PHP8_DOM +PACKAGE_php8-mod-dom:libxml2))
$(eval $(call BuildModule,exif,EXIF))
$(eval $(call BuildModule,fileinfo,Fileinfo))
$(eval $(call BuildModule,filter,Filter))
$(eval $(call BuildModule,ftp,FTP,+PACKAGE_php8-mod-ftp:libopenssl))
$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php8-mod-gd:libgd-full))
$(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php8-mod-gettext:libintl-full))
$(eval $(call BuildModule,gettext,Gettext,@PHP8_GETTEXT +PACKAGE_php8-mod-gettext:libintl-full))
$(eval $(call BuildModule,gmp,GMP,+PACKAGE_php8-mod-gmp:libgmp))
$(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS)))
$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php8-mod-intl:icu +PHP8_FULLICUDATA:icu-full-data))
$(eval $(call BuildModule,intl,Internationalization Functions,@PHP8_INTL +PACKAGE_php8-mod-intl:icu +PHP8_FULLICUDATA:icu-full-data))
$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php8-mod-ldap:libopenldap +PACKAGE_php8-mod-ldap:libsasl2))
$(eval $(call BuildModule,mbstring,MBString,+PACKAGE_php8-mod-mbstring:oniguruma))
$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php8-mod-mysqli:php8-mod-mysqlnd,30))
Expand All @@ -662,9 +693,9 @@ $(eval $(call BuildModule,pgsql,PostgreSQL,+PACKAGE_php8-mod-pgsql:libpq))
$(eval $(call BuildModule,phar,Phar Archives))
$(eval $(call BuildModule,session,Session))
$(eval $(call BuildModule,shmop,Shared Memory))
$(eval $(call BuildModule,simplexml,SimpleXML,+@PHP8_LIBXML +PACKAGE_php8-mod-simplexml:libxml2))
$(eval $(call BuildModule,simplexml,SimpleXML,@PHP8_LIBXML +PACKAGE_php8-mod-simplexml:libxml2))
$(eval $(call BuildModule,snmp,SNMP,+PACKAGE_php8-mod-snmp:libnetsnmp +PACKAGE_php8-mod-snmp:libopenssl))
$(eval $(call BuildModule,soap,SOAP,+@PHP8_LIBXML +PACKAGE_php8-mod-soap:libxml2 +php8-mod-session))
$(eval $(call BuildModule,soap,SOAP,@PHP8_LIBXML +PACKAGE_php8-mod-soap:libxml2 +php8-mod-session))
$(eval $(call BuildModule,sockets,Sockets))
$(eval $(call BuildModule,sodium,Sodium,+PACKAGE_php8-mod-sodium:libsodium,30))
$(eval $(call BuildModule,sqlite3,SQLite3,+PACKAGE_php8-mod-sqlite3:libsqlite3))
Expand All @@ -673,6 +704,6 @@ $(eval $(call BuildModule,sysvsem,System V shared memory))
$(eval $(call BuildModule,sysvshm,System V semaphore))
$(eval $(call BuildModule,tokenizer,Tokenizer))
$(eval $(call BuildModule,xml,XML,+PHP8_LIBXML:libxml2 +!PHP8_LIBXML:libexpat))
$(eval $(call BuildModule,xmlreader,XMLReader,+@PHP8_LIBXML +PACKAGE_php8-mod-dom:php8-mod-dom +PACKAGE_php8-mod-xmlreader:libxml2))
$(eval $(call BuildModule,xmlwriter,XMLWriter,+@PHP8_LIBXML +PACKAGE_php8-mod-xmlwriter:libxml2))
$(eval $(call BuildModule,xmlreader,XMLReader,@PHP8_LIBXML @PHP8_DOM +PACKAGE_php8-mod-dom:php8-mod-dom +PACKAGE_php8-mod-xmlreader:libxml2))
$(eval $(call BuildModule,xmlwriter,XMLWriter,@PHP8_LIBXML +PACKAGE_php8-mod-xmlwriter:libxml2))
$(eval $(call BuildModule,zip,ZIP,+PACKAGE_php8-mod-zip:libzip))
Loading