Add support for swoole 6 (#1019)

pull/1020/head 2.7.2
Michele Locati 2024-11-28 15:02:44 +01:00 committed by GitHub
parent 8b093df065
commit c4493e6106
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 22 additions and 1 deletions

View File

@ -1434,6 +1434,12 @@ buildRequiredPackageLists() {
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile sqlite-dev" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile sqlite-dev"
fi fi
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) swoole@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls libpq5" buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls libpq5"
@ -1449,6 +1455,11 @@ buildRequiredPackageLists() {
fi fi
fi 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) sybase_ct@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetds" buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetds"
@ -4064,18 +4075,28 @@ installRemoteModule() {
installRemoteModule_zts=no installRemoteModule_zts=no
fi fi
installRemoteModule_sqlite=yes installRemoteModule_sqlite=yes
installRemoteModule_iouring=no
case "$DISTRO" in case "$DISTRO" in
alpine) alpine)
if test $DISTRO_MAJMIN_VERSION -lt 317; then if test $DISTRO_MAJMIN_VERSION -lt 317; then
# we need sqlite3 >= 3.7.7 # we need sqlite3 >= 3.7.7
installRemoteModule_sqlite=no installRemoteModule_sqlite=no
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
installRemoteModule_iouring=yes
fi
;; ;;
debian) debian)
if test $DISTRO_MAJMIN_VERSION -lt 1200; then if test $DISTRO_MAJMIN_VERSION -lt 1200; then
# we need sqlite3 >= 3.7.7 # we need sqlite3 >= 3.7.7
installRemoteModule_sqlite=no installRemoteModule_sqlite=no
fi 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 esac
if test $(compareVersions "$installRemoteModule_version" 6.0.0) -ge 0; then if test $(compareVersions "$installRemoteModule_version" 6.0.0) -ge 0; then
@ -4102,7 +4123,7 @@ installRemoteModule() {
# enable swoole thread support (need php zts support)? # enable swoole thread support (need php zts support)?
addConfigureOption enable-swoole-thread $installRemoteModule_zts addConfigureOption enable-swoole-thread $installRemoteModule_zts
# enable iouring for file async support? # 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 elif test $(compareVersions "$installRemoteModule_version" 5.1.0) -ge 0; then
# enable sockets supports? # enable sockets supports?
addConfigureOption enable-sockets $installRemoteModule_sockets addConfigureOption enable-sockets $installRemoteModule_sockets