Skip to content

Commit

Permalink
Add support for swoole 6 (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati authored Nov 28, 2024
1 parent 8b093df commit c4493e6
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion install-php-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,12 @@ buildRequiredPackageLists() {
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile sqlite-dev"
fi
fi
# iouring support in swoole 6 requires liburing 2.5+: available since Alpine 3.19
# but with Alpine 3.19 we have a "invalid use of incomplete type 'const struct statx'" error
if test $DISTRO_MAJMIN_VERSION -ge 320; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent liburing"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile liburing-dev"
fi
;;
swoole@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls libpq5"
Expand All @@ -1449,6 +1455,11 @@ buildRequiredPackageLists() {
fi
fi
fi
if test $DISTRO_VERSION_NUMBER -ge 13; then
# iouring support in swoole 6 requires liburing 2.5+: available since Debian Trixie (13)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent liburing2"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile liburing-dev"
fi
;;
sybase_ct@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetds"
Expand Down Expand Up @@ -4064,18 +4075,28 @@ installRemoteModule() {
installRemoteModule_zts=no
fi
installRemoteModule_sqlite=yes
installRemoteModule_iouring=no
case "$DISTRO" in
alpine)
if test $DISTRO_MAJMIN_VERSION -lt 317; then
# we need sqlite3 >= 3.7.7
installRemoteModule_sqlite=no
fi
# iouring support in swoole 6 requires liburing 2.5+: available since Alpine 3.19
# but with Alpine 3.19 we have a "invalid use of incomplete type 'const struct statx'" error
if test $DISTRO_MAJMIN_VERSION -ge 320; then
installRemoteModule_iouring=yes
fi
;;
debian)
if test $DISTRO_MAJMIN_VERSION -lt 1200; then
# we need sqlite3 >= 3.7.7
installRemoteModule_sqlite=no
fi
if test $DISTRO_VERSION_NUMBER -ge 13; then
# iouring support in swoole 6 requires liburing 2.5+: available since Debian Trixie (13)
installRemoteModule_iouring=yes
fi
;;
esac
if test $(compareVersions "$installRemoteModule_version" 6.0.0) -ge 0; then
Expand All @@ -4102,7 +4123,7 @@ installRemoteModule() {
# enable swoole thread support (need php zts support)?
addConfigureOption enable-swoole-thread $installRemoteModule_zts
# enable iouring for file async support?
addConfigureOption enable-iouring yes
addConfigureOption enable-iouring $installRemoteModule_iouring
elif test $(compareVersions "$installRemoteModule_version" 5.1.0) -ge 0; then
# enable sockets supports?
addConfigureOption enable-sockets $installRemoteModule_sockets
Expand Down

0 comments on commit c4493e6

Please sign in to comment.