diff options
author | Tomasz Gruszka | 2021-01-31 12:47:26 +0100 |
---|---|---|
committer | Tomasz Gruszka | 2021-01-31 12:48:40 +0100 |
commit | a8449fc00725e3a0e8e1d67723fd240b17bd8b03 (patch) | |
tree | 94648b92bf55389cfc06ef748bddb277bf5b8d47 | |
download | aur-a8449fc00725e3a0e8e1d67723fd240b17bd8b03.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 158 | ||||
-rw-r--r-- | .gitignore | 17 | ||||
-rw-r--r-- | PKGBUILD | 361 | ||||
-rw-r--r-- | apache.conf | 13 | ||||
-rw-r--r-- | apache.patch | 10 | ||||
-rw-r--r-- | enchant-2.patch | 49 | ||||
-rwxr-xr-x | generate_patches | 64 | ||||
-rw-r--r-- | php-fpm.patch | 74 | ||||
-rw-r--r-- | php-fpm.tmpfiles | 1 | ||||
-rw-r--r-- | php.ini.patch | 77 | ||||
-rw-r--r-- | phpize.m4.patch | 13 |
11 files changed, 837 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..91f817912bb2 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,158 @@ +pkgbase = php74 + pkgver = 7.4.14 + pkgrel = 1 + url = https://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 = libsodium + makedepends = libxslt + makedepends = libzip + makedepends = net-snmp + makedepends = postgresql-libs + makedepends = sqlite + makedepends = systemd + makedepends = tidy + makedepends = unixodbc + makedepends = curl + makedepends = libtool + makedepends = smtp-forwarder + makedepends = freetds + makedepends = pcre2 + makedepends = libnsl + makedepends = oniguruma + source = https://php.net/distributions/php-7.4.14.tar.xz + source = https://php.net/distributions/php-7.4.14.tar.xz.asc + source = apache.patch + source = apache.conf + source = php-fpm.patch + source = php-fpm.tmpfiles + source = php.ini.patch + source = phpize.m4.patch + source = enchant-2.patch + validpgpkeys = 5A52880781F755608BF815FC910DEB46F53EA312 + validpgpkeys = 42670A7FE4D0441C8E4632349E4FDC074A4EF02D + sha256sums = f9f3c37969fcd9006c1dbb1dd76ab53f28c698a1646fa2dde8547c3f45e02886 + sha256sums = SKIP + sha256sums = b4ea038f2863801175d6c4e74c685913feecdd5be3d49aff7d9b3fa92d8c4159 + sha256sums = ebc0af1ef3a6baccb013d0ccb29923895a7b22ff2d032e3bba802dc6328301ce + sha256sums = 299c6495f276b51cb05a3ffbdf365f8d40307fba748646998b0eea61af4eb827 + sha256sums = 696c2cfda2b10de542e4267d3ed245711e3eb6c7f4c7c4d1878e4d5de6f3140b + sha256sums = 3a6d101962db9d311d9bba3b561b9dfd417701d9d2b607b70b9df218f6e029d7 + sha256sums = 354b1d5fd83e9902c6a4f7ca5d2101631bd67404f3c55a7194d9a6862656b479 + sha256sums = d94d22ad8bcd13829addda84e9de6b73fa04be9bc6da8622086c7e19c97ab724 + +pkgname = php74 + pkgdesc = A general-purpose scripting language that is especially suited to web development + depends = libxml2 + depends = curl + depends = libzip + depends = pcre2 + depends = argon2 + depends = oniguruma + backup = etc/${pkgbase}/php.ini + +pkgname = php74-cgi + pkgdesc = CGI and FCGI SAPI for PHP + depends = php74 + +pkgname = php74-apache + pkgdesc = Apache SAPI for PHP + depends = php74 + depends = apache + depends = libnsl + backup = etc/httpd/conf/extra/php74_module.conf + +pkgname = php74-fpm + pkgdesc = FastCGI Process Manager for PHP + depends = php74 + depends = systemd + options = !emptydirs + backup = etc/php74/php-fpm.conf + backup = etc/php74/php-fpm.d/www.conf + +pkgname = php74-embed + pkgdesc = Embedded PHP SAPI library + depends = php74 + depends = systemd-libs + depends = libnsl + options = !emptydirs + +pkgname = php74-phpdbg + pkgdesc = Interactive PHP debugger + depends = php74 + options = !emptydirs + +pkgname = php74-dblib + pkgdesc = dblib module for PHP + depends = php74 + depends = freetds + +pkgname = php74-enchant + pkgdesc = enchant module for PHP + depends = php74 + depends = enchant + +pkgname = php74-gd + pkgdesc = gd module for PHP + depends = php74 + depends = gd + +pkgname = php74-imap + pkgdesc = imap module for PHP + depends = php74 + depends = c-client + +pkgname = php74-intl + pkgdesc = intl module for PHP + depends = php74 + depends = icu + +pkgname = php74-sodium + pkgdesc = sodium module for PHP + depends = php74 + depends = libsodium + +pkgname = php74-odbc + pkgdesc = ODBC modules for PHP + depends = php74 + depends = unixodbc + +pkgname = php74-pgsql + pkgdesc = PostgreSQL modules for PHP + depends = php74 + depends = postgresql-libs + +pkgname = php74-pspell + pkgdesc = pspell module for PHP + depends = php74 + depends = aspell + +pkgname = php74-snmp + pkgdesc = snmp module for PHP + depends = php74 + depends = net-snmp + +pkgname = php74-sqlite + pkgdesc = sqlite module for PHP + depends = php74 + depends = sqlite + +pkgname = php74-tidy + pkgdesc = tidy module for PHP + depends = php74 + depends = tidy + +pkgname = php74-xsl + pkgdesc = xsl module for PHP + depends = php74 + depends = libxslt + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..9b97681014e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*.zip +*.jar +*.tar +*.tgz +*.tbz2 +*.gz +*.bz2 +*.xz +*.gem +*.run +*.deb +*.rpm +*.sig +*.log +/src +/pkg +*.kate-swp diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f7d76b31d1fc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,361 @@ +# Maintainer: Tomasz Gruszka <tompear79@gmail.com> +# Contributor: Pierre Schmitz <pierre@archlinux.de> +# Contributor: Matt Harrison <matt@harrison.us.com> + +pkgbase=php74 +_pkgbase=${pkgbase%74} +pkgname=("${pkgbase}" + "${pkgbase}-cgi" + "${pkgbase}-apache" + "${pkgbase}-fpm" + "${pkgbase}-embed" + "${pkgbase}-phpdbg" + "${pkgbase}-dblib" + "${pkgbase}-enchant" + "${pkgbase}-gd" + "${pkgbase}-imap" + "${pkgbase}-intl" + "${pkgbase}-sodium" + "${pkgbase}-odbc" + "${pkgbase}-pgsql" + "${pkgbase}-pspell" + "${pkgbase}-snmp" + "${pkgbase}-sqlite" + "${pkgbase}-tidy" + "${pkgbase}-xsl") +pkgver=7.4.14 +pkgrel=1 +arch=('x86_64') +license=('PHP') +url='https://www.php.net/' +makedepends=('apache' 'aspell' 'c-client' 'db' 'enchant' 'gd' 'gmp' 'icu' 'libsodium' 'libxslt' 'libzip' 'net-snmp' + 'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl' 'libtool' 'smtp-forwarder' 'freetds' 'pcre2' 'libnsl' + 'oniguruma') +checkdepends=('procps-ng') +source=("https://php.net/distributions/${_pkgbase}-${pkgver}.tar.xz"{,.asc} + 'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch' + 'phpize.m4.patch' 'enchant-2.patch') +sha256sums=('f9f3c37969fcd9006c1dbb1dd76ab53f28c698a1646fa2dde8547c3f45e02886' + 'SKIP' + 'b4ea038f2863801175d6c4e74c685913feecdd5be3d49aff7d9b3fa92d8c4159' + 'ebc0af1ef3a6baccb013d0ccb29923895a7b22ff2d032e3bba802dc6328301ce' + '299c6495f276b51cb05a3ffbdf365f8d40307fba748646998b0eea61af4eb827' + '696c2cfda2b10de542e4267d3ed245711e3eb6c7f4c7c4d1878e4d5de6f3140b' + '3a6d101962db9d311d9bba3b561b9dfd417701d9d2b607b70b9df218f6e029d7' + '354b1d5fd83e9902c6a4f7ca5d2101631bd67404f3c55a7194d9a6862656b479' + 'd94d22ad8bcd13829addda84e9de6b73fa04be9bc6da8622086c7e19c97ab724') + +validpgpkeys=('5A52880781F755608BF815FC910DEB46F53EA312' + '42670A7FE4D0441C8E4632349E4FDC074A4EF02D') + +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 -p0 -i ${srcdir}/phpize.m4.patch + patch -p0 -i ${srcdir}/enchant-2.patch + autoconf + + rm tests/output/stream_isatty_*.phpt +} + +build() { + # http://site.icu-project.org/download/61#TOC-Migration-Issues + CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1' + + local _phpconfig="--srcdir=../${_pkgbase}-${pkgver} \ + --config-cache \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc/${pkgbase} \ + --localstatedir=/var \ + --libdir=/usr/lib/${pkgbase} \ + --datarootdir=/usr/share/${pkgbase} \ + --datadir=/usr/share/${pkgbase} \ + --program-suffix=${pkgbase#php} \ + --with-layout=GNU \ + --with-config-file-path=/etc/${pkgbase} \ + --with-config-file-scan-dir=/etc/${pkgbase}/conf.d \ + --disable-rpath \ + --mandir=/usr/share/man \ + --without-pear \ + " + + local _phpextensions="\ + --enable-bcmath=shared \ + --enable-calendar=shared \ + --enable-dba=shared \ + --enable-exif=shared \ + --enable-ftp=shared \ + --enable-gd=shared \ + --enable-intl=shared \ + --enable-mbstring \ + --enable-pcntl \ + --enable-shmop=shared \ + --enable-soap=shared \ + --enable-sockets=shared \ + --enable-sysvmsg=shared \ + --enable-sysvsem=shared \ + --enable-sysvshm=shared \ + --with-bz2=shared \ + --with-curl=shared \ + --with-db4=/usr \ + --with-enchant=shared,/usr \ + --with-external-gd \ + --with-external-pcre \ + --with-ffi=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-mhash \ + --with-mysql-sock=/run/mysqld/mysqld.sock \ + --with-mysqli=shared,mysqlnd \ + --with-openssl \ + --with-password-argon2 \ + --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-sodium=shared \ + --with-sqlite3=shared,/usr \ + --with-tidy=shared \ + --with-unixODBC=shared,/usr \ + --with-xmlrpc=shared \ + --with-xsl=shared \ + --with-zip=shared \ + --with-zlib \ + " + + EXTENSION_DIR=/usr/lib/${pkgbase}/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 + export TEST_PHP_ARGS="-j$(nproc)" + export TESTS='tests Zend' + + ${srcdir}/build/sapi/cli/php -n run-tests.php -n -P {tests,Zend} +} + +package_php74() { + pkgdesc='A general-purpose scripting language that is especially suited to web development' + depends=('libxml2' 'curl' 'libzip' 'pcre2' 'argon2' 'oniguruma') + backup=('etc/${pkgbase}/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}/etc/${pkgbase}/php.ini + install -d -m755 ${pkgdir}/etc/${pkgbase}/conf.d/ + + # remove static modules + rm -f ${pkgdir}/usr/lib/${pkgbase}/modules/*.a + # remove modules provided by sub packages + rm -f ${pkgdir}/usr/lib/${pkgbase}/modules/{enchant,gd,imap,intl,sodium,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/${pkgbase} + + # create phar74 symlink + ln -sf phar74.phar ${pkgdir}/usr/bin/phar74 + + # fix paths in executables + sed -i "/^includedir=/c \includedir=/usr/include/${pkgbase}" ${pkgdir}/usr/bin/phpize74 + sed -i "/^include_dir=/c \include_dir=/usr/include/${pkgbase}" ${pkgdir}/usr/bin/php-config74 +} + +package_php74-cgi() { + pkgdesc='CGI and FCGI SAPI for PHP' + depends=("${pkgbase}") + + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} install-cgi +} + +package_php74-apache() { + pkgdesc='Apache SAPI for PHP' + depends=("${pkgbase}" 'apache' 'libnsl') + backup=("etc/httpd/conf/extra/${pkgbase}_module.conf") + + install -D -m755 ${srcdir}/build-apache/libs/libphp7.so ${pkgdir}/usr/lib/httpd/modules/lib${pkgbase}.so + install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/${pkgbase}_module.conf +} + +package_php74-fpm() { + pkgdesc='FastCGI Process Manager for PHP' + depends=("${pkgbase}" 'systemd') + backup=("etc/${pkgbase}/php-fpm.conf" "etc/${pkgbase}/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/${pkgbase}-fpm.service + install -D -m644 ${srcdir}/php-fpm.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/${pkgbase}-fpm.conf +} + +package_php74-embed() { + pkgdesc='Embedded PHP SAPI library' + depends=("${pkgbase}" 'systemd-libs' 'libnsl') + options=('!emptydirs') + + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} PHP_SAPI=embed install-sapi + mv ${pkgdir}/usr/lib/libphp7.so ${pkgdir}/usr/lib/libphp-74.so +} + +package_php74-phpdbg() { + pkgdesc='Interactive PHP debugger' + depends=("${pkgbase}") + options=('!emptydirs') + + cd ${srcdir}/build-phpdbg + make -j1 INSTALL_ROOT=${pkgdir} install-phpdbg +} + +package_php74-dblib() { + pkgdesc='dblib module for PHP' + depends=("${pkgbase}" 'freetds') + + install -D -m755 ${srcdir}/build/modules/pdo_dblib.so ${pkgdir}/usr/lib/${pkgbase}/modules/pdo_dblib.so +} + +package_php74-enchant() { + pkgdesc='enchant module for PHP' + depends=("${pkgbase}" 'enchant') + + install -D -m755 ${srcdir}/build/modules/enchant.so ${pkgdir}/usr/lib/${pkgbase}/modules/enchant.so +} + +package_php74-gd() { + pkgdesc='gd module for PHP' + depends=("${pkgbase}" 'gd') + + install -D -m755 ${srcdir}/build/modules/gd.so ${pkgdir}/usr/lib/${pkgbase}/modules/gd.so +} + +package_php74-imap() { + pkgdesc='imap module for PHP' + depends=("${pkgbase}" 'c-client') + + install -D -m755 ${srcdir}/build/modules/imap.so ${pkgdir}/usr/lib/${pkgbase}/modules/imap.so +} + +package_php74-intl() { + pkgdesc='intl module for PHP' + depends=("${pkgbase}" 'icu') + + install -D -m755 ${srcdir}/build/modules/intl.so ${pkgdir}/usr/lib/${pkgbase}/modules/intl.so +} + +package_php74-sodium() { + pkgdesc='sodium module for PHP' + depends=("${pkgbase}" 'libsodium') + + install -D -m755 ${srcdir}/build/modules/sodium.so ${pkgdir}/usr/lib/${pkgbase}/modules/sodium.so +} + +package_php74-odbc() { + pkgdesc='ODBC modules for PHP' + depends=("${pkgbase}" 'unixodbc') + + install -D -m755 ${srcdir}/build/modules/odbc.so ${pkgdir}/usr/lib/${pkgbase}/modules/odbc.so + install -D -m755 ${srcdir}/build/modules/pdo_odbc.so ${pkgdir}/usr/lib/${pkgbase}/modules/pdo_odbc.so +} + +package_php74-pgsql() { + pkgdesc='PostgreSQL modules for PHP' + depends=("${pkgbase}" 'postgresql-libs') + + install -D -m755 ${srcdir}/build/modules/pgsql.so ${pkgdir}/usr/lib/${pkgbase}/modules/pgsql.so + install -D -m755 ${srcdir}/build/modules/pdo_pgsql.so ${pkgdir}/usr/lib/${pkgbase}/modules/pdo_pgsql.so +} + +package_php74-pspell() { + pkgdesc='pspell module for PHP' + depends=("${pkgbase}" 'aspell') + + install -D -m755 ${srcdir}/build/modules/pspell.so ${pkgdir}/usr/lib/${pkgbase}/modules/pspell.so +} + +package_php74-snmp() { + pkgdesc='snmp module for PHP' + depends=("${pkgbase}" 'net-snmp') + + install -D -m755 ${srcdir}/build/modules/snmp.so ${pkgdir}/usr/lib/${pkgbase}/modules/snmp.so +} + +package_php74-sqlite() { + pkgdesc='sqlite module for PHP' + depends=("${pkgbase}" 'sqlite') + + install -D -m755 ${srcdir}/build/modules/sqlite3.so ${pkgdir}/usr/lib/${pkgbase}/modules/sqlite3.so + install -D -m755 ${srcdir}/build/modules/pdo_sqlite.so ${pkgdir}/usr/lib/${pkgbase}/modules/pdo_sqlite.so +} + +package_php74-tidy() { + pkgdesc='tidy module for PHP' + depends=("${pkgbase}" 'tidy') + + install -D -m755 ${srcdir}/build/modules/tidy.so ${pkgdir}/usr/lib/${pkgbase}/modules/tidy.so +} + +package_php74-xsl() { + pkgdesc='xsl module for PHP' + depends=("${pkgbase}" 'libxslt') + + install -D -m755 ${srcdir}/build/modules/xsl.so ${pkgdir}/usr/lib/${pkgbase}/modules/xsl.so +} diff --git a/apache.conf b/apache.conf new file mode 100644 index 000000000000..b516b5e66ffa --- /dev/null +++ b/apache.conf @@ -0,0 +1,13 @@ +# Required modules: dir_module, php7_module + +<IfModule dir_module> + <IfModule php7_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..c64021b8fbcd --- /dev/null +++ b/apache.patch @@ -0,0 +1,10 @@ +--- sapi/apache2handler/config.m4.orig ++++ sapi/apache2handler/config.m4 +@@ -111,7 +111,6 @@ + PHP_BUILD_THREAD_SAFE + fi + else +- APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'` + if test -n "$APACHE_THREADED_MPM"; then + PHP_BUILD_THREAD_SAFE + fi diff --git a/enchant-2.patch b/enchant-2.patch new file mode 100644 index 000000000000..5aee2f7294bb --- /dev/null +++ b/enchant-2.patch @@ -0,0 +1,49 @@ +--- ext/enchant/config.m4.orig ++++ ext/enchant/config.m4 +@@ -4,7 +4,7 @@ + [Include Enchant support])]) + + if test "$PHP_ENCHANT" != "no"; then +- PKG_CHECK_MODULES([ENCHANT], [enchant]) ++ PKG_CHECK_MODULES([ENCHANT], [enchant-2]) + + PHP_EVAL_INCLINE($ENCHANT_CFLAGS) + PHP_EVAL_LIBLINE($ENCHANT_LIBS, ENCHANT_SHARED_LIBADD) +--- ext/enchant/enchant.c.orig ++++ ext/enchant/enchant.c +@@ -738,7 +738,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); + } + + +@@ -793,7 +793,7 @@ + add_next_index_string(return_value, suggs[i]); + } + +- enchant_dict_free_suggestions(pdict->pdict, suggs); ++ enchant_dict_free_string_list(pdict->pdict, suggs); + } + } + /* }}} */ +@@ -813,7 +813,7 @@ + + PHP_ENCHANT_GET_DICT; + +- enchant_dict_add_to_personal(pdict->pdict, word, wordlen); ++ enchant_dict_add(pdict->pdict, word, wordlen); + } + /* }}} */ + +@@ -851,7 +851,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 new file mode 100755 index 000000000000..b814d9c0e604 --- /dev/null +++ b/generate_patches @@ -0,0 +1,64 @@ +#!/bin/bash + +. PKGBUILD + +makepkg -o --nodeps --noprepare --skipinteg + +pushd src/${_pkgbase}-${pkgver} + +sed '/APACHE_THREADED_MPM=/d' -i.orig sapi/apache2handler/config.m4 + +sed 's/.conf.default/.conf/g' -i.orig sapi/fpm/Makefile.frag + +sed \ + -e 's#run/php-fpm.pid#/run/php74-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/php74-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/php74-fpm/php-fpm.pid#' \ + -e 's#^ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize#ExecStart=@EXPANDED_SBINDIR@/php-fpm74 --nodaemonize#' \ + -i.orig sapi/fpm/php-fpm.service.in + +extensions=";extension=bcmath\n;extension=bz2\n;extension=calendar\nextension=curl\n;extension=dba\n;extension=enchant\n;extension=exif\n;extension=ffi\n;extension=ftp\n;extension=gd\n;extension=gettext\n;extension=gmp\n;extension=iconv\n;extension=imap\n;extension=intl\n;extension=ldap\n;extension=mysqli\n;extension=odbc\n;zend_extension=opcache\n;extension=pdo_dblib\n;extension=pdo_mysql\n;extension=pdo_odbc\n;extension=pdo_pgsql\n;extension=pdo_sqlite\n;extension=pgsql\n;extension=pspell\n;extension=shmop\n;extension=snmp\n;extension=soap\n;extension=sockets\n;extension=sodium\n;extension=sqlite3\n;extension=sysvmsg\n;extension=sysvsem\n;extension=sysvshm\n;extension=tidy\n;extension=xmlrpc\n;extension=xsl\nextension=zip\n" + +sed \ + -r ":a;N;\$!ba;s/; Notes for Windows environments :\n.+;?extension=\w+\n/${extensions}/g" \ + -i.orig php.ini-production +sed \ + -e 's#^;extension_dir = "\./"$#extension_dir = "/usr/lib/php74/modules/"#g' \ + -i php.ini-production + +sed \ + -r 's#PKG_CHECK_MODULES\(\[ENCHANT\], \[enchant\]\)#PKG_CHECK_MODULES([ENCHANT], [enchant-2])#g' \ + -i.orig ext/enchant/config.m4 +sed \ + -r 's#enchant_dict_free_suggestions\(pdict->pdict, suggs\)#enchant_dict_free_string_list(pdict->pdict, suggs)#g' \ + -i.orig ext/enchant/enchant.c +sed \ + -r 's#enchant_dict_add_to_personal\(pdict->pdict, word, wordlen\)#enchant_dict_add(pdict->pdict, word, wordlen)#g' \ + -i ext/enchant/enchant.c +sed \ + -r 's#enchant_dict_is_in_session\(pdict->pdict, word, wordlen\)#enchant_dict_is_added(pdict->pdict, word, wordlen)#g' \ + -i ext/enchant/enchant.c + +diff -u sapi/apache2handler/config.m4.orig sapi/apache2handler/config.m4 | 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 + +diff -u ext/enchant/config.m4.orig ext/enchant/config.m4 | filterdiff --clean --remove-timestamps > ../../enchant-2.patch +diff -u ext/enchant/enchant.c.orig ext/enchant/enchant.c | filterdiff --clean --remove-timestamps >> ../../enchant-2.patch + +popd diff --git a/php-fpm.patch b/php-fpm.patch new file mode 100644 index 000000000000..f8a3d87b4851 --- /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 = /run/php74-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 = /run/php74-fpm/php-fpm.sock + + ; Set listen(2) backlog. + ; Default Value: 511 (-1 on FreeBSD and OpenBSD) +@@ -45,8 +45,8 @@ + ; and group can be specified either by name or by their numeric IDs. + ; 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. +@@ -371,7 +371,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 +-ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf ++PIDFile=/run/php74-fpm/php-fpm.pid ++ExecStart=@EXPANDED_SBINDIR@/php-fpm74 --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf + ExecReload=/bin/kill -USR2 $MAINPID diff --git a/php-fpm.tmpfiles b/php-fpm.tmpfiles new file mode 100644 index 000000000000..d8a07e841433 --- /dev/null +++ b/php-fpm.tmpfiles @@ -0,0 +1 @@ +d /run/php74-fpm 755 root root diff --git a/php.ini.patch b/php.ini.patch new file mode 100644 index 000000000000..e88d50df6018 --- /dev/null +++ b/php.ini.patch @@ -0,0 +1,77 @@ +--- php.ini-production.orig ++++ php.ini-production +@@ -756,7 +756,7 @@ + + ; Directory in which the loadable extensions (modules) reside. + ; http://php.net/extension-dir +-;extension_dir = "./" ++extension_dir = "/usr/lib/php74/modules/" + ; On windows: + ;extension_dir = "ext" + +@@ -904,49 +904,45 @@ + ; 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=calendar ++extension=curl ++;extension=dba ++;extension=enchant ++;extension=exif + ;extension=ffi + ;extension=ftp +-;extension=fileinfo +-;extension=gd2 ++;extension=gd + ;extension=gettext + ;extension=gmp +-;extension=intl ++;extension=iconv + ;extension=imap ++;extension=intl + ;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=sodium + ;extension=sqlite3 ++;extension=sysvmsg ++;extension=sysvsem ++;extension=sysvshm + ;extension=tidy + ;extension=xmlrpc + ;extension=xsl ++extension=zip + + ;;;;;;;;;;;;;;;;;;; + ; Module Settings ; diff --git a/phpize.m4.patch b/phpize.m4.patch new file mode 100644 index 000000000000..365f52d84c42 --- /dev/null +++ b/phpize.m4.patch @@ -0,0 +1,13 @@ +--- scripts/phpize.m4.orig 2021-01-05 11:45:07.000000000 +0100 ++++ scripts/phpize.m4 2021-01-31 12:03:46.869682067 +0100 +@@ -50,8 +50,8 @@ + dnl Find php-config script. + PHP_ARG_WITH([php-config],, + [AS_HELP_STRING([--with-php-config=PATH], +- [Path to php-config [php-config]])], +- [php-config], ++ [Path to php-config74 [php-config74]])], ++ [php-config74], + [no]) + + dnl For BC. |