1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-08 16:17:20 +00:00

Support opencensus for PHP 7.3 and 7.4

This commit is contained in:
Michele Locati 2019-12-17 11:14:04 +01:00
parent 868e5689a8
commit 2ca480b37e
No known key found for this signature in database
GPG key ID: 98B7CE2E7234E28B
2 changed files with 19 additions and 5 deletions

View file

@ -813,6 +813,7 @@ installPECLModule () {
printf '### INSTALLING PECL MODULE %s ###\n' "$2"
installPECLModule_actual="$2"
installPECLModule_stdin='\n'
installPECLModule_manuallyInstalled=0
case "$2" in
apcu)
if test $1 -le 506; then
@ -856,7 +857,18 @@ installPECLModule () {
fi
;;
opencensus)
installPECLModule_actual="$2-alpha"
if test $1 -le 702; then
installPECLModule_actual="$2-alpha"
else
installPECLModule_manuallyInstalled=1
installPECLModule_src="$(getPackageSource https://pecl.php.net/get/opencensus)"
cd "$installPECLModule_src"/opencensus-*
find . -name '*.c' -type f -exec sed -i 's/\bZVAL_DESTRUCTOR\b/zval_dtor/g' {} +
phpize
./configure
make install
cd -
fi
;;
parallel)
if test $1 -le 701; then
@ -932,10 +944,12 @@ installPECLModule () {
fi
;;
esac
if test "$2" != "$installPECLModule_actual"; then
printf ' (installing version %s)\n' "$installPECLModule_actual"
if test $installPECLModule_manuallyInstalled -eq 0; then
if test "$2" != "$installPECLModule_actual"; then
printf ' (installing version %s)\n' "$installPECLModule_actual"
fi
printf "$installPECLModule_stdin" | pecl install "$installPECLModule_actual"
fi
printf "$installPECLModule_stdin" | pecl install "$installPECLModule_actual"
docker-php-ext-enable "$2"
}