php7: major upgrade to 7.4.1
authorMichael Heimpold <mhei@heimpold.de>
Mon, 2 Dec 2019 23:08:21 +0000 (00:08 +0100)
committerMichael Heimpold <mhei@heimpold.de>
Sat, 21 Dec 2019 15:59:53 +0000 (16:59 +0100)
- remove obsolete patches and update other ones
- filter support is now available as an extension module
- php7-mod-hash: this extension is now part of the core binary
  and cannot be built as an extension module anymore
- php7-mod-gd:
  - do not use bundled libgd, but rely on external one
  - this also obsoletes dependencies and configuration options
- php7-mod-zip: requires external libzip now

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
17 files changed:
lang/php7/Makefile
lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch
lang/php7/patches/0016-dont-gitclean-in-build.patch [deleted file]
lang/php7/patches/0032-Use-system-timezone.patch
lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch
lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch
lang/php7/patches/0050-remove-build-timestamps.patch
lang/php7/patches/1000-fix_membar_producer_link_error_gcc3x.patch [deleted file]
lang/php7/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch
lang/php7/patches/1002-gd-iconv.patch [deleted file]
lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch [deleted file]
lang/php7/patches/1004-disable-phar-command.patch
lang/php7/patches/1006-multiline-syslog.patch [deleted file]
lang/php7/patches/1010-pcrelib-NativeMIPS.patch [deleted file]
lang/php7/patches/1010-zend-alloc-mm-alignment.patch [new file with mode: 0644]
lang/php7/patches/1012-php_iconv_string-null-out-pointer.patch [deleted file]
lang/php7/patches/1020-openssl-deprecated.patch [deleted file]

index 0003295c4ed5364ed9d97115e663b2cb3f0701f8..23f47c14e8b584c0db1c1f22cbb27ab56853063f 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=7.2.26
+PKG_VERSION:=7.4.1
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -16,21 +16,18 @@ PKG_CPE_ID:=cpe:/a:php:php
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=1dd3bc875e105f5c9d21fb4dc240670bd2c22037820ff03890f5ab883c88b78d
+PKG_HASH:=561bb866bdd509094be00f4ece7c3543ec971c4d878645ee81437e291cffc762
 
-PKG_FIXUP:=libtool autoreconf
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
-PHP7_MODULES = \
+PHP7_MODULES= \
        bcmath \
        calendar ctype curl \
-       fileinfo \
        dom \
        exif \
-       ftp \
+       fileinfo filter ftp \
        gettext gd gmp \
-       hash \
        iconv imap intl \
        json \
        ldap \
@@ -39,11 +36,12 @@ PHP7_MODULES = \
        pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql phar \
        session shmop simplexml snmp soap sockets sqlite3 sysvmsg sysvsem sysvshm \
        tokenizer \
-       xml xmlreader xmlwriter zip \
+       xml xmlreader xmlwriter \
+       zip
 
 PKG_CONFIG_DEPENDS:= \
        $(patsubst %,CONFIG_PACKAGE_php7-mod-%,$(PHP7_MODULES)) \
-       CONFIG_PHP7_FILTER CONFIG_PHP7_LIBXML CONFIG_PHP7_SYSTEMTZDATA CONFIG_PHP7_LIBFREETYPE
+       CONFIG_PHP7_LIBXML CONFIG_PHP7_SYSTEMTZDATA
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -63,11 +61,6 @@ define Package/php7/Default/description
 endef
 
 define Package/php7/config
-       config PHP7_FILTER
-               bool "PHP7 Filter support"
-               depends on PACKAGE_php7-cli || PACKAGE_php7-cgi
-               default y
-
        config PHP7_LIBXML
                bool "PHP7 LIBXML support"
                depends on PACKAGE_php7-cli || PACKAGE_php7-cgi
@@ -85,7 +78,7 @@ endef
 define Package/php7
   $(call Package/php7/Default)
 
-  DEPENDS:=+libpcre +zlib \
+  DEPENDS:=+libpcre2 +zlib \
            +PHP7_LIBXML:libxml2 \
            +PHP7_SYSTEMTZDATA:zoneinfo-core
 endef
@@ -143,13 +136,6 @@ define Package/php7-fpm/description
   This package contains the FastCGI Process Manager of the PHP7 interpreter.
 endef
 
-define Package/php7-mod-gd/config
-  config PHP7_LIBFREETYPE
-       bool "Enable Freetype 2 support in php7-mod-gd"
-       depends on PACKAGE_php7-mod-gd
-       default y
-endef
-
 define Package/php7-mod-intl/config
   config PHP7_FULLICUDATA
        bool "Add dependency to full ICU Data"
@@ -186,9 +172,8 @@ CONFIGURE_ARGS+= \
        --disable-short-tags \
        \
        --without-valgrind \
-       --with-pcre-regex="$(STAGING_DIR)/usr" \
-       --with-zlib="$(STAGING_DIR)/usr" \
-         --with-zlib-dir="$(STAGING_DIR)/usr"
+       --with-external-pcre \
+       --with-zlib="$(STAGING_DIR)/usr"
 
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-bcmath),)
   CONFIGURE_ARGS+= --enable-bcmath=shared
@@ -209,23 +194,11 @@ else
 endif
 
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-curl),)
-  CONFIGURE_ARGS+= --with-curl=shared,"$(STAGING_DIR)/usr"
+  CONFIGURE_ARGS+= --with-curl=shared
 else
   CONFIGURE_ARGS+= --without-curl
 endif
 
-ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-fileinfo),)
-  CONFIGURE_ARGS+= --enable-fileinfo=shared
-else
-  CONFIGURE_ARGS+= --disable-fileinfo
-endif
-
-ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gettext),)
-  CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full"
-else
-  CONFIGURE_ARGS+= --without-gettext
-endif
-
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-dom),)
   CONFIGURE_ARGS+= --enable-dom=shared
 else
@@ -238,6 +211,18 @@ else
   CONFIGURE_ARGS+= --disable-exif
 endif
 
+ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-fileinfo),)
+  CONFIGURE_ARGS+= --enable-fileinfo=shared,"$(STAGING_DIR)/usr"
+else
+  CONFIGURE_ARGS+= --disable-fileinfo
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-filter),)
+  CONFIGURE_ARGS+= --enable-filter=shared,"$(STAGING_DIR)/usr"
+else
+  CONFIGURE_ARGS+= --disable-filter
+endif
+
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ftp),)
   CONFIGURE_ARGS+= --enable-ftp=shared
 else
@@ -246,20 +231,16 @@ endif
 
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gd),)
   CONFIGURE_ARGS+= \
-       --with-gd=shared \
-       --with-jpeg-dir="$(STAGING_DIR)/usr" \
-       --with-png-dir="$(STAGING_DIR)/usr" \
-       --with-webp-dir="$(STAGING_DIR)/usr" \
-       --without-xpm-dir \
-       --enable-gd-native-ttf \
-       --disable-gd-jis-conv
+       --enable-gd=shared,"$(STAGING_DIR)/usr" \
+       --with-external-gd
 else
-  CONFIGURE_ARGS+= --without-gd
+  CONFIGURE_ARGS+= --disable-gd
 endif
