Skip to content

Commit

Permalink
Fix installing swoole (#926)
Browse files Browse the repository at this point in the history
* Install swoole 5.1.2 on Alpine 3.12

Fix this error:
configure: error: Package requirements (libbrotlienc) were not met:

Package 'libbrotlienc', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables BROTLIENC_CFLAGS
and BROTLIENC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Test: swoole

* Fix installing swoole on Debian

* Workaround for swoole/swoole-src#5365

* Fix installing swoole on Debian
  • Loading branch information
mlocati authored Jun 7, 2024
1 parent 6d18123 commit 1e04b3c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions install-php-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,8 @@ buildRequiredPackageLists() {
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libc-ares-dev"
fi
if test $PHP_MAJMIN_VERSION -ge 800; then
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev"
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libbrotli1"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev libbrotli-dev"
fi
;;
sybase_ct@alpine)
Expand Down Expand Up @@ -3811,6 +3812,14 @@ installRemoteModule() {
elif test $PHP_BITS -eq 32; then
# See https://github.com/swoole/swoole-src/issues/5198#issuecomment-1820162178
installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module" '^5.0')"
else
case "$DISTRO" in
alpine)
if test $DISTRO_MAJMIN_VERSION -le 312; then
installRemoteModule_version=5.1.2
fi
;;
esac
fi
else
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
Expand All @@ -3829,8 +3838,8 @@ installRemoteModule() {
fi
;;
esac
if test $PHP_MAJMIN_VERSION -eq 803; then
# see https://github.com/swoole/docker-swoole/issues/45
if test $PHP_MAJMIN_VERSION -ge 800; then
# see https://github.com/swoole/swoole-src/issues/5365
installRemoteModule_curl=no
else
installRemoteModule_curl=yes
Expand Down

0 comments on commit 1e04b3c

Please sign in to comment.