summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Lamskoy2019-01-31 22:53:52 +0200
committerEugene Lamskoy2019-01-31 22:56:06 +0200
commit46e08dc96e37eb53aa5cb8a766daa87412206d5e (patch)
tree3ba0e88877e1e8eff7584adf4a21afe1b0e9ff5c
downloadaur-46e08dc96e37eb53aa5cb8a766daa87412206d5e.tar.gz
PHP 7.2.14
-rw-r--r--.SRCINFO161
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD353
-rw-r--r--apache.conf13
-rw-r--r--apache.patch20
-rw-r--r--enchant-2.patch84
-rw-r--r--php-fpm.patch74
-rw-r--r--php-fpm.tmpfiles1
-rw-r--r--php-freetype-2.9.1.patch233
-rw-r--r--php.ini.patch77
10 files changed, 1021 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f7d6389bd54b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,161 @@
+pkgbase = php72
+ pkgdesc = php 7.2 compiled as to not conflict with mainline php
+ pkgver = 7.2.14
+ pkgrel = 1
+ url = http://www.php.net
+ arch = i686
+ arch = x86_64
+ license = PHP
+ makedepends = apache
+ makedepends = aspell
+ makedepends = c-client
+ makedepends = db
+ makedepends = enchant
+ makedepends = gd
+ makedepends = gmp
+ makedepends = icu
+ makedepends = libmcrypt
+ makedepends = libxslt
+ makedepends = libzip
+ makedepends = net-snmp
+ makedepends = postgresql-libs
+ makedepends = sqlite
+ makedepends = systemd
+ makedepends = tidy
+ makedepends = unixodbc
+ makedepends = curl
+ makedepends = libtool
+ makedepends = freetds
+ makedepends = pcre
+ source = https://php.net/distributions/php-7.2.14.tar.xz
+ source = apache.patch
+ source = apache.conf
+ source = php-fpm.patch
+ source = php-fpm.tmpfiles
+ source = php.ini.patch
+ source = enchant-2.patch
+ source = php-freetype-2.9.1.patch
+ md5sums = a003b586eba4c56f7814eca5f1e76cfb
+ md5sums = 13cda50a6a420d04ddc26935ded3164e
+ md5sums = b7d69762f7c045b3950d770e04db504c
+ md5sums = 57342b2632c8a4a829f26e8f9985f3aa
+ md5sums = 62fa82888154a0c0d55b41a8d7138a05
+ md5sums = 4bf0b1296fc95947a11bef36fe76102a
+ md5sums = e3883dce91ed21e23a3d7ae9fa80216d
+ md5sums = b40b82f55208eaead22dbfb64720b064
+
+pkgname = php72
+ pkgdesc = A general-purpose scripting language that is especially suited to web development
+ depends = libxml2
+ depends = curl
+ depends = libzip
+ depends = pcre
+ provides = php=7.2.14
+ backup = etc/php72/php.ini
+
+pkgname = php72-cgi
+ pkgdesc = CGI and FCGI SAPI for PHP
+ depends = php72
+ provides = php-cgi=7.2.14
+
+pkgname = php72-apache
+ pkgdesc = Apache SAPI for PHP
+ depends = php72
+ depends = apache
+ provides = php-apache=7.2.14
+ backup = etc/httpd/conf/extra/php72_module.conf
+
+pkgname = php72-fpm
+ pkgdesc = FastCGI Process Manager for PHP
+ depends = php72
+ depends = systemd
+ provides = php-fpm=7.2.14
+ options = !emptydirs
+ backup = etc/php72/php-fpm.conf
+ backup = etc/php72/php-fpm.d/www.conf
+
+pkgname = php72-embed
+ pkgdesc = Embedded PHP SAPI library
+ depends = php72
+ depends = libsystemd
+ provides = php-embed=7.2.14
+ options = !emptydirs
+
+pkgname = php72-phpdbg
+ pkgdesc = Interactive PHP debugger
+ depends = php72
+ provides = php-phpdbg=7.2.14
+ options = !emptydirs
+
+pkgname = php72-dblib
+ pkgdesc = dblib module for PHP
+ depends = php72
+ depends = freetds
+ provides = php-dblib=7.2.14
+
+pkgname = php72-enchant
+ pkgdesc = enchant module for PHP
+ depends = php72
+ depends = enchant
+ provides = php-enchant=7.2.14
+
+pkgname = php72-gd
+ pkgdesc = gd module for PHP
+ depends = php72
+ depends = gd
+ provides = php-gd=7.2.14
+
+pkgname = php72-imap
+ pkgdesc = imap module for PHP
+ depends = php72
+ depends = c-client
+ provides = php-imap=7.2.14
+
+pkgname = php72-intl
+ pkgdesc = intl module for PHP
+ depends = php72
+ depends = icu
+ provides = php-intl=7.2.14
+
+pkgname = php72-odbc
+ pkgdesc = ODBC modules for PHP
+ depends = php72
+ depends = unixodbc
+ provides = php-odbc=7.2.14
+
+pkgname = php72-pgsql
+ pkgdesc = PostgreSQL modules for PHP
+ depends = php72
+ depends = postgresql-libs
+ provides = php-pgsql=7.2.14
+
+pkgname = php72-pspell
+ pkgdesc = pspell module for PHP
+ depends = php72
+ depends = aspell
+ provides = php-pspell=7.2.14
+
+pkgname = php72-snmp
+ pkgdesc = snmp module for PHP
+ depends = php72
+ depends = net-snmp
+ provides = php-snmp=7.2.14
+
+pkgname = php72-sqlite
+ pkgdesc = sqlite module for PHP
+ depends = php72
+ depends = sqlite
+ provides = php-sqlite=7.2.14
+
+pkgname = php72-tidy
+ pkgdesc = tidy module for PHP
+ depends = php72
+ depends = tidy
+ provides = php-tidy=7.2.14
+
+pkgname = php72-xsl
+ pkgdesc = xsl module for PHP
+ depends = php72
+ depends = libxslt
+ provides = php-xsl=7.2.14
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..54f60cf993a7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.tar.xz
+*.tar.gz
+*.tar.bz2
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c7af66c9a708
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,353 @@
+pkgbase=php72
+_pkgbase=${pkgbase%72}
+_realpkg=${pkgbase%}
+pkgname=("${pkgbase}"
+ "${_realpkg}-"{cgi,apache,fpm,embed,phpdbg,dblib,enchant,gd,imap,intl,odbc,pgsql,pspell,snmp,sqlite,tidy,xsl}"")
+pkgver=7.2.14
+pkgrel=1
+pkgdesc="php 7.2 compiled as to not conflict with mainline php"
+arch=('i686' 'x86_64')
+license=('PHP')
+url='http://www.php.net'
+makedepends=('apache' 'aspell' 'c-client' 'db' 'enchant' 'gd' 'gmp' 'icu' 'libmcrypt' 'libxslt' 'libzip' 'net-snmp'
+ 'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl' 'libtool' 'freetds' 'pcre')
+#checkdepends=('procps-ng')
+source=("https://php.net/distributions/${_pkgbase}-${pkgver}.tar.xz"
+ 'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch' 'enchant-2.patch' 'php-freetype-2.9.1.patch')
+
+prepare() {
+ cd ${srcdir}/${_pkgbase}-${pkgver}
+ patch -p0 -i ${srcdir}/apache.patch
+ patch -p0 -i ${srcdir}/php-fpm.patch
+ patch -p0 -i ${srcdir}/php.ini.patch
+ patch -p1 -i ${srcdir}/enchant-2.patch
+ patch -p1 -i ${srcdir}/php-freetype-2.9.1.patch
+}
+
+build() {
+ local _phpconfig="--srcdir=../${_pkgbase}-${pkgver} \
+ --config-cache \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc/${_realpkg} \
+ --localstatedir=/var \
+ --libdir=/usr/lib/${_realpkg} \
+ --datarootdir=/usr/share/${_realpkg} \
+ --datadir=/usr/share/${_realpkg} \
+ --program-suffix=${_realpkg#php} \
+ --with-layout=GNU \
+ --with-config-file-path=/etc/${_realpkg} \
+ --with-config-file-scan-dir=/etc/${_realpkg}/conf.d \
+ --disable-rpath \
+ --without-pear \
+ "
+
+ local _phpextensions="\
+ --enable-bcmath=shared \
+ --enable-calendar=shared \
+ --enable-dba=shared \
+ --enable-exif=shared \
+ --enable-ftp=shared \
+ --enable-gd-native-ttf \
+ --enable-intl=shared \
+ --enable-mbstring \
+ --enable-shmop=shared \
+ --enable-soap=shared \
+ --enable-sockets=shared \
+ --enable-sysvmsg=shared \
+ --enable-sysvsem=shared \
+ --enable-sysvshm=shared \
+ --enable-zip=shared \
+ --with-bz2=shared \
+ --with-curl=shared \
+ --with-db4=/usr \
+ --with-enchant=shared,/usr \
+ --with-freetype-dir=/usr \
+ --with-gd=shared,/usr \
+ --with-gdbm \
+ --with-gettext=shared \
+ --with-gmp=shared \
+ --with-iconv=shared \
+ --with-imap-ssl \
+ --with-imap=shared \
+ --with-kerberos=/usr \
+ --with-ldap=shared \
+ --with-ldap-sasl \
+ --with-libzip \
+ --with-mhash \
+ --with-mysql-sock=/run/mysqld/mysqld.sock \
+ --with-mysqli=shared,mysqlnd \
+ --with-openssl \
+ --with-pcre-regex=/usr \
+ --with-pdo-dblib=shared,/usr \
+ --with-pdo-mysql=shared,mysqlnd \
+ --with-pdo-odbc=shared,unixODBC,/usr \
+ --with-pdo-pgsql=shared \
+ --with-pdo-sqlite=shared,/usr \
+ --with-pgsql=shared \
+ --with-pspell=shared \
+ --with-readline \
+ --with-snmp=shared \
+ --with-sqlite3=shared,/usr \
+ --with-tidy=shared \
+ --with-unixODBC=shared,/usr \
+ --with-xmlrpc=shared \
+ --with-xsl=shared \
+ --with-zlib \
+ --enable-pcntl \
+ "
+
+ EXTENSION_DIR=/usr/lib/${_realpkg}/modules
+ export EXTENSION_DIR
+ mkdir ${srcdir}/build
+ cd ${srcdir}/build
+ ln -s ../${_pkgbase}-${pkgver}/configure
+ ./configure ${_phpconfig} \
+ --enable-cgi \
+ --enable-fpm \
+ --with-fpm-systemd \
+ --with-fpm-acl \
+ --with-fpm-user=http \
+ --with-fpm-group=http \
+ --enable-embed=shared \
+ ${_phpextensions}
+ make
+
+ # apache
+ # reuse the previous run; this will save us a lot of time
+ cp -a ${srcdir}/build ${srcdir}/build-apache
+ cd ${srcdir}/build-apache
+ ./configure ${_phpconfig} \
+ --with-apxs2 \
+ ${_phpextensions}
+ make
+
+ # phpdbg
+ cp -a ${srcdir}/build ${srcdir}/build-phpdbg
+ cd ${srcdir}/build-phpdbg
+ ./configure ${_phpconfig} \
+ --enable-phpdbg \
+ ${_phpextensions}
+ make
+}
+
+#check() {
+# cd ${srcdir}/${_pkgbase}-${pkgver}
+#
+# # Check if sendmail was configured correctly (FS#47600)
+# ${srcdir}/build/sapi/cli/php -n -r 'echo ini_get("sendmail_path");' | grep -q '/usr/bin/sendmail'
+#
+# export REPORT_EXIT_STATUS=1
+# export NO_INTERACTION=1
+# export SKIP_ONLINE_TESTS=1
+# export SKIP_SLOW_TESTS=1
+#
+# ${srcdir}/build/sapi/cli/php -n run-tests.php -n -P {tests,Zend}
+#}
+
+package_php72() {
+ pkgdesc='A general-purpose scripting language that is especially suited to web development'
+ depends=('libxml2' 'curl' 'libzip' 'pcre')
+ backup=("etc/${_realpkg}/php.ini")
+ provides=("${_pkgbase}=${pkgver}")
+
+ cd ${srcdir}/build
+ make -j1 INSTALL_ROOT=${pkgdir} install-{modules,cli,build,headers,programs,pharcmd}
+ install -D -m644 ${srcdir}/${_pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/${_realpkg}/php.ini
+ install -d -m755 ${pkgdir}/etc/${_realpkg}/conf.d/
+
+ # remove static modules
+ rm -f ${pkgdir}/usr/lib/${_realpkg}/modules/*.a
+ # remove modules provided by sub packages
+ rm -f ${pkgdir}/usr/lib/${_realpkg}/modules/{enchant,gd,imap,intl,mcrypt,odbc,pdo_dblib,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so
+ # remove empty directory
+ rmdir ${pkgdir}/usr/include/php/include
+
+# move include directory
+ mv ${pkgdir}/usr/include/php ${pkgdir}/usr/include/${_realpkg}
+
+# fix phar symlink
+ rm ${pkgdir}/usr/bin/phar
+ ln -sf phar.${_realpkg/php/phar} ${pkgdir}/usr/bin/${_realpkg/php/phar}
+
+ # rename executables
+ mv ${pkgdir}/usr/bin/phar.{phar,${_realpkg/php/phar}}
+
+ # rename man pages
+ mv ${pkgdir}/usr/share/man/man1/{phar,${_realpkg/php/phar}}.1
+ mv ${pkgdir}/usr/share/man/man1/phar.{phar,${_realpkg/php/phar}}.1
+
+ # fix paths in executables
+ sed -i "/^includedir=/c \includedir=/usr/include/${_realpkg}" ${pkgdir}/usr/bin/${_realpkg/php/phpize}
+ sed -i "/^include_dir=/c \include_dir=/usr/include/${_realpkg}" ${pkgdir}/usr/bin/${_realpkg/php/php-config}
+
+ # make phpize use php-config72
+ sed -i "/^\[ --with-php-config=/c \[ --with-php-config=PATH Path to php-config [${_realpkg/php/php-config}]], ${_realpkg/php/php-config}, no)" ${pkgdir}/usr/lib/${_realpkg}/build/phpize.m4
+}
+
+package_php72-cgi() {
+ pkgdesc='CGI and FCGI SAPI for PHP'
+ depends=("${pkgbase}")
+ provides=("${_pkgbase}-cgi=${pkgver}")
+
+ cd ${srcdir}/build
+ make -j1 INSTALL_ROOT=${pkgdir} install-cgi
+}
+
+package_php72-apache() {
+ pkgdesc='Apache SAPI for PHP'
+ depends=("${pkgbase}" 'apache')
+ backup=("etc/httpd/conf/extra/${_realpkg}_module.conf")
+ provides=("${_pkgbase}-apache=${pkgver}")
+ echo "# End of LoadModule in httpd.conf - see ArchWiki Apache HTTP Server"
+ echo "LoadModule php7_module modules/libphp72.so"
+ echo "AddHandler php7-script .php"
+ echo "# End of Include List"
+ echo "Include conf/extra/php72_module.conf"
+ install -D -m755 ${srcdir}/build-apache/libs/libphp7.so ${pkgdir}/usr/lib/httpd/modules/lib${_realpkg}.so
+ install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/${_realpkg}_module.conf
+}
+
+package_php72-fpm() {
+ pkgdesc='FastCGI Process Manager for PHP'
+ depends=("${pkgbase}" 'systemd')
+ backup=("etc/${_realpkg}/php-fpm.conf" "etc/${_realpkg}/php-fpm.d/www.conf")
+ options=('!emptydirs')
+ provides=("${_pkgbase}-fpm=${pkgver}")
+
+ cd ${srcdir}/build
+ make -j1 INSTALL_ROOT=${pkgdir} install-fpm
+ install -D -m644 sapi/fpm/php-fpm.service ${pkgdir}/usr/lib/systemd/system/${_realpkg}-fpm.service
+ install -D -m644 ${srcdir}/php-fpm.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/${_realpkg}-fpm.conf
+}
+
+package_php72-embed() {
+ pkgdesc='Embedded PHP SAPI library'
+ depends=("${pkgbase}" 'libsystemd')
+ options=('!emptydirs')
+ provides=("${_pkgbase}-embed=${pkgver}")
+
+ cd ${srcdir}/build
+ make -j1 INSTALL_ROOT=${pkgdir} PHP_SAPI=embed install-sapi
+# move libphp7.so to libphp-72.so -- note well: this is to prevent ldconfig
+# from complaining about libphp7.so not being a symbolic link if another php7 is installed.
+mv ${pkgdir}/usr/lib/libphp7.so ${pkgdir}/usr/lib/libphp-72.so
+}
+
+package_php72-phpdbg() {
+ pkgdesc='Interactive PHP debugger'
+ depends=("${pkgbase}")
+ options=('!emptydirs')
+ provides=("${_pkgbase}-phpdbg=${pkgver}")
+
+ cd ${srcdir}/build-phpdbg
+ make -j1 INSTALL_ROOT=${pkgdir} install-phpdbg
+}
+
+package_php72-dblib() {
+ pkgdesc='dblib module for PHP'
+ depends=("${pkgbase}" 'freetds')
+ provides=("${_pkgbase}-dblib=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/pdo_dblib.so ${pkgdir}/usr/lib/${_realpkg}/modules/pdo_dblib.so
+}
+
+package_php72-enchant() {
+ pkgdesc='enchant module for PHP'
+ depends=("${pkgbase}" 'enchant')
+ provides=("${_pkgbase}-enchant=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/enchant.so ${pkgdir}/usr/lib/${_realpkg}/modules/enchant.so
+}
+
+package_php72-gd() {
+ pkgdesc='gd module for PHP'
+ depends=("${pkgbase}" 'gd')
+ provides=("${_pkgbase}-gd=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/gd.so ${pkgdir}/usr/lib/${_realpkg}/modules/gd.so
+}
+
+package_php72-imap() {
+ pkgdesc='imap module for PHP'
+ depends=("${pkgbase}" 'c-client')
+ provides=("${_pkgbase}-imap=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/imap.so ${pkgdir}/usr/lib/${_realpkg}/modules/imap.so
+}
+
+package_php72-intl() {
+ pkgdesc='intl module for PHP'
+ depends=("${pkgbase}" 'icu')
+ provides=("${_pkgbase}-intl=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/intl.so ${pkgdir}/usr/lib/${_realpkg}/modules/intl.so
+}
+
+package_php72-odbc() {
+ pkgdesc='ODBC modules for PHP'
+ depends=("${pkgbase}" 'unixodbc')
+ provides=("${_pkgbase}-odbc=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/odbc.so ${pkgdir}/usr/lib/${_realpkg}/modules/odbc.so
+ install -D -m755 ${srcdir}/build/modules/pdo_odbc.so ${pkgdir}/usr/lib/${_realpkg}/modules/pdo_odbc.so
+}
+
+package_php72-pgsql() {
+ pkgdesc='PostgreSQL modules for PHP'
+ depends=("${pkgbase}" 'postgresql-libs')
+ provides=("${_pkgbase}-pgsql=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/pgsql.so ${pkgdir}/usr/lib/${_realpkg}/modules/pgsql.so
+ install -D -m755 ${srcdir}/build/modules/pdo_pgsql.so ${pkgdir}/usr/lib/${_realpkg}/modules/pdo_pgsql.so
+}
+
+package_php72-pspell() {
+ pkgdesc='pspell module for PHP'
+ depends=("${pkgbase}" 'aspell')
+ provides=("${_pkgbase}-pspell=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/pspell.so ${pkgdir}/usr/lib/${_realpkg}/modules/pspell.so
+}
+
+package_php72-snmp() {
+ pkgdesc='snmp module for PHP'
+ depends=("${pkgbase}" 'net-snmp')
+ provides=("${_pkgbase}-snmp=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/snmp.so ${pkgdir}/usr/lib/${_realpkg}/modules/snmp.so
+}
+
+package_php72-sqlite() {
+ pkgdesc='sqlite module for PHP'
+ depends=("${pkgbase}" 'sqlite')
+ provides=("${_pkgbase}-sqlite=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/sqlite3.so ${pkgdir}/usr/lib/${_realpkg}/modules/sqlite3.so
+ install -D -m755 ${srcdir}/build/modules/pdo_sqlite.so ${pkgdir}/usr/lib/${_realpkg}/modules/pdo_sqlite.so
+}
+
+package_php72-tidy() {
+ pkgdesc='tidy module for PHP'
+ depends=("${pkgbase}" 'tidy')
+ provides=("${_pkgbase}-tidy=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/tidy.so ${pkgdir}/usr/lib/${_realpkg}/modules/tidy.so
+}
+
+package_php72-xsl() {
+ pkgdesc='xsl module for PHP'
+ depends=("${pkgbase}" 'libxslt')
+ provides=("${_pkgbase}-xsl=${pkgver}")
+
+ install -D -m755 ${srcdir}/build/modules/xsl.so ${pkgdir}/usr/lib/${_realpkg}/modules/xsl.so
+}
+
+md5sums=('a003b586eba4c56f7814eca5f1e76cfb'
+ '13cda50a6a420d04ddc26935ded3164e'
+ 'b7d69762f7c045b3950d770e04db504c'
+ '57342b2632c8a4a829f26e8f9985f3aa'
+ '62fa82888154a0c0d55b41a8d7138a05'
+ '4bf0b1296fc95947a11bef36fe76102a'
+ 'e3883dce91ed21e23a3d7ae9fa80216d'
+ 'b40b82f55208eaead22dbfb64720b064')
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 000000000000..e0478fba9e10
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php71_module
+
+<IfModule dir_module>
+ <IfModule php71_module>
+ DirectoryIndex index.php index.html
+ <FilesMatch "\.php$">
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+ <FilesMatch "\.phps$">
+ SetHandler application/x-httpd-php-source
+ </FilesMatch>
+ </IfModule>
+</IfModule>
diff --git a/apache.patch b/apache.patch
new file mode 100644
index 000000000000..81b2cd8f7538
--- /dev/null
+++ b/apache.patch
@@ -0,0 +1,20 @@
+--- sapi/apache2handler/config.m4.orig
++++ sapi/apache2handler/config.m4
+@@ -122,7 +122,6 @@
+ PHP_BUILD_THREAD_SAFE
+ fi
+ else
+- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
+ if test -n "$APACHE_THREADED_MPM"; then
+ PHP_BUILD_THREAD_SAFE
+ fi
+--- configure.orig
++++ configure
+@@ -7018,7 +7018,6 @@
+
+ fi
+ else
+- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
+ if test -n "$APACHE_THREADED_MPM"; then
+
+ enable_maintainer_zts=yes
diff --git a/enchant-2.patch b/enchant-2.patch
new file mode 100644
index 000000000000..93c0ce5c269e
--- /dev/null
+++ b/enchant-2.patch
@@ -0,0 +1,84 @@
+--- php-7.1.13/ext/enchant/config.m4.orig 2018-01-03 02:32:29.000000000 +0000
++++ php-7.1.13/ext/enchant/config.m4 2018-01-21 22:10:03.788875780 +0000
+@@ -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,
+ [
+--- php-7.1.13/configure.orig 2018-01-21 22:03:51.494656374 +0000
++++ php-7.1.13/configure 2018-01-21 22:12:35.932571143 +0000
+@@ -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
+--- php-7.2.1/ext/enchant/enchant.c.orig 2018-01-02 22:36:05.000000000 +0000
++++ php-7.2.1/ext/enchant/enchant.c 2018-01-21 22:34:50.205791491 +0000
+@@ -741,7 +741,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);
+ }
+
+
+@@ -798,7 +798,7 @@
+ add_next_index_string(return_value, suggs[i]);
+ }
+
+- enchant_dict_free_suggestions(pdict->pdict, suggs);
++ enchant_dict_free_string_list(pdict->pdict, suggs);
+ }
+ }
+ /* }}} */
+@@ -818,7 +818,7 @@
+
+ PHP_ENCHANT_GET_DICT;
+
+- enchant_dict_add_to_personal(pdict->pdict, word, wordlen);
++ enchant_dict_add(pdict->pdict, word, wordlen);
+ }
+ /* }}} */
+
+@@ -856,7 +856,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/php-fpm.patch b/php-fpm.patch
new file mode 100644
index 000000000000..f13521b76ff6
--- /dev/null
+++ b/php-fpm.patch
@@ -0,0 +1,74 @@
+--- sapi/fpm/Makefile.frag.orig
++++ sapi/fpm/Makefile.frag
+@@ -15,8 +15,8 @@
+ else \
+ echo "Installing PHP FPM defconfig: $(INSTALL_ROOT)$(sysconfdir)/" && \
+ $(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d; \
+- $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default; \
+- $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf.default; \
++ $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf; \
++ $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf; \
+ fi
+
+ @echo "Installing PHP FPM man page: $(INSTALL_ROOT)$(mandir)/man8/"
+--- sapi/fpm/php-fpm.conf.in.orig
++++ sapi/fpm/php-fpm.conf.in
+@@ -14,14 +14,14 @@
+ ; Pid file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++;pid = /opt/php71/run/php-fpm/php-fpm.pid
+
+ ; Error log file
+ ; If it's set to "syslog", log is sent to syslogd instead of being written
+ ; into a local file.
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: log/php-fpm.log
+-;error_log = log/php-fpm.log
++error_log = syslog
+
+ ; syslog_facility is used to specify what type of program is logging the
+ ; message. This lets syslogd specify that messages from different facilities
+--- sapi/fpm/www.conf.in.orig
++++ sapi/fpm/www.conf.in
+@@ -33,7 +33,7 @@
+ ; (IPv6 and IPv4-mapped) on a specific port;
+ ; '/path/to/unix/socket' - to listen on a unix socket.
+ ; Note: This value is mandatory.
+-listen = 127.0.0.1:9000
++listen = /opt/php71/run/php-fpm/php-fpm.sock
+
+ ; Set listen(2) backlog.
+ ; Default Value: 511 (-1 on FreeBSD and OpenBSD)
+@@ -44,8 +44,8 @@
+ ; BSD-derived systems allow connections regardless of permissions.
+ ; Default Values: user and group are set as the running user
+ ; mode is set to 0660
+-;listen.owner = @php_fpm_user@
+-;listen.group = @php_fpm_group@
++listen.owner = @php_fpm_user@
++listen.group = @php_fpm_group@
+ ;listen.mode = 0660
+ ; When POSIX Access Control Lists are supported you can set them using
+ ; these options, value is a comma separated list of user/group names.
+@@ -356,7 +356,7 @@
+ ; Chdir to this directory at the start.
+ ; Note: relative path can be used.
+ ; Default Value: current directory or / when chroot
+-;chdir = /var/www
++;chdir = /srv/http
+
+ ; Redirect worker stdout and stderr into main error log. If not set, stdout and
+ ; stderr will be redirected to /dev/null according to FastCGI specs.
+--- sapi/fpm/php-fpm.service.in.orig
++++ sapi/fpm/php-fpm.service.in
+@@ -8,7 +8,7 @@
+
+ [Service]
+ Type=@php_fpm_systemd@
+-PIDFile=@EXPANDED_LOCALSTATEDIR@/run/php-fpm.pid
++PIDFile=/opt/php71/run/php-fpm/php-fpm.pid
+ ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf
+ ExecReload=/bin/kill -USR2 $MAINPID
+ PrivateTmp=true
diff --git a/php-fpm.tmpfiles b/php-fpm.tmpfiles
new file mode 100644
index 000000000000..1544819f2771
--- /dev/null
+++ b/php-fpm.tmpfiles
@@ -0,0 +1 @@
+d /opt/php71/run/php-fpm 755 root root
diff --git a/php-freetype-2.9.1.patch b/php-freetype-2.9.1.patch
new file mode 100644
index 000000000000..02dfd9ce3cd4
--- /dev/null
+++ b/php-freetype-2.9.1.patch
@@ -0,0 +1,233 @@
+--- a/ext/gd/config.m4 2018-04-24 11:09:54.000000000 -0400
++++ b/ext/gd/config.m4 2018-05-04 15:18:49.867283889 -0400
+@@ -186,21 +186,36 @@
+ AC_DEFUN([PHP_GD_FREETYPE2],[
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/bin/freetype-config"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_CONFIG="$i/bin/freetype-config"
+- break
++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
++ AC_MSG_CHECKING(for freetype2)
++
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
++
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
++ FREETYPE2_DIR="found"
++
++ AC_MSG_RESULT(from pkgconfig: version $FREETYPE2_VERSION found)
++ else
++
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/bin/freetype-config"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
++ break
++ fi
++ done
++
++ if test -z "$FREETYPE2_DIR"; then
++ AC_MSG_ERROR([freetype-config not found.])
+ fi
+- done
+
+- if test -z "$FREETYPE2_DIR"; then
+- AC_MSG_ERROR([freetype-config not found.])
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
++ AC_MSG_RESULT(found via freetype-config)
+ fi
+
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+-
+ PHP_EVAL_INCLINE($FREETYPE2_CFLAGS)
+ PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD)
+ AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
+--- a/configure 2018-04-24 11:10:05.000000000 -0400
++++ b/configure 2018-05-04 15:18:45.626367913 -0400
+@@ -34348,21 +34348,79 @@
+
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/bin/freetype-config"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_CONFIG="$i/bin/freetype-config"
+- break
++ # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_PKG_CONFIG+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ case $PKG_CONFIG in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
++ ;;
++esac
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
++$as_echo_n "checking for freetype2... " >&6; }
++
++
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
++
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
++ FREETYPE2_DIR="found"
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE2_VERSION found" >&5
++$as_echo "from pkgconfig: version $FREETYPE2_VERSION found" >&6; }
++ else
++
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/bin/freetype-config"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
++ break
++ fi
++ done
++
++ if test -z "$FREETYPE2_DIR"; then
++ as_fn_error $? "freetype-config not found." "$LINENO" 5
+ fi
+- done
+
+- if test -z "$FREETYPE2_DIR"; then
+- as_fn_error $? "freetype-config not found." "$LINENO" 5
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
++$as_echo "found via freetype-config" >&6; }
+ fi
+
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+-
+
+ for ac_i in $FREETYPE2_CFLAGS; do
+ case $ac_i in
+@@ -36019,21 +36076,78 @@
+
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/bin/freetype-config"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_CONFIG="$i/bin/freetype-config"
+- break
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
++$as_echo_n "checking for freetype2... " >&6; }
++ # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_PKG_CONFIG+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ case $PKG_CONFIG in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
++ ;;
++esac
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
++
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE_VERSON found" >&5
++$as_echo "from pkgconfig: version $FREETYPE_VERSON found" >&6; }
++ else
++
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/bin/freetype-config"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
++ break
++ fi
++ done
++
++ if test -z "$FREETYPE2_DIR"; then
++ as_fn_error $? "freetype-config not found." "$LINENO" 5
+ fi
+- done
+
+- if test -z "$FREETYPE2_DIR"; then
+- as_fn_error $? "freetype-config not found." "$LINENO" 5
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
++$as_echo "found via freetype-config" >&6; }
+ fi
+
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+-
+
+ for ac_i in $FREETYPE2_CFLAGS; do
+ case $ac_i in
diff --git a/php.ini.patch b/php.ini.patch
new file mode 100644
index 000000000000..b2975943a695
--- /dev/null
+++ b/php.ini.patch
@@ -0,0 +1,77 @@
+--- php.ini-production.orig
++++ php.ini-production
+@@ -734,7 +734,7 @@
+
+ ; Directory in which the loadable extensions (modules) reside.
+ ; http://php.net/extension-dir
+-; extension_dir = "./"
++extension_dir = "/usr/lib/php72/modules/"
+ ; On windows:
+ ; extension_dir = "ext"
+
+@@ -883,47 +883,44 @@
+ ; deprecated in a future PHP major version. So, when it is possible, please
+ ; move to the new ('extension=<ext>) syntax.
+ ;
+-; Notes for Windows environments :
+-;
+-; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
+-; extension folders as well as the separate PECL DLL download (PHP 5+).
+-; Be sure to appropriately set the extension_dir directive.
+-;
++;extension=bcmath
+ ;extension=bz2
+-;extension=curl
+-;extension=fileinfo
+-;extension=gd2
++;extension=calendar
++extension=curl
++;extension=dba
++;extension=enchant
++;extension=exif
++;extension=ftp
++;extension=gd
+ ;extension=gettext
+ ;extension=gmp
+-;extension=intl
++;extension=iconv
+ ;extension=imap
+-;extension=interbase
++;extension=intl
++;extension=sodium
+ ;extension=ldap
+-;extension=mbstring
+-;extension=exif ; Must be after mbstring as it depends on it
+ ;extension=mysqli
+-;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
+ ;extension=odbc
+-;extension=openssl
+-;extension=pdo_firebird
++;zend_extension=opcache
++;extension=pdo_dblib
+ ;extension=pdo_mysql
+-;extension=pdo_oci
+ ;extension=pdo_odbc
+ ;extension=pdo_pgsql
+ ;extension=pdo_sqlite
+ ;extension=pgsql
++;extension=pspell
+ ;extension=shmop
+-
+-; The MIBS data available in the PHP distribution must be installed.
+-; See http://www.php.net/manual/en/snmp.installation.php
+ ;extension=snmp
+-
+ ;extension=soap
+ ;extension=sockets
+ ;extension=sqlite3
++;extension=sysvmsg
++;extension=sysvsem
++;extension=sysvshm
+ ;extension=tidy
+ ;extension=xmlrpc
+ ;extension=xsl
++extension=zip
+
+ ;;;;;;;;;;;;;;;;;;;
+ ; Module Settings ;