-ifneq ($(CONFIG_PHP7_LIBFREETYPE),)
-  CONFIGURE_ARGS+= --with-freetype-dir="$(STAGING_DIR)"
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gettext),)
+  CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full"
 else
-  CONFIGURE_ARGS+= --without-freetype-dir
+  CONFIGURE_ARGS+= --without-gettext
 endif
 
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gmp),)
@@ -268,12 +249,6 @@ else
   CONFIGURE_ARGS+= --without-gmp
 endif
 
-ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-hash),)
-  CONFIGURE_ARGS+= --enable-hash=shared
-else
-  CONFIGURE_ARGS+= --disable-hash
-endif
-
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-iconv),)
   CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)"
 else
@@ -283,7 +258,7 @@ endif
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-imap),)
   CONFIGURE_ARGS+= \
                --with-imap=shared,"$(STAGING_DIR)/usr" \
-               --with-imap-kerberos=no \
+               --with-kerberos=no \
                --with-imap-ssl="$(STAGING_DIR)/usr"
 else
   CONFIGURE_ARGS+= --without-imap
@@ -305,13 +280,15 @@ endif
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ldap),)
   CONFIGURE_ARGS+= \
        --with-ldap=shared,"$(STAGING_DIR)/usr" \
-       --with-ldap-sasl="$(STAGING_DIR)/usr"
+       --with-ldap-sasl
 else
   CONFIGURE_ARGS+= --without-ldap
 endif
 
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mbstring),)
-  CONFIGURE_ARGS+= --enable-mbstring=shared --enable-mbregex
+  CONFIGURE_ARGS+= \
+       --enable-mbstring=shared \
+       --enable-mbregex
 else
   CONFIGURE_ARGS+= --disable-mbstring
 endif
@@ -336,7 +313,7 @@ endif
 
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-openssl)$(CONFIG_PACKAGE_php7-mod-ftp)$(CONFIG_PACKAGE_php7-mod-imap)$(CONFIG_PACKAGE_php7-mod-snmp),)
   CONFIGURE_ARGS+= \
-       --with-openssl=shared,"$(STAGING_DIR)/usr" \
+       --with-openssl=shared \
        --with-kerberos=no \
        --with-openssl-dir="$(STAGING_DIR)/usr"
 else
@@ -362,7 +339,7 @@ ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo),)
     CONFIGURE_ARGS+= --without-pdo-pgsql
   endif
   ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-sqlite),)
-    CONFIGURE_ARGS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr"
+    CONFIGURE_ARGS+= --with-pdo-sqlite=shared
   else
     CONFIGURE_ARGS+= --without-pdo-sqlite
   endif
@@ -419,7 +396,7 @@ else
 endif
 
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sqlite3),)
-  CONFIGURE_ARGS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr"
+  CONFIGURE_ARGS+= --with-sqlite3=shared
 else
   CONFIGURE_ARGS+= --without-sqlite3
 endif
@@ -450,10 +427,8 @@ endif
 
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xml),)
   CONFIGURE_ARGS+= --enable-xml=shared,"$(STAGING_DIR)/usr"
-  ifneq ($(CONFIG_PHP7_LIBXML),)
-    CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2"
-  else
-    CONFIGURE_ARGS+= --with-libexpat-dir="$(STAGING_DIR)/usr"
+  ifneq ($(CONFIG_PHP7_LIBXML),y)
+    CONFIGURE_ARGS+= --with-expat
   endif
 else
   CONFIGURE_ARGS+= --disable-xml
@@ -472,22 +447,15 @@ else
 endif
 
 ifneq ($(CONFIG_PACKAGE_php7-mod-zip),)
-  CONFIGURE_ARGS+= --enable-zip=shared
+  CONFIGURE_ARGS+= --with-zip=shared,"$(STAGING_DIR)/usr"
 else
-  CONFIGURE_ARGS+= --disable-zip
-endif
-
-ifneq ($(SDK)$(CONFIG_PHP7_FILTER),)
-  CONFIGURE_ARGS+= --enable-filter
-else
-  CONFIGURE_ARGS+= --disable-filter
+  CONFIGURE_ARGS+= --without-zip
 endif
 
 ifneq ($(SDK)$(CONFIG_PHP7_LIBXML),)
-  CONFIGURE_ARGS+= --enable-libxml
-  CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2"
+  CONFIGURE_ARGS+= --with-libxml
 else
-  CONFIGURE_ARGS+= --disable-libxml
+  CONFIGURE_ARGS+= --without-libxml
 endif
 
 ifneq ($(CONFIG_PHP7_SYSTEMTZDATA),)
@@ -501,7 +469,8 @@ CONFIGURE_VARS+= \
        php_cv_cc_rpath="no" \
        iconv_impl_name="gnu_libiconv" \
        ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \
-       ac_cv_u8t_decompose=yes
+       ac_cv_u8t_decompose=yes \
+       ac_cv_have_pcre2_jit=no
 
 define Package/php7/conffiles
 /etc/php.ini
@@ -561,7 +530,7 @@ endef
 
 define Build/Prepare
        $(call Build/Prepare/Default)
-       ( cd $(PKG_BUILD_DIR); touch configure.in; ./buildconf --force )
+       ( cd $(PKG_BUILD_DIR); touch configure.ac; ./buildconf --force )
 endef
 
 define Build/InstallDev
@@ -626,19 +595,19 @@ $(eval $(call BuildModule,curl,cURL,+PACKAGE_php7-mod-curl:libcurl))
 $(eval $(call BuildModule,dom,DOM,+@PHP7_LIBXML +PACKAGE_php7-mod-dom:libxml2))
 $(eval $(call BuildModule,exif,EXIF))
 $(eval $(call BuildModule,fileinfo,Fileinfo))
+$(eval $(call BuildModule,filter,Filter))
 $(eval $(call BuildModule,ftp,FTP,+PACKAGE_php7-mod-ftp:libopenssl))
-$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng +PACKAGE_php7-mod-gd:libwebp +PHP7_LIBFREETYPE:libfreetype))
+$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libgd))
 $(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php7-mod-gettext:libintl-full))
 $(eval $(call BuildModule,gmp,GMP,+PACKAGE_php7-mod-gmp:libgmp))
-$(eval $(call BuildModule,hash,Hash))
 $(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS)))
 $(eval $(call BuildModule,imap,IMAP,+PACKAGE_php7-mod-imap:libopenssl +PACKAGE_libpam:libpam +PACKAGE_php7-mod-imap:uw-imap))
 $(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu +PHP7_FULLICUDATA:icu-full-data))
 $(eval $(call BuildModule,json,JSON))
 $(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php7-mod-ldap:libopenldap +PACKAGE_php7-mod-ldap:libsasl2))
-$(eval $(call BuildModule,mbstring,MBString))
+$(eval $(call BuildModule,mbstring,MBString,+PACKAGE_php7-mod-mbstring:oniguruma))
 $(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:php7-mod-mysqlnd,30))
-$(eval $(call BuildModule,mysqlnd,MySQL Native Driver,+php7-mod-hash))
+$(eval $(call BuildModule,mysqlnd,MySQL Native Driver))
 $(eval $(call BuildModule,opcache,OPcache,,,zend))
 $(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl,15))
 $(eval $(call BuildModule,pcntl,PCNTL))
