Skip to content

Commit

Permalink
Add support for swoole 6.0.0 (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati authored Jun 24, 2024
1 parent fafb433 commit 7f57a1c
Showing 1 changed file with 85 additions and 6 deletions.
91 changes: 85 additions & 6 deletions install-php-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,9 @@ buildRequiredPackageLists() {
if test $PHP_MAJMIN_VERSION -ge 702; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent c-ares"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile c-ares-dev"
if test $PHP_MAJMIN_VERSION -ge 801; then
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile sqlite-dev"
fi
fi
;;
swoole@debian)
Expand All @@ -1362,10 +1365,13 @@ buildRequiredPackageLists() {
if test $PHP_MAJMIN_VERSION -ge 702; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libc-ares2"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libc-ares-dev"
fi
if test $PHP_MAJMIN_VERSION -ge 800; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libbrotli1"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev libbrotli-dev"
if test $PHP_MAJMIN_VERSION -ge 800; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libbrotli1"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev libbrotli-dev"
if test $PHP_MAJMIN_VERSION -ge 801; then
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libsqlite3-dev"
fi
fi
fi
;;
sybase_ct@alpine)
Expand Down Expand Up @@ -3827,6 +3833,13 @@ installRemoteModule() {
;;
esac
fi
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 800; then
installRemoteModule_version=5.1.3
else
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" stable)"
fi
fi
else
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
fi
Expand All @@ -3838,7 +3851,7 @@ installRemoteModule() {
installRemoteModule_openssl=yes
case "$DISTRO_VERSION" in
[email protected] | [email protected])
if test -n "$installRemoteModule_version" && test $(compareVersions "$installRemoteModule_version" 4.6.0) -lt 0; then
if test $(compareVersions "$installRemoteModule_version" 4.6.0) -lt 0; then
# see https://github.com/swoole/swoole-src/issues/3934
installRemoteModule_openssl=no
fi
Expand All @@ -3850,7 +3863,73 @@ installRemoteModule() {
else
installRemoteModule_curl=yes
fi
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 5.0.1) -ge 0; then
if test $PHP_THREADSAFE -eq 1; then
installRemoteModule_zts=yes
else
installRemoteModule_zts=no
fi
installRemoteModule_sqlite=yes
case "$DISTRO" in
alpine)
if test $DISTRO_MAJMIN_VERSION -lt 317; then
# we need sqlite3 >= 3.7.7
installRemoteModule_sqlite=no
fi
;;
debian)
if test $DISTRO_MAJMIN_VERSION -lt 1200; then
# we need sqlite3 >= 3.7.7
installRemoteModule_sqlite=no
fi
;;
esac
if test $(compareVersions "$installRemoteModule_version" 6.0.0) -ge 0; then
# enable sockets supports?
addConfigureOption enable-sockets $installRemoteModule_sockets
# enable openssl support?
addConfigureOption enable-openssl $installRemoteModule_openssl
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
# enable curl support?
addConfigureOption enable-swoole-curl $installRemoteModule_curl
# enable cares support?
addConfigureOption enable-cares yes
# enable brotli support?
addConfigureOption enable-brotli yes
# enable PostgreSQL database support?
addConfigureOption enable-swoole-pgsql yes
# enable ODBC database support?
addConfigureOption with-swoole-odbc no
# enable Oracle database support?
addConfigureOption with-swoole-oracle no
# enable Sqlite database support?
addConfigureOption enable-swoole-sqlite $installRemoteModule_sqlite
# enable swoole thread support (need php zts support)?
addConfigureOption enable-swoole-thread $installRemoteModule_zts
# enable iouring for file async support?
addConfigureOption enable-iouring yes
elif test $(compareVersions "$installRemoteModule_version" 5.1.0) -ge 0; then
# enable sockets supports?
addConfigureOption enable-sockets $installRemoteModule_sockets
# enable openssl support?
addConfigureOption enable-openssl $installRemoteModule_openssl
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
# enable curl support?
addConfigureOption enable-swoole-curl $installRemoteModule_curl
# enable cares support?
addConfigureOption enable-cares yes
# enable brotli support?
addConfigureOption enable-brotli yes
# enable PostgreSQL database support?
addConfigureOption enable-swoole-pgsql yes
# enable ODBC database support?
addConfigureOption with-swoole-odbc no
# enable Oracle database support?
addConfigureOption with-swoole-oracle no
# enable Sqlite database support?
addConfigureOption enable-swoole-sqlite $installRemoteModule_sqlite
elif test $(compareVersions "$installRemoteModule_version" 5.0.1) -ge 0; then
# enable sockets supports?
addConfigureOption enable-sockets $installRemoteModule_sockets
# enable openssl support?
Expand Down

0 comments on commit 7f57a1c

Please sign in to comment.