summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxwell Pray2018-03-26 11:04:00 -0700
committerMaxwell Pray2018-03-26 11:04:00 -0700
commit8a3cab92746eec0c5d246f9e89ad3eacc8c9d414 (patch)
tree2288e10814635bb8de571589c01d7402c4dd28ee
downloadaur-8a3cab92746eec0c5d246f9e89ad3eacc8c9d414.tar.gz
Initial commit.
-rw-r--r--.SRCINFO154
-rw-r--r--PKGBUILD337
-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.ini.patch97
8 files changed, 780 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a3e75a0a5d0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,154 @@
+pkgbase = php71
+ pkgver = 7.1.15
+ pkgrel = 1
+ url = http://www.php.net
+ arch = x86_64
+ license = PHP
+ checkdepends = procps-ng
+ 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 = postfix
+ makedepends = freetds
+ makedepends = pcre
+ provides = =7.1.15
+ source = https://php.net/distributions/php-7.1.15.tar.xz
+ source = https://php.net/distributions/php-7.1.15.tar.xz.asc
+ source = apache.patch
+ source = apache.conf
+ source = php-fpm.patch
+ source = php-fpm.tmpfiles
+ source = php.ini.patch
+ source = enchant-2.patch
+ validpgpkeys = A917B1ECDA84AEC2B568FED6F50ABC807BD5DCD0
+ validpgpkeys = 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E
+ validpgpkeys = 1729F83938DA44E27BA0F4D3DBDB397470D12172
+ sha512sums = 2b23795ffcb9d741adafe8a1e01e6988bb86ce7c6380bdbe822f8f6485e217ed2e95a27daf5ba11f0bf10317f1e1f4e37068e40d0bf322de5625d38b430d37c2
+ sha512sums = SKIP
+ sha512sums = 65ea5cb38c1fc1874b2a4d08bc52443f9ed5dcc92cf99023a74292c78f9074516296f56c768f7efa8a1f0838feac47b356d3da6fdb1199419bebec3a93204ae6
+ sha512sums = fc3d711033c8b7ead910826d7c0d4479b481fa9d84c3147b1d33ef9b1e3d3d073a8d17a7c7f66db30d710be1c9b17d2b5536a74a4f05c4ff88b9339e95dd244a
+ sha512sums = ef2724cedec46a6955355fc75406efa2895545f2ebcdfcee06ce6f3c9a20f8348a291ac78ab1e384b703095d317f59504b787f21074f841c45e53a98955af0c1
+ sha512sums = 209a8b2f9e2e25887c86e126c2761aae329e2bf9456a5de735f3ae264bd2be21e7646cc1954c1417e4c74f8d2d6b0f6081aa74a5af48f6b97484bab0d4e72fcf
+ sha512sums = 978ad84ffe8a0d10a62725173f3a56fd05f8d8347066760017f3555d009de8b9772f31c37f97ec87cfad22f60522d3c4a27a2deda4b95195c1cd459b704f6f58
+ sha512sums = 89993be67988f6db09e1102214a41fdb7223274bc6ca71f1defc5fe9548d832485f7133b8ba82860f04da00c7f655d701c7550460c0172a2a2d31ef3f3f96038
+
+pkgname = php71
+ pkgdesc = A general-purpose scripting language that is especially suited to web development
+ depends = libxml2
+ depends = curl
+ depends = libzip
+ depends = pcre
+ depends = argon2
+ backup = opt/php71etc/php/php.ini
+
+pkgname = php71-cgi
+ pkgdesc = CGI and FCGI SAPI for PHP
+ depends = php71
+
+pkgname = php71-apache
+ pkgdesc = Apache SAPI for PHP
+ depends = php71
+ depends = apache
+ backup = opt/php71etc/httpd/conf/extra/php7_module.conf
+
+pkgname = php71-fpm
+ pkgdesc = FastCGI Process Manager for PHP
+ depends = php71
+ depends = systemd
+ options = !emptydirs
+ backup = opt/php71etc/php/php-fpm.conf
+ backup = opt/php71etc/php/php-fpm.d/www.conf
+
+pkgname = php71-embed
+ pkgdesc = Embedded PHP SAPI library
+ depends = php71
+ depends = libsystemd
+ options = !emptydirs
+
+pkgname = php71-phpdbg
+ pkgdesc = Interactive PHP debugger
+ depends = php71
+ options = !emptydirs
+
+pkgname = php71-dblib
+ pkgdesc = dblib module for PHP
+ depends = php71
+ depends = freetds
+
+pkgname = php71-enchant
+ pkgdesc = enchant module for PHP
+ depends = php71
+ depends = enchant
+
+pkgname = php71-gd
+ pkgdesc = gd module for PHP
+ depends = php71
+ depends = gd
+
+pkgname = php71-imap
+ pkgdesc = imap module for PHP
+ depends = php71
+ depends = c-client
+
+pkgname = php71-intl
+ pkgdesc = intl module for PHP
+ depends = php71
+ depends = icu
+
+pkgname = php71-mcrypt
+ pkgdesc = mcrypt module for PHP
+ depends = php71
+ depends = libmcrypt
+ depends = libtool
+
+pkgname = php71-odbc
+ pkgdesc = ODBC modules for PHP
+ depends = php71
+ depends = unixodbc
+
+pkgname = php71-pgsql
+ pkgdesc = PostgreSQL modules for PHP
+ depends = php71
+ depends = postgresql-libs
+
+pkgname = php71-pspell
+ pkgdesc = pspell module for PHP
+ depends = php71
+ depends = aspell
+
+pkgname = php71-snmp
+ pkgdesc = snmp module for PHP
+ depends = php71
+ depends = net-snmp
+
+pkgname = php71-sqlite
+ pkgdesc = sqlite module for PHP
+ depends = php71
+ depends = sqlite
+
+pkgname = php71-tidy
+ pkgdesc = tidy module for PHP
+ depends = php71
+ depends = tidy
+
+pkgname = php71-xsl
+ pkgdesc = xsl module for PHP
+ depends = php71
+ depends = libxslt
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1cadbea48e0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,337 @@
+# Maintainer: Maxwell Pray a.k.a. Synthead <synthead@gmail.com>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=php71
+_pkgbase=php
+pkgname=("$pkgbase"
+ "$pkgbase-cgi"
+ "$pkgbase-apache"
+ "$pkgbase-fpm"
+ "$pkgbase-embed"
+ "$pkgbase-phpdbg"
+ "$pkgbase-dblib"
+ "$pkgbase-enchant"
+ "$pkgbase-gd"
+ "$pkgbase-imap"
+ "$pkgbase-intl"
+ "$pkgbase-mcrypt"
+ "$pkgbase-odbc"
+ "$pkgbase-pgsql"
+ "$pkgbase-pspell"
+ "$pkgbase-snmp"
+ "$pkgbase-sqlite"
+ "$pkgbase-tidy"
+ "$pkgbase-xsl")
+pkgver=7.1.15
+pkgrel=1
+arch=('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' 'postfix' 'freetds' 'pcre')
+checkdepends=('procps-ng')
+provides=("${_pkgname}=${pkgver}")
+source=("https://php.net/distributions/${_pkgbase}-${pkgver}.tar.xz"{,.asc}
+ 'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch' 'enchant-2.patch')
+sha512sums=('2b23795ffcb9d741adafe8a1e01e6988bb86ce7c6380bdbe822f8f6485e217ed2e95a27daf5ba11f0bf10317f1e1f4e37068e40d0bf322de5625d38b430d37c2'
+ 'SKIP'
+ '65ea5cb38c1fc1874b2a4d08bc52443f9ed5dcc92cf99023a74292c78f9074516296f56c768f7efa8a1f0838feac47b356d3da6fdb1199419bebec3a93204ae6'
+ 'fc3d711033c8b7ead910826d7c0d4479b481fa9d84c3147b1d33ef9b1e3d3d073a8d17a7c7f66db30d710be1c9b17d2b5536a74a4f05c4ff88b9339e95dd244a'
+ 'ef2724cedec46a6955355fc75406efa2895545f2ebcdfcee06ce6f3c9a20f8348a291ac78ab1e384b703095d317f59504b787f21074f841c45e53a98955af0c1'
+ '209a8b2f9e2e25887c86e126c2761aae329e2bf9456a5de735f3ae264bd2be21e7646cc1954c1417e4c74f8d2d6b0f6081aa74a5af48f6b97484bab0d4e72fcf'
+ '978ad84ffe8a0d10a62725173f3a56fd05f8d8347066760017f3555d009de8b9772f31c37f97ec87cfad22f60522d3c4a27a2deda4b95195c1cd459b704f6f58'
+ '89993be67988f6db09e1102214a41fdb7223274bc6ca71f1defc5fe9548d832485f7133b8ba82860f04da00c7f655d701c7550460c0172a2a2d31ef3f3f96038')
+validpgpkeys=('A917B1ECDA84AEC2B568FED6F50ABC807BD5DCD0'
+ '528995BFEDFBA7191D46839EF9BA0ADA31CBD89E'
+ '1729F83938DA44E27BA0F4D3DBDB397470D12172')
+
+_optdir=/opt/$pkgbase
+
+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 ../enchant-2.patch
+}
+
+build() {
+ local _phpconfig="--srcdir=../${_pkgbase}-${pkgver} \
+ --config-cache \
+ --prefix=${_optdir}/usr \
+ --sbindir=${_optdir}/usr/bin \
+ --sysconfdir=${_optdir}/etc/php \
+ --localstatedir=${_optdir}/var \
+ --with-layout=GNU \
+ --with-config-file-path=${_optdir}/etc/php \
+ --with-config-file-scan-dir=${_optdir}/etc/php/conf.d \
+ --disable-rpath \
+ --mandir=${_optdir}/usr/share/man \
+ --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-password-argon2 \
+ --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-mcrypt=shared \
+ --with-sqlite3=shared,/usr \
+ --with-tidy=shared \
+ --with-unixODBC=shared,/usr \
+ --with-xmlrpc=shared \
+ --with-xsl=shared \
+ --with-zlib \
+ --enable-pcntl \
+ "
+
+ EXTENSION_DIR=${_optdir}/usr/lib/php/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_php71() {
+ pkgdesc='A general-purpose scripting language that is especially suited to web development'
+ depends=('libxml2' 'curl' 'libzip' 'pcre' 'argon2')
+ backup=("${_optdir#/}etc/php/php.ini")
+
+ 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}${_optdir}/etc/php/php.ini
+ install -d -m755 ${pkgdir}${_optdir}/etc/php/conf.d/
+
+ # remove static modules
+ rm -f ${pkgdir}${_optdir}/usr/lib/php/modules/*.a
+ # remove modules provided by sub packages
+ rm -f ${pkgdir}${_optdir}/usr/lib/php/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}${_optdir}/usr/include/php/include
+}
+
+package_php71-cgi() {
+ pkgdesc='CGI and FCGI SAPI for PHP'
+ depends=("$pkgbase")
+
+ cd ${srcdir}/build
+ make -j1 INSTALL_ROOT=${pkgdir} install-cgi
+}
+
+package_php71-apache() {
+ pkgdesc='Apache SAPI for PHP'
+ depends=("$pkgbase" 'apache')
+ backup=("${_optdir#/}etc/httpd/conf/extra/php7_module.conf")
+
+ install -D -m755 ${srcdir}/build-apache/libs/libphp7.so ${pkgdir}/usr/lib/httpd/modules/${pkgbase}.so
+ install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/${pkgbase}_module.conf
+}
+
+package_php71-fpm() {
+ pkgdesc='FastCGI Process Manager for PHP'
+ depends=("$pkgbase" 'systemd')
+ backup=("${_optdir#/}etc/php/php-fpm.conf" "${_optdir#/}etc/php/php-fpm.d/www.conf")
+ options=('!emptydirs')
+
+ cd ${srcdir}/build
+ make -j1 INSTALL_ROOT=${pkgdir} install-fpm
+ install -D -m644 sapi/fpm/php-fpm.service ${pkgdir}/usr/lib/systemd/system/php71-fpm.service
+ install -D -m644 ${srcdir}/php-fpm.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/php71-fpm.conf
+}
+
+package_php71-embed() {
+ pkgdesc='Embedded PHP SAPI library'
+ depends=("$pkgbase" 'libsystemd')
+ options=('!emptydirs')
+
+ cd ${srcdir}/build
+ make -j1 INSTALL_ROOT=${pkgdir} PHP_SAPI=embed install-sapi
+}
+
+package_php71-phpdbg() {
+ pkgdesc='Interactive PHP debugger'
+ depends=("$pkgbase")
+ options=('!emptydirs')
+
+ cd ${srcdir}/build-phpdbg
+ make -j1 INSTALL_ROOT=${pkgdir} install-phpdbg
+}
+
+package_php71-dblib() {
+ pkgdesc='dblib module for PHP'
+ depends=("$pkgbase" 'freetds')
+
+ install -D -m755 ${srcdir}/build/modules/pdo_dblib.so ${pkgdir}${_optdir}/usr/lib/php/modules/pdo_dblib.so
+}
+
+package_php71-enchant() {
+ pkgdesc='enchant module for PHP'
+ depends=("$pkgbase" 'enchant')
+
+ install -D -m755 ${srcdir}/build/modules/enchant.so ${pkgdir}${_optdir}/usr/lib/php/modules/enchant.so
+}
+
+package_php71-gd() {
+ pkgdesc='gd module for PHP'
+ depends=("$pkgbase" 'gd')
+
+ install -D -m755 ${srcdir}/build/modules/gd.so ${pkgdir}${_optdir}/usr/lib/php/modules/gd.so
+}
+
+package_php71-imap() {
+ pkgdesc='imap module for PHP'
+ depends=("$pkgbase" 'c-client')
+
+ install -D -m755 ${srcdir}/build/modules/imap.so ${pkgdir}${_optdir}/usr/lib/php/modules/imap.so
+}
+
+package_php71-intl() {
+ pkgdesc='intl module for PHP'
+ depends=("$pkgbase" 'icu')
+
+ install -D -m755 ${srcdir}/build/modules/intl.so ${pkgdir}${_optdir}/usr/lib/php/modules/intl.so
+}
+
+package_php71-mcrypt() {
+ pkgdesc='mcrypt module for PHP'
+ depends=("$pkgbase" 'libmcrypt' 'libtool')
+
+ install -D -m755 ${srcdir}/build/modules/mcrypt.so ${pkgdir}${_optdir}/usr/lib/php/modules/mcrypt.so
+}
+
+package_php71-odbc() {
+ pkgdesc='ODBC modules for PHP'
+ depends=("$pkgbase" 'unixodbc')
+
+ install -D -m755 ${srcdir}/build/modules/odbc.so ${pkgdir}${_optdir}/usr/lib/php/modules/odbc.so
+ install -D -m755 ${srcdir}/build/modules/pdo_odbc.so ${pkgdir}${_optdir}/usr/lib/php/modules/pdo_odbc.so
+}
+
+package_php71-pgsql() {
+ pkgdesc='PostgreSQL modules for PHP'
+ depends=("$pkgbase" 'postgresql-libs')
+
+ install -D -m755 ${srcdir}/build/modules/pgsql.so ${pkgdir}${_optdir}/usr/lib/php/modules/pgsql.so
+ install -D -m755 ${srcdir}/build/modules/pdo_pgsql.so ${pkgdir}${_optdir}/usr/lib/php/modules/pdo_pgsql.so
+}
+
+package_php71-pspell() {
+ pkgdesc='pspell module for PHP'
+ depends=("$pkgbase" 'aspell')
+
+ install -D -m755 ${srcdir}/build/modules/pspell.so ${pkgdir}${_optdir}/usr/lib/php/modules/pspell.so
+}
+
+package_php71-snmp() {
+ pkgdesc='snmp module for PHP'
+ depends=("$pkgbase" 'net-snmp')
+
+ install -D -m755 ${srcdir}/build/modules/snmp.so ${pkgdir}${_optdir}/usr/lib/php/modules/snmp.so
+}
+
+package_php71-sqlite() {
+ pkgdesc='sqlite module for PHP'
+ depends=("$pkgbase" 'sqlite')
+
+ install -D -m755 ${srcdir}/build/modules/sqlite3.so ${pkgdir}${_optdir}/usr/lib/php/modules/sqlite3.so
+ install -D -m755 ${srcdir}/build/modules/pdo_sqlite.so ${pkgdir}${_optdir}/usr/lib/php/modules/pdo_sqlite.so
+}
+
+package_php71-tidy() {
+ pkgdesc='tidy module for PHP'
+ depends=("$pkgbase" 'tidy')
+
+ install -D -m755 ${srcdir}/build/modules/tidy.so ${pkgdir}${_optdir}/usr/lib/php/modules/tidy.so
+}
+
+package_php71-xsl() {
+ pkgdesc='xsl module for PHP'
+ depends=("$pkgbase" 'libxslt')
+
+ install -D -m755 ${srcdir}/build/modules/xsl.so ${pkgdir}${_optdir}/usr/lib/php/modules/xsl.so
+}
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 00000000000..e0478fba9e1
--- /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 00000000000..81b2cd8f753
--- /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 00000000000..93c0ce5c269
--- /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 00000000000..f13521b76ff
--- /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 00000000000..1544819f277
--- /dev/null
+++ b/php-fpm.tmpfiles
@@ -0,0 +1 @@
+d /opt/php71/run/php-fpm 755 root root
diff --git a/php.ini.patch b/php.ini.patch
new file mode 100644
index 00000000000..afa7fa1e805
--- /dev/null
+++ b/php.ini.patch
@@ -0,0 +1,97 @@
+--- php.ini-production.orig
++++ php.ini-production
+@@ -733,7 +733,7 @@
+
+ ; Directory in which the loadable extensions (modules) reside.
+ ; http://php.net/extension-dir
+-; extension_dir = "./"
++extension_dir = "/opt/php71/usr/lib/php/modules/"
+ ; On windows:
+ ; extension_dir = "ext"
+
+@@ -883,47 +883,44 @@
+ ; If you only provide the name of the extension, PHP will look for it in its
+ ; default extension directory.
+ ;
+-; Windows Extensions
+-; Note that ODBC support is built in, so no dll is needed for it.
+-; Note that many DLL files are located in the extensions/ (PHP 4) 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=php_bz2.dll
+-;extension=php_curl.dll
+-;extension=php_fileinfo.dll
+-;extension=php_ftp.dll
+-;extension=php_gd2.dll
+-;extension=php_gettext.dll
+-;extension=php_gmp.dll
+-;extension=php_intl.dll
+-;extension=php_imap.dll
+-;extension=php_interbase.dll
+-;extension=php_ldap.dll
+-;extension=php_mbstring.dll
+-;extension=php_exif.dll ; Must be after mbstring as it depends on it
+-;extension=php_mysqli.dll
+-;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
+-;extension=php_openssl.dll
+-;extension=php_pdo_firebird.dll
+-;extension=php_pdo_mysql.dll
+-;extension=php_pdo_oci.dll
+-;extension=php_pdo_odbc.dll
+-;extension=php_pdo_pgsql.dll
+-;extension=php_pdo_sqlite.dll
+-;extension=php_pgsql.dll
+-;extension=php_shmop.dll
+-
+-; The MIBS data available in the PHP distribution must be installed.
+-; See http://www.php.net/manual/en/snmp.installation.php
+-;extension=php_snmp.dll
+-
+-;extension=php_soap.dll
+-;extension=php_sockets.dll
+-;extension=php_sqlite3.dll
+-;extension=php_tidy.dll
+-;extension=php_xmlrpc.dll
+-;extension=php_xsl.dll
++;extension=bcmath.so
++;extension=bz2.so
++;extension=calendar.so
++extension=curl.so
++;extension=dba.so
++;extension=enchant.so
++;extension=exif.so
++;extension=ftp.so
++;extension=gd.so
++;extension=gettext.so
++;extension=gmp.so
++;extension=iconv.so
++;extension=imap.so
++;extension=intl.so
++;extension=ldap.so
++;extension=mcrypt.so
++;extension=mysqli.so
++;extension=odbc.so
++;zend_extension=opcache.so
++;extension=pdo_dblib.so
++;extension=pdo_mysql.so
++;extension=pdo_odbc.so
++;extension=pdo_pgsql.so
++;extension=pdo_sqlite.so
++;extension=pgsql.so
++;extension=pspell.so
++;extension=shmop.so
++;extension=snmp.so
++;extension=soap.so
++;extension=sockets.so
++;extension=sqlite3.so
++;extension=sysvmsg.so
++;extension=sysvsem.so
++;extension=sysvshm.so
++;extension=tidy.so
++;extension=xmlrpc.so
++;extension=xsl.so
++extension=zip.so
+
+ ;;;;;;;;;;;;;;;;;;;
+ ; Module Settings ;