@@ -647,7 +616,7 @@ $(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php7-mod-pdo +PACKAGE_
 $(eval $(call BuildModule,pdo-pgsql,PDO driver for PostgreSQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-pgsql:libpq))
 $(eval $(call BuildModule,pdo-sqlite,PDO driver for SQLite 3.x,+php7-mod-pdo +PACKAGE_php7-mod-pdo-sqlite:libsqlite3 +PACKAGE_php7-mod-pdo-sqlite:librt))
 $(eval $(call BuildModule,pgsql,PostgreSQL,+PACKAGE_php7-mod-pgsql:libpq))
-$(eval $(call BuildModule,phar,Phar Archives,+php7-mod-hash))
+$(eval $(call BuildModule,phar,Phar Archives))
 $(eval $(call BuildModule,session,Session))
 $(eval $(call BuildModule,shmop,Shared Memory))
 $(eval $(call BuildModule,simplexml,SimpleXML,+@PHP7_LIBXML +PACKAGE_php7-mod-simplexml:libxml2))
@@ -662,4 +631,4 @@ $(eval $(call BuildModule,tokenizer,Tokenizer))
 $(eval $(call BuildModule,xml,XML,+PHP7_LIBXML:libxml2 +!PHP7_LIBXML:libexpat))
 $(eval $(call BuildModule,xmlreader,XMLReader,+@PHP7_LIBXML +PACKAGE_php7-mod-dom:php7-mod-dom +PACKAGE_php7-mod-xmlreader:libxml2))
 $(eval $(call BuildModule,xmlwriter,XMLWriter,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlwriter:libxml2))
-$(eval $(call BuildModule,zip,ZIP,+PACKAGE_php7-mod-zip:zlib))
+$(eval $(call BuildModule,zip,ZIP,+PACKAGE_php7-mod-zip:libzip))
index c9c7ffb44586f2af0b898a695a8513090f46d40d..ceea3f2c82ac37db7f28059a0e7eb19e5e214f77 100644 (file)
@@ -1,5 +1,5 @@
 From: Debian PHP Maintainers <team+pkg-php@tracker.debian.org>
-Date: Thu, 7 Mar 2019 19:36:30 +0000
+Date: Thu, 7 Mar 2019 19:42:35 +0000
 Subject: Add-support-for-use-of-the-system-timezone-database
 
 # License: MIT
@@ -12,7 +12,8 @@ Add support for use of the system timezone database, rather
 than embedding a copy.  Discussed upstream but was not desired.
 
 History:
-r17: adapt for autotool change in 7.2.16RC1
+r18: adapt for autotool change in 7.3.3RC1
+r17: adapt for timelib 2018.01 (in 7.3.2RC1)
 r16: adapt for timelib 2017.06 (in 7.2.3RC1)
 r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1)
 r14: improve check for valid tz file
@@ -36,14 +37,14 @@ r2: add filesystem trawl to set up name alias index
 r1: initial revision
 ---
  ext/date/config0.m4     |  13 ++
- ext/date/lib/parse_tz.c | 536 +++++++++++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 546 insertions(+), 3 deletions(-)
+ ext/date/lib/parse_tz.c | 535 +++++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 545 insertions(+), 3 deletions(-)
 
 diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
-index e464156..00dae8b 100644
+index 20e4164..a612436 100644
 --- a/ext/date/config0.m4
 +++ b/ext/date/config0.m4
-@@ -10,6 +10,19 @@ io.h
+@@ -4,6 +4,19 @@ AC_CHECK_HEADERS([io.h])
  dnl Check for strtoll, atoll
  AC_CHECK_FUNCS(strtoll atoll)
  
@@ -64,10 +65,10 @@ index e464156..00dae8b 100644
  timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
                   lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
 diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
-index 960e528..501b09e 100644
+index 020da31..9b39c6e 100644
 --- a/ext/date/lib/parse_tz.c
 +++ b/ext/date/lib/parse_tz.c
-@@ -25,8 +25,21 @@
+@@ -26,8 +26,21 @@
  #include "timelib.h"
  #include "timelib_private.h"
  
@@ -89,7 +90,7 @@ index 960e528..501b09e 100644
  
  #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
  # if defined(__LITTLE_ENDIAN__)
-@@ -67,6 +80,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
+@@ -88,6 +101,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
  {
        uint32_t version;
  
@@ -101,7 +102,7 @@ index 960e528..501b09e 100644
        /* read ID */
        version = (*tzf)[3] - '0';
        *tzf += 4;
-@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
+@@ -412,7 +430,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
        }
  }
  
@@ -532,7 +533,7 @@ index 960e528..501b09e 100644
  {
        int left = 0, right = tzdb->index_size - 1;
  
-@@ -400,9 +840,48 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
+@@ -438,9 +878,48 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
        return 0;
  }
  
@@ -581,7 +582,7 @@ index 960e528..501b09e 100644
  }
  
  const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
-@@ -414,7 +893,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
+@@ -452,7 +931,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
  int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
  {
        const unsigned char *tzf;
@@ -613,7 +614,7 @@ index 960e528..501b09e 100644
  }
  
  static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -456,12 +958,14 @@ static timelib_tzinfo* timelib_tzinfo_ctor(char *name)
+@@ -494,12 +996,14 @@ static timelib_tzinfo* timelib_tzinfo_ctor(char *name)
  timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code)
  {
        const unsigned char *tzf;
@@ -629,11 +630,10 @@ index 960e528..501b09e 100644
                tmp = timelib_tzinfo_ctor(timezone);
  
                version = read_preamble(&tzf, tmp, &type);
-@@ -484,6 +988,29 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
-                       timelib_tzinfo_dtor(tmp);
-                       return NULL;
+@@ -534,11 +1038,36 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
                }
