summaryrefslogtreecommitdiffstats
path: root/abs/core/php/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/php/PKGBUILD')
-rw-r--r--abs/core/php/PKGBUILD292
1 files changed, 115 insertions, 177 deletions
diff --git a/abs/core/php/PKGBUILD b/abs/core/php/PKGBUILD
index e73312c..67a725a 100644
--- a/abs/core/php/PKGBUILD
+++ b/abs/core/php/PKGBUILD
@@ -8,14 +8,12 @@ pkgname=('php'
'php-fpm'
'php-embed'
'php-phpdbg'
- 'php-pear'
+ 'php-dblib'
'php-enchant'
'php-gd'
'php-imap'
'php-intl'
- 'php-ldap'
- 'php-mcrypt'
- 'php-mssql'
+ 'php-sodium'
'php-odbc'
'php-pgsql'
'php-pspell'
@@ -23,63 +21,56 @@ pkgname=('php'
'php-sqlite'
'php-tidy'
'php-xsl')
-pkgver=5.6.30
+pkgver=7.2.4
pkgrel=1
-arch=('i686' 'x86_64')
+arch=('x86_64')
license=('PHP')
url='http://www.php.net'
-makedepends=('apache' 'c-client' 'postgresql-libs' 'libldap' 'postfix'
- 'sqlite' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file' 'freetds'
- 'libmcrypt' 'tidy' 'aspell' 'libltdl' 'gd' 'icu'
- 'curl' 'libxslt' 'openssl' 'db' 'gmp' 'systemd')
-source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.xz"
- "http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.xz.asc"
- 'php.ini.patch' 'linhes.ini' 'apache.conf' 'php-fpm.conf.in.patch'
- 'logrotate.d.php-fpm' 'php-fpm.service' 'php-fpm.tmpfiles')
-validpgpkeys=('6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3'
- '0BD78B5F97500D450838F95DFE857D9A90D90EC1')
+makedepends=('apache' 'aspell' 'c-client' 'db' 'enchant' 'gd' 'gmp' 'icu' 'libsodium' 'libxslt' 'libzip' 'net-snmp'
+ 'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl' 'libtool' 'postfix' 'freetds' 'pcre')
+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' 'linhes.ini' 'enchant-2.patch')
+validpgpkeys=('B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F'
+ '1729F83938DA44E27BA0F4D3DBDB397470D12172')
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}/php-fpm.conf.in.patch
- # Just because our Apache 2.4 is configured with a threaded MPM by default does not mean we want to build a ZTS PHP.
- # Let's supress this behaviour and build a SAPI that works fine with the prefork MPM.
- sed '/APACHE_THREADED_MPM=/d' -i sapi/apache2handler/config.m4 -i configure
+ patch -p1 -i ../enchant-2.patch
- # Allow php-tidy to compile with tidy-html5
- sed 's/buffio\.h/tidybuffio\.h/' -i ext/tidy/tidy.c
+ 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 \
- --sysconfdir=/etc/${pkgbase} \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc/php \
--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 \
+ --with-config-file-path=/etc/php \
+ --with-config-file-scan-dir=/etc/php/conf.d \
--disable-rpath \
+ --mandir=/usr/share/man \
--without-pear \
"
- local _phpextensions="--enable-bcmath=shared \
+ 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-opcache \
- --enable-phar=shared \
- --enable-posix=shared \
--enable-shmop=shared \
--enable-soap=shared \
--enable-sockets=shared \
@@ -91,314 +82,261 @@ build() {
--with-curl=shared \
--with-db4=/usr \
--with-enchant=shared,/usr \
- --with-fpm-systemd \
--with-freetype-dir=/usr \
- --with-xpm-dir=/usr \
--with-gd=shared,/usr \
--with-gdbm \
--with-gettext=shared \
--with-gmp=shared \
--with-iconv=shared \
- --with-icu-dir=/usr \
--with-imap-ssl \
--with-imap=shared \
--with-kerberos=/usr \
- --with-jpeg-dir=/usr \
- --with-vpx-dir=no \
--with-ldap=shared \
--with-ldap-sasl \
--with-libzip \
- --with-mcrypt=shared \
--with-mhash \
- --with-mssql=shared \
--with-mysql-sock=/run/mysqld/mysqld.sock \
- --with-mysql=shared,mysqlnd \
--with-mysqli=shared,mysqlnd \
- --with-openssl=shared \
+ --with-openssl \
+ --with-password-argon2 \
--with-pcre-regex=/usr \
- --with-pdo-dblib=shared,/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-png-dir=/usr \
--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-zlib \
+ --enable-pcntl \
"
- export EXTENSION_DIR=/usr/lib/${pkgbase}/modules
- export PEAR_INSTALLDIR=/usr/share/${pkgbase}/pear
+ EXTENSION_DIR=/usr/lib/php/modules
+ export EXTENSION_DIR
- cd ${srcdir}/${pkgbase}-${pkgver}
-
- # php
- mkdir -p ${srcdir}/build-php
- cd ${srcdir}/build-php
- ln -sf ../${pkgbase}-${pkgver}/configure
+ mkdir ${srcdir}/build
+ cd ${srcdir}/build
+ ln -s ../${pkgbase}-${pkgver}/configure
./configure ${_phpconfig} \
- --disable-cgi \
- --with-readline \
- --enable-pcntl \
- ${_phpextensions}
- make
-
- # cgi and fcgi
- # reuse the previous run; this will save us a lot of time
- cp -Ta ${srcdir}/build-php ${srcdir}/build-cgi
- cd ${srcdir}/build-cgi
- ./configure ${_phpconfig} \
- --disable-cli \
--enable-cgi \
- ${_phpextensions}
- make
-
- # apache
- cp -Ta ${srcdir}/build-php ${srcdir}/build-apache
- cd ${srcdir}/build-apache
- ./configure ${_phpconfig} \
- --disable-cli \
- --with-apxs2 \
- ${_phpextensions}
- make
-
- # fpm
- cp -Ta ${srcdir}/build-php ${srcdir}/build-fpm
- cd ${srcdir}/build-fpm
- ./configure ${_phpconfig} \
- --disable-cli \
--enable-fpm \
+ --with-fpm-systemd \
+ --with-fpm-acl \
--with-fpm-user=http \
--with-fpm-group=http \
+ --enable-embed=shared \
${_phpextensions}
make
- # embed
- cp -Ta ${srcdir}/build-php ${srcdir}/build-embed
- cd ${srcdir}/build-embed
+ # 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} \
- --disable-cli \
- --enable-embed=shared \
+ --with-apxs2 \
${_phpextensions}
make
# phpdbg
- cp -Ta ${srcdir}/build-php ${srcdir}/build-phpdbg
+ cp -a ${srcdir}/build ${srcdir}/build-phpdbg
cd ${srcdir}/build-phpdbg
./configure ${_phpconfig} \
- --disable-cli \
- --disable-cgi \
- --with-readline \
--enable-phpdbg \
${_phpextensions}
make
+}
- # pear
- sed -i 's#@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d#@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -p $(bindir)/php$(program_suffix) -d#' ${srcdir}/php-${pkgver}/pear/Makefile.frag
- cp -Ta ${srcdir}/build-php ${srcdir}/build-pear
- cd ${srcdir}/build-pear
- ./configure ${_phpconfig} \
- --disable-cgi \
- --with-readline \
- --enable-pcntl \
- --with-pear \
- ${_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_php() {
- pkgdesc='An HTML-embedded scripting language'
- depends=('pcre' 'libxml2' 'curl' 'libzip' 'php-gd' 'php-mcrypt')
+ pkgdesc='A general-purpose scripting language that is especially suited to web development'
+ depends=('libxml2' 'curl' 'libzip' 'pcre' 'argon2' 'php-gd')
+ replaces=('php-ldap')
+ conflicts=('php-ldap')
+ provides=("php-ldap=${pkgver}")
#backup=('etc/php/php.ini')
install='php.install'
- cd ${srcdir}/build-php
- make -j1 INSTALL_ROOT=${pkgdir} install
-
- # install 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/php/php.ini
install -d -m755 ${pkgdir}/etc/php/conf.d/
- install -D -m644 ${srcdir}/linhes.ini ${pkgdir}/etc/php/conf.d/linhes.ini
+ install -D -m644 ${srcdir}/linhes.ini ${pkgdir}/etc/php/conf.d/linhes.ini
# remove static modules
rm -f ${pkgdir}/usr/lib/php/modules/*.a
# remove modules provided by sub packages
- rm -f ${pkgdir}/usr/lib/php/modules/{enchant,gd,imap,intl,ldap,mcrypt,mssql,odbc,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so
-
+ rm -f ${pkgdir}/usr/lib/php/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
-
}
package_php-cgi() {
pkgdesc='CGI and FCGI SAPI for PHP'
depends=('php')
- install -D -m755 ${srcdir}/build-cgi/sapi/cgi/php-cgi ${pkgdir}/usr/bin/php-cgi
+ cd ${srcdir}/build
+ make -j1 INSTALL_ROOT=${pkgdir} install-cgi
}
package_php-apache() {
pkgdesc='Apache SAPI for PHP'
depends=('php' 'apache')
- backup=('etc/httpd/conf/extra/php5_module.conf')
- install='php-apache.install'
+ backup=('etc/httpd/conf/extra/php7_module.conf')
- install -D -m755 ${srcdir}/build-apache/libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so
- install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf
+ install -D -m755 ${srcdir}/build-apache/libs/libphp7.so ${pkgdir}/usr/lib/httpd/modules/libphp7.so
+ install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php7_module.conf
}
package_php-fpm() {
pkgdesc='FastCGI Process Manager for PHP'
depends=('php' 'systemd')
- backup=('etc/php/php-fpm.conf')
- install='php-fpm.install'
-
- install -D -m755 ${srcdir}/build-fpm/sapi/fpm/php-fpm ${pkgdir}/usr/bin/php-fpm
- install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.8 ${pkgdir}/usr/share/man/man8/php-fpm.8
- install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.conf ${pkgdir}/etc/php/php-fpm.conf
- install -D -m644 ${srcdir}/logrotate.d.php-fpm ${pkgdir}/etc/logrotate.d/php-fpm
- install -d -m755 ${pkgdir}/etc/php/fpm.d
+ backup=('etc/php/php-fpm.conf' '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/php-fpm.service
install -D -m644 ${srcdir}/php-fpm.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/php-fpm.conf
- install -D -m644 ${srcdir}/php-fpm.service ${pkgdir}/usr/lib/systemd/system/php-fpm.service
}
package_php-embed() {
pkgdesc='Embedded PHP SAPI library'
- depends=('php')
+ depends=('php' 'libsystemd')
+ options=('!emptydirs')
- install -D -m755 ${srcdir}/build-embed/libs/libphp5.so ${pkgdir}/usr/lib/libphp5.so
- install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/sapi/embed/php_embed.h ${pkgdir}/usr/include/php/sapi/embed/php_embed.h
+ cd ${srcdir}/build
+ make -j1 INSTALL_ROOT=${pkgdir} PHP_SAPI=embed install-sapi
}
package_php-phpdbg() {
pkgdesc='Interactive PHP debugger'
depends=('php')
+ options=('!emptydirs')
- install -D -m755 ${srcdir}/build-phpdbg/sapi/phpdbg/phpdbg ${pkgdir}/usr/bin/phpdbg
+ cd ${srcdir}/build-phpdbg
+ make -j1 INSTALL_ROOT=${pkgdir} install-phpdbg
}
-package_php-pear() {
- pkgdesc='PHP Extension and Application Repository'
- depends=('php')
- backup=('etc/php/pear.conf')
+package_php-dblib() {
+ pkgdesc='dblib module for PHP'
+ depends=('php' 'freetds')
- cd ${srcdir}/build-pear
- make install-pear INSTALL_ROOT=${pkgdir}
- rm -rf ${pkgdir}/usr/share/pear/.{channels,depdb,depdblock,filemap,lock,registry}
+ install -D -m755 ${srcdir}/build/modules/pdo_dblib.so ${pkgdir}/usr/lib/php/modules/pdo_dblib.so
}
package_php-enchant() {
pkgdesc='enchant module for PHP'
depends=('php' 'enchant')
- install -D -m755 ${srcdir}/build-php/modules/enchant.so ${pkgdir}/usr/lib/php/modules/enchant.so
+ install -D -m755 ${srcdir}/build/modules/enchant.so ${pkgdir}/usr/lib/php/modules/enchant.so
}
package_php-gd() {
pkgdesc='gd module for PHP'
depends=('php' 'gd')
- install -D -m755 ${srcdir}/build-php/modules/gd.so ${pkgdir}/usr/lib/php/modules/gd.so
+ install -D -m755 ${srcdir}/build/modules/gd.so ${pkgdir}/usr/lib/php/modules/gd.so
}
package_php-imap() {
pkgdesc='imap module for PHP'
depends=('php' 'c-client')
- install -D -m755 ${srcdir}/build-php/modules/imap.so ${pkgdir}/usr/lib/php/modules/imap.so
+ install -D -m755 ${srcdir}/build/modules/imap.so ${pkgdir}/usr/lib/php/modules/imap.so
}
package_php-intl() {
pkgdesc='intl module for PHP'
depends=('php' 'icu')
- install -D -m755 ${srcdir}/build-php/modules/intl.so ${pkgdir}/usr/lib/php/modules/intl.so
+ install -D -m755 ${srcdir}/build/modules/intl.so ${pkgdir}/usr/lib/php/modules/intl.so
}
-package_php-ldap() {
- pkgdesc='ldap module for PHP'
- depends=('php' 'libldap')
-
- install -D -m755 ${srcdir}/build-php/modules/ldap.so ${pkgdir}/usr/lib/php/modules/ldap.so
-}
-
-package_php-mcrypt() {
- pkgdesc='mcrypt module for PHP'
- depends=('php' 'libmcrypt' 'libltdl')
-
- install -D -m755 ${srcdir}/build-php/modules/mcrypt.so ${pkgdir}/usr/lib/php/modules/mcrypt.so
-}
-
-package_php-mssql() {
- pkgdesc='mssql module for PHP'
- depends=('php' 'freetds')
+package_php-sodium() {
+ pkgdesc='sodium module for PHP'
+ depends=('php' 'libsodium')
- install -D -m755 ${srcdir}/build-php/modules/mssql.so ${pkgdir}/usr/lib/php/modules/mssql.so
+ install -D -m755 ${srcdir}/build/modules/sodium.so ${pkgdir}/usr/lib/php/modules/sodium.so
}
package_php-odbc() {
pkgdesc='ODBC modules for PHP'
depends=('php' 'unixodbc')
- install -D -m755 ${srcdir}/build-php/modules/odbc.so ${pkgdir}/usr/lib/php/modules/odbc.so
- install -D -m755 ${srcdir}/build-php/modules/pdo_odbc.so ${pkgdir}/usr/lib/php/modules/pdo_odbc.so
+ install -D -m755 ${srcdir}/build/modules/odbc.so ${pkgdir}/usr/lib/php/modules/odbc.so
+ install -D -m755 ${srcdir}/build/modules/pdo_odbc.so ${pkgdir}/usr/lib/php/modules/pdo_odbc.so
}
package_php-pgsql() {
pkgdesc='PostgreSQL modules for PHP'
depends=('php' 'postgresql-libs')
- install -D -m755 ${srcdir}/build-php/modules/pgsql.so ${pkgdir}/usr/lib/php/modules/pgsql.so
- install -D -m755 ${srcdir}/build-php/modules/pdo_pgsql.so ${pkgdir}/usr/lib/php/modules/pdo_pgsql.so
+ install -D -m755 ${srcdir}/build/modules/pgsql.so ${pkgdir}/usr/lib/php/modules/pgsql.so
+ install -D -m755 ${srcdir}/build/modules/pdo_pgsql.so ${pkgdir}/usr/lib/php/modules/pdo_pgsql.so
}
package_php-pspell() {
pkgdesc='pspell module for PHP'
depends=('php' 'aspell')
- install -D -m755 ${srcdir}/build-php/modules/pspell.so ${pkgdir}/usr/lib/php/modules/pspell.so
+ install -D -m755 ${srcdir}/build/modules/pspell.so ${pkgdir}/usr/lib/php/modules/pspell.so
}
package_php-snmp() {
pkgdesc='snmp module for PHP'
depends=('php' 'net-snmp')
- install -D -m755 ${srcdir}/build-php/modules/snmp.so ${pkgdir}/usr/lib/php/modules/snmp.so
+ install -D -m755 ${srcdir}/build/modules/snmp.so ${pkgdir}/usr/lib/php/modules/snmp.so
}
package_php-sqlite() {
pkgdesc='sqlite module for PHP'
depends=('php' 'sqlite')
- install -D -m755 ${srcdir}/build-php/modules/sqlite3.so ${pkgdir}/usr/lib/php/modules/sqlite3.so
- install -D -m755 ${srcdir}/build-php/modules/pdo_sqlite.so ${pkgdir}/usr/lib/php/modules/pdo_sqlite.so
+ install -D -m755 ${srcdir}/build/modules/sqlite3.so ${pkgdir}/usr/lib/php/modules/sqlite3.so
+ install -D -m755 ${srcdir}/build/modules/pdo_sqlite.so ${pkgdir}/usr/lib/php/modules/pdo_sqlite.so
}
package_php-tidy() {
pkgdesc='tidy module for PHP'
depends=('php' 'tidy')
- install -D -m755 ${srcdir}/build-php/modules/tidy.so ${pkgdir}/usr/lib/php/modules/tidy.so
+ install -D -m755 ${srcdir}/build/modules/tidy.so ${pkgdir}/usr/lib/php/modules/tidy.so
}
package_php-xsl() {
pkgdesc='xsl module for PHP'
depends=('php' 'libxslt')
- install -D -m755 ${srcdir}/build-php/modules/xsl.so ${pkgdir}/usr/lib/php/modules/xsl.so
+ install -D -m755 ${srcdir}/build/modules/xsl.so ${pkgdir}/usr/lib/php/modules/xsl.so
}
-md5sums=('68753955a8964ae49064c6424f81eb3e'
+md5sums=('8266120cf6500a96f1ba335d9ef1e01b'
'SKIP'
- '8da5e525fcbea84adf54ba2da15e25f0'
- '4ecf586ef1597aa5eb977573954b5d21'
- 'dec2cbaad64e3abf4f0ec70e1de4e8e9'
- '16b5e2e4da59f15bea4c2db78a7bc8dc'
- '25bc67ad828e8147a817410b68d8016c'
- 'cc2940f5312ba42e7aa1ddfab74b84c4'
- 'c60343df74f8e1afb13b084d5c0e47ed')
+ '13cda50a6a420d04ddc26935ded3164e'
+ '0677a10d2e721472d6fccb470356b322'
+ '6505b11a92265cd6563119f8a2e047aa'
+ 'c60343df74f8e1afb13b084d5c0e47ed'
+ 'e034326b07074eaabf45b43c30f8d5fa'
+ 'c25450566a6d88427c02d1647984d3c7'
+ 'e3883dce91ed21e23a3d7ae9fa80216d')