This commit is contained in:
TriForceX
2021-03-13 22:13:38 -03:00
parent c77595adbd
commit b3ecc6e32d
7043 changed files with 119373 additions and 73690 deletions
+31 -15
View File
@@ -4,7 +4,7 @@
#
################################################################################
PHP_VERSION = 7.3.8
PHP_VERSION = 7.4.11
PHP_SITE = http://www.php.net/distributions
PHP_SOURCE = php-$(PHP_VERSION).tar.xz
PHP_INSTALL_STAGING = YES
@@ -16,6 +16,7 @@ PHP_LICENSE_FILES = LICENSE
PHP_CONF_OPTS = \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-config-file-scan-dir=/etc/php.d \
--disable-all \
--without-pear \
--with-config-file-path=/etc \
@@ -96,7 +97,6 @@ PHP_CONF_OPTS += \
$(if $(BR2_PACKAGE_PHP_EXT_SOCKETS),--enable-sockets) \
$(if $(BR2_PACKAGE_PHP_EXT_POSIX),--enable-posix) \
$(if $(BR2_PACKAGE_PHP_EXT_SESSION),--enable-session) \
$(if $(BR2_PACKAGE_PHP_EXT_HASH),--enable-hash) \
$(if $(BR2_PACKAGE_PHP_EXT_DOM),--enable-dom) \
$(if $(BR2_PACKAGE_PHP_EXT_SIMPLEXML),--enable-simplexml) \
$(if $(BR2_PACKAGE_PHP_EXT_SOAP),--enable-soap) \
@@ -112,15 +112,29 @@ PHP_CONF_OPTS += \
$(if $(BR2_PACKAGE_PHP_EXT_SYSVMSG),--enable-sysvmsg) \
$(if $(BR2_PACKAGE_PHP_EXT_SYSVSEM),--enable-sysvsem) \
$(if $(BR2_PACKAGE_PHP_EXT_SYSVSHM),--enable-sysvshm) \
$(if $(BR2_PACKAGE_PHP_EXT_ZIP),--enable-zip) \
$(if $(BR2_PACKAGE_PHP_EXT_ZIP),--with-zip) \
$(if $(BR2_PACKAGE_PHP_EXT_CTYPE),--enable-ctype) \
$(if $(BR2_PACKAGE_PHP_EXT_FILTER),--enable-filter) \
$(if $(BR2_PACKAGE_PHP_EXT_CALENDAR),--enable-calendar) \
$(if $(BR2_PACKAGE_PHP_EXT_FILEINFO),--enable-fileinfo) \
$(if $(BR2_PACKAGE_PHP_EXT_BCMATH),--enable-bcmath) \
$(if $(BR2_PACKAGE_PHP_EXT_MBSTRING),--enable-mbstring) \
$(if $(BR2_PACKAGE_PHP_EXT_PHAR),--enable-phar)
ifeq ($(BR2_PACKAGE_PHP_EXT_LIBARGON2),y)
PHP_CONF_OPTS += --with-password-argon2=$(STAGING_DIR)/usr
PHP_DEPENDENCIES += libargon2
endif
ifeq ($(BR2_PACKAGE_PHP_EXT_LIBSODIUM),y)
PHP_CONF_OPTS += --with-sodium=$(STAGING_DIR)/usr
PHP_DEPENDENCIES += libsodium
endif
ifeq ($(BR2_PACKAGE_PHP_EXT_MBSTRING),y)
PHP_CONF_OPTS += --enable-mbstring
PHP_DEPENDENCIES += oniguruma
endif
ifeq ($(BR2_PACKAGE_PHP_EXT_MCRYPT),y)
PHP_CONF_OPTS += --with-mcrypt=$(STAGING_DIR)/usr
PHP_DEPENDENCIES += libmcrypt
@@ -136,7 +150,7 @@ endif
ifeq ($(BR2_PACKAGE_PHP_EXT_LIBXML2),y)
PHP_CONF_ENV += php_cv_libxml_build_works=yes
PHP_CONF_OPTS += --enable-libxml --with-libxml-dir=$(STAGING_DIR)/usr
PHP_CONF_OPTS += --with-libxml
PHP_DEPENDENCIES += libxml2
endif
@@ -159,6 +173,8 @@ endif
ifneq ($(BR2_PACKAGE_PHP_EXT_ZLIB)$(BR2_PACKAGE_PHP_EXT_ZIP),)
PHP_CONF_OPTS += --with-zlib=$(STAGING_DIR)/usr
PHP_DEPENDENCIES += zlib
else
PHP_CONF_OPTS += --disable-mysqlnd_compression_support
endif
ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
@@ -310,12 +326,15 @@ endif
ifeq ($(BR2_PACKAGE_PHP_EXT_GD),y)
PHP_CONF_OPTS += \
--with-gd \
--with-jpeg-dir=$(STAGING_DIR)/usr \
--with-png-dir=$(STAGING_DIR)/usr \
--with-zlib-dir=$(STAGING_DIR)/usr \
--with-freetype-dir=$(STAGING_DIR)/usr
PHP_DEPENDENCIES += jpeg libpng freetype
--enable-gd \
--with-jpeg \
--with-freetype
PHP_DEPENDENCIES += jpeg libpng freetype zlib
endif
ifeq ($(BR2_PACKAGE_PHP_EXT_FFI),y)
PHP_CONF_OPTS += --with-ffi
PHP_DEPENDENCIES += libffi
endif
ifeq ($(BR2_PACKAGE_PHP_SAPI_FPM),y)
@@ -327,15 +346,12 @@ endef
define PHP_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/sapi/fpm/php-fpm.service \
$(TARGET_DIR)/usr/lib/systemd/system/php-fpm.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/php-fpm.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/php-fpm.service
endef
define PHP_INSTALL_FPM_CONF
$(INSTALL) -D -m 0644 package/php/php-fpm.conf \
$(TARGET_DIR)/etc/php-fpm.conf
rm -f $(TARGET_DIR)/etc/php-fpm.conf.default
rm -f $(TARGET_DIR)/etc/php-fpm.d/www.conf.default
# remove unused sample status page /usr/php/php/fpm/status.html
rm -rf $(TARGET_DIR)/usr/php
endef