-+
+               skip_posix_string(&tzf, tmp);
 +#ifdef HAVE_SYSTEM_TZDATA
 +              if (memmap) {
 +                      const struct location_info *li;
@@ -656,10 +656,8 @@ index 960e528..501b09e 100644
 +                      munmap(memmap, maplen);
 +              } else {
 +#endif
-               if (version == 2 || version == 3) {
-                       if (!skip_64bit_preamble(&tzf, tmp)) {
-                               /* 64 bit preamble is not in place */
-@@ -501,6 +1028,9 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
+               if (type == TIMELIB_TZINFO_PHP) {
+                       read_location(&tzf, tmp);
                } else {
                        set_default_location_and_comments(&tzf, tmp);
                }
diff --git a/lang/php7/patches/0016-dont-gitclean-in-build.patch b/lang/php7/patches/0016-dont-gitclean-in-build.patch
deleted file mode 100644 (file)
index 32de557..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-From: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
-Date: Sat, 2 May 2015 10:26:53 +0200
-Subject: dont-gitclean-in-build
-
----
- build/build.mk | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/build/build.mk b/build/build.mk
-index 9452984..b964def 100644
---- a/build/build.mk
-+++ b/build/build.mk
-@@ -63,6 +63,5 @@ gitclean-work:
-       @if (test ! -f '.git/info/exclude' || grep -s "git-ls-files" .git/info/exclude); then \
-               (echo "Rebuild .git/info/exclude" && echo '*.o' > .git/info/exclude && git svn propget svn:ignore | grep -v config.nice >> .git/info/exclude); \
-       fi; \
--      git clean -X -f -d;
- .PHONY: $(ALWAYS) snapshot
index 0ab03fc7cfde6ab8c745db096490caea5a458e3e..00873eee42ee75b8d68a4334dd95fd3f9ca7c5c7 100644 (file)
@@ -14,10 +14,10 @@ To be used in tandem with use_embedded_timezonedb.patch and use_embedded_timezon
  1 file changed, 17 insertions(+)
 
 diff --git a/ext/date/php_date.c b/ext/date/php_date.c
-index cbe6e91..1999c83 100644
+index f049ae2..6a044ce 100644
 --- a/ext/date/php_date.c
 +++ b/ext/date/php_date.c
-@@ -1016,6 +1016,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
+@@ -1030,6 +1030,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
                DATEG(timezone_valid) = 1;
                return DATEG(default_timezone);
        }
index 528e0f51a091d2bd8f3c72f0234ea0e099aa714b..afab2b45872ddec41f8b87c1367473b684c65a21 100644 (file)
@@ -1,5 +1,5 @@
 From: Thijs Kinkhorst <thijs@debian.org>
-Date: Wed, 15 Jun 2016 09:18:03 +0200
+Date: Mon, 2 Dec 2019 22:18:43 +0100
 Subject: Add patch to remove build timestamps from generated binaries.
 
 ---
@@ -13,7 +13,7 @@ Subject: Add patch to remove build timestamps from generated binaries.
 
 --- a/ext/standard/info.c
 +++ b/ext/standard/info.c
-@@ -830,7 +830,6 @@ PHPAPI void php_print_info(int flag)
+@@ -802,7 +802,6 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
                php_info_print_box_end();
                php_info_print_table_start();
                php_info_print_table_row(2, "System", ZSTR_VAL(php_uname));
@@ -23,7 +23,7 @@ Subject: Add patch to remove build timestamps from generated binaries.
  #endif
 --- a/sapi/apache2handler/config.m4
 +++ b/sapi/apache2handler/config.m4
-@@ -67,18 +67,9 @@ if test "$PHP_APXS2" != "no"; then
+@@ -64,18 +64,9 @@ if test "$PHP_APXS2" != "no"; then
    fi
  
    APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
@@ -47,53 +47,53 @@ Subject: Add patch to remove build timestamps from generated binaries.
    *aix*)
 --- a/sapi/cgi/cgi_main.c
 +++ b/sapi/cgi/cgi_main.c
-@@ -2442,9 +2442,9 @@ consult the installation file that came
-                                                               SG(request_info).no_headers = 1;
-                                                       }
+@@ -2392,9 +2392,9 @@ parent_loop_end:
+                                                       SG(headers_sent) = 1;
+                                                       SG(request_info).no_headers = 1;
  #if ZEND_DEBUG
--                                                      php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+                                                      php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+-                                                      php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++                                                      php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name,  get_zend_version());
  #else
--                                                      php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+                                                      php_printf("PHP %s (%s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+-                                                      php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++                                                      php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
  #endif
                                                        php_request_shutdown((void *) 0);
                                                        fcgi_shutdown();
 --- a/sapi/cli/php_cli.c
 +++ b/sapi/cli/php_cli.c
-@@ -697,8 +697,8 @@ static int do_cli(int argc, char **argv)
+@@ -645,8 +645,8 @@ static int do_cli(int argc, char **argv) /* {{{ */
                                goto out;
  
                        case 'v': /* show php version & quit */
--                              php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2018 The PHP Group\n%s",
+-                              php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s",
 -                                      PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
-+                              php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2018 The PHP Group\n%s",
++                              php_printf("PHP %s (%s) ( %s)\nCopyright (c) The PHP Group\n%s",
 +                                      PHP_VERSION, cli_sapi_module.name,
  #if ZTS
                                        "ZTS "
  #else
 --- a/sapi/fpm/fpm/fpm_main.c
 +++ b/sapi/fpm/fpm/fpm_main.c
-@@ -1755,9 +1755,9 @@ int main(int argc, char *argv[])
+@@ -1722,9 +1722,9 @@ int main(int argc, char *argv[])
                                SG(request_info).no_headers = 1;
  
  #if ZEND_DEBUG
--                              php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__,        __TIME__, get_zend_version());
-+                              php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+-                              php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__,        __TIME__, get_zend_version());
++                              php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
  #else
