diff options
Diffstat (limited to 'community/php7/APKBUILD')
-rw-r--r-- | community/php7/APKBUILD | 95 |
1 files changed, 43 insertions, 52 deletions
diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD index 95ae31eac1..a570b73e1c 100644 --- a/community/php7/APKBUILD +++ b/community/php7/APKBUILD @@ -12,7 +12,6 @@ # gd | BSD | ext/gd/libgd | used # hash | CC0-1.0 | ext/hash/sha3 | used # libmbfl | LGPL-2.1-only | ext/mbstring/libmbfl | used -# oniguruma | BSD-2-Clause | ext/mbstring/oniguruma | used # pcre | BSD-3-Clause | ext/pcre/pcrelib | not used # sqlite3 | Public | ext/sqlite3/libsqlite | not used # libXMLRPC | BSD-3-Clause | ext/xmlrpc/libxmlrpc | used @@ -26,18 +25,18 @@ pkgname=php7 _pkgreal=php -pkgver=7.3.19 +pkgver=7.4.7 pkgrel=0 -_apiver=20180731 +_apiver=20190902 _suffix=${pkgname#php} # Is this package the default (latest) PHP version? _default_php="yes" pkgdesc="The PHP$_suffix language runtime engine" url="https://www.php.net/" arch="all" -license="PHP-3.01 BSD LGPL-2.0-or-later MIT Zend-2.0" +license="PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0" depends="$pkgname-common" -depends_dev="$pkgname=$pkgver-r$pkgrel autoconf pcre2-dev" +depends_dev="$pkgname=$pkgver-r$pkgrel autoconf pcre2-dev re2c" # Most dependencies between extensions is auto-discovered (see _extension()). _depends_mysqlnd="$pkgname-openssl" _depends_pdo_mysql="$pkgname-pdo $pkgname-mysqlnd" @@ -68,6 +67,7 @@ makedepends=" libjpeg-turbo-dev libpng-dev lmdb-dev + oniguruma-dev openssl-dev libsodium-dev libwebp-dev @@ -78,8 +78,6 @@ makedepends=" net-snmp-dev openldap-dev postgresql-dev - re2c - recode-dev sqlite-dev tidyhtml-dev unixodbc-dev @@ -101,8 +99,8 @@ source="https://php.net/distributions/$_pkgreal-$pkgver.tar.xz includedir.patch sharedir.patch php7-fpm-version-suffix.patch - allow-build-recode-and-imap-together.patch fix-tests-devserver.patch + fix-tests-icu.patch enchant-2.patch " builddir="$srcdir/$_pkgreal-$pkgver" @@ -121,6 +119,7 @@ _extensions=" dom enchant exif + ffi fileinfo ftp gd @@ -148,7 +147,6 @@ _extensions=" phar posix pspell - recode session shmop simplexml @@ -162,7 +160,6 @@ _extensions=" sysvshm tidy tokenizer - wddx xml xmlreader xmlrpc @@ -178,9 +175,8 @@ for _ext in $_extensions; do done subpackages="$subpackages $pkgname-common::noarch" -# FIXME: tests fails on s390x and x86_64 +# FIXME: tests are very slow on s390x case "$CARCH" in - x86_64) options="$options !check";; s390x) options="$options !check";; esac @@ -247,7 +243,6 @@ esac prepare() { default_prepare - update_config_sub local vapi=$(sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h) if [ "$vapi" != "$_apiver" ]; then @@ -266,10 +261,10 @@ prepare() { ext/standard/winver.h # Fix some bogus permissions. - find . -name \*.[ch] -exec chmod 644 {} \; + find . -name '*.[ch]' -exec chmod 644 {} \; # XXX: Delete failing tests. - sed -n '/^[^#]/p' "$srcdir"/disabled-tests.list | while read item; do + sed -n '/^[^#]/p' "$srcdir"/disabled-tests.list | while read -r item; do rm -r $item # do it in this way to apply globbing... done @@ -279,9 +274,11 @@ prepare() { # Notes: # * gd-jis-conv breaks any non-latin font rendering (vakartel). # * libxml cannot be build as shared. -# * Doesn't work with system-provided onigurama, some tests fail (invalid code -# point); probably because bundled onigurama is version 5.x, but we have 6.x. +# * -D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64 (https://www.php.net/manual/en/intro.filesystem.php andypost) _build() { + export CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + export CXXFLAGS="$CXXFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + local without_pcre_jit [ "$CARCH" = "s390x" ] && without_pcre_jit="--without-pcre-jit" @@ -314,29 +311,27 @@ _build() { --enable-dom=shared \ --with-enchant=shared \ --enable-exif=shared \ + --with-ffi=shared \ --enable-fileinfo=shared \ --enable-ftp=shared \ - --with-gd=shared \ - --with-freetype-dir=/usr \ + --enable-gd=shared \ + --with-freetype \ + --with-jpeg \ + --with-webp \ + --with-xpm \ --disable-gd-jis-conv \ - --with-jpeg-dir=/usr \ - --with-png-dir=/usr \ - --with-webp-dir=/usr \ - --with-xpm-dir=/usr \ --with-gettext=shared \ --with-gmp=shared \ --with-iconv=shared \ --with-imap=shared \ --with-imap-ssl \ - --with-icu-dir=/usr \ --enable-intl=shared \ --enable-json=shared \ --with-kerberos \ --with-ldap=shared \ --with-ldap-sasl \ --with-libedit \ - --enable-libxml \ - --with-libxml-dir=/usr \ + --with-libxml \ --enable-mbstring=shared \ --with-mysqli=shared,mysqlnd \ --with-mysql-sock=/run/mysqld/mysqld.sock \ @@ -346,20 +341,19 @@ _build() { --with-system-ciphers \ --with-password-argon2 \ --enable-pcntl=shared \ - --with-pcre-regex=/usr \ + --with-external-pcre \ $without_pcre_jit \ --enable-pdo=shared \ --with-pdo-dblib=shared \ --with-pdo-mysql=shared,mysqlnd \ --with-pdo-odbc=shared,unixODBC,/usr \ --with-pdo-pgsql=shared \ - --with-pdo-sqlite=shared,/usr \ + --with-pdo-sqlite=shared \ --with-pgsql=shared \ --enable-phar=shared \ --enable-posix=shared \ --with-pspell=shared \ --without-readline \ - --with-recode=shared \ --enable-session=shared \ --enable-shmop=shared \ --enable-simplexml=shared \ @@ -367,24 +361,21 @@ _build() { --enable-soap=shared \ --with-sodium=shared \ --enable-sockets=shared \ - --with-sqlite3=shared,/usr \ + --with-sqlite3=shared \ --enable-sysvmsg=shared \ --enable-sysvsem=shared \ --enable-sysvshm=shared \ --with-tidy=shared \ --enable-tokenizer=shared \ --with-unixODBC=shared,/usr \ - --enable-wddx=shared \ --enable-xml=shared \ --enable-xmlreader=shared \ --with-xmlrpc=shared \ --enable-xmlwriter=shared \ --with-xsl=shared \ - --enable-zip=shared \ - --with-libzip=/usr \ + --with-zip=shared \ --with-zlib \ - --with-zlib-dir=/usr \ - $@ + "$@" make } @@ -406,7 +397,7 @@ build() { _build --disable-phpdbg \ --enable-fpm \ --enable-embed \ - --with-litespeed + --enable-litespeed } check() { @@ -424,12 +415,13 @@ check() { # Ignore it for now and continue build even on test failures. local allow_fail='no' case "$CARCH" in - x86 | arm* | aarch64 | ppc64le | mips*) allow_fail='yes' + x86 | s390x | mips*) allow_fail='yes' esac NO_INTERACTION=1 REPORT_EXIT_STATUS=1 \ SKIP_SLOW_TESTS=1 SKIP_ONLINE_TESTS=1 TEST_TIMEOUT=10 \ - TZ= LANG= LC_ALL= \ + TZ='' LANG='' LC_ALL='' \ + TRAVIS=true SKIP_IO_CAPTURE_TESTS=1 \ make test || [ "$allow_fail" = yes ] echo 'NOTE: We have skipped quite a lot tests, see disabled-tests.list.' @@ -446,7 +438,7 @@ package() { "$pkgdir"/usr/bin/$file done - find "$pkgdir" -name '.*' | xargs rm -rf + find "$pkgdir" -name '.*' -print0 | xargs -0 rm -rf rmdir "$pkgdir"/var/run if [ "$_default_php" = yes ]; then @@ -479,7 +471,7 @@ doc() { cd "$builddir" mkdir -p "$subpkgdir"/usr/share/doc/$pkgname - cp CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS \ + cp CODING_STANDARDS.md EXTENSIONS LICENSE NEWS \ README* UPGRADING* \ "$subpkgdir"/usr/share/doc/$pkgname/ } @@ -632,7 +624,7 @@ _extension() { mkdir -p "$subpkgdir"/$_extension_confd echo "${prefix}extension=$extname.so" \ - > "$subpkgdir"/$_extension_confd/$(printf %02d $load_order)_$extname.ini + > "$subpkgdir"/$_extension_confd/"$(printf %02d $load_order)"_$extname.ini } # Resolves dependencies of the given extension name (without $pkgname- prefix) @@ -648,7 +640,7 @@ _resolve_extension_deps() { | sed -En "s/.*ADD_EXTENSION_DEP\('$name', ([^)]+)\).*/\1/p" \ | tr -d "'," | tr ' ' '\n' \ | sort -u \ - | while read dep; do + | while read -r dep; do if echo "$_extensions" | grep -qw "$dep"; then echo "$pkgname-$dep" fi @@ -666,7 +658,6 @@ _extension_load_order() { case "$name" in # XXX: This must be loaded after recode, even though it does # not depend on it. So we must use this hack... - imap) echo 1;; *) echo "${deps:=$(_resolve_extension_deps $name)}" | wc -w;; esac } @@ -684,18 +675,18 @@ _extensions_by_load_order() { _mv() { local dest; for dest; do true; done # get last argument mkdir -p "$dest" - mv $@ + mv "$@" } -sha512sums="f37800d9e1bf808ad1099f6190965cc75781e7bf6d2c341a7143aca435abc9974a2987cbfeb8c2b35805c946218343612906fde3cc84b195c2c586945869b760 php-7.3.19.tar.xz +sha512sums="5b3ba690e610e0511675f06a10afe9edbcfa90b5b16956d22aab225cdf140b55e5a8a551e7b189d30404981c94c6921b8c4aed00102546cfa38784a719704b80 php-7.4.7.tar.xz 1c708de82d1086f272f484faf6cf6d087af7c31750cc2550b0b94ed723961b363f28a947b015b2dfc0765caea185a75f5d2c2f2b099c948b65c290924f606e4f php7-fpm.initd cacce7bf789467ff40647b7319e3760c6c587218720538516e8d400baa75651f72165c4e28056cd0c1dc89efecb4d00d0d7823bed80b29136262c825ce816691 php7-fpm.logrotate 274bd7b0b2b7002fa84c779640af37b59258bb37b05cb7dd5c89452977d71807f628d91b523b5039608376d1f760f3425d165242ca75ee5129b2730e71c4e198 php7-module.conf -6593accfe1ef0d9d28d257b2825823afdbfaa72bbf2e09e4ed689b644571a0d085cd4d6c92ffdff6ca9d0bb6d31cf84e5db5c4a4d88f192bba3f95a0c9b1dfd7 disabled-tests.list -f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c939768584f3e4edbe52e8bd6103fb6777462326a9d94e8ab1f505 install-pear.patch +980ba103c494b01b187fb189373cd2f1ef9603d58f88ed0ff21b7eeadaf89cd3396f7569f9b99a0e7af9946e478803fef2700809888c32b960f1721f5d366aec disabled-tests.list +a4130d29c7fee2b8cb561b116baf603bdc3a7b5b4985ec3c9918f253d1851197539dfad72c6b36d9f7008f85982904731184c79e4cee4415c1a1b88016639225 install-pear.patch ebf571c5e595221b9944d7e840807ebb68c1be38bf117186e19a3bd1070310ece5918bcaa5f941679f3371a2108ad57bf179c3f90e612a5a2b982db941172859 includedir.patch -2128eb8e7e44e4f45909f2aa83c071bf7677f5c96e29a0182ac59d5850c7b3437e4b1b67c1a20f14d65f4b370985f838ea061541690ebcfbc9cb21d64744bc7a sharedir.patch -fc680157c9bfaa600a82da0b2b8b96c9515eda653479bc9a9424e96683ea7c983190af0e54dcaf34256646069924df55f3f2d9a97fb11e971463a60f6df0e90f php7-fpm-version-suffix.patch -a07f6f54a298be6f10caa0ce68cebdf1c7cd1404ddb6a0f2c3a77fb7af3c4172bc4474ffc784f3dc92514e4da2639e558aca6dc1cffcc2e55af0743eaad7de47 allow-build-recode-and-imap-together.patch -695ce980ea659575ba26b8443051620e83dc806e04b3bbace791f14af5c581ae4329e2c6326b554c60dab1a13f6b7c3fde49f20032540e53f80ecfade88c5b94 fix-tests-devserver.patch -b9b63a5fab6844cf98b7220948c94ea967b8bc9b6d76236e3b74e69f06513dd9e7c6684cda90f203adbb243c5bdfa5a51bd8dbab1bd0e266f0443480db9e31ed enchant-2.patch" +965b52893affb666af64e00d09e0208dcd41b17ce2864cf05616c6d05a05c0121694c0b209d403b8c0c55d18e6f1528c4aba1a4fcdce7b282a13304d12cd0f9d sharedir.patch +16399fbf6a966f9beffe00f659f9551ef8e52285bca116da5bd5b15ec99a2b0bd5fa03be0faa6c893802aa44c100d634083343a9ac0cd2467812865df66dd572 php7-fpm-version-suffix.patch +3bfeea79f9acfaa7be5bab85cd3d02713abb569e54024a22bb2c747c06d97f83ac2c63dcd75c7c409426ac03f8bc2ccc01bcd66bc39a767930d32542349123f9 fix-tests-devserver.patch +337c431a58f8c0bc5519bb89febc7e00cb0b9da91239347aaedcfa5e77f483df41d3e089cc194fd65b7476d9c3068e1a78bb5b44a116c58bcf2b4bcc6f823427 fix-tests-icu.patch +7c8c3cac9efce81d525cb5a70e1402e393881b83ef4c7b5d39d3565803d21cd283daf3d74e9a8b059ecac66cf339756acc63608ffcb83d960dba86583bd45108 enchant-2.patch" |