summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Gathoye2018-04-24 23:38:09 +0200
committerWilliam Gathoye2018-04-24 23:38:09 +0200
commit67ba11023aebd03233e5f649e35aadbbf5312df4 (patch)
treec41e058bb0699976cf2b48f16bfbc0de35ba1d54
parent5e453d322e7adf11acad35f1f4cd7c08ee458931 (diff)
parent270dfeb9fe714ab66ee090d3498327f059954956 (diff)
downloadaur-67ba11023aebd03233e5f649e35aadbbf5312df4.tar.gz
Merge branch 'github'
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD40
-rw-r--r--enchant-2.patch84
-rwxr-xr-xgenerate_patches49
-rw-r--r--php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch303
-rw-r--r--php-icu-1101-Simplify-namespace-access.patch307
6 files changed, 735 insertions, 68 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0a3ad7bd016..418f90601d2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -31,18 +31,24 @@ pkgbase = php70
source = https://php.net/distributions/php-7.0.29.tar.xz.asc
source = apache.patch
source = apache.conf
+ source = enchant-2.patch
source = php-fpm.patch
source = php-fpm.tmpfiles
source = php.ini.patch
+ source = php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch
+ source = php-icu-1101-Simplify-namespace-access.patch
validpgpkeys = 1A4E8B7277C42E53DBA9C7B9BCAA30EA9C0D5763
validpgpkeys = 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3
- sha256sums = ca79d3ecc123bff4b623d4a1bbf5ad53ad39f5f2f5912fecc0ea97e95eba21cc
- sha256sums = SKIP
- sha256sums = 819f05d2fd5a75c96e93c863517ca77dbd021a1224dc2d8096f758fb2937df6a
- sha256sums = df075b89484eb3a08402788580de16d23123f95541b2e9aed8d928105de9b874
- sha256sums = 75322f9b38c5961faddcb4f5333fbcb5ea5955e4f54f1eec223fc4367eb3b247
- sha256sums = b6b7f3ced56b75bf95513a46f43cde41fc28da714f5e0ed181caf2266f2f0c27
- sha256sums = 2f678d039313ee613d59c8b4bf9f48068085df0fa8ac7ca4cf807e168061a8c9
+ sha512sums = ea5a2fbcfc875dd2621e3f67038c1e00f43b53bc7079ae2127fcefbf116db0f32e34d4435f8211305402a4eccdaa5dfd6b96cf9416e68700f2c1f438d74a0af8
+ sha512sums = 3702882c137cefaf62f55c9a2c508173152b6e7ad33be2f7de38e6e4e5273109efb19fa9fe6964a385d95f7837df80769d890fe0e04a78c8ede66cc266ba9b92
+ sha512sums = f5e5431993c2e0c1806c4edf392030d0b605f4b3c4cebec036e810ff771b2327983f347221735673506e2c91ce2e18ad37ab7600261b684fe29491206171b4f3
+ sha512sums = 30cdc281c6e288cf8a0bf58a0ad74ad5b4e8205d2b0b6ab465fad97d810f7bfae4581ad836712998e834d2e90d38cacd22f19bb01e77fc4c9d200d95613fc669
+ sha512sums = 2d5f3aa71ce7d8da43f0f683f81b06258e3a0d95df4807a8acac91ff89fbe60484ef97856a908bce625b1610d0004767a6a8c622246086afe2f2d464977088b5
+ sha512sums = e567dbe8b348364c0efb2d96492d4747e96f835adc2b3cb0c1563049fe6cabe9b1fde8ba24b690fb5d64339673e3088b2336f8cb5aa2c85e2f9fa50efd665865
+ sha512sums = fde017c6382d687b80d660253cbe5d581ca886fee0d762bf519b245c6e39677194be542ec26c71c81d104422b444a0fdadd92ac1a17e9ea1e6ec34bfb204ca7d
+ sha512sums = a98bba8d648853d653946c7a379ef62760282d8856fc1f79f84d66ac3c2082ef62c2fc0ed6a6762b50560ac60168fcdf946536a99131d397e89e906ee855419c
+ sha512sums = 70c859feff58650ff4a291b1725bce8f290ac6d92cacc4420d3ead5cbbdbcf567cd0ed4d79fdd8b0435cf6833f7b50fff798b2fae274c5fb1bb37a0984a45f9d
+ sha512sums = 33d40f3ae500cf583519ecfa271e36d727c38ff4ea9547d3d2c4d51c9fadd317ed614a048077ebdb116e3c84c11db95e6455cdfc80d092d217d070c98af56525
pkgname = php70
pkgdesc = A general-purpose scripting language that is especially suited to web development
diff --git a/PKGBUILD b/PKGBUILD
index af41f5564f0..7607eb6c584 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -35,22 +35,35 @@ license=('PHP')
url='http://www.php.net'
-makedepends=('apache' 'aspell' 'db' 'enchant' 'gd' 'gmp' 'icu'
+makedepends=('apache' 'aspell' 'db' 'enchant' 'gd' 'gmp' 'icu'
'libmcrypt' 'libxslt' 'libzip' 'net-snmp'
'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl'
'libtool' 'freetds' 'pcre' 'c-client')
-source=("https://php.net/distributions/${_pkgbase}-${pkgver}.tar.xz"{,.asc}
- 'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch'
- )
-sha256sums=('ca79d3ecc123bff4b623d4a1bbf5ad53ad39f5f2f5912fecc0ea97e95eba21cc'
- 'SKIP'
- '819f05d2fd5a75c96e93c863517ca77dbd021a1224dc2d8096f758fb2937df6a'
- 'df075b89484eb3a08402788580de16d23123f95541b2e9aed8d928105de9b874'
- '75322f9b38c5961faddcb4f5333fbcb5ea5955e4f54f1eec223fc4367eb3b247'
- 'b6b7f3ced56b75bf95513a46f43cde41fc28da714f5e0ed181caf2266f2f0c27'
- '2f678d039313ee613d59c8b4bf9f48068085df0fa8ac7ca4cf807e168061a8c9'
- )
+source=(
+ "https://php.net/distributions/${_pkgbase}-${pkgver}.tar.xz"{,.asc}
+ 'apache.patch'
+ 'apache.conf'
+ 'enchant-2.patch'
+ 'php-fpm.patch'
+ 'php-fpm.tmpfiles'
+ 'php.ini.patch'
+ 'php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch'
+ 'php-icu-1101-Simplify-namespace-access.patch'
+)
+sha512sums=(
+ 'ea5a2fbcfc875dd2621e3f67038c1e00f43b53bc7079ae2127fcefbf116db0f32e34d4435f8211305402a4eccdaa5dfd6b96cf9416e68700f2c1f438d74a0af8'
+ '3702882c137cefaf62f55c9a2c508173152b6e7ad33be2f7de38e6e4e5273109efb19fa9fe6964a385d95f7837df80769d890fe0e04a78c8ede66cc266ba9b92'
+ 'f5e5431993c2e0c1806c4edf392030d0b605f4b3c4cebec036e810ff771b2327983f347221735673506e2c91ce2e18ad37ab7600261b684fe29491206171b4f3'
+ '30cdc281c6e288cf8a0bf58a0ad74ad5b4e8205d2b0b6ab465fad97d810f7bfae4581ad836712998e834d2e90d38cacd22f19bb01e77fc4c9d200d95613fc669'
+ '2d5f3aa71ce7d8da43f0f683f81b06258e3a0d95df4807a8acac91ff89fbe60484ef97856a908bce625b1610d0004767a6a8c622246086afe2f2d464977088b5'
+ 'e567dbe8b348364c0efb2d96492d4747e96f835adc2b3cb0c1563049fe6cabe9b1fde8ba24b690fb5d64339673e3088b2336f8cb5aa2c85e2f9fa50efd665865'
+ 'fde017c6382d687b80d660253cbe5d581ca886fee0d762bf519b245c6e39677194be542ec26c71c81d104422b444a0fdadd92ac1a17e9ea1e6ec34bfb204ca7d'
+ 'a98bba8d648853d653946c7a379ef62760282d8856fc1f79f84d66ac3c2082ef62c2fc0ed6a6762b50560ac60168fcdf946536a99131d397e89e906ee855419c'
+ '70c859feff58650ff4a291b1725bce8f290ac6d92cacc4420d3ead5cbbdbcf567cd0ed4d79fdd8b0435cf6833f7b50fff798b2fae274c5fb1bb37a0984a45f9d'
+ '33d40f3ae500cf583519ecfa271e36d727c38ff4ea9547d3d2c4d51c9fadd317ed614a048077ebdb116e3c84c11db95e6455cdfc80d092d217d070c98af56525'
+)
+
# keys from http://php.net/downloads.php#gpg-7.0
#
#pub 2048R/9C0D5763 2015-06-09 [expires: 2024-06-06]
@@ -76,6 +89,9 @@ prepare() {
patch -p0 -i ${srcdir}/apache.patch
patch -p0 -i ${srcdir}/php-fpm.patch
patch -p0 -i ${srcdir}/php.ini.patch
+ patch -p0 -i ${srcdir}/enchant-2.patch
+ patch -p1 -i ${srcdir}/php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch
+ patch -p1 -i ${srcdir}/php-icu-1101-Simplify-namespace-access.patch
}
diff --git a/enchant-2.patch b/enchant-2.patch
new file mode 100644
index 00000000000..e582e54458f
--- /dev/null
+++ b/enchant-2.patch
@@ -0,0 +1,84 @@
+--- ext/enchant/config.m4 2018-01-02 09:50:14.000000000 +0100
++++ ext/enchant/config.m4.new 2018-02-01 12:13:28.801708953 +0100
+@@ -14,9 +14,9 @@
+ ENCHANT_SEARCH_DIRS="/usr/local /usr"
+ fi
+ for i in $ENCHANT_SEARCH_DIRS; do
+- if test -f $i/include/enchant/enchant.h; then
++ if test -f $i/include/enchant-2/enchant.h; then
+ ENCHANT_DIR=$i
+- ENCHANT_INCDIR=$i/include/enchant
++ ENCHANT_INCDIR=$i/include/enchant-2
+ elif test -f $i/include/enchant.h; then
+ ENCHANT_DIR=$i
+ ENCHANT_INCDIR=$i/include
+@@ -31,7 +31,7 @@
+
+ AC_DEFINE(HAVE_ENCHANT,1,[ ])
+ PHP_SUBST(ENCHANT_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(enchant, $ENCHANT_LIBDIR, ENCHANT_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(enchant-2, $ENCHANT_LIBDIR, ENCHANT_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($ENCHANT_INCDIR)
+ PHP_CHECK_LIBRARY(enchant, enchant_broker_set_param,
+ [
+--- configure 2018-01-02 09:51:27.000000000 +0100
++++ configure.new 2018-02-01 12:16:17.950382811 +0100
+@@ -29838,9 +29838,9 @@
+ ENCHANT_SEARCH_DIRS="/usr/local /usr"
+ fi
+ for i in $ENCHANT_SEARCH_DIRS; do
+- if test -f $i/include/enchant/enchant.h; then
++ if test -f $i/include/enchant-2/enchant.h; then
+ ENCHANT_DIR=$i
+- ENCHANT_INCDIR=$i/include/enchant
++ ENCHANT_INCDIR=$i/include/enchant-2
+ elif test -f $i/include/enchant.h; then
+ ENCHANT_DIR=$i
+ ENCHANT_INCDIR=$i/include
+@@ -29862,7 +29862,7 @@
+
+
+ if test "$ext_shared" = "yes"; then
+- ENCHANT_SHARED_LIBADD="-lenchant $ENCHANT_SHARED_LIBADD"
++ ENCHANT_SHARED_LIBADD="-lenchant-2 $ENCHANT_SHARED_LIBADD"
+ if test -n "$ENCHANT_LIBDIR"; then
+
+ if test "$ENCHANT_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ENCHANT_LIBDIR" != "/usr/lib"; then
+--- ext/enchant/enchant.c 2018-01-02 09:50:14.000000000 +0100
++++ ext/enchant/enchant.c.new 2018-02-01 12:19:00.228985343 +0100
+@@ -745,7 +745,7 @@
+ for (i = 0; i < n_sugg; i++) {
+ add_next_index_string(sugg, suggs[i]);
+ }
+- enchant_dict_free_suggestions(pdict->pdict, suggs);
++ enchant_dict_free_string_list(pdict->pdict, suggs);
+ }
+
+
+@@ -802,7 +802,7 @@
+ add_next_index_string(return_value, suggs[i]);
+ }
+
+- enchant_dict_free_suggestions(pdict->pdict, suggs);
++ enchant_dict_free_string_list(pdict->pdict, suggs);
+ }
+ }
+ /* }}} */
+@@ -822,7 +822,7 @@
+
+ PHP_ENCHANT_GET_DICT;
+
+- enchant_dict_add_to_personal(pdict->pdict, word, wordlen);
++ enchant_dict_add(pdict->pdict, word, wordlen);
+ }
+ /* }}} */
+
+@@ -860,7 +860,7 @@
+
+ PHP_ENCHANT_GET_DICT;
+
+- RETURN_BOOL(enchant_dict_is_in_session(pdict->pdict, word, wordlen));
++ RETURN_BOOL(enchant_dict_is_added(pdict->pdict, word, wordlen));
+ }
+ /* }}} */
+
diff --git a/generate_patches b/generate_patches
deleted file mode 100755
index d024aaeeca6..00000000000
--- a/generate_patches
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-
-. PKGBUILD
-
-makepkg -o --nodeps --noprepare --skipinteg
-
-pushd src/${_pkgbase}-${pkgver}
-
-sed '/APACHE_THREADED_MPM=/d' -i.orig sapi/apache2handler/config.m4 -i.orig configure
-
-sed 's/.conf.default/.conf/g' -i.orig sapi/fpm/Makefile.frag
-
-sed \
- -e 's#run/php-fpm.pid#/run/php70-fpm/php-fpm.pid#' \
- -e 's#^;error_log =.*#error_log = syslog#' \
- -i.orig sapi/fpm/php-fpm.conf.in
-
-sed \
- -e 's#^listen =.*#listen = /run/php70-fpm/php-fpm.sock#' \
- -e 's#^;listen.owner =#listen.owner =#' \
- -e 's#^;listen.group =#listen.group =#' \
- -e 's#^;chdir =.*#;chdir = /srv/http#' \
- -i.orig sapi/fpm/www.conf.in
-
-sed \
- -e 's#^PIDFile=.*#PIDFile=/run/php70-fpm/php-fpm.pid#' \
- -e 's#^ExecStart=.*#ExecStart=@sbindir@/php-fpm70 --nodaemonize --fpm-config @sysconfdir@/php-fpm.conf#' \
- -i.orig sapi/fpm/php-fpm.service.in
-
-extensions=";extension=bcmath.so\n;extension=bz2.so\n;extension=calendar.so\nextension=curl.so\n;extension=dba.so\n;extension=enchant.so\n;extension=exif.so\n;extension=ftp.so\n;extension=gd.so\n;extension=gettext.so\n;extension=gmp.so\n;extension=iconv.so\n;extension=imap.so\n;extension=intl.so\n;extension=ldap.so\n;extension=mcrypt.so\n;extension=mysqli.so\n;extension=odbc.so\n;zend_extension=opcache.so\n;extension=pdo_dblib.so\n;extension=pdo_mysql.so\n;extension=pdo_odbc.so\n;extension=pdo_pgsql.so\n;extension=pdo_sqlite.so\n;extension=pgsql.so\n;extension=pspell.so\n;extension=shmop.so\n;extension=snmp.so\n;extension=soap.so\n;extension=sockets.so\n;extension=sqlite3.so\n;extension=sysvmsg.so\n;extension=sysvsem.so\n;extension=sysvshm.so\n;extension=tidy.so\n;extension=xmlrpc.so\n;extension=xsl.so\nextension=zip.so\n"
-
-sed \
- -r ":a;N;\$!ba;s/; Windows Extensions\n.+;?extension=php_[a-z]+\.dll\n/${extensions}/g" \
- -i.orig php.ini-production
-sed \
- -e 's#^; extension_dir = "\./"$#extension_dir = "/usr/lib/php70/modules/"#g' \
- -i php.ini-production
-
-diff -u sapi/apache2handler/config.m4.orig sapi/apache2handler/config.m4 | filterdiff --clean --remove-timestamps > ../../apache.patch
-diff -u configure.orig configure | filterdiff --clean --remove-timestamps >> ../../apache.patch
-
-diff -u sapi/fpm/Makefile.frag.orig sapi/fpm/Makefile.frag | filterdiff --clean --remove-timestamps > ../../php-fpm.patch
-diff -u sapi/fpm/php-fpm.conf.in.orig sapi/fpm/php-fpm.conf.in | filterdiff --clean --remove-timestamps >> ../../php-fpm.patch
-diff -u sapi/fpm/www.conf.in.orig sapi/fpm/www.conf.in | filterdiff --clean --remove-timestamps >> ../../php-fpm.patch
-diff -u sapi/fpm/php-fpm.service.in.orig sapi/fpm/php-fpm.service.in | filterdiff --clean --remove-timestamps >> ../../php-fpm.patch
-
-diff -u php.ini-production.orig php.ini-production | filterdiff --clean --remove-timestamps > ../../php.ini.patch
-
-popd
diff --git a/php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch b/php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch
new file mode 100644
index 00000000000..e24205504be
--- /dev/null
+++ b/php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch
@@ -0,0 +1,303 @@
+From 8d35a423838eb462cd39ee535c5d003073cc5f22 Mon Sep 17 00:00:00 2001
+From: Anatol Belski <ab@php.net>
+Date: Sat, 31 Mar 2018 18:51:03 +0200
+Subject: [PATCH] Utilize the recommended way to handle the icu namespace
+
+---
+ ext/intl/breakiterator/breakiterator_class.cpp | 1 +
+ ext/intl/breakiterator/breakiterator_class.h | 2 ++
+ ext/intl/breakiterator/breakiterator_methods.cpp | 2 ++
+ ext/intl/breakiterator/codepointiterator_internal.cpp | 2 ++
+ ext/intl/breakiterator/codepointiterator_internal.h | 3 +++
+ ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp | 3 +++
+ ext/intl/calendar/calendar_class.cpp | 3 +++
+ ext/intl/calendar/calendar_class.h | 2 ++
+ ext/intl/calendar/calendar_methods.cpp | 2 ++
+ ext/intl/calendar/gregoriancalendar_methods.cpp | 7 +++++++
+ ext/intl/common/common_date.cpp | 3 +++
+ ext/intl/common/common_date.h | 2 ++
+ ext/intl/common/common_enum.h | 1 +
+ ext/intl/dateformat/dateformat_format_object.cpp | 6 ++++++
+ ext/intl/dateformat/dateformat_helpers.cpp | 2 ++
+ ext/intl/dateformat/dateformat_helpers.h | 5 +++++
+ ext/intl/intl_convertcpp.h | 2 ++
+ ext/intl/msgformat/msgformat_helpers.cpp | 10 ++++++++++
+ ext/intl/timezone/timezone_class.cpp | 2 ++
+ ext/intl/timezone/timezone_class.h | 2 ++
+ ext/intl/timezone/timezone_methods.cpp | 4 ++++
+ 21 files changed, 66 insertions(+)
+
+--- a/ext/intl/breakiterator/breakiterator_class.cpp
++++ b/ext/intl/breakiterator/breakiterator_class.cpp
+@@ -38,6 +38,7 @@ extern "C" {
+ }
+
+ using PHP::CodePointBreakIterator;
++using U_ICU_NAMESPACE::RuleBasedBreakIterator;
+
+ /* {{{ Global variables */
+ zend_class_entry *BreakIterator_ce_ptr;
+--- a/ext/intl/breakiterator/breakiterator_class.h
++++ b/ext/intl/breakiterator/breakiterator_class.h
+@@ -26,6 +26,8 @@
+
+ #ifndef USE_BREAKITERATOR_POINTER
+ typedef void BreakIterator;
++#else
++using U_ICU_NAMESPACE::BreakIterator;
+ #endif
+
+ typedef struct {
+--- a/ext/intl/breakiterator/breakiterator_methods.cpp
++++ b/ext/intl/breakiterator/breakiterator_methods.cpp
+@@ -32,6 +32,8 @@ extern "C" {
+ }
+
+ using PHP::CodePointBreakIterator;
++using U_ICU_NAMESPACE::BreakIterator;
++using U_ICU_NAMESPACE::Locale;
+
+ U_CFUNC PHP_METHOD(BreakIterator, __construct)
+ {
+--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
++++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
+@@ -33,6 +33,8 @@ typedef union {
+
+ using namespace PHP;
+
++using U_ICU_NAMESPACE::UCharCharacterIterator;
++
+ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
+
+ CodePointBreakIterator::CodePointBreakIterator()
+--- a/ext/intl/breakiterator/codepointiterator_internal.h
++++ b/ext/intl/breakiterator/codepointiterator_internal.h
+@@ -18,8 +18,11 @@
+ #define CODEPOINTITERATOR_INTERNAL_H
+
+ #include <unicode/brkiter.h>
++#include <unicode/unistr.h>
+
+ using U_ICU_NAMESPACE::BreakIterator;
++using U_ICU_NAMESPACE::CharacterIterator;
++using U_ICU_NAMESPACE::UnicodeString;
+
+ namespace PHP {
+
+--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
++++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+@@ -26,6 +26,9 @@ extern "C" {
+ #include "../intl_convertcpp.h"
+ #include "../intl_common.h"
+
++using U_ICU_NAMESPACE::RuleBasedBreakIterator;
++using U_ICU_NAMESPACE::Locale;
++
+ static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
+ return (RuleBasedBreakIterator*)bio->biter;
+ }
+--- a/ext/intl/calendar/calendar_class.cpp
++++ b/ext/intl/calendar/calendar_class.cpp
+@@ -34,6 +34,9 @@ extern "C" {
+ #include <assert.h>
+ }
+
++using U_ICU_NAMESPACE::GregorianCalendar;
++using U_ICU_NAMESPACE::Locale;
++
+ /* {{{ Global variables */
+ zend_class_entry *Calendar_ce_ptr;
+ zend_class_entry *GregorianCalendar_ce_ptr;
+--- a/ext/intl/calendar/calendar_class.h
++++ b/ext/intl/calendar/calendar_class.h
+@@ -26,6 +26,8 @@
+
+ #ifndef USE_CALENDAR_POINTER
+ typedef void Calendar;
++#else
++using U_ICU_NAMESPACE::Calendar;
+ #endif
+
+ typedef struct {
+--- a/ext/intl/calendar/calendar_methods.cpp
++++ b/ext/intl/calendar/calendar_methods.cpp
+@@ -40,6 +40,8 @@ extern "C" {
+ }
+ #include "../common/common_enum.h"
+
++using U_ICU_NAMESPACE::Locale;
++
+ U_CFUNC PHP_METHOD(IntlCalendar, __construct)
+ {
+ zend_throw_exception( NULL,
+--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
++++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
+@@ -23,6 +23,8 @@
+ #include <unicode/locid.h>
+ #include <unicode/calendar.h>
+ #include <unicode/gregocal.h>
++#include <unicode/ustring.h>
++
+ extern "C" {
+ #include "../php_intl.h"
+ #include "../intl_common.h"
+@@ -34,6 +36,11 @@ extern "C" {
+ #include "zend_exceptions.h"
+ }
+
++using U_ICU_NAMESPACE::GregorianCalendar;
++using U_ICU_NAMESPACE::Locale;
++using U_ICU_NAMESPACE::UnicodeString;
++using U_ICU_NAMESPACE::StringPiece;
++
+ static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
+ return (GregorianCalendar*)co->ucal;
+ }
+--- a/ext/intl/common/common_date.cpp
++++ b/ext/intl/common/common_date.cpp
+@@ -25,4 +25,7 @@
+ #include <ext/date/php_date.h>
+ }
+
++using U_ICU_NAMESPACE::TimeZone;
++using U_ICU_NAMESPACE::UnicodeString;
++
+ #ifndef INFINITY
+--- a/ext/intl/common/common_date.h
++++ b/ext/intl/common/common_date.h
+@@ -28,6 +28,8 @@ U_CDECL_END
+
+ #include <unicode/timezone.h>
+
++using U_ICU_NAMESPACE::TimeZone;
++
+ U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func);
+ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
+ intl_error *err, const char *func);
+--- a/ext/intl/common/common_enum.h
++++ b/ext/intl/common/common_enum.h
+@@ -75,6 +75,7 @@ U_CFUNC zval *zoi_with_current_get_curre
+ U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter);
+
+ #ifdef __cplusplus
++using U_ICU_NAMESPACE::StringEnumeration;
+ U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object);
+ #endif
+
+--- a/ext/intl/dateformat/dateformat_format_object.cpp
++++ b/ext/intl/dateformat/dateformat_format_object.cpp
+@@ -33,6 +33,12 @@ extern "C" {
+ #include "../common/common_date.h"
+ }
+
++using U_ICU_NAMESPACE::Locale;
++using U_ICU_NAMESPACE::DateFormat;
++using U_ICU_NAMESPACE::GregorianCalendar;
++using U_ICU_NAMESPACE::StringPiece;
++using U_ICU_NAMESPACE::SimpleDateFormat;
++
+ static const DateFormat::EStyle valid_styles[] = {
+ DateFormat::kNone,
+ DateFormat::kFull,
+--- a/ext/intl/dateformat/dateformat_helpers.cpp
++++ b/ext/intl/dateformat/dateformat_helpers.cpp
+@@ -28,6 +28,8 @@ extern "C" {
+ #include "../calendar/calendar_class.h"
+ }
+
++using U_ICU_NAMESPACE::GregorianCalendar;
++
+ int datefmt_process_calendar_arg(zval* calendar_zv,
+ Locale const& locale,
+ const char *func_name,
+--- a/ext/intl/dateformat/dateformat_helpers.h
++++ b/ext/intl/dateformat/dateformat_helpers.h
+@@ -22,11 +22,16 @@
+ #endif
+
+ #include <unicode/calendar.h>
++#include <unicode/datefmt.h>
+
+ extern "C" {
+ #include "../php_intl.h"
+ }
+
++using U_ICU_NAMESPACE::Locale;
++using U_ICU_NAMESPACE::Calendar;
++using U_ICU_NAMESPACE::DateFormat;
++
+ int datefmt_process_calendar_arg(zval* calendar_zv,
+ Locale const& locale,
+ const char *func_name,
+--- a/ext/intl/intl_convertcpp.h
++++ b/ext/intl/intl_convertcpp.h
+@@ -26,6 +26,8 @@
+ #include <unicode/unistr.h>
+ #include <zend_types.h>
+
++using U_ICU_NAMESPACE::UnicodeString;
++
+ int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status);
+
+ zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status);
+--- a/ext/intl/msgformat/msgformat_helpers.cpp
++++ b/ext/intl/msgformat/msgformat_helpers.cpp
+@@ -76,6 +76,16 @@ MessageFormatAdapter::getMessagePattern(
+ #endif
+ U_NAMESPACE_END
+
++using U_ICU_NAMESPACE::Formattable;
++using U_ICU_NAMESPACE::Format;
++using U_ICU_NAMESPACE::DateFormat;
++using U_ICU_NAMESPACE::MessageFormat;
++#ifdef HAS_MESSAGE_PATTERN
++using U_ICU_NAMESPACE::MessagePattern;
++#endif
++using U_ICU_NAMESPACE::MessageFormatAdapter;
++using U_ICU_NAMESPACE::FieldPosition;
++
+ U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
+ {
+ int32_t fmt_count = 0;
+--- a/ext/intl/timezone/timezone_class.cpp
++++ b/ext/intl/timezone/timezone_class.cpp
+@@ -37,6 +37,8 @@ extern "C" {
+ #include <ext/date/php_date.h>
+ }
+
++using U_ICU_NAMESPACE::Calendar;
++
+ /* {{{ Global variables */
+ U_CDECL_BEGIN
+ zend_class_entry *TimeZone_ce_ptr = NULL;
+--- a/ext/intl/timezone/timezone_class.h
++++ b/ext/intl/timezone/timezone_class.h
+@@ -29,6 +29,8 @@
+
+ #ifndef USE_TIMEZONE_POINTER
+ typedef void TimeZone;
++#else
++using U_ICU_NAMESPACE::TimeZone;
+ #endif
+
+ typedef struct {
+--- a/ext/intl/timezone/timezone_methods.cpp
++++ b/ext/intl/timezone/timezone_methods.cpp
+@@ -23,6 +23,7 @@
+ #include <unicode/locid.h>
+ #include <unicode/timezone.h>
+ #include <unicode/ustring.h>
++#include <unicode/calendar.h>
+ #include "intl_convertcpp.h"
+
+ #include "../common/common_date.h"
+@@ -37,6 +38,9 @@ extern "C" {
+ }
+ #include "common/common_enum.h"
+
++using U_ICU_NAMESPACE::Locale;
++using U_ICU_NAMESPACE::Calendar;
++
+ U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
+ {
+ zend_throw_exception( NULL,
diff --git a/php-icu-1101-Simplify-namespace-access.patch b/php-icu-1101-Simplify-namespace-access.patch
new file mode 100644
index 00000000000..84e8145ab44
--- /dev/null
+++ b/php-icu-1101-Simplify-namespace-access.patch
@@ -0,0 +1,307 @@
+From d8200e48857aeaf09f7127751efc5632ef7660a7 Mon Sep 17 00:00:00 2001
+From: Anatol Belski <ab@php.net>
+Date: Sun, 1 Apr 2018 01:03:40 +0200
+Subject: [PATCH] Simplify namespace access
+
+The icu namespace is an alias which resolves to the real namespace.
+---
+ ext/intl/breakiterator/breakiterator_class.cpp | 2 +-
+ ext/intl/breakiterator/breakiterator_class.h | 2 +-
+ ext/intl/breakiterator/breakiterator_methods.cpp | 4 ++--
+ ext/intl/breakiterator/codepointiterator_internal.cpp | 2 +-
+ ext/intl/breakiterator/codepointiterator_internal.h | 6 +++---
+ ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp | 4 ++--
+ ext/intl/calendar/calendar_class.cpp | 4 ++--
+ ext/intl/calendar/calendar_class.h | 2 +-
+ ext/intl/calendar/calendar_methods.cpp | 2 +-
+ ext/intl/calendar/gregoriancalendar_methods.cpp | 8 ++++----
+ ext/intl/common/common_date.cpp | 4 ++--
+ ext/intl/common/common_date.h | 2 +-
+ ext/intl/common/common_enum.h | 2 +-
+ ext/intl/dateformat/dateformat_format_object.cpp | 10 +++++-----
+ ext/intl/dateformat/dateformat_helpers.cpp | 2 +-
+ ext/intl/dateformat/dateformat_helpers.h | 6 +++---
+ ext/intl/intl_convertcpp.h | 2 +-
+ ext/intl/msgformat/msgformat_helpers.cpp | 14 +++++++-------
+ ext/intl/timezone/timezone_class.cpp | 2 +-
+ ext/intl/timezone/timezone_class.h | 2 +-
+ ext/intl/timezone/timezone_methods.cpp | 4 ++--
+ 21 files changed, 43 insertions(+), 43 deletions(-)
+
+--- a/ext/intl/breakiterator/breakiterator_class.cpp
++++ b/ext/intl/breakiterator/breakiterator_class.cpp
+@@ -38,7 +38,7 @@ extern "C" {
+ }
+
+ using PHP::CodePointBreakIterator;
+-using U_ICU_NAMESPACE::RuleBasedBreakIterator;
++using icu::RuleBasedBreakIterator;
+
+ /* {{{ Global variables */
+ zend_class_entry *BreakIterator_ce_ptr;
+--- a/ext/intl/breakiterator/breakiterator_class.h
++++ b/ext/intl/breakiterator/breakiterator_class.h
+@@ -27,7 +27,7 @@
+ #ifndef USE_BREAKITERATOR_POINTER
+ typedef void BreakIterator;
+ #else
+-using U_ICU_NAMESPACE::BreakIterator;
++using icu::BreakIterator;
+ #endif
+
+ typedef struct {
+--- a/ext/intl/breakiterator/breakiterator_methods.cpp
++++ b/ext/intl/breakiterator/breakiterator_methods.cpp
+@@ -32,8 +32,8 @@ extern "C" {
+ }
+
+ using PHP::CodePointBreakIterator;
+-using U_ICU_NAMESPACE::BreakIterator;
+-using U_ICU_NAMESPACE::Locale;
++using icu::BreakIterator;
++using icu::Locale;
+
+ U_CFUNC PHP_METHOD(BreakIterator, __construct)
+ {
+--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
++++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
+@@ -33,7 +33,7 @@ typedef union {
+
+ using namespace PHP;
+
+-using U_ICU_NAMESPACE::UCharCharacterIterator;
++using icu::UCharCharacterIterator;
+
+ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
+
+--- a/ext/intl/breakiterator/codepointiterator_internal.h
++++ b/ext/intl/breakiterator/codepointiterator_internal.h
+@@ -20,9 +20,9 @@
+ #include <unicode/brkiter.h>
+ #include <unicode/unistr.h>
+
+-using U_ICU_NAMESPACE::BreakIterator;
+-using U_ICU_NAMESPACE::CharacterIterator;
+-using U_ICU_NAMESPACE::UnicodeString;
++using icu::BreakIterator;
++using icu::CharacterIterator;
++using icu::UnicodeString;
+
+ namespace PHP {
+
+--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
++++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+@@ -26,8 +26,8 @@ extern "C" {
+ #include "../intl_convertcpp.h"
+ #include "../intl_common.h"
+
+-using U_ICU_NAMESPACE::RuleBasedBreakIterator;
+-using U_ICU_NAMESPACE::Locale;
++using icu::RuleBasedBreakIterator;
++using icu::Locale;
+
+ static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
+ return (RuleBasedBreakIterator*)bio->biter;
+--- a/ext/intl/calendar/calendar_class.cpp
++++ b/ext/intl/calendar/calendar_class.cpp
+@@ -34,8 +34,8 @@ extern "C" {
+ #include <assert.h>
+ }
+
+-using U_ICU_NAMESPACE::GregorianCalendar;
+-using U_ICU_NAMESPACE::Locale;
++using icu::GregorianCalendar;
++using icu::Locale;
+
+ /* {{{ Global variables */
+ zend_class_entry *Calendar_ce_ptr;
+--- a/ext/intl/calendar/calendar_class.h
++++ b/ext/intl/calendar/calendar_class.h
+@@ -27,7 +27,7 @@
+ #ifndef USE_CALENDAR_POINTER
+ typedef void Calendar;
+ #else
+-using U_ICU_NAMESPACE::Calendar;
++using icu::Calendar;
+ #endif
+
+ typedef struct {
+--- a/ext/intl/calendar/calendar_methods.cpp
++++ b/ext/intl/calendar/calendar_methods.cpp
+@@ -40,7 +40,7 @@ extern "C" {
+ }
+ #include "../common/common_enum.h"
+
+-using U_ICU_NAMESPACE::Locale;
++using icu::Locale;
+
+ U_CFUNC PHP_METHOD(IntlCalendar, __construct)
+ {
+--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
++++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
+@@ -36,10 +36,10 @@ extern "C" {
+ #include "zend_exceptions.h"
+ }
+
+-using U_ICU_NAMESPACE::GregorianCalendar;
+-using U_ICU_NAMESPACE::Locale;
+-using U_ICU_NAMESPACE::UnicodeString;
+-using U_ICU_NAMESPACE::StringPiece;
++using icu::GregorianCalendar;
++using icu::Locale;
++using icu::UnicodeString;
++using icu::StringPiece;
+
+ static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
+ return (GregorianCalendar*)co->ucal;
+--- a/ext/intl/common/common_date.cpp
++++ b/ext/intl/common/common_date.cpp
+@@ -25,8 +25,8 @@ extern "C" {
+ #include <ext/date/php_date.h>
+ }
+
+-using U_ICU_NAMESPACE::TimeZone;
+-using U_ICU_NAMESPACE::UnicodeString;
++using icu::TimeZone;
++using icu::UnicodeString;
+
+ #include "zend_portability.h"
+
+--- a/ext/intl/common/common_date.h
++++ b/ext/intl/common/common_date.h
+@@ -28,7 +28,7 @@ U_CDECL_END
+
+ #include <unicode/timezone.h>
+
+-using U_ICU_NAMESPACE::TimeZone;
++using icu::TimeZone;
+
+ U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func);
+ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
+--- a/ext/intl/common/common_enum.h
++++ b/ext/intl/common/common_enum.h
+@@ -75,7 +75,7 @@ U_CFUNC zval *zoi_with_current_get_curre
+ U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter);
+
+ #ifdef __cplusplus
+-using U_ICU_NAMESPACE::StringEnumeration;
++using icu::StringEnumeration;
+ U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object);
+ #endif
+
+--- a/ext/intl/dateformat/dateformat_format_object.cpp
++++ b/ext/intl/dateformat/dateformat_format_object.cpp
+@@ -33,11 +33,11 @@ extern "C" {
+ #include "../common/common_date.h"
+ }
+
+-using U_ICU_NAMESPACE::Locale;
+-using U_ICU_NAMESPACE::DateFormat;
+-using U_ICU_NAMESPACE::GregorianCalendar;
+-using U_ICU_NAMESPACE::StringPiece;
+-using U_ICU_NAMESPACE::SimpleDateFormat;
++using icu::Locale;
++using icu::DateFormat;
++using icu::GregorianCalendar;
++using icu::StringPiece;
++using icu::SimpleDateFormat;
+
+ static const DateFormat::EStyle valid_styles[] = {
+ DateFormat::kNone,
+--- a/ext/intl/dateformat/dateformat_helpers.cpp
++++ b/ext/intl/dateformat/dateformat_helpers.cpp
+@@ -28,7 +28,7 @@ extern "C" {
+ #include "../calendar/calendar_class.h"
+ }
+
+-using U_ICU_NAMESPACE::GregorianCalendar;
++using icu::GregorianCalendar;
+
+ int datefmt_process_calendar_arg(zval* calendar_zv,
+ Locale const& locale,
+--- a/ext/intl/dateformat/dateformat_helpers.h
++++ b/ext/intl/dateformat/dateformat_helpers.h
+@@ -28,9 +28,9 @@ extern "C" {
+ #include "../php_intl.h"
+ }
+
+-using U_ICU_NAMESPACE::Locale;
+-using U_ICU_NAMESPACE::Calendar;
+-using U_ICU_NAMESPACE::DateFormat;
++using icu::Locale;
++using icu::Calendar;
++using icu::DateFormat;
+
+ int datefmt_process_calendar_arg(zval* calendar_zv,
+ Locale const& locale,
+--- a/ext/intl/intl_convertcpp.h
++++ b/ext/intl/intl_convertcpp.h
+@@ -26,7 +26,7 @@
+ #include <unicode/unistr.h>
+ #include <zend_types.h>
+
+-using U_ICU_NAMESPACE::UnicodeString;
++using icu::UnicodeString;
+
+ int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status);
+
+--- a/ext/intl/msgformat/msgformat_helpers.cpp
++++ b/ext/intl/msgformat/msgformat_helpers.cpp
+@@ -76,15 +76,15 @@ MessageFormatAdapter::getMessagePattern(
+ #endif
+ U_NAMESPACE_END
+
+-using U_ICU_NAMESPACE::Formattable;
+-using U_ICU_NAMESPACE::Format;
+-using U_ICU_NAMESPACE::DateFormat;
+-using U_ICU_NAMESPACE::MessageFormat;
++using icu::Formattable;
++using icu::Format;
++using icu::DateFormat;
++using icu::MessageFormat;
+ #ifdef HAS_MESSAGE_PATTERN
+-using U_ICU_NAMESPACE::MessagePattern;
++using icu::MessagePattern;
+ #endif
+-using U_ICU_NAMESPACE::MessageFormatAdapter;
+-using U_ICU_NAMESPACE::FieldPosition;
++using icu::MessageFormatAdapter;
++using icu::FieldPosition;
+
+ U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
+ {
+--- a/ext/intl/timezone/timezone_class.cpp
++++ b/ext/intl/timezone/timezone_class.cpp
+@@ -37,7 +37,7 @@ extern "C" {
+ #include <ext/date/php_date.h>
+ }
+
+-using U_ICU_NAMESPACE::Calendar;
++using icu::Calendar;
+
+ /* {{{ Global variables */
+ U_CDECL_BEGIN
+--- a/ext/intl/timezone/timezone_class.h
++++ b/ext/intl/timezone/timezone_class.h
+@@ -30,7 +30,7 @@
+ #ifndef USE_TIMEZONE_POINTER
+ typedef void TimeZone;
+ #else
+-using U_ICU_NAMESPACE::TimeZone;
++using icu::TimeZone;
+ #endif
+
+ typedef struct {
+--- a/ext/intl/timezone/timezone_methods.cpp
++++ b/ext/intl/timezone/timezone_methods.cpp
+@@ -38,8 +38,8 @@ extern "C" {
+ }
+ #include "common/common_enum.h"
+
+-using U_ICU_NAMESPACE::Locale;
+-using U_ICU_NAMESPACE::Calendar;
++using icu::Locale;
++using icu::Calendar;
+
+ U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
+ {