--                              php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__,      get_zend_version());
-+                              php_printf("PHP %s (%s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+-                              php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__,      get_zend_version());
++                              php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
  #endif
                                php_request_shutdown((void *) 0);
                                fcgi_shutdown();
 --- a/sapi/phpdbg/phpdbg.c
 +++ b/sapi/phpdbg/phpdbg.c
-@@ -1697,10 +1697,8 @@ phpdbg_main:
+@@ -1695,10 +1695,8 @@ phpdbg_main:
                                phpdbg_do_help_cmd(exec);
                        } else if (show_version) {
                                phpdbg_out(
--                                      "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2018 The PHP Group\n%s",
-+                                      "phpdbg %s\nPHP %s, Copyright (c) 1997-2018 The PHP Group\n%s",
+-                                      "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) The PHP Group\n%s",
++                                      "phpdbg %s\nPHP %s, Copyright (c) The PHP Group\n%s",
                                        PHPDBG_VERSION,
 -                                      __DATE__,
 -                                      __TIME__,
index 78f7dca4b7517018b7b7461f15821cfc5b14e2eb..f52afe92475866a77cd7b0b861b602b9b16c3301 100644 (file)
@@ -11,7 +11,7 @@ diff --git a/sapi/fpm/status.html.in b/sapi/fpm/status.html.in
 index 86492d7..31c31ff 100644
 --- a/sapi/fpm/status.html.in
 +++ b/sapi/fpm/status.html.in
-@@ -71,11 +71,6 @@
+@@ -70,11 +70,6 @@
                                <tr class="h"><th>PID&darr;</th><th>Start Time</th><th>Start Since</th><th>Requests Served</th><th>Request Duration</th><th>Request method</th><th>Request URI</th><th>Content Length</th><th>User</th><th>Script</th><th>Last Request %CPU</th><th>Last Request Memory</th></tr>
                        </table>
                </div>
index 9632e5762ea2b876dca3713e1d6ff25bc5187282..511d9899165da8f01799e5264170183413689b4f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ext/opcache/ZendAccelerator.c
 +++ b/ext/opcache/ZendAccelerator.c
-@@ -2484,11 +2484,6 @@ static void accel_gen_system_id(void)
+@@ -2652,11 +2652,6 @@ static void accel_gen_system_id(void)
        PHP_MD5Update(&context, PHP_VERSION, sizeof(PHP_VERSION)-1);
        PHP_MD5Update(&context, ZEND_EXTENSION_BUILD_ID, sizeof(ZEND_EXTENSION_BUILD_ID)-1);
        PHP_MD5Update(&context, ZEND_BIN_ID, sizeof(ZEND_BIN_ID)-1);
 -              PHP_MD5Update(&context, __TIME__, sizeof(__TIME__)-1);
 -      }
        PHP_MD5Final(digest, &context);
-       for (i = 0; i < 16; i++) {
-               c = digest[i] >> 4;
+       php_hash_bin2hex(accel_system_id, digest, sizeof digest);
+ }
 --- a/sapi/litespeed/lsapi_main.c
 +++ b/sapi/litespeed/lsapi_main.c
-@@ -1057,9 +1057,9 @@ static int cli_main( int argc, char * ar
+@@ -1284,9 +1284,9 @@ static int cli_main( int argc, char * ar
              case 'v':
                  if (php_request_startup() != FAILURE) {
  #if ZEND_DEBUG
--                    php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+                    php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+-                    php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++                    php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
  #else
--                    php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+                    php_printf("PHP %s (%s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+-                    php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++                    php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
  #endif
  #ifdef PHP_OUTPUT_NEWAPI
                      php_output_end_all();
diff --git a/lang/php7/patches/1000-fix_membar_producer_link_error_gcc3x.patch b/lang/php7/patches/1000-fix_membar_producer_link_error_gcc3x.patch
deleted file mode 100644 (file)
index 3e81dd6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/ext/standard/php_crypt_r.c
-+++ b/ext/standard/php_crypt_r.c
-@@ -96,6 +96,8 @@ void _crypt_extended_init_r(void)
-               InterlockedIncrement(&initialized);
- #elif defined(HAVE_SYNC_FETCH_AND_ADD)
-               __sync_fetch_and_add(&initialized, 1);
-+#elif (defined(__GNUC__) && (__GNUC__ == 3))
-+              initialized = 1;
- #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */
-               membar_producer();
-               atomic_add_int(&initialized, 1);
index 4e50d5ef601532eabca764315ded8f6d8d436d66..7b8193c86840a1d900b77eea8af11074b2017e9f 100644 (file)
@@ -1,6 +1,6 @@
-From dc8bb6a53bfdfe42d9ae81d4e78c6155ad4bfd6e Mon Sep 17 00:00:00 2001
+From dd6ee0fb6715881b204fb4cb124db9134c1a6c7d Mon Sep 17 00:00:00 2001
 From: Michael Heimpold <mhei@heimpold.de>
-Date: Sun, 17 May 2015 16:50:50 +0200
+Date: Mon, 2 Dec 2019 22:42:28 +0100
 Subject: [PATCH] ext/opcache: fix detection of shm/mmap
 
 The detection of sysvipc and mmap doesn't work well when cross-compiling,
@@ -15,145 +15,37 @@ and makes opcache usable on OpenWrt.
 
 Signed-off-by: Michael Heimpold <mhei@heimpold.de>
 ---
- ext/opcache/config.m4 |  122 ++-----------------------------------------------
- 1 file changed, 4 insertions(+), 118 deletions(-)
+ ext/opcache/config.m4 | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
 
 diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
-index b7e4835..7b6c0aa 100644
+index 6c40cafc1..63fa5bb55 100644
 --- a/ext/opcache/config.m4
 +++ b/ext/opcache/config.m4
-@@ -28,127 +28,13 @@ if test "$PHP_OPCACHE" != "no"; then
-   AC_CHECK_HEADERS([unistd.h sys/uio.h])
--  AC_MSG_CHECKING(for sysvipc shared memory support)
--  AC_TRY_RUN([
--#include <sys/types.h>
--#include <sys/wait.h>
--#include <sys/ipc.h>
--#include <sys/shm.h>
--#include <unistd.h>
--#include <string.h>
--
--int main() {
--  pid_t pid;
--  int status;
--  int ipc_id;
--  char *shm;
--  struct shmid_ds shmbuf;
--
--  ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W));
--  if (ipc_id == -1) {
--    return 1;
--  }
--
--  shm = shmat(ipc_id, NULL, 0);
--  if (shm == (void *)-1) {
--    shmctl(ipc_id, IPC_RMID, NULL);
--    return 2;
--  }
--
--  if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) {
--    shmdt(shm);
--    shmctl(ipc_id, IPC_RMID, NULL);
--    return 3;
--  }
--
--  shmbuf.shm_perm.uid = getuid();
--  shmbuf.shm_perm.gid = getgid();
--  shmbuf.shm_perm.mode = 0600;
--
--  if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) {
--    shmdt(shm);
--    shmctl(ipc_id, IPC_RMID, NULL);
--    return 4;
--  }
--
--  shmctl(ipc_id, IPC_RMID, NULL);
--
--  strcpy(shm, "hello");
--
--  pid = fork();
--  if (pid < 0) {
--    return 5;
--  } else if (pid == 0) {
--    strcpy(shm, "bye");
--    return 6;
--  }
--  if (wait(&status) != pid) {
--    return 7;
--  }
--  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
--    return 8;
--  }
--  if (strcmp(shm, "bye") != 0) {
--    return 9;
--  }
--  return 0;
--}
--],dnl
-+  AC_CHECK_FUNC(shmget,[
+@@ -89,7 +89,10 @@ int main() {
+ }
+ ]])],[dnl
      AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
--    msg=yes,msg=no,msg=no)
--  AC_MSG_RESULT([$msg])
--
--  AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
--  AC_TRY_RUN([
--#include <sys/types.h>
--#include <sys/wait.h>
--#include <sys/mman.h>
--#include <unistd.h>
--#include <string.h>
--
--#ifndef MAP_ANON
--# ifdef MAP_ANONYMOUS
--#  define MAP_ANON MAP_ANONYMOUS
--# endif
--#endif
--#ifndef MAP_FAILED
--# define MAP_FAILED ((void*)-1)
--#endif
--
--int main() {
--  pid_t pid;
--  int status;
--  char *shm;
--
--  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
--  if (shm == MAP_FAILED) {
--    return 1;
--  }
--
--  strcpy(shm, "hello");
-+  ])
+-    msg=yes],[msg=no],[msg=no])
++    msg=yes],[msg=no],[dnl
++    AC_CHECK_FUNC(shmget,[dnl
++        AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
++        msg=yes],[msg=no])])
+   AC_MSG_RESULT([$msg])
  
--  pid = fork();
--  if (pid < 0) {
--    return 5;
--  } else if (pid == 0) {
--    strcpy(shm, "bye");
--    return 6;
--  }
--  if (wait(&status) != pid) {
--    return 7;
--  }
--  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
--    return 8;
--  }
--  if (strcmp(shm, "bye") != 0) {
--    return 9;
--  }
--  return 0;
--}
--],dnl
-+  AC_CHECK_FUNC(mmap,[
+   AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
+@@ -141,7 +144,10 @@ int main() {
+ }
+ ]])],[dnl
      AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
--    msg=yes,msg=no,msg=no)
--  AC_MSG_RESULT([$msg])
-+  ])
+-    msg=yes],[msg=no],[msg=no])
++    msg=yes],[msg=no],[dnl
++    AC_CHECK_FUNC(mmap,[dnl
++        AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
++        msg=yes],[msg=no])])
+   AC_MSG_RESULT([$msg])
  
