diff options
Diffstat (limited to 'package/php')
-rw-r--r-- | package/php/0001-ditch-unset.patch | 6 | ||||
-rw-r--r-- | package/php/0002-no-iconv-search.patch | 8 | ||||
-rw-r--r-- | package/php/Config.ext | 5 | ||||
-rw-r--r-- | package/php/php.hash | 2 | ||||
-rw-r--r-- | package/php/php.mk | 36 |
5 files changed, 47 insertions, 10 deletions
diff --git a/package/php/0001-ditch-unset.patch b/package/php/0001-ditch-unset.patch index b43b40f0c4..eda83c95a3 100644 --- a/package/php/0001-ditch-unset.patch +++ b/package/php/0001-ditch-unset.patch @@ -3,9 +3,9 @@ Terminate them with extreme prejudice. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> -diff -Nura php-5.6.7.orig/aclocal.m4 php-5.6.7/aclocal.m4 ---- php-5.6.7.orig/aclocal.m4 2015-04-08 11:08:11.208848359 -0300 -+++ php-5.6.7/aclocal.m4 2015-04-08 11:08:49.828160195 -0300 +diff -Nura php-5.6.8.orig/acinclude.m4 php-5.6.8/acinclude.m4 +--- php-5.6.8.orig/acinclude.m4 2015-04-15 20:05:57.000000000 +0200 ++++ php-5.6.8/acinclude.m4 2015-05-18 20:03:50.833099001 +0200 @@ -1897,8 +1897,6 @@ dnl AC_DEFUN([PHP_CHECK_FUNC_LIB],[ diff --git a/package/php/0002-no-iconv-search.patch b/package/php/0002-no-iconv-search.patch index 3496222166..322395379d 100644 --- a/package/php/0002-no-iconv-search.patch +++ b/package/php/0002-no-iconv-search.patch @@ -8,10 +8,10 @@ PHP_ICONV_H_PATH which, again, uses test and absolute paths. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> [Gustavo: convert to nice m4 instead of patching configure] -diff -Nura php-5.6.7.orig/aclocal.m4 php-5.6.7/aclocal.m4 ---- php-5.6.7.orig/aclocal.m4 2015-04-08 11:08:11.208848359 -0300 -+++ php-5.6.7/aclocal.m4 2015-04-08 11:42:17.321044950 -0300 -@@ -2474,7 +2474,7 @@ +diff -Nura php-5.6.8.orig/acinclude.m4 php-5.6.8/acinclude.m4 +--- php-5.6.8.orig/acinclude.m4 2015-05-18 20:06:48.557099001 +0200 ++++ php-5.6.8/acinclude.m4 2015-05-18 20:07:33.177099001 +0200 +@@ -2470,7 +2470,7 @@ dnl if test "$found_iconv" = "no"; then diff --git a/package/php/Config.ext b/package/php/Config.ext index 499509037e..5324e7958a 100644 --- a/package/php/Config.ext +++ b/package/php/Config.ext @@ -159,9 +159,14 @@ config BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL bool "PostgreSQL" select BR2_PACKAGE_POSTGRESQL depends on BR2_USE_MMU # postgresql + depends on !BR2_STATIC_LIBS help PDO driver for PostgreSQL +comment "PostgreSQL drivers need a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS + config BR2_PACKAGE_PHP_EXT_PDO_SQLITE bool "SQLite3" select BR2_PACKAGE_SQLITE diff --git a/package/php/php.hash b/package/php/php.hash index 210c9f0430..fe938f5ed1 100644 --- a/package/php/php.hash +++ b/package/php/php.hash @@ -1,2 +1,2 @@ # From http://php.net/downloads.php -md5 526a5a7f593de632cd9e8546335de8b7 php-5.6.8.tar.xz +sha256 1fac497b596f5e4e87d87a7ca90f8725e39a8ca3f9d7adb500fa83c4bb70a73f php-5.6.9.tar.xz diff --git a/package/php/php.mk b/package/php/php.mk index 47811fff76..c9bcfe30ed 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -4,7 +4,8 @@ # ################################################################################ -PHP_VERSION = 5.6.8 +PHP_VERSION_MAJOR = 5.6 +PHP_VERSION = $(PHP_VERSION_MAJOR).9 PHP_SITE = http://www.php.net/distributions PHP_SOURCE = php-$(PHP_VERSION).tar.xz PHP_INSTALL_STAGING = YES @@ -24,6 +25,10 @@ PHP_CONF_ENV = \ ac_cv_func_strcasestr=yes \ EXTRA_LIBS="$(PHP_EXTRA_LIBS)" +ifeq ($(BR2_STATIC_LIBS),y) +PHP_CONF_ENV += LIBS="$(PHP_STATIC_LIBS)" +endif + ifeq ($(BR2_TARGET_LOCALTIME),) PHP_LOCALTIME = UTC else @@ -109,6 +114,9 @@ endif ifeq ($(BR2_PACKAGE_PHP_EXT_OPENSSL),y) PHP_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr PHP_DEPENDENCIES += openssl +# openssl needs zlib, but the configure script forgets to link against +# it causing detection failures with static linking +PHP_STATIC_LIBS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs --static openssl) endif ifeq ($(BR2_PACKAGE_PHP_EXT_LIBXML2),y) @@ -179,6 +187,7 @@ endif ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y) PHP_CONF_OPTS += --with-sqlite3=$(STAGING_DIR)/usr PHP_DEPENDENCIES += sqlite +PHP_STATIC_LIBS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs --static sqlite3) endif ### PDO @@ -200,13 +209,31 @@ endif ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_UNIXODBC),y) PHP_CONF_OPTS += --with-pdo-odbc=unixODBC,$(STAGING_DIR)/usr PHP_DEPENDENCIES += unixodbc +ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +PHP_STATIC_LIBS += -lpthread endif endif +endif + +define PHP_DISABLE_PCRE_JIT + $(SED) '/^#define SUPPORT_JIT/d' $(@D)/ext/pcre/pcrelib/config.h +endef ### Use external PCRE if it's available ifeq ($(BR2_PACKAGE_PCRE),y) PHP_CONF_OPTS += --with-pcre-regex=$(STAGING_DIR)/usr PHP_DEPENDENCIES += pcre +else +# The bundled pcre library is not configurable through ./configure options, +# and by default is configured to be thread-safe, so it wants pthreads. So +# we must explicitly tell it when we don't have threads. +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +PHP_CFLAGS += -DSLJIT_SINGLE_THREADED=1 +endif +# check ext/pcre/pcrelib/sljit/sljitConfigInternal.h for supported archs +ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb)$(BR2_aarch64)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_sparc),) +PHP_POST_CONFIGURE_HOOKS += PHP_DISABLE_PCRE_JIT +endif endif ifeq ($(BR2_PACKAGE_PHP_EXT_CURL),y) @@ -275,6 +302,8 @@ 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 + # remove unused sample status page /usr/php/php/fpm/status.html + rm -rf $(TARGET_DIR)/usr/php endef PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FPM_CONF @@ -290,12 +319,15 @@ endef PHP_POST_INSTALL_TARGET_HOOKS += PHP_EXTENSIONS_FIXUP define PHP_INSTALL_FIXUP - rm -rf $(TARGET_DIR)/usr/lib/php + rm -rf $(TARGET_DIR)/usr/lib/php/build rm -f $(TARGET_DIR)/usr/bin/phpize $(INSTALL) -D -m 0755 $(PHP_DIR)/php.ini-production \ $(TARGET_DIR)/etc/php.ini $(SED) 's%;date.timezone =.*%date.timezone = $(PHP_LOCALTIME)%' \ $(TARGET_DIR)/etc/php.ini + $(if $(BR2_PACKAGE_PHP_EXT_OPCACHE), + $(SED) '/;extension=php_xsl.dll/azend_extension=opcache.so' \ + $(TARGET_DIR)/etc/php.ini) endef PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FIXUP |