mirror of
https://github.com/danog/docker-php-extension-installer.git
synced 2024-12-11 17:09:51 +01:00
Update configuration options for mongo and swoole
Test: mongo, swoole
This commit is contained in:
parent
bba413a175
commit
6d90a6ea5e
@ -37,9 +37,13 @@ setDistro() {
|
|||||||
DISTRO_MAJMIN_VERSION="$(echo "$DISTRO_VERSION_NUMBER" | awk -F. '{print $1*100+$2}')"
|
DISTRO_MAJMIN_VERSION="$(echo "$DISTRO_VERSION_NUMBER" | awk -F. '{print $1*100+$2}')"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the PHP_MAJMIN_VERSION variable containing the PHP Major-Minor version as an integer value, in format MMmm (example: 506 for PHP 5.6.15)
|
# Set:
|
||||||
setPHPMajorMinor() {
|
# - PHP_MAJMIN_VERSION: Major-Minor version, format MMmm (example 800 for PHP 8.0.1)
|
||||||
PHP_MAJMIN_VERSION=$(php-config --version | awk -F. '{print $1*100+$2}')
|
# - PHP_MAJMINPAT_VERSION: Major-Minor-Patch version, format MMmmpp (example 80001 for PHP 8.0.1) variables containing integers value
|
||||||
|
setPHPVersionVariables() {
|
||||||
|
setPHPVersionVariables_textual="$(php-config --version)"
|
||||||
|
PHP_MAJMIN_VERSION=$(printf '%s' "$setPHPVersionVariables_textual" | awk -F. '{print $1*100+$2}')
|
||||||
|
PHP_MAJMINPAT_VERSION=$(printf '%s' "$setPHPVersionVariables_textual" | awk -F. '{print $1*10000+$2*100+$3}')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get the directory containing the compiled PHP extensions
|
# Get the directory containing the compiled PHP extensions
|
||||||
@ -739,7 +743,7 @@ buildRequiredPackageLists() {
|
|||||||
;;
|
;;
|
||||||
swoole@alpine)
|
swoole@alpine)
|
||||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent postgresql-libs libstdc++"
|
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent postgresql-libs libstdc++"
|
||||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile postgresql-dev linux-headers"
|
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile curl-dev postgresql-dev linux-headers"
|
||||||
case "$DISTRO_VERSION" in
|
case "$DISTRO_VERSION" in
|
||||||
alpine@3.7 | alpine@3.8)
|
alpine@3.7 | alpine@3.8)
|
||||||
# I can assure you I tried very hard to enable openssl in these Alpine versions...
|
# I can assure you I tried very hard to enable openssl in these Alpine versions...
|
||||||
@ -751,8 +755,8 @@ buildRequiredPackageLists() {
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
swoole@debian)
|
swoole@debian)
|
||||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libpq5"
|
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls libpq5"
|
||||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev libpq-dev"
|
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev libcurl4-gnutls-dev libpq-dev"
|
||||||
;;
|
;;
|
||||||
sybase_ct@alpine)
|
sybase_ct@alpine)
|
||||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetds"
|
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetds"
|
||||||
@ -1528,8 +1532,10 @@ installRemoteModule() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
mongo)
|
mongo)
|
||||||
# Build with Cyrus SASL (MongoDB Enterprise Authentication) support?
|
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" '1.5.0') -ge 0; then
|
||||||
addConfigureOption '-with-mongo-sasl' 'yes'
|
# Build with Cyrus SASL (MongoDB Enterprise Authentication) support?
|
||||||
|
addConfigureOption '-with-mongo-sasl' 'yes'
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
mongodb)
|
mongodb)
|
||||||
if test -z "$installRemoteModule_version"; then
|
if test -z "$installRemoteModule_version"; then
|
||||||
@ -1750,7 +1756,25 @@ installRemoteModule() {
|
|||||||
installRemoteModule_openssl=yes
|
installRemoteModule_openssl=yes
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 4.4.0) -ge 0; then
|
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 4.6.1) -ge 0; then
|
||||||
|
# enable sockets supports?
|
||||||
|
addConfigureOption enable-sockets $installRemoteModule_sockets
|
||||||
|
# enable openssl support?
|
||||||
|
addConfigureOption enable-openssl $installRemoteModule_openssl
|
||||||
|
# enable http2 support?
|
||||||
|
addConfigureOption enable-http2 yes
|
||||||
|
# enable mysqlnd support?
|
||||||
|
addConfigureOption enable-mysqlnd yes
|
||||||
|
# enable json support?
|
||||||
|
addConfigureOption enable-swoole-json yes
|
||||||
|
# enable curl support?
|
||||||
|
if test $PHP_MAJMINPAT_VERSION -ne 80000; then
|
||||||
|
addConfigureOption enable-swoole-curl yes
|
||||||
|
else
|
||||||
|
# https://github.com/swoole/swoole-src/issues/3977#issuecomment-754755521
|
||||||
|
addConfigureOption enable-swoole-curl no
|
||||||
|
fi
|
||||||
|
elif test $(compareVersions "$installRemoteModule_version" 4.4.0) -ge 0; then
|
||||||
# enable sockets supports?
|
# enable sockets supports?
|
||||||
addConfigureOption enable-sockets $installRemoteModule_sockets
|
addConfigureOption enable-sockets $installRemoteModule_sockets
|
||||||
# enable openssl support?
|
# enable openssl support?
|
||||||
@ -2211,7 +2235,7 @@ mkdir -p /tmp/pickle.tmp
|
|||||||
IPE_ERRFLAG_FILE="$(mktemp -p /tmp/src)"
|
IPE_ERRFLAG_FILE="$(mktemp -p /tmp/src)"
|
||||||
CONFIGURE_FILE=/tmp/configure-options
|
CONFIGURE_FILE=/tmp/configure-options
|
||||||
setDistro
|
setDistro
|
||||||
setPHPMajorMinor
|
setPHPVersionVariables
|
||||||
setPHPPreinstalledModules
|
setPHPPreinstalledModules
|
||||||
case "$PHP_MAJMIN_VERSION" in
|
case "$PHP_MAJMIN_VERSION" in
|
||||||
505 | 506 | 700 | 701 | 702 | 703 | 704 | 800) ;;
|
505 | 506 | 700 | 701 | 702 | 703 | 704 | 800) ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user