-   AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support)
-   AC_TRY_RUN([
+   PHP_CHECK_FUNC_LIB(shm_open, rt)
 -- 
-1.7.10.4
+2.17.1
 
diff --git a/lang/php7/patches/1002-gd-iconv.patch b/lang/php7/patches/1002-gd-iconv.patch
deleted file mode 100644 (file)
index 1418c27..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/ext/gd/libgd/gdkanji.c
-+++ b/ext/gd/libgd/gdkanji.c
-@@ -9,6 +9,11 @@
- #include "gdhelpers.h"
- #include <stdarg.h>
-+
-+/* force usage of internal conversation routine */
-+#undef HAVE_ICONV_H
-+#undef HAVE_ICONV
-+
- #if defined(HAVE_ICONV_H) || defined(HAVE_ICONV)
- #include <iconv.h>
- #ifdef HAVE_ERRNO_H
diff --git a/lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch b/lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch
deleted file mode 100644 (file)
index bd181b8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -422,7 +422,10 @@ PHP_CHECK_FUNC(gethostname, nsl)
- PHP_CHECK_FUNC(gethostbyaddr, nsl)
- PHP_CHECK_FUNC(yp_get_default_domain, nsl)
--PHP_CHECK_FUNC(dlopen, dl)
-+PHP_ADD_LIBRARY(dl)
-+PHP_DEF_HAVE(dlopen)
-+PHP_DEF_HAVE(libdl)
-+ac_cv_func_dlopen=yes
- if test "$ac_cv_func_dlopen" = "yes"; then
-   AC_DEFINE(HAVE_LIBDL, 1, [ ])
- fi
---- a/ext/fileinfo/config.m4
-+++ b/ext/fileinfo/config.m4
-@@ -46,6 +46,10 @@ int main(void)
-     AC_MSG_RESULT(no)
-     AC_MSG_NOTICE(using libmagic strcasestr implementation)
-     libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
-+  ],[
-+    dnl cross-compiling; assume not present
-+    AC_MSG_NOTICE(using libmagic strcasestr implementation)
-+    libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
-   ])
-   PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
index 02ab057aa7550cc02a5c834f3c58b6a72bdd8f70..ee478ad42fd5bdd3a580de6655c31ed03e11adc8 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ext/phar/config.m4       2016-08-17 21:50:58.000000000 +0200
 +++ b/ext/phar/config.m4       2016-09-20 22:21:28.494934775 +0200
-@@ -26,7 +26,7 @@
+@@ -19,7 +19,7 @@
    fi
    PHP_ADD_EXTENSION_DEP(phar, hash, true)
    PHP_ADD_EXTENSION_DEP(phar, spl, true)
@@ -11,7 +11,7 @@
  
 --- a/configure.ac     2016-09-20 22:26:38.000000000 +0200
 +++ b/configure.ac     2016-09-20 22:42:30.380101556 +0200
-@@ -1454,13 +1454,13 @@
+@@ -1430,13 +1430,13 @@
  INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
  CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"
  
