diff options
author | Max Rees <maxcrees@me.com> | 2018-07-25 02:49:07 -0400 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-07-25 02:03:15 -0500 |
commit | 9ee9fb5965c1e348a0cda7c9f8ac6b2af9e8aa32 (patch) | |
tree | bc1eb3ab98e620d5724a133fa2b0c93e7cd4baba /user/php7/APKBUILD | |
parent | dd2b27a13bd42b6e67695711aa9410f2e26570c0 (diff) | |
download | packages-9ee9fb5965c1e348a0cda7c9f8ac6b2af9e8aa32.tar.gz packages-9ee9fb5965c1e348a0cda7c9f8ac6b2af9e8aa32.tar.bz2 packages-9ee9fb5965c1e348a0cda7c9f8ac6b2af9e8aa32.tar.xz packages-9ee9fb5965c1e348a0cda7c9f8ac6b2af9e8aa32.zip |
user/php7: upgrade to 7.2.6, fix license, remove bashisms
Diffstat (limited to 'user/php7/APKBUILD')
-rw-r--r-- | user/php7/APKBUILD | 63 |
1 files changed, 41 insertions, 22 deletions
diff --git a/user/php7/APKBUILD b/user/php7/APKBUILD index bd5152a47..37b0431fb 100644 --- a/user/php7/APKBUILD +++ b/user/php7/APKBUILD @@ -25,14 +25,14 @@ pkgname=php7 _pkgname=php -pkgver=7.2.6 +pkgver=7.2.8 pkgrel=0 _apiver=20170718 pkgdesc="The PHP7 language runtime engine" -url="http://www.php.net/" +url="https://php.net/" arch="all" -license="PHP-3.0 BSD LGPL-2.0 MIT Zend" options="!checkroot" +license="PHP-3.01 AND Zend-2.0 AND Custom:TSRM AND LGPL-2.1+ AND MIT AND Beerware AND Public-Domain AND BSD-3-Clause AND Apache-1.0 AND PostgreSQL AND BSD-2-Clause AND Zlib AND BSD-4-Clause" depends="" depends_dev="$pkgname=$pkgver-r$pkgrel autoconf pcre-dev" makedepends="autoconf @@ -46,7 +46,7 @@ makedepends="autoconf freetds-dev freetype-dev gdbm-dev - gettext-dev + gettext-tiny gmp-dev icu-dev krb5-dev @@ -86,8 +86,6 @@ _libdir="/usr/lib/$_pkgname" _extension_dir="$_libdir/modules" _extension_confd="/etc/$_pkgname/conf.d" -_configure_extra_opts="" -declare -A _extensions # Usage: add_ext [with|enable] name [extension dependencies...] [configure options...] add_ext() { local ext="$1" @@ -103,23 +101,34 @@ add_ext() { phar) subpackages="$subpackages $pkgname-$ext:$ext";; *) subpackages="$subpackages $pkgname-$ext:_extension";; esac - _extensions[$ext]="" + _extensions="$_extensions $ext" local opt + local prev for opt in $@; do - if printf '%s' "$opt" | grep -q '^-'; then + case "$opt" in + -*) # Add more configure options _configure_ext_opts="$_configure_ext_opts $opt" - else + ;; + license:*) + # Add custom license + opt="$(printf '%s' "${opt#license:}" | sed 's/:/ AND /g')" + eval "_licenses_$ext='$opt'" + ;; + *) # Add dependencies - _extensions[$ext]="${_extensions[$ext]} $opt" - fi + prev="$(eval echo \$_deps_$ext)" + eval "_deps_$ext='$prev $opt'" + ;; + esac done } enable_ext() { add_ext enable $@; } with_ext() { add_ext with $@; } -enable_ext 'bcmath' +enable_ext 'bcmath' \ + license:LGPL-2.0+:PHP-3.01 with_ext 'bz2' enable_ext 'calendar' enable_ext 'ctype' @@ -131,7 +140,8 @@ enable_ext 'dba' \ enable_ext 'dom' with_ext 'enchant' enable_ext 'exif' mbstring -enable_ext 'fileinfo' +enable_ext 'fileinfo' \ + license:PHP-3.0:BSD-2-Clause:BSD-3-Clause:Public-Domain enable_ext 'ftp' with_ext 'gd' \ --with-freetype-dir=/usr \ @@ -150,7 +160,8 @@ enable_ext 'intl' enable_ext 'json' with_ext 'ldap' \ --with-ldap-sasl -enable_ext 'mbstring' +enable_ext 'mbstring' \ + license:PHP-3.01:OLDAP-2.8:BSD-2-Clause:Public-Domain:LGPL-2.0-only:LGPL-2.1-only add_ext 'mysqli' mysqlnd openssl \ --with-mysqli=shared,mysqlnd \ --with-mysql-sock=/run/mysqld/mysqld.sock @@ -168,6 +179,7 @@ add_ext 'pdo_dblib' pdo \ add_ext 'pdo_mysql' pdo mysqlnd \ --with-pdo-mysql=shared,mysqlnd add_ext 'pdo_odbc' pdo \ + license:PHP-3.0 \ --with-pdo-odbc=shared,unixODBC,/usr add_ext 'pdo_pgsql' pdo \ --with-pdo-pgsql=shared @@ -183,7 +195,8 @@ enable_ext 'session' enable_ext 'shmop' enable_ext 'simplexml' with_ext 'snmp' -enable_ext 'soap' +enable_ext 'soap' \ + license:PHP-3.01:PHP-2.02 # Needs makedepends=libsodium-dev #with_ext 'sodium' enable_ext 'sockets' @@ -207,6 +220,9 @@ enable_ext 'zip' \ # secfixes: # 7.2.5-r0: # - CVE-2018-5712 +# 7.2.8-r0: +# - CVE-2015-9253 +# - CVE-2018-12882 prepare() { cd "$builddir" @@ -311,9 +327,9 @@ check() { # between extensions and load them in correct order, so we must # help it... # opcache is Zend extension, it's handled specially in Makefile - local php_modules=$(_extensions_by_load_order \ + local php_modules="$(_extensions_by_load_order \ | grep -vx opcache \ - | xargs -n 1 printf "'$builddir/modules/%s.la' ") + | xargs -n 1 printf "'$builddir/modules/%s.la' ")" sed -i "/^PHP_TEST_SHARED_EXTENSIONS/,/extension=/ \ s|in \$(PHP_MODULES)\"*|in $php_modules|" Makefile @@ -450,10 +466,13 @@ _extension() { local ext="${subpkgname#$pkgname-}" local extdesc="$(head -n1 "$builddir"/ext/$ext/CREDITS 2>/dev/null ||:)" depends="$pkgname" - local dep; for dep in ${_extensions[$ext]}; do + local dep; for dep in $(eval echo \$_deps_$ext); do depends="$depends $pkgname-$dep" done pkgdesc="PHP7 extension: ${extdesc:-$ext}" + if [ -n "$(eval echo \$_licenses_$ext)" ]; then + license="$(eval echo \$_licenses_$ext)" + fi local load_order=$(_extension_load_order "$ext") @@ -475,7 +494,7 @@ _extension() { # "imap"), which is flawed, but simple and good enough for now. _extension_load_order() { local ext="$1" - local deps="${_extensions[$ext]}" + local deps="$(eval echo \$_deps_$ext)" case "$ext" in # This must be loaded after recode, even though it does @@ -491,7 +510,7 @@ _extension_load_order() { _extensions_by_load_order() { local deps list ext - for ext in ${!_extensions[@]}; do + for ext in $_extensions; do list="$list $(_extension_load_order $ext);$ext" done printf '%s\n' $list | sort -t ';' -k 1 | sed -E 's/\d+;//' @@ -503,11 +522,11 @@ _mv() { mv $@ } -sha512sums="aace53b0b523484715b218e8e77ede355e73c6433e18ebd960a07c371940568d576f54455040c201b95856fa607febc19ef6539bc661a4db7984edc804c50408 php-7.2.6.tar.bz2 +sha512sums="4eaab35ff99c6829e4e67b99d0dbc1d25b83210c9d894fbb9e6810dd3de8b7d5bd62b2d8a9f2ecb3c1f2f5a9c28116a22b36f019a21b8770f02fe1e3149728d9 php-7.2.8.tar.bz2 23df4e779c809db3e3b8e5b0353b1aafaad2f3dc56f2d1cd45f9b0e3ad71b32e40700d6ebfe914b3c87e8e0b670d0dc862ded1e5c898adf160e33dea372e044f php-fpm.initd 01d4ba3ef104ea378eb0e8cbb7bdee3fdf65e4bd6865eb3bc6c0dc4af31c2d52887abdf0150b5ef984b877860285a3b1af84b11ffebb5b8b722ea9faf83edfeb php-fpm.logrotate a7f9ba5e11652fd1cb9e756c3269269a95de083ecb5be936a85c7a09c1396db9088e0251c6a643c40235c0e776fce2a471e5c7f5a033b85c7d3b3110c2b39e48 php-module.conf -29d622c3818a9ebfd7534dd11b64eebce0215667cc2f7810cf9e61ffcf60645aee80cfc74193066ae71e88e8b4eb7216985ad8926666b96267fd6b27d0532269 disabled-tests.list +3a11b2c68daf41cb5283cacc5cc78e58c1220206b444ce82cffd0aebbe1a2d916d3cfa9637e7714cbddbe9c790c6e85e4cb4133570eee6757144440a5e996acf disabled-tests.list f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c939768584f3e4edbe52e8bd6103fb6777462326a9d94e8ab1f505 install-pear.patch a77dd3bdf9dc7a0f2c06ff3e7c425d062bbaa29902c17402ce98701dc99499be863ad543aa5e6a7d1c249702d6afb193398dd3199ae58e42b32b95d434fb1883 fpm-paths.patch f8ecae241a90cbc3e98aa4deb3d5d35ef555f51380e29f4e182a8060dffeb84be74f030a14c6b452668471030d78964f52795ca74275db05543ccad20ef1f2cc allow-build-recode-and-imap-together.patch |