diff --git a/lang/php7/patches/1006-multiline-syslog.patch b/lang/php7/patches/1006-multiline-syslog.patch
deleted file mode 100644 (file)
index 5b10506..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-commit f11d40ef88f640fe4764d2731d3061472aefe556
-Author: Philip Prindeville <philipp@redfish-solutions.com>
-Date:   Wed Aug 9 20:55:25 2017 -0600
-
-    Turn php_syslog() into wrapper for syslog and split lines
-
-diff --git a/Zend/zend_smart_string.h b/Zend/zend_smart_string.h
-index 2282202..12d755e 100644
---- a/Zend/zend_smart_string.h
-+++ b/Zend/zend_smart_string.h
-@@ -136,6 +136,10 @@ static zend_always_inline void smart_string_setl(smart_string *dest, char *src,
-       dest->c = src;
- }
-+static zend_always_inline void smart_string_reset(smart_string *str) {
-+      str->len = 0;
-+}
-+
- #endif
- /*
-diff --git a/configure.ac b/configure.ac
-index cb95d86..a63354f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1478,7 +1478,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
-        php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
-        strlcat.c explicit_bzero.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
-        network.c php_open_temporary_file.c \
--       output.c getopt.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
-+       output.c getopt.c php_syslog.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
- PHP_ADD_SOURCES_X(main, fastcgi.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1, PHP_FASTCGI_OBJS, no)
-diff --git a/main/php_syslog.c b/main/php_syslog.c
-new file mode 100644
-index 0000000..c351951
---- /dev/null
-+++ b/main/php_syslog.c
-@@ -0,0 +1,81 @@
-+/*
-+   +----------------------------------------------------------------------+
-+   | PHP Version 7                                                        |
-+   +----------------------------------------------------------------------+
-+   | Copyright (c) 2017 The PHP Group                                |
-+   +----------------------------------------------------------------------+
-+   | This source file is subject to version 3.01 of the PHP license,      |
-+   | that is bundled with this package in the file LICENSE, and is        |
-+   | available through the world-wide-web at the following url:           |
-+   | http://www.php.net/license/3_01.txt                                  |
-+   | If you did not receive a copy of the PHP license and are unable to   |
-+   | obtain it through the world-wide-web, please send a note to          |
-+   | license@php.net so we can mail you a copy immediately.               |
-+   +----------------------------------------------------------------------+
-+   | Author: Philip Prindeville <philipp@redfish-solutions.com>           |
-+   +----------------------------------------------------------------------+
-+*/
-+
-+/* $Id$ */
-+
-+#include <stdio.h>
-+#include <string.h>
-+#include <assert.h>
-+#include <stdlib.h>
-+#include "php.h"
-+#include "php_syslog.h"
-+
-+#include "zend.h"
-+#include "zend_smart_string.h"
-+
-+/*
-+ * The SCO OpenServer 5 Development System (not the UDK)
-+ * defines syslog to std_syslog.
-+ */
-+
-+#ifdef HAVE_STD_SYSLOG
-+#define syslog std_syslog
-+#endif
-+
-+PHPAPI void php_syslog(int priority, const char *format, ...) /* {{{ */
-+{
-+      const char *ptr;
-+      unsigned char c;
-+      smart_string fbuf = {0};
-+      smart_string sbuf = {0};
-+      va_list args;
-+
-+      va_start(args, format);
-+      zend_printf_to_smart_string(&fbuf, format, args);
-+      smart_string_0(&fbuf);
-+      va_end(args);
-+
-+      for (ptr = fbuf.c; ; ++ptr) {
-+              c = *ptr;
-+              if (c == '\0') {
-+                      syslog(priority, "%.*s", (int)sbuf.len, sbuf.c);
-+                      break;
-+              }
-+
-+              if (c != '\n')
-+                      smart_string_appendc(&sbuf, c);
-+              else {
-+                      syslog(priority, "%.*s", (int)sbuf.len, sbuf.c);
-+                      smart_string_reset(&sbuf);
-+              }
-+      }
-+
-+      smart_string_free(&fbuf);
-+      smart_string_free(&sbuf);
-+}
-+
-+/* }}} */
-+
-+/*
-+ * Local variables:
-+ * tab-width: 4
-+ * c-basic-offset: 4
-+ * End:
-+ * vim600: sw=4 ts=4 fdm=marker
-+ * vim<600: sw=4 ts=4
-+ */
-diff --git a/main/php_syslog.h b/main/php_syslog.h
-index be68cc4..4c4ca4e 100644
---- a/main/php_syslog.h
-+++ b/main/php_syslog.h
-@@ -21,6 +21,8 @@
- #ifndef PHP_SYSLOG_H
- #define PHP_SYSLOG_H
-+#include "php.h"
-+
- #ifdef PHP_WIN32
- #include "win32/syslog.h"
- #else
-@@ -30,26 +32,12 @@
- #endif
- #endif
--/*
-- * The SCO OpenServer 5 Development System (not the UDK)
-- * defines syslog to std_syslog.
-- */
--
--#ifdef syslog
--
--#ifdef HAVE_STD_SYSLOG
--#define php_syslog std_syslog
--#endif
--
--#undef syslog
-+BEGIN_EXTERN_C()
-+PHPAPI void php_syslog(int, const char *format, ...);
-+END_EXTERN_C()
- #endif
--#ifndef php_syslog
--#define php_syslog syslog
--#endif
--
--#endif
- /*
-  * Local variables:
-  * tab-width: 4
-diff --git a/win32/build/config.w32 b/win32/build/config.w32
-index 6cbb18b..71cf491 100644
---- a/win32/build/config.w32
-+++ b/win32/build/config.w32
-@@ -241,7 +241,8 @@ ADD_FLAG("CFLAGS_BD_ZEND", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
- ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \
-       php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
-       strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c network.c \
--      php_open_temporary_file.c output.c internal_functions.c php_sprintf.c");
-+      php_open_temporary_file.c output.c internal_functions.c php_sprintf.c \
-+      php_syslog.c");
- ADD_FLAG("CFLAGS_BD_MAIN", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
- AC_DEFINE('HAVE_STRNLEN', 1);
diff --git a/lang/php7/patches/1010-pcrelib-NativeMIPS.patch b/lang/php7/patches/1010-pcrelib-NativeMIPS.patch
deleted file mode 100644 (file)
index 7a1ac46..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c  2017-11-28 02:22:57.000000000 -0700
-+++ b/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c  2017-12-29 17:35:44.231934114 -0700
-@@ -498,12 +498,13 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_gen
- SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type)
- {
-+      sljit_sw fir = 0;
-+
-       switch (feature_type) {
-       case SLJIT_HAS_FPU:
- #ifdef SLJIT_IS_FPU_AVAILABLE
-               return SLJIT_IS_FPU_AVAILABLE;
- #elif defined(__GNUC__)
--              sljit_sw fir;
-               asm ("cfc1 %0, $0" : "=r"(fir));
-               return (fir >> 22) & 0x1;
- #else
diff --git a/lang/php7/patches/1010-zend-alloc-mm-alignment.patch b/lang/php7/patches/1010-zend-alloc-mm-alignment.patch
new file mode 100644 (file)
index 0000000..88d4a08
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/Zend/zend_alloc.h
++++ b/Zend/zend_alloc.h
+@@ -27,12 +27,12 @@
+ #include "zend.h"
+ #ifndef ZEND_MM_ALIGNMENT
+-# define ZEND_MM_ALIGNMENT ((size_t) 8)
++# define ZEND_MM_ALIGNMENT (8)
+ # define ZEND_MM_ALIGNMENT_LOG2 Z_L(3)
+ #elif ZEND_MM_ALIGNMENT < 4
+ # undef ZEND_MM_ALIGNMENT
+ # undef ZEND_MM_ALIGNMENT_LOG2
+-# define ZEND_MM_ALIGNMENT ((size_t) 4)
++# define ZEND_MM_ALIGNMENT (4)
+ # define ZEND_MM_ALIGNMENT_LOG2 Z_L(2)
+ #endif
diff --git a/lang/php7/patches/1012-php_iconv_string-null-out-pointer.patch b/lang/php7/patches/1012-php_iconv_string-null-out-pointer.patch
deleted file mode 100644 (file)
index e2db2d2..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-commit 3763c8f1645983b5abc37c60597e1ecc1bf89019
-Author: Philip Prindeville <philipp@redfish-solutions.com>
-Date:   Thu Jan 25 14:18:00 2018 -0700
-
-    Always free out_buf in php_iconv_string()
-
-diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
-index 4289242..807bb14 100644
---- a/ext/iconv/iconv.c
-+++ b/ext/iconv/iconv.c
-@@ -699,6 +699,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
-       iconv_close(cd);
-       if (result == (size_t)(-1)) {
-+              zend_string_free(out_buf);
-               switch (errno) {
-                       case EINVAL:
-                               retval = PHP_ICONV_ERR_ILLEGAL_CHAR;
-@@ -715,7 +716,6 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
-                       default:
-                               /* other error */
--                              zend_string_free(out_buf);
-                               return PHP_ICONV_ERR_UNKNOWN;
-               }
-       }
-@@ -988,9 +988,6 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval,
-       err = php_iconv_string(ndl, ndl_nbytes, &ndl_buf, GENERIC_SUPERSET_NAME, enc);
-       if (err != PHP_ICONV_ERR_SUCCESS) {
--              if (ndl_buf != NULL) {
--                      zend_string_free(ndl_buf);
--              }
-               return err;
-       }
-@@ -2494,9 +2491,6 @@ PHP_NAMED_FUNCTION(php_if_iconv)
-       if (err == PHP_ICONV_ERR_SUCCESS && out_buffer != NULL) {
-               RETVAL_STR(out_buffer);
-       } else {
--              if (out_buffer != NULL) {
--                      zend_string_free(out_buffer);
--              }
-               RETURN_FALSE;
-       }
- }
diff --git a/lang/php7/patches/1020-openssl-deprecated.patch b/lang/php7/patches/1020-openssl-deprecated.patch
deleted file mode 100644 (file)
index 745a5da..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
---- a/ext/ftp/php_ftp.c
-+++ b/ext/ftp/php_ftp.c
-@@ -320,12 +320,14 @@ static void ftp_destructor_ftpbuf(zend_resource *rsrc)
- PHP_MINIT_FUNCTION(ftp)
- {
- #ifdef HAVE_FTP_SSL
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       SSL_library_init();
-       OpenSSL_add_all_ciphers();
-       OpenSSL_add_all_digests();
-       OpenSSL_add_all_algorithms();
-       SSL_load_error_strings();
-+#endif
- #endif
-       le_ftpbuf = zend_register_list_destructors_ex(ftp_destructor_ftpbuf, NULL, le_ftpbuf_name, module_number);
---- a/ext/openssl/openssl.c
-+++ b/ext/openssl/openssl.c
-@@ -683,6 +683,12 @@ static const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1)
-       return M_ASN1_STRING_data(asn1);
- }
-+#define OpenSSL_version               OpenSSL_version
-+#define OPENSSL_VERSION               OPENSSL_VERSION
-+#define X509_getm_notBefore   X509_get_notBefore
-+#define X509_getm_notAfter    X509_get_notAfter
-+#define EVP_CIPHER_CTX_reset  EVP_CIPHER_CTX_cleanup
-+
- #if PHP_OPENSSL_API_VERSION < 0x10002
- static int X509_get_signature_nid(const X509 *x)
-@@ -1587,7 +1593,7 @@ PHP_MINFO_FUNCTION(openssl)
- {
-       php_info_print_table_start();
-       php_info_print_table_row(2, "OpenSSL support", "enabled");
--      php_info_print_table_row(2, "OpenSSL Library Version", SSLeay_version(SSLEAY_VERSION));
-+      php_info_print_table_row(2, "OpenSSL Library Version", OpenSSL_version(OPENSSL_VERSION));
-       php_info_print_table_row(2, "OpenSSL Header Version", OPENSSL_VERSION_TEXT);
-       php_info_print_table_row(2, "Openssl default config", default_ssl_conf_filename);
-       php_info_print_table_end();
-@@ -2364,11 +2370,11 @@ PHP_FUNCTION(openssl_x509_parse)
-       add_assoc_string(return_value, "serialNumberHex", hex_serial);
-       OPENSSL_free(hex_serial);
--      php_openssl_add_assoc_asn1_string(return_value, "validFrom",    X509_get_notBefore(cert));
--      php_openssl_add_assoc_asn1_string(return_value, "validTo",              X509_get_notAfter(cert));
-+      php_openssl_add_assoc_asn1_string(return_value, "validFrom",    X509_getm_notBefore(cert));
-+      php_openssl_add_assoc_asn1_string(return_value, "validTo",              X509_getm_notAfter(cert));
--      add_assoc_long(return_value, "validFrom_time_t", php_openssl_asn1_time_to_time_t(X509_get_notBefore(cert)));
--      add_assoc_long(return_value, "validTo_time_t",  php_openssl_asn1_time_to_time_t(X509_get_notAfter(cert)));
-+      add_assoc_long(return_value, "validFrom_time_t", php_openssl_asn1_time_to_time_t(X509_getm_notBefore(cert)));
-+      add_assoc_long(return_value, "validTo_time_t",  php_openssl_asn1_time_to_time_t(X509_getm_notAfter(cert)));
-       tmpstr = (char *)X509_alias_get0(cert, NULL);
-       if (tmpstr) {
-@@ -3459,8 +3465,8 @@ PHP_FUNCTION(openssl_csr_sign)
-               php_openssl_store_errors();
-               goto cleanup;
-       }
--      X509_gmtime_adj(X509_get_notBefore(new_cert), 0);
--      X509_gmtime_adj(X509_get_notAfter(new_cert), 60*60*24*(long)num_days);
-+      X509_gmtime_adj(X509_getm_notBefore(new_cert), 0);
-+      X509_gmtime_adj(X509_getm_notAfter(new_cert), 60*60*24*(long)num_days);
-       i = X509_set_pubkey(new_cert, key);
-       if (!i) {
-               php_openssl_store_errors();
-@@ -6092,7 +6098,7 @@ PHP_FUNCTION(openssl_seal)
-       /* allocate one byte extra to make room for \0 */
-       buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx));
--      EVP_CIPHER_CTX_cleanup(ctx);
-+      EVP_CIPHER_CTX_reset(ctx);
-       if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 ||
-                       !EVP_SealUpdate(ctx, buf, &len1, (unsigned char *)data, (int)data_len) ||
-@@ -6645,7 +6651,7 @@ PHP_FUNCTION(openssl_encrypt)
-       if (free_iv) {
-               efree(iv);
-       }
--      EVP_CIPHER_CTX_cleanup(cipher_ctx);
-+      EVP_CIPHER_CTX_reset(cipher_ctx);
-       EVP_CIPHER_CTX_free(cipher_ctx);
- }
- /* }}} */
-@@ -6732,7 +6738,7 @@ PHP_FUNCTION(openssl_decrypt)
-       if (base64_str) {
-               zend_string_release(base64_str);
-       }
--      EVP_CIPHER_CTX_cleanup(cipher_ctx);
-+      EVP_CIPHER_CTX_reset(cipher_ctx);
-       EVP_CIPHER_CTX_free(cipher_ctx);
- }
- /* }}} */
---- a/ext/openssl/xp_ssl.c
-+++ b/ext/openssl/xp_ssl.c
-@@ -56,8 +56,21 @@
- #define HAVE_SSL3 1
- #endif
-+#if PHP_OPENSSL_API_VERSION >= 0x10100
-+#define HAVE_TLS 1
-+#endif
-+
-+#if PHP_OPENSSL_API_VERSION < 0x10100
-+#define HAVE_TLS1 1
-+#endif
-+
-+#if PHP_OPENSSL_API_VERSION < 0x10100
- #define HAVE_TLS11 1
-+#endif
-+
-+#if PHP_OPENSSL_API_VERSION < 0x10100
- #define HAVE_TLS12 1
-+#endif
- #ifndef OPENSSL_NO_ECDH
- #define HAVE_ECDH 1
-@@ -78,9 +91,10 @@
- #define STREAM_CRYPTO_IS_CLIENT            (1<<0)
- #define STREAM_CRYPTO_METHOD_SSLv2         (1<<1)
- #define STREAM_CRYPTO_METHOD_SSLv3         (1<<2)
--#define STREAM_CRYPTO_METHOD_TLSv1_0       (1<<3)
--#define STREAM_CRYPTO_METHOD_TLSv1_1       (1<<4)
--#define STREAM_CRYPTO_METHOD_TLSv1_2       (1<<5)
-+#define STREAM_CRYPTO_METHOD_TLS           (1<<3)
-+#define STREAM_CRYPTO_METHOD_TLSv1_0       (1<<4)
-+#define STREAM_CRYPTO_METHOD_TLSv1_1       (1<<5)
-+#define STREAM_CRYPTO_METHOD_TLSv1_2       (1<<6)
- /* Simplify ssl context option retrieval */
- #define GET_VER_OPT(name) \
-@@ -968,9 +982,23 @@ static const SSL_METHOD *php_openssl_select_crypto_method(zend_long method_value
-               php_error_docref(NULL, E_WARNING,
-                               "SSLv3 unavailable in the OpenSSL library against which PHP is linked");
-               return NULL;
-+#endif
-+      } else if (method_value == STREAM_CRYPTO_METHOD_TLS) {
-+#ifdef HAVE_TLS
-+              return is_client ? TLS_client_method() : TLS_server_method();
-+#else
-+              php_error_docref(NULL, E_WARNING,
-+                              "TLS unavailable in the OpenSSL library against which PHP is linked");
-+              return NULL;
- #endif
-       } else if (method_value == STREAM_CRYPTO_METHOD_TLSv1_0) {
-+#ifdef HAVE_TLS1
-               return is_client ? TLSv1_client_method() : TLSv1_server_method();
-+#else
-+              php_error_docref(NULL, E_WARNING,
-+                              "TLSv1 unavailable in the OpenSSL library against which PHP is linked");
-+              return NULL;
-+#endif
-       } else if (method_value == STREAM_CRYPTO_METHOD_TLSv1_1) {
- #ifdef HAVE_TLS11
-               return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
-@@ -1022,9 +1050,11 @@ static int php_openssl_get_crypto_method_ctx_flags(int method_flags) /* {{{ */
-               ssl_ctx_options |= SSL_OP_NO_SSLv3;
-       }
- #endif
-+#ifdef HAVE_TLS1
-       if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_0)) {
-               ssl_ctx_options |= SSL_OP_NO_TLSv1;
-       }
-+#endif
- #ifdef HAVE_TLS11
-       if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_1)) {
-               ssl_ctx_options |= SSL_OP_NO_TLSv1_1;