feat: 更新 install-php-extensions 脚本 (#1406)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@ if ! which docker-php-ext-configure >/dev/null || ! which docker-php-ext-enable
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IPE_VERSION=master
|
||||
IPE_VERSION=2.2.14
|
||||
|
||||
StandWithUkraine() {
|
||||
if test -t 1 && ! grep -Eq '^VERSION=.*jessie' /etc/os-release; then
|
||||
@@ -357,74 +357,81 @@ getModuleSourceCodePath() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Get the wanted PHP module version, resolving it if it starts with '^'
|
||||
# Get the actual PHP module version, resolving it if it starts with '^'
|
||||
#
|
||||
# Arguments:
|
||||
# $1: the name of the module to be normalized
|
||||
# $1: the name of the module
|
||||
# $2: the wanted version (optional, if omitted we'll use getWantedPHPModuleVersion)
|
||||
#
|
||||
# Output:
|
||||
# The version to be used
|
||||
resolveWantedPHPModuleVersion() {
|
||||
resolveWantedPHPModuleVersion_raw="$(getWantedPHPModuleVersion "$1")"
|
||||
resolveWantedPHPModuleVersion_afterCaret="${resolveWantedPHPModuleVersion_raw#^}"
|
||||
if test "$resolveWantedPHPModuleVersion_raw" = "$resolveWantedPHPModuleVersion_afterCaret"; then
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_raw"
|
||||
resolvePHPModuleVersion() {
|
||||
resolvePHPModuleVersion_module="$1"
|
||||
if test $# -lt 2; then
|
||||
resolvePHPModuleVersion_raw="$(getWantedPHPModuleVersion "$installRemoteModule_module")"
|
||||
else
|
||||
resolvePHPModuleVersion_raw="$2"
|
||||
fi
|
||||
resolvePHPModuleVersion_afterCaret="${resolvePHPModuleVersion_raw#^}"
|
||||
if test "$resolvePHPModuleVersion_raw" = "$resolvePHPModuleVersion_afterCaret"; then
|
||||
printf '%s' "$resolvePHPModuleVersion_raw"
|
||||
return
|
||||
fi
|
||||
case "$resolveWantedPHPModuleVersion_afterCaret" in
|
||||
case "$resolvePHPModuleVersion_afterCaret" in
|
||||
?*@snapshot | ?*@devel | ?*@alpha | ?*@beta | ?*@stable)
|
||||
resolveWantedPHPModuleVersion_wantedStability="${resolveWantedPHPModuleVersion_afterCaret##*@}"
|
||||
resolveWantedPHPModuleVersion_wantedVersion="${resolveWantedPHPModuleVersion_afterCaret%@*}"
|
||||
resolvePHPModuleVersion_wantedStability="${resolvePHPModuleVersion_afterCaret##*@}"
|
||||
resolvePHPModuleVersion_wantedVersion="${resolvePHPModuleVersion_afterCaret%@*}"
|
||||
;;
|
||||
*)
|
||||
resolveWantedPHPModuleVersion_wantedStability=''
|
||||
resolveWantedPHPModuleVersion_wantedVersion="$resolveWantedPHPModuleVersion_afterCaret"
|
||||
resolvePHPModuleVersion_wantedStability=''
|
||||
resolvePHPModuleVersion_wantedVersion="$resolvePHPModuleVersion_afterCaret"
|
||||
;;
|
||||
esac
|
||||
resolveWantedPHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$1/allreleases.xml")"
|
||||
resolvePHPModuleVersion_peclModule="$(getPeclModuleName "$resolvePHPModuleVersion_module")"
|
||||
resolvePHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$resolvePHPModuleVersion_peclModule/allreleases.xml")"
|
||||
# remove line endings, collapse spaces
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')"
|
||||
# one line per release (eg <r><v>1.2.3</v><s>stable</s></r>)
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed -r 's#<r#\n<r#g')"
|
||||
if test -n "$resolveWantedPHPModuleVersion_wantedStability"; then
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed -r 's#<r#\n<r#g')"
|
||||
if test -n "$resolvePHPModuleVersion_wantedStability"; then
|
||||
# keep the lines with the wanted stability
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | grep "<s>$resolveWantedPHPModuleVersion_wantedStability</s>")"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | grep "<s>$resolvePHPModuleVersion_wantedStability</s>")"
|
||||
fi
|
||||
# remove everything's up to '<v>' (included)
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed 's#^.*<v>##')"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed 's#^.*<v>##')"
|
||||
# keep just the versions
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | cut -d'<' -f1)"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | cut -d'<' -f1)"
|
||||
resetIFS
|
||||
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
|
||||
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
|
||||
if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion.}"; then
|
||||
for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do
|
||||
resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}"
|
||||
if test "$resolvePHPModuleVersion_version" != "${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion.}"; then
|
||||
# Example: looking for 1.0, found 1.0.1
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_version"
|
||||
printf '%s' "$resolvePHPModuleVersion_version"
|
||||
return
|
||||
fi
|
||||
done
|
||||
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
|
||||
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
|
||||
if test "$resolveWantedPHPModuleVersion_version" = "$resolveWantedPHPModuleVersion_suffix"; then
|
||||
for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do
|
||||
resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}"
|
||||
if test "$resolvePHPModuleVersion_version" = "$resolvePHPModuleVersion_suffix"; then
|
||||
continue
|
||||
fi
|
||||
if test -z "$resolveWantedPHPModuleVersion_suffix"; then
|
||||
if test -z "$resolvePHPModuleVersion_suffix"; then
|
||||
# Example: looking for 1.0, found exactly it
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_version"
|
||||
printf '%s' "$resolvePHPModuleVersion_version"
|
||||
return
|
||||
fi
|
||||
case "$resolveWantedPHPModuleVersion_suffix" in
|
||||
case "$resolvePHPModuleVersion_suffix" in
|
||||
[0-9])
|
||||
# Example: looking for 1.1, but this is 1.10
|
||||
;;
|
||||
*)
|
||||
# Example: looking for 1.1, this is 1.1rc1
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_version"
|
||||
printf '%s' "$resolvePHPModuleVersion_version"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
done
|
||||
printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$1" "$resolveWantedPHPModuleVersion_raw" "$resolveWantedPHPModuleVersion_versions" >&2
|
||||
printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$resolvePHPModuleVersion_module" "$resolvePHPModuleVersion_raw" "$resolvePHPModuleVersion_versions" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -443,7 +450,8 @@ resolvePeclStabilityVersion() {
|
||||
return
|
||||
;;
|
||||
esac
|
||||
peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$1/$2.txt"
|
||||
resolvePeclStabilityVersion_peclModule="$(getPeclModuleName "$1")"
|
||||
peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$resolvePeclStabilityVersion_peclModule/$2.txt"
|
||||
if ! peclStabilityFlagToVersion_result="$(curl -sSLf "$peclStabilityFlagToVersion_url")"; then
|
||||
peclStabilityFlagToVersion_result=''
|
||||
fi
|
||||
@@ -671,7 +679,7 @@ buildRequiredPackageLists() {
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $PHPIZE_DEPS"
|
||||
fi
|
||||
if test -z "$(apk info 2>/dev/null | grep -E ^libssl)"; then
|
||||
buildRequiredPackageLists_libssl='^libssl[0-9]+(\.[0-9]+)*$'
|
||||
buildRequiredPackageLists_libssl="$(apk search | grep -E '^libssl[0-9]' | head -1 | cut -d- -f1)"
|
||||
elif test -z "$(apk info 2>/dev/null | grep -E '^libressl.*-libtls')" && test -z "$(apk info 2>/dev/null | grep -E '^libressl.*-libssl')" && test -z "$(apk info 2>/dev/null | grep -E '^libretls-')"; then
|
||||
buildRequiredPackageLists_libssl=$(apk search -q libressl*-libtls)
|
||||
else
|
||||
@@ -811,6 +819,12 @@ buildRequiredPackageLists() {
|
||||
ffi@debian)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libffi-dev"
|
||||
;;
|
||||
ftp@alpine)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
|
||||
;;
|
||||
ftp@debian)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
|
||||
;;
|
||||
gd@alpine)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetype libjpeg-turbo libpng libxpm"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev"
|
||||
@@ -848,7 +862,10 @@ buildRequiredPackageLists() {
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libwebp[0-9]+$"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libwebp-dev"
|
||||
if test $PHP_MAJMIN_VERSION -ge 801; then
|
||||
if ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then
|
||||
if test $DISTRO_VERSION_NUMBER -ge 12; then
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libavif[0-9]+$ ^libaom[0-9]+$ ^libdav1d[0-9]+$"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libavif-dev libaom-dev libdav1d-dev"
|
||||
elif ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then
|
||||
case "${IPE_GD_WITHOUTAVIF:-}" in
|
||||
1 | y* | Y*) ;;
|
||||
*)
|
||||
@@ -1297,6 +1314,9 @@ buildRequiredPackageLists() {
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libcurl4-gnutls-dev libxml2-dev"
|
||||
;;
|
||||
sourceguardian@alpine)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent eudev-libs"
|
||||
;;
|
||||
spx@alpine)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev"
|
||||
;;
|
||||
@@ -1438,6 +1458,14 @@ buildRequiredPackageLists() {
|
||||
wddx@debian)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
|
||||
;;
|
||||
wikidiff2@alpine)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git"
|
||||
;;
|
||||
wikidiff2@debian)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libthai0"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git libthai-dev"
|
||||
;;
|
||||
xdebug@alpine)
|
||||
if test $PHP_MAJMIN_VERSION -ge 800; then
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile linux-headers"
|
||||
@@ -1985,11 +2013,11 @@ installOracleInstantClient() {
|
||||
mv "$installOracleInstantClient_src" "$ORACLE_INSTANTCLIENT_LIBPATH"
|
||||
echo 'done.'
|
||||
fi
|
||||
if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then
|
||||
if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk" && ! test -L "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then
|
||||
printf 'Downloading Oracle Instant SDK v%s... ' "$installOracleInstantClient_version"
|
||||
installOracleInstantClient_src="$(getPackageSource $installOracleInstantClient_sdk)"
|
||||
ln -sf "$installOracleInstantClient_src/sdk" "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"
|
||||
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS '$ORACLE_INSTANTCLIENT_LIBPATH/sdk'"
|
||||
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS $ORACLE_INSTANTCLIENT_LIBPATH/sdk"
|
||||
echo 'done.'
|
||||
fi
|
||||
case "$DISTRO" in
|
||||
@@ -2039,7 +2067,7 @@ installMicrosoftSqlServerODBC() {
|
||||
alpine)
|
||||
rm -rf /tmp/src/msodbcsql.apk
|
||||
if test $PHP_MAJMIN_VERSION -le 703; then
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.9.1.1-1_amd64.apk
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.10.6.1-1_amd64.apk
|
||||
else
|
||||
case $(uname -m) in
|
||||
aarch64 | arm64 | armv8)
|
||||
@@ -2049,7 +2077,7 @@ installMicrosoftSqlServerODBC() {
|
||||
installMicrosoftSqlServerODBC_arch=amd64
|
||||
;;
|
||||
esac
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.1.1-1_$installMicrosoftSqlServerODBC_arch.apk
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.3.1-1_$installMicrosoftSqlServerODBC_arch.apk
|
||||
fi
|
||||
printf '\n' | apk add --allow-untrusted /tmp/src/msodbcsql.apk
|
||||
rm -rf /tmp/src/msodbcsql.apk
|
||||
@@ -2088,7 +2116,7 @@ installMicrosoftSqlServerODBC() {
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibaomInstalled() {
|
||||
if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so; then
|
||||
if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so && ! test -f /usr/lib/x86_64*/libaom.so; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/aom/aom_codec.h && ! test -f /usr/include/aom/aom_codec.h; then
|
||||
@@ -2100,7 +2128,18 @@ isLibaomInstalled() {
|
||||
# Install libaom
|
||||
installLibaom() {
|
||||
printf 'Installing libaom\n'
|
||||
installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v3.3.0.tar.gz)"
|
||||
installLibaom_version=3.8.1
|
||||
case "$DISTRO_VERSION" in
|
||||
debian@10)
|
||||
case $(uname -m) in
|
||||
aarch* | arm*)
|
||||
#see https://bugs.chromium.org/p/aomedia/issues/detail?id=3543
|
||||
installLibaom_version=3.5.0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v$installLibaom_version.tar.gz)"
|
||||
mkdir -- "$installLibaom_dir/my.build"
|
||||
cd -- "$installLibaom_dir/my.build"
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 -DCMAKE_INSTALL_LIBDIR:PATH=lib ..
|
||||
@@ -2127,7 +2166,7 @@ isLibdav1dInstalled() {
|
||||
# Install libdav1d
|
||||
installLibdav1d() {
|
||||
printf 'Installing libdav1d\n'
|
||||
installLibdav1d_dir="$(getPackageSource https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz)"
|
||||
installLibdav1d_dir="$(getPackageSource https://github.com/videolan/dav1d/archive/refs/tags/1.3.0.tar.gz)"
|
||||
mkdir -- "$installLibdav1d_dir/build"
|
||||
cd -- "$installLibdav1d_dir/build"
|
||||
meson --buildtype release -Dprefix=/usr ..
|
||||
@@ -2145,7 +2184,7 @@ installLibdav1d() {
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibyuvInstalled() {
|
||||
if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so; then
|
||||
if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so.*; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/libyuv.h && ! test -f /usr/include/libyuv.h; then
|
||||
@@ -2157,7 +2196,7 @@ isLibyuvInstalled() {
|
||||
# Install libyuv
|
||||
installLibyuv() {
|
||||
printf 'Installing libyuv\n'
|
||||
installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/25d0a5110be796eef47004412baf43333d9ecf26.tar.gz)"
|
||||
installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/d359a9f922af840b043535d43cf9d38b220d102e.tar.gz)"
|
||||
mkdir -- "$installLibyuv_dir/build"
|
||||
cd -- "$installLibyuv_dir/build"
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -B. ..
|
||||
@@ -2183,7 +2222,7 @@ isLibavifInstalled() {
|
||||
# Install libavif
|
||||
installLibavif() {
|
||||
printf 'Installing libavif\n'
|
||||
installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v0.9.3)"
|
||||
installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v1.0.3)"
|
||||
mkdir -- "$installLibavif_dir/build"
|
||||
cd -- "$installLibavif_dir/build"
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DAVIF_CODEC_AOM=ON -DCMAKE_INSTALL_LIBDIR:PATH=lib
|
||||
@@ -2201,6 +2240,59 @@ installLibMPDec() {
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
# Check if libdatrie is installed
|
||||
#
|
||||
# Return:
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibDatrieInstalled() {
|
||||
if ! test -f /usr/local/lib/libdatrie.so && ! test -f /usr/lib/libdatrie.so && ! test -f /usr/lib/x86_64*/libdatrie.so; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/datrie/trie.h && ! test -f /usr/include/datrie/trie.h; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Install libdatrie
|
||||
installLibDatrie() {
|
||||
printf 'Installing libdatrie\n'
|
||||
installLibDatrie_src="$(getPackageSource https://github.com/tlwg/libdatrie/releases/download/v0.2.13/libdatrie-0.2.13.tar.xz)"
|
||||
cd -- "$installLibDatrie_src"
|
||||
./configure
|
||||
make -j$(getProcessorCount)
|
||||
make install
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
# Check if libdatrie is installed
|
||||
#
|
||||
# Return:
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibThaiInstalled() {
|
||||
return 1
|
||||
if ! test -f /usr/local/lib/libthai.so && ! test -f /usr/lib/libthai.so && ! test -f /usr/lib/x86_64*/libthai.so; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/thai/thailib.h && ! test -f /usr/include/thai/thailib.h; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Install libdatrie
|
||||
installLibThai() {
|
||||
printf 'Installing libthai\n'
|
||||
installLibThai_src="$(getPackageSource https://github.com/tlwg/libthai/releases/download/v0.1.29/libthai-0.1.29.tar.xz)"
|
||||
cd -- "$installLibThai_src"
|
||||
./configure
|
||||
make -j$(getProcessorCount)
|
||||
make install
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
# Install Composer
|
||||
installComposer() {
|
||||
installComposer_version="$(getWantedPHPModuleVersion @composer)"
|
||||
@@ -2336,6 +2428,37 @@ installCargo() {
|
||||
fi
|
||||
}
|
||||
|
||||
installNewRelic() {
|
||||
printf '# Installing newrelic\n'
|
||||
installNewRelic_search='\bnewrelic-php[0-9.]*-[0-9]+(\.[0-9]+)*-linux'
|
||||
case "$DISTRO" in
|
||||
alpine)
|
||||
installNewRelic_search="$installNewRelic_search-musl"
|
||||
;;
|
||||
esac
|
||||
installNewRelic_file="$(curl -sSLf -o- https://download.newrelic.com/php_agent/release/ | sed -E 's/<[^>]*>//g' | grep -Eo "$installNewRelic_search.tar.gz" | sort | head -1)"
|
||||
installNewRelic_url="https://download.newrelic.com/php_agent/release/$installNewRelic_file"
|
||||
installNewRelic_src="$(getPackageSource "$installNewRelic_url")"
|
||||
cd -- "$installNewRelic_src"
|
||||
NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 ./newrelic-install install
|
||||
case "${IPE_NEWRELIC_DAEMON:-}" in
|
||||
1 | y* | Y*)
|
||||
NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 ./newrelic-install install_daemon
|
||||
;;
|
||||
esac
|
||||
cd - >/dev/null
|
||||
cat <<EOT
|
||||
NewRelic has been installed from $installNewRelic_url
|
||||
You may need to:
|
||||
- change the owner/permissions of /var/log/newrelic
|
||||
(for example: chown -R www-data:www-data /var/log/newrelic)
|
||||
- set the value of the newrelic.license configuration key in
|
||||
$PHP_INI_DIR/conf.d/newrelic.ini
|
||||
(if you didn't set the NR_INSTALL_KEY environment variable)
|
||||
|
||||
EOT
|
||||
}
|
||||
|
||||
# Install a bundled PHP module given its handle
|
||||
#
|
||||
# Arguments:
|
||||
@@ -2401,6 +2524,9 @@ EOF
|
||||
cd - >/dev/null
|
||||
fi
|
||||
;;
|
||||
ftp)
|
||||
docker-php-ext-configure ftp --with-openssl-dir=/usr
|
||||
;;
|
||||
gd)
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --with-vpx-dir
|
||||
@@ -2418,6 +2544,11 @@ EOF
|
||||
installBundledModule_tmp=1
|
||||
fi
|
||||
;;
|
||||
debian)
|
||||
if test $DISTRO_VERSION_NUMBER -ge 12; then
|
||||
installBundledModule_tmp=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test $installBundledModule_tmp -eq 0; then
|
||||
case "${IPE_GD_WITHOUTAVIF:-}" in
|
||||
@@ -2570,13 +2701,18 @@ EOF
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
php -r 'return;' >/dev/null 2>/dev/null || true
|
||||
installBundledModule_errAfter="$(php -r 'return;' 2>&1 || true)"
|
||||
if test "$installBundledModule_errAfter" != "$installBundledModule_errBefore"; then
|
||||
printf 'PHP has problems after installing the "%s" extension:\n%s\n' "$1" "$installBundledModule_errAfter" >&2
|
||||
rm "$PHP_INI_DIR/conf.d/docker-php-ext-$1.ini" || true
|
||||
return 1
|
||||
fi
|
||||
case "${IPE_SKIP_CHECK:-}" in
|
||||
1 | y* | Y*) ;;
|
||||
*)
|
||||
php -r 'return;' >/dev/null 2>/dev/null || true
|
||||
installBundledModule_errAfter="$(php -r 'return;' 2>&1 || true)"
|
||||
if test "$installBundledModule_errAfter" != "$installBundledModule_errBefore"; then
|
||||
printf 'PHP has problems after installing the "%s" extension:\n%s\n' "$1" "$installBundledModule_errAfter" >&2
|
||||
rm "$PHP_INI_DIR/conf.d/docker-php-ext-$1.ini" || true
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Fetch a tar.gz file, extract it and returns the path of the extracted folder.
|
||||
@@ -2623,7 +2759,7 @@ getPackageSource() {
|
||||
installRemoteModule() {
|
||||
installRemoteModule_module="$1"
|
||||
printf '### INSTALLING REMOTE MODULE %s ###\n' "$installRemoteModule_module"
|
||||
installRemoteModule_version="$(resolveWantedPHPModuleVersion "$installRemoteModule_module")"
|
||||
installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module")"
|
||||
installRemoteModule_path="$(getModuleSourceCodePath "$installRemoteModule_module")"
|
||||
rm -rf "$CONFIGURE_FILE"
|
||||
installRemoteModule_manuallyInstalled=0
|
||||
@@ -2716,7 +2852,7 @@ installRemoteModule() {
|
||||
if test $(compareVersions "$(cmake --version | head -n1 | sed -E 's/^.* //')" '3.7') -lt 0; then
|
||||
installRemoteModule_tmp=0.29.0
|
||||
else
|
||||
installRemoteModule_tmp=0.30.3
|
||||
installRemoteModule_tmp=0.31.0
|
||||
fi
|
||||
cd "$(getPackageSource https://github.com/commonmark/cmark/archive/$installRemoteModule_tmp.tar.gz)"
|
||||
make -s -j$(getProcessorCount) cmake_build
|
||||
@@ -2745,9 +2881,12 @@ installRemoteModule() {
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -lt 700; then
|
||||
installRemoteModule_version=0.75.0
|
||||
else
|
||||
installCargo
|
||||
fi
|
||||
else
|
||||
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
|
||||
fi
|
||||
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 0.75.0) -ge 0; then
|
||||
installCargo
|
||||
fi
|
||||
;;
|
||||
decimal)
|
||||
@@ -2949,6 +3088,12 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
imap)
|
||||
# Include Kerberos Support
|
||||
addConfigureOption with-kerberos yes
|
||||
# Include SSL Support
|
||||
addConfigureOption with-imap-ssl yes
|
||||
;;
|
||||
inotify)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
@@ -3161,6 +3306,10 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
newrelic)
|
||||
installNewRelic
|
||||
installRemoteModule_manuallyInstalled=2
|
||||
;;
|
||||
oauth)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
@@ -3168,6 +3317,14 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
oci8 | pdo_oci)
|
||||
installOracleInstantClient
|
||||
if test "$installRemoteModule_module" = oci8; then
|
||||
addConfigureOption with-oci8 "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH"
|
||||
elif test "$installRemoteModule_module" = pdo_oci; then
|
||||
addConfigureOption with-pdo-oci "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH"
|
||||
fi
|
||||
;;
|
||||
opencensus)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
installRemoteModule_version=alpha
|
||||
@@ -3274,11 +3431,6 @@ installRemoteModule() {
|
||||
addConfigureOption enable-swoole-curl yes
|
||||
fi
|
||||
;;
|
||||
opentelemetry)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
installRemoteModule_version=beta
|
||||
fi
|
||||
;;
|
||||
parallel)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 701; then
|
||||
@@ -3333,6 +3485,8 @@ installRemoteModule() {
|
||||
installRemoteModule_version=3.12.4
|
||||
elif test $PHP_MAJMIN_VERSION -lt 800; then
|
||||
installRemoteModule_version=3.24.4
|
||||
elif test $PHP_MAJMIN_VERSION -lt 801; then
|
||||
installRemoteModule_version=3.25.3
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@@ -3478,8 +3632,8 @@ installRemoteModule() {
|
||||
;;
|
||||
saxon)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
installRemoteModule_version='11.6'
|
||||
if test $PHP_MAJMIN_VERSION -ge 800; then
|
||||
installRemoteModule_version='12.4.2'
|
||||
else
|
||||
installRemoteModule_version='12.3'
|
||||
fi
|
||||
@@ -3506,9 +3660,7 @@ installRemoteModule() {
|
||||
fi
|
||||
ldconfig || true
|
||||
fi
|
||||
set -x
|
||||
cd "$installRemoteModule_dir/Saxon.C.API"
|
||||
exit
|
||||
phpize
|
||||
./configure --enable-saxon
|
||||
make -j$(getProcessorCount) install
|
||||
@@ -3586,7 +3738,7 @@ installRemoteModule() {
|
||||
spx)
|
||||
if test -z "$installRemoteModule_path"; then
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
installRemoteModule_version=v0.4.14
|
||||
installRemoteModule_version=v0.4.15
|
||||
fi
|
||||
if test "${installRemoteModule_version%.*}" = "$installRemoteModule_version"; then
|
||||
installRemoteModule_displayVersion="$installRemoteModule_version"
|
||||
@@ -3618,6 +3770,8 @@ installRemoteModule() {
|
||||
installRemoteModule_version=5.9.0
|
||||
elif test $PHP_MAJMIN_VERSION -le 704; then
|
||||
installRemoteModule_version=5.10.1
|
||||
elif test $PHP_MAJMIN_VERSION -le 800; then
|
||||
installRemoteModule_version=5.11.1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@@ -3654,6 +3808,9 @@ installRemoteModule() {
|
||||
installRemoteModule_version=4.5.10
|
||||
elif test $PHP_MAJMIN_VERSION -le 704; then
|
||||
installRemoteModule_version=4.8.11
|
||||
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')"
|
||||
fi
|
||||
else
|
||||
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
|
||||
@@ -3871,7 +4028,7 @@ installRemoteModule() {
|
||||
installRemoteModule_architecture=alpine-arm64
|
||||
;;
|
||||
*)
|
||||
installRemoteModule_architecture=alpine
|
||||
installRemoteModule_architecture=alpine-x86_64
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -3887,6 +4044,10 @@ installRemoteModule() {
|
||||
;;
|
||||
esac
|
||||
installRemoteModule_url="$(curl -sSLf -o - https://tideways.com/profiler/downloads | grep -Eo "\"[^\"]+/tideways-php-([0-9]+\.[0-9]+\.[0-9]+)-$installRemoteModule_architecture.tar.gz\"" | cut -d'"' -f2)"
|
||||
if test -z "$installRemoteModule_url"; then
|
||||
echo 'Failed to find the tideways tarball to be downloaded'
|
||||
exit 1
|
||||
fi
|
||||
printf 'Downloading tideways from %s\n' "$installRemoteModule_url"
|
||||
installRemoteModule_src="$(getPackageSource $installRemoteModule_url)"
|
||||
if test -d "$installRemoteModule_src/dist"; then
|
||||
@@ -3953,6 +4114,33 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
wikidiff2)
|
||||
case "$DISTRO" in
|
||||
alpine)
|
||||
if ! isLibDatrieInstalled; then
|
||||
installLibDatrie
|
||||
fi
|
||||
if ! isLibThaiInstalled; then
|
||||
installLibThai
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 702; then
|
||||
installRemoteModule_version=1.13.0
|
||||
else
|
||||
installRemoteModule_version="$(git -c versionsort.suffix=- ls-remote --tags --refs --quiet --exit-code --sort=version:refname https://github.com/wikimedia/mediawiki-php-wikidiff2.git 'refs/tags/*.*.*' | tail -1 | cut -d/ -f3)"
|
||||
fi
|
||||
fi
|
||||
installRemoteModule_src="$(getPackageSource "https://codeload.github.com/wikimedia/mediawiki-php-wikidiff2/tar.gz/refs/tags/$installRemoteModule_version")"
|
||||
cd -- "$installRemoteModule_src"
|
||||
phpize
|
||||
./configure
|
||||
make -j$(getProcessorCount)
|
||||
make install
|
||||
cd - >/dev/null
|
||||
installRemoteModule_manuallyInstalled=1
|
||||
;;
|
||||
xdebug)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 500; then
|
||||
@@ -4133,8 +4321,15 @@ installRemoteModule() {
|
||||
installPeclPackage "$installRemoteModule_module" "$installRemoteModule_version" "$installRemoteModule_cppflags" "$installRemoteModule_path"
|
||||
fi
|
||||
postProcessModule "$installRemoteModule_module"
|
||||
checkModuleWorking "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
enablePhpExtension "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
if test $installRemoteModule_manuallyInstalled -lt 2; then
|
||||
case "${IPE_SKIP_CHECK:-}" in
|
||||
1 | y* | Y*) ;;
|
||||
*)
|
||||
checkModuleWorking "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
;;
|
||||
esac
|
||||
enablePhpExtension "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if a module/helper may be installed using the pecl archive
|
||||
@@ -4400,7 +4595,7 @@ fixLetsEncrypt() {
|
||||
invokeAptGetUpdate
|
||||
fi
|
||||
printf -- '- installing newer ca-certificates package\n'
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -qqy --no-install-recommends $IPE_APTGET_INSTALLOPTIONS ca-certificates
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -qqy --no-install-recommends ${IPE_APTGET_INSTALLOPTIONS:-} ca-certificates
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -21,7 +21,7 @@ if ! which docker-php-ext-configure >/dev/null || ! which docker-php-ext-enable
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IPE_VERSION=master
|
||||
IPE_VERSION=2.2.14
|
||||
|
||||
StandWithUkraine() {
|
||||
if test -t 1 && ! grep -Eq '^VERSION=.*jessie' /etc/os-release; then
|
||||
@@ -357,74 +357,81 @@ getModuleSourceCodePath() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Get the wanted PHP module version, resolving it if it starts with '^'
|
||||
# Get the actual PHP module version, resolving it if it starts with '^'
|
||||
#
|
||||
# Arguments:
|
||||
# $1: the name of the module to be normalized
|
||||
# $1: the name of the module
|
||||
# $2: the wanted version (optional, if omitted we'll use getWantedPHPModuleVersion)
|
||||
#
|
||||
# Output:
|
||||
# The version to be used
|
||||
resolveWantedPHPModuleVersion() {
|
||||
resolveWantedPHPModuleVersion_raw="$(getWantedPHPModuleVersion "$1")"
|
||||
resolveWantedPHPModuleVersion_afterCaret="${resolveWantedPHPModuleVersion_raw#^}"
|
||||
if test "$resolveWantedPHPModuleVersion_raw" = "$resolveWantedPHPModuleVersion_afterCaret"; then
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_raw"
|
||||
resolvePHPModuleVersion() {
|
||||
resolvePHPModuleVersion_module="$1"
|
||||
if test $# -lt 2; then
|
||||
resolvePHPModuleVersion_raw="$(getWantedPHPModuleVersion "$installRemoteModule_module")"
|
||||
else
|
||||
resolvePHPModuleVersion_raw="$2"
|
||||
fi
|
||||
resolvePHPModuleVersion_afterCaret="${resolvePHPModuleVersion_raw#^}"
|
||||
if test "$resolvePHPModuleVersion_raw" = "$resolvePHPModuleVersion_afterCaret"; then
|
||||
printf '%s' "$resolvePHPModuleVersion_raw"
|
||||
return
|
||||
fi
|
||||
case "$resolveWantedPHPModuleVersion_afterCaret" in
|
||||
case "$resolvePHPModuleVersion_afterCaret" in
|
||||
?*@snapshot | ?*@devel | ?*@alpha | ?*@beta | ?*@stable)
|
||||
resolveWantedPHPModuleVersion_wantedStability="${resolveWantedPHPModuleVersion_afterCaret##*@}"
|
||||
resolveWantedPHPModuleVersion_wantedVersion="${resolveWantedPHPModuleVersion_afterCaret%@*}"
|
||||
resolvePHPModuleVersion_wantedStability="${resolvePHPModuleVersion_afterCaret##*@}"
|
||||
resolvePHPModuleVersion_wantedVersion="${resolvePHPModuleVersion_afterCaret%@*}"
|
||||
;;
|
||||
*)
|
||||
resolveWantedPHPModuleVersion_wantedStability=''
|
||||
resolveWantedPHPModuleVersion_wantedVersion="$resolveWantedPHPModuleVersion_afterCaret"
|
||||
resolvePHPModuleVersion_wantedStability=''
|
||||
resolvePHPModuleVersion_wantedVersion="$resolvePHPModuleVersion_afterCaret"
|
||||
;;
|
||||
esac
|
||||
resolveWantedPHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$1/allreleases.xml")"
|
||||
resolvePHPModuleVersion_peclModule="$(getPeclModuleName "$resolvePHPModuleVersion_module")"
|
||||
resolvePHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$resolvePHPModuleVersion_peclModule/allreleases.xml")"
|
||||
# remove line endings, collapse spaces
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')"
|
||||
# one line per release (eg <r><v>1.2.3</v><s>stable</s></r>)
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed -r 's#<r#\n<r#g')"
|
||||
if test -n "$resolveWantedPHPModuleVersion_wantedStability"; then
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed -r 's#<r#\n<r#g')"
|
||||
if test -n "$resolvePHPModuleVersion_wantedStability"; then
|
||||
# keep the lines with the wanted stability
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | grep "<s>$resolveWantedPHPModuleVersion_wantedStability</s>")"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | grep "<s>$resolvePHPModuleVersion_wantedStability</s>")"
|
||||
fi
|
||||
# remove everything's up to '<v>' (included)
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed 's#^.*<v>##')"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed 's#^.*<v>##')"
|
||||
# keep just the versions
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | cut -d'<' -f1)"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | cut -d'<' -f1)"
|
||||
resetIFS
|
||||
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
|
||||
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
|
||||
if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion.}"; then
|
||||
for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do
|
||||
resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}"
|
||||
if test "$resolvePHPModuleVersion_version" != "${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion.}"; then
|
||||
# Example: looking for 1.0, found 1.0.1
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_version"
|
||||
printf '%s' "$resolvePHPModuleVersion_version"
|
||||
return
|
||||
fi
|
||||
done
|
||||
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
|
||||
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
|
||||
if test "$resolveWantedPHPModuleVersion_version" = "$resolveWantedPHPModuleVersion_suffix"; then
|
||||
for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do
|
||||
resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}"
|
||||
if test "$resolvePHPModuleVersion_version" = "$resolvePHPModuleVersion_suffix"; then
|
||||
continue
|
||||
fi
|
||||
if test -z "$resolveWantedPHPModuleVersion_suffix"; then
|
||||
if test -z "$resolvePHPModuleVersion_suffix"; then
|
||||
# Example: looking for 1.0, found exactly it
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_version"
|
||||
printf '%s' "$resolvePHPModuleVersion_version"
|
||||
return
|
||||
fi
|
||||
case "$resolveWantedPHPModuleVersion_suffix" in
|
||||
case "$resolvePHPModuleVersion_suffix" in
|
||||
[0-9])
|
||||
# Example: looking for 1.1, but this is 1.10
|
||||
;;
|
||||
*)
|
||||
# Example: looking for 1.1, this is 1.1rc1
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_version"
|
||||
printf '%s' "$resolvePHPModuleVersion_version"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
done
|
||||
printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$1" "$resolveWantedPHPModuleVersion_raw" "$resolveWantedPHPModuleVersion_versions" >&2
|
||||
printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$resolvePHPModuleVersion_module" "$resolvePHPModuleVersion_raw" "$resolvePHPModuleVersion_versions" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -443,7 +450,8 @@ resolvePeclStabilityVersion() {
|
||||
return
|
||||
;;
|
||||
esac
|
||||
peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$1/$2.txt"
|
||||
resolvePeclStabilityVersion_peclModule="$(getPeclModuleName "$1")"
|
||||
peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$resolvePeclStabilityVersion_peclModule/$2.txt"
|
||||
if ! peclStabilityFlagToVersion_result="$(curl -sSLf "$peclStabilityFlagToVersion_url")"; then
|
||||
peclStabilityFlagToVersion_result=''
|
||||
fi
|
||||
@@ -671,7 +679,7 @@ buildRequiredPackageLists() {
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $PHPIZE_DEPS"
|
||||
fi
|
||||
if test -z "$(apk info 2>/dev/null | grep -E ^libssl)"; then
|
||||
buildRequiredPackageLists_libssl='^libssl[0-9]+(\.[0-9]+)*$'
|
||||
buildRequiredPackageLists_libssl="$(apk search | grep -E '^libssl[0-9]' | head -1 | cut -d- -f1)"
|
||||
elif test -z "$(apk info 2>/dev/null | grep -E '^libressl.*-libtls')" && test -z "$(apk info 2>/dev/null | grep -E '^libressl.*-libssl')" && test -z "$(apk info 2>/dev/null | grep -E '^libretls-')"; then
|
||||
buildRequiredPackageLists_libssl=$(apk search -q libressl*-libtls)
|
||||
else
|
||||
@@ -811,6 +819,12 @@ buildRequiredPackageLists() {
|
||||
ffi@debian)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libffi-dev"
|
||||
;;
|
||||
ftp@alpine)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
|
||||
;;
|
||||
ftp@debian)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
|
||||
;;
|
||||
gd@alpine)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetype libjpeg-turbo libpng libxpm"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev"
|
||||
@@ -848,7 +862,10 @@ buildRequiredPackageLists() {
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libwebp[0-9]+$"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libwebp-dev"
|
||||
if test $PHP_MAJMIN_VERSION -ge 801; then
|
||||
if ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then
|
||||
if test $DISTRO_VERSION_NUMBER -ge 12; then
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libavif[0-9]+$ ^libaom[0-9]+$ ^libdav1d[0-9]+$"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libavif-dev libaom-dev libdav1d-dev"
|
||||
elif ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then
|
||||
case "${IPE_GD_WITHOUTAVIF:-}" in
|
||||
1 | y* | Y*) ;;
|
||||
*)
|
||||
@@ -1297,6 +1314,9 @@ buildRequiredPackageLists() {
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libcurl4-gnutls-dev libxml2-dev"
|
||||
;;
|
||||
sourceguardian@alpine)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent eudev-libs"
|
||||
;;
|
||||
spx@alpine)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev"
|
||||
;;
|
||||
@@ -1438,6 +1458,14 @@ buildRequiredPackageLists() {
|
||||
wddx@debian)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
|
||||
;;
|
||||
wikidiff2@alpine)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git"
|
||||
;;
|
||||
wikidiff2@debian)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libthai0"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git libthai-dev"
|
||||
;;
|
||||
xdebug@alpine)
|
||||
if test $PHP_MAJMIN_VERSION -ge 800; then
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile linux-headers"
|
||||
@@ -1985,11 +2013,11 @@ installOracleInstantClient() {
|
||||
mv "$installOracleInstantClient_src" "$ORACLE_INSTANTCLIENT_LIBPATH"
|
||||
echo 'done.'
|
||||
fi
|
||||
if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then
|
||||
if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk" && ! test -L "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then
|
||||
printf 'Downloading Oracle Instant SDK v%s... ' "$installOracleInstantClient_version"
|
||||
installOracleInstantClient_src="$(getPackageSource $installOracleInstantClient_sdk)"
|
||||
ln -sf "$installOracleInstantClient_src/sdk" "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"
|
||||
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS '$ORACLE_INSTANTCLIENT_LIBPATH/sdk'"
|
||||
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS $ORACLE_INSTANTCLIENT_LIBPATH/sdk"
|
||||
echo 'done.'
|
||||
fi
|
||||
case "$DISTRO" in
|
||||
@@ -2039,7 +2067,7 @@ installMicrosoftSqlServerODBC() {
|
||||
alpine)
|
||||
rm -rf /tmp/src/msodbcsql.apk
|
||||
if test $PHP_MAJMIN_VERSION -le 703; then
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.9.1.1-1_amd64.apk
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.10.6.1-1_amd64.apk
|
||||
else
|
||||
case $(uname -m) in
|
||||
aarch64 | arm64 | armv8)
|
||||
@@ -2049,7 +2077,7 @@ installMicrosoftSqlServerODBC() {
|
||||
installMicrosoftSqlServerODBC_arch=amd64
|
||||
;;
|
||||
esac
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.1.1-1_$installMicrosoftSqlServerODBC_arch.apk
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.3.1-1_$installMicrosoftSqlServerODBC_arch.apk
|
||||
fi
|
||||
printf '\n' | apk add --allow-untrusted /tmp/src/msodbcsql.apk
|
||||
rm -rf /tmp/src/msodbcsql.apk
|
||||
@@ -2088,7 +2116,7 @@ installMicrosoftSqlServerODBC() {
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibaomInstalled() {
|
||||
if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so; then
|
||||
if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so && ! test -f /usr/lib/x86_64*/libaom.so; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/aom/aom_codec.h && ! test -f /usr/include/aom/aom_codec.h; then
|
||||
@@ -2100,7 +2128,18 @@ isLibaomInstalled() {
|
||||
# Install libaom
|
||||
installLibaom() {
|
||||
printf 'Installing libaom\n'
|
||||
installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v3.3.0.tar.gz)"
|
||||
installLibaom_version=3.8.1
|
||||
case "$DISTRO_VERSION" in
|
||||
debian@10)
|
||||
case $(uname -m) in
|
||||
aarch* | arm*)
|
||||
#see https://bugs.chromium.org/p/aomedia/issues/detail?id=3543
|
||||
installLibaom_version=3.5.0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v$installLibaom_version.tar.gz)"
|
||||
mkdir -- "$installLibaom_dir/my.build"
|
||||
cd -- "$installLibaom_dir/my.build"
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 -DCMAKE_INSTALL_LIBDIR:PATH=lib ..
|
||||
@@ -2127,7 +2166,7 @@ isLibdav1dInstalled() {
|
||||
# Install libdav1d
|
||||
installLibdav1d() {
|
||||
printf 'Installing libdav1d\n'
|
||||
installLibdav1d_dir="$(getPackageSource https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz)"
|
||||
installLibdav1d_dir="$(getPackageSource https://github.com/videolan/dav1d/archive/refs/tags/1.3.0.tar.gz)"
|
||||
mkdir -- "$installLibdav1d_dir/build"
|
||||
cd -- "$installLibdav1d_dir/build"
|
||||
meson --buildtype release -Dprefix=/usr ..
|
||||
@@ -2145,7 +2184,7 @@ installLibdav1d() {
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibyuvInstalled() {
|
||||
if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so; then
|
||||
if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so.*; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/libyuv.h && ! test -f /usr/include/libyuv.h; then
|
||||
@@ -2157,7 +2196,7 @@ isLibyuvInstalled() {
|
||||
# Install libyuv
|
||||
installLibyuv() {
|
||||
printf 'Installing libyuv\n'
|
||||
installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/25d0a5110be796eef47004412baf43333d9ecf26.tar.gz)"
|
||||
installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/d359a9f922af840b043535d43cf9d38b220d102e.tar.gz)"
|
||||
mkdir -- "$installLibyuv_dir/build"
|
||||
cd -- "$installLibyuv_dir/build"
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -B. ..
|
||||
@@ -2183,7 +2222,7 @@ isLibavifInstalled() {
|
||||
# Install libavif
|
||||
installLibavif() {
|
||||
printf 'Installing libavif\n'
|
||||
installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v0.9.3)"
|
||||
installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v1.0.3)"
|
||||
mkdir -- "$installLibavif_dir/build"
|
||||
cd -- "$installLibavif_dir/build"
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DAVIF_CODEC_AOM=ON -DCMAKE_INSTALL_LIBDIR:PATH=lib
|
||||
@@ -2201,6 +2240,59 @@ installLibMPDec() {
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
# Check if libdatrie is installed
|
||||
#
|
||||
# Return:
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibDatrieInstalled() {
|
||||
if ! test -f /usr/local/lib/libdatrie.so && ! test -f /usr/lib/libdatrie.so && ! test -f /usr/lib/x86_64*/libdatrie.so; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/datrie/trie.h && ! test -f /usr/include/datrie/trie.h; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Install libdatrie
|
||||
installLibDatrie() {
|
||||
printf 'Installing libdatrie\n'
|
||||
installLibDatrie_src="$(getPackageSource https://github.com/tlwg/libdatrie/releases/download/v0.2.13/libdatrie-0.2.13.tar.xz)"
|
||||
cd -- "$installLibDatrie_src"
|
||||
./configure
|
||||
make -j$(getProcessorCount)
|
||||
make install
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
# Check if libdatrie is installed
|
||||
#
|
||||
# Return:
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibThaiInstalled() {
|
||||
return 1
|
||||
if ! test -f /usr/local/lib/libthai.so && ! test -f /usr/lib/libthai.so && ! test -f /usr/lib/x86_64*/libthai.so; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/thai/thailib.h && ! test -f /usr/include/thai/thailib.h; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Install libdatrie
|
||||
installLibThai() {
|
||||
printf 'Installing libthai\n'
|
||||
installLibThai_src="$(getPackageSource https://github.com/tlwg/libthai/releases/download/v0.1.29/libthai-0.1.29.tar.xz)"
|
||||
cd -- "$installLibThai_src"
|
||||
./configure
|
||||
make -j$(getProcessorCount)
|
||||
make install
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
# Install Composer
|
||||
installComposer() {
|
||||
installComposer_version="$(getWantedPHPModuleVersion @composer)"
|
||||
@@ -2336,6 +2428,37 @@ installCargo() {
|
||||
fi
|
||||
}
|
||||
|
||||
installNewRelic() {
|
||||
printf '# Installing newrelic\n'
|
||||
installNewRelic_search='\bnewrelic-php[0-9.]*-[0-9]+(\.[0-9]+)*-linux'
|
||||
case "$DISTRO" in
|
||||
alpine)
|
||||
installNewRelic_search="$installNewRelic_search-musl"
|
||||
;;
|
||||
esac
|
||||
installNewRelic_file="$(curl -sSLf -o- https://download.newrelic.com/php_agent/release/ | sed -E 's/<[^>]*>//g' | grep -Eo "$installNewRelic_search.tar.gz" | sort | head -1)"
|
||||
installNewRelic_url="https://download.newrelic.com/php_agent/release/$installNewRelic_file"
|
||||
installNewRelic_src="$(getPackageSource "$installNewRelic_url")"
|
||||
cd -- "$installNewRelic_src"
|
||||
NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 ./newrelic-install install
|
||||
case "${IPE_NEWRELIC_DAEMON:-}" in
|
||||
1 | y* | Y*)
|
||||
NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 ./newrelic-install install_daemon
|
||||
;;
|
||||
esac
|
||||
cd - >/dev/null
|
||||
cat <<EOT
|
||||
NewRelic has been installed from $installNewRelic_url
|
||||
You may need to:
|
||||
- change the owner/permissions of /var/log/newrelic
|
||||
(for example: chown -R www-data:www-data /var/log/newrelic)
|
||||
- set the value of the newrelic.license configuration key in
|
||||
$PHP_INI_DIR/conf.d/newrelic.ini
|
||||
(if you didn't set the NR_INSTALL_KEY environment variable)
|
||||
|
||||
EOT
|
||||
}
|
||||
|
||||
# Install a bundled PHP module given its handle
|
||||
#
|
||||
# Arguments:
|
||||
@@ -2401,6 +2524,9 @@ EOF
|
||||
cd - >/dev/null
|
||||
fi
|
||||
;;
|
||||
ftp)
|
||||
docker-php-ext-configure ftp --with-openssl-dir=/usr
|
||||
;;
|
||||
gd)
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --with-vpx-dir
|
||||
@@ -2418,6 +2544,11 @@ EOF
|
||||
installBundledModule_tmp=1
|
||||
fi
|
||||
;;
|
||||
debian)
|
||||
if test $DISTRO_VERSION_NUMBER -ge 12; then
|
||||
installBundledModule_tmp=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test $installBundledModule_tmp -eq 0; then
|
||||
case "${IPE_GD_WITHOUTAVIF:-}" in
|
||||
@@ -2570,13 +2701,18 @@ EOF
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
php -r 'return;' >/dev/null 2>/dev/null || true
|
||||
installBundledModule_errAfter="$(php -r 'return;' 2>&1 || true)"
|
||||
if test "$installBundledModule_errAfter" != "$installBundledModule_errBefore"; then
|
||||
printf 'PHP has problems after installing the "%s" extension:\n%s\n' "$1" "$installBundledModule_errAfter" >&2
|
||||
rm "$PHP_INI_DIR/conf.d/docker-php-ext-$1.ini" || true
|
||||
return 1
|
||||
fi
|
||||
case "${IPE_SKIP_CHECK:-}" in
|
||||
1 | y* | Y*) ;;
|
||||
*)
|
||||
php -r 'return;' >/dev/null 2>/dev/null || true
|
||||
installBundledModule_errAfter="$(php -r 'return;' 2>&1 || true)"
|
||||
if test "$installBundledModule_errAfter" != "$installBundledModule_errBefore"; then
|
||||
printf 'PHP has problems after installing the "%s" extension:\n%s\n' "$1" "$installBundledModule_errAfter" >&2
|
||||
rm "$PHP_INI_DIR/conf.d/docker-php-ext-$1.ini" || true
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Fetch a tar.gz file, extract it and returns the path of the extracted folder.
|
||||
@@ -2623,7 +2759,7 @@ getPackageSource() {
|
||||
installRemoteModule() {
|
||||
installRemoteModule_module="$1"
|
||||
printf '### INSTALLING REMOTE MODULE %s ###\n' "$installRemoteModule_module"
|
||||
installRemoteModule_version="$(resolveWantedPHPModuleVersion "$installRemoteModule_module")"
|
||||
installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module")"
|
||||
installRemoteModule_path="$(getModuleSourceCodePath "$installRemoteModule_module")"
|
||||
rm -rf "$CONFIGURE_FILE"
|
||||
installRemoteModule_manuallyInstalled=0
|
||||
@@ -2716,7 +2852,7 @@ installRemoteModule() {
|
||||
if test $(compareVersions "$(cmake --version | head -n1 | sed -E 's/^.* //')" '3.7') -lt 0; then
|
||||
installRemoteModule_tmp=0.29.0
|
||||
else
|
||||
installRemoteModule_tmp=0.30.3
|
||||
installRemoteModule_tmp=0.31.0
|
||||
fi
|
||||
cd "$(getPackageSource https://github.com/commonmark/cmark/archive/$installRemoteModule_tmp.tar.gz)"
|
||||
make -s -j$(getProcessorCount) cmake_build
|
||||
@@ -2745,9 +2881,12 @@ installRemoteModule() {
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -lt 700; then
|
||||
installRemoteModule_version=0.75.0
|
||||
else
|
||||
installCargo
|
||||
fi
|
||||
else
|
||||
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
|
||||
fi
|
||||
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 0.75.0) -ge 0; then
|
||||
installCargo
|
||||
fi
|
||||
;;
|
||||
decimal)
|
||||
@@ -2949,6 +3088,12 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
imap)
|
||||
# Include Kerberos Support
|
||||
addConfigureOption with-kerberos yes
|
||||
# Include SSL Support
|
||||
addConfigureOption with-imap-ssl yes
|
||||
;;
|
||||
inotify)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
@@ -3161,6 +3306,10 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
newrelic)
|
||||
installNewRelic
|
||||
installRemoteModule_manuallyInstalled=2
|
||||
;;
|
||||
oauth)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
@@ -3168,6 +3317,14 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
oci8 | pdo_oci)
|
||||
installOracleInstantClient
|
||||
if test "$installRemoteModule_module" = oci8; then
|
||||
addConfigureOption with-oci8 "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH"
|
||||
elif test "$installRemoteModule_module" = pdo_oci; then
|
||||
addConfigureOption with-pdo-oci "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH"
|
||||
fi
|
||||
;;
|
||||
opencensus)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
installRemoteModule_version=alpha
|
||||
@@ -3274,11 +3431,6 @@ installRemoteModule() {
|
||||
addConfigureOption enable-swoole-curl yes
|
||||
fi
|
||||
;;
|
||||
opentelemetry)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
installRemoteModule_version=beta
|
||||
fi
|
||||
;;
|
||||
parallel)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 701; then
|
||||
@@ -3333,6 +3485,8 @@ installRemoteModule() {
|
||||
installRemoteModule_version=3.12.4
|
||||
elif test $PHP_MAJMIN_VERSION -lt 800; then
|
||||
installRemoteModule_version=3.24.4
|
||||
elif test $PHP_MAJMIN_VERSION -lt 801; then
|
||||
installRemoteModule_version=3.25.3
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@@ -3478,8 +3632,8 @@ installRemoteModule() {
|
||||
;;
|
||||
saxon)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
installRemoteModule_version='11.6'
|
||||
if test $PHP_MAJMIN_VERSION -ge 800; then
|
||||
installRemoteModule_version='12.4.2'
|
||||
else
|
||||
installRemoteModule_version='12.3'
|
||||
fi
|
||||
@@ -3506,9 +3660,7 @@ installRemoteModule() {
|
||||
fi
|
||||
ldconfig || true
|
||||
fi
|
||||
set -x
|
||||
cd "$installRemoteModule_dir/Saxon.C.API"
|
||||
exit
|
||||
phpize
|
||||
./configure --enable-saxon
|
||||
make -j$(getProcessorCount) install
|
||||
@@ -3586,7 +3738,7 @@ installRemoteModule() {
|
||||
spx)
|
||||
if test -z "$installRemoteModule_path"; then
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
installRemoteModule_version=v0.4.14
|
||||
installRemoteModule_version=v0.4.15
|
||||
fi
|
||||
if test "${installRemoteModule_version%.*}" = "$installRemoteModule_version"; then
|
||||
installRemoteModule_displayVersion="$installRemoteModule_version"
|
||||
@@ -3618,6 +3770,8 @@ installRemoteModule() {
|
||||
installRemoteModule_version=5.9.0
|
||||
elif test $PHP_MAJMIN_VERSION -le 704; then
|
||||
installRemoteModule_version=5.10.1
|
||||
elif test $PHP_MAJMIN_VERSION -le 800; then
|
||||
installRemoteModule_version=5.11.1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@@ -3654,6 +3808,9 @@ installRemoteModule() {
|
||||
installRemoteModule_version=4.5.10
|
||||
elif test $PHP_MAJMIN_VERSION -le 704; then
|
||||
installRemoteModule_version=4.8.11
|
||||
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')"
|
||||
fi
|
||||
else
|
||||
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
|
||||
@@ -3871,7 +4028,7 @@ installRemoteModule() {
|
||||
installRemoteModule_architecture=alpine-arm64
|
||||
;;
|
||||
*)
|
||||
installRemoteModule_architecture=alpine
|
||||
installRemoteModule_architecture=alpine-x86_64
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -3887,6 +4044,10 @@ installRemoteModule() {
|
||||
;;
|
||||
esac
|
||||
installRemoteModule_url="$(curl -sSLf -o - https://tideways.com/profiler/downloads | grep -Eo "\"[^\"]+/tideways-php-([0-9]+\.[0-9]+\.[0-9]+)-$installRemoteModule_architecture.tar.gz\"" | cut -d'"' -f2)"
|
||||
if test -z "$installRemoteModule_url"; then
|
||||
echo 'Failed to find the tideways tarball to be downloaded'
|
||||
exit 1
|
||||
fi
|
||||
printf 'Downloading tideways from %s\n' "$installRemoteModule_url"
|
||||
installRemoteModule_src="$(getPackageSource $installRemoteModule_url)"
|
||||
if test -d "$installRemoteModule_src/dist"; then
|
||||
@@ -3953,6 +4114,33 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
wikidiff2)
|
||||
case "$DISTRO" in
|
||||
alpine)
|
||||
if ! isLibDatrieInstalled; then
|
||||
installLibDatrie
|
||||
fi
|
||||
if ! isLibThaiInstalled; then
|
||||
installLibThai
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 702; then
|
||||
installRemoteModule_version=1.13.0
|
||||
else
|
||||
installRemoteModule_version="$(git -c versionsort.suffix=- ls-remote --tags --refs --quiet --exit-code --sort=version:refname https://github.com/wikimedia/mediawiki-php-wikidiff2.git 'refs/tags/*.*.*' | tail -1 | cut -d/ -f3)"
|
||||
fi
|
||||
fi
|
||||
installRemoteModule_src="$(getPackageSource "https://codeload.github.com/wikimedia/mediawiki-php-wikidiff2/tar.gz/refs/tags/$installRemoteModule_version")"
|
||||
cd -- "$installRemoteModule_src"
|
||||
phpize
|
||||
./configure
|
||||
make -j$(getProcessorCount)
|
||||
make install
|
||||
cd - >/dev/null
|
||||
installRemoteModule_manuallyInstalled=1
|
||||
;;
|
||||
xdebug)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 500; then
|
||||
@@ -4133,8 +4321,15 @@ installRemoteModule() {
|
||||
installPeclPackage "$installRemoteModule_module" "$installRemoteModule_version" "$installRemoteModule_cppflags" "$installRemoteModule_path"
|
||||
fi
|
||||
postProcessModule "$installRemoteModule_module"
|
||||
checkModuleWorking "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
enablePhpExtension "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
if test $installRemoteModule_manuallyInstalled -lt 2; then
|
||||
case "${IPE_SKIP_CHECK:-}" in
|
||||
1 | y* | Y*) ;;
|
||||
*)
|
||||
checkModuleWorking "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
;;
|
||||
esac
|
||||
enablePhpExtension "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if a module/helper may be installed using the pecl archive
|
||||
@@ -4400,7 +4595,7 @@ fixLetsEncrypt() {
|
||||
invokeAptGetUpdate
|
||||
fi
|
||||
printf -- '- installing newer ca-certificates package\n'
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -qqy --no-install-recommends $IPE_APTGET_INSTALLOPTIONS ca-certificates
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -qqy --no-install-recommends ${IPE_APTGET_INSTALLOPTIONS:-} ca-certificates
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -21,7 +21,7 @@ if ! which docker-php-ext-configure >/dev/null || ! which docker-php-ext-enable
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IPE_VERSION=master
|
||||
IPE_VERSION=2.2.14
|
||||
|
||||
StandWithUkraine() {
|
||||
if test -t 1 && ! grep -Eq '^VERSION=.*jessie' /etc/os-release; then
|
||||
@@ -357,74 +357,81 @@ getModuleSourceCodePath() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Get the wanted PHP module version, resolving it if it starts with '^'
|
||||
# Get the actual PHP module version, resolving it if it starts with '^'
|
||||
#
|
||||
# Arguments:
|
||||
# $1: the name of the module to be normalized
|
||||
# $1: the name of the module
|
||||
# $2: the wanted version (optional, if omitted we'll use getWantedPHPModuleVersion)
|
||||
#
|
||||
# Output:
|
||||
# The version to be used
|
||||
resolveWantedPHPModuleVersion() {
|
||||
resolveWantedPHPModuleVersion_raw="$(getWantedPHPModuleVersion "$1")"
|
||||
resolveWantedPHPModuleVersion_afterCaret="${resolveWantedPHPModuleVersion_raw#^}"
|
||||
if test "$resolveWantedPHPModuleVersion_raw" = "$resolveWantedPHPModuleVersion_afterCaret"; then
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_raw"
|
||||
resolvePHPModuleVersion() {
|
||||
resolvePHPModuleVersion_module="$1"
|
||||
if test $# -lt 2; then
|
||||
resolvePHPModuleVersion_raw="$(getWantedPHPModuleVersion "$installRemoteModule_module")"
|
||||
else
|
||||
resolvePHPModuleVersion_raw="$2"
|
||||
fi
|
||||
resolvePHPModuleVersion_afterCaret="${resolvePHPModuleVersion_raw#^}"
|
||||
if test "$resolvePHPModuleVersion_raw" = "$resolvePHPModuleVersion_afterCaret"; then
|
||||
printf '%s' "$resolvePHPModuleVersion_raw"
|
||||
return
|
||||
fi
|
||||
case "$resolveWantedPHPModuleVersion_afterCaret" in
|
||||
case "$resolvePHPModuleVersion_afterCaret" in
|
||||
?*@snapshot | ?*@devel | ?*@alpha | ?*@beta | ?*@stable)
|
||||
resolveWantedPHPModuleVersion_wantedStability="${resolveWantedPHPModuleVersion_afterCaret##*@}"
|
||||
resolveWantedPHPModuleVersion_wantedVersion="${resolveWantedPHPModuleVersion_afterCaret%@*}"
|
||||
resolvePHPModuleVersion_wantedStability="${resolvePHPModuleVersion_afterCaret##*@}"
|
||||
resolvePHPModuleVersion_wantedVersion="${resolvePHPModuleVersion_afterCaret%@*}"
|
||||
;;
|
||||
*)
|
||||
resolveWantedPHPModuleVersion_wantedStability=''
|
||||
resolveWantedPHPModuleVersion_wantedVersion="$resolveWantedPHPModuleVersion_afterCaret"
|
||||
resolvePHPModuleVersion_wantedStability=''
|
||||
resolvePHPModuleVersion_wantedVersion="$resolvePHPModuleVersion_afterCaret"
|
||||
;;
|
||||
esac
|
||||
resolveWantedPHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$1/allreleases.xml")"
|
||||
resolvePHPModuleVersion_peclModule="$(getPeclModuleName "$resolvePHPModuleVersion_module")"
|
||||
resolvePHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$resolvePHPModuleVersion_peclModule/allreleases.xml")"
|
||||
# remove line endings, collapse spaces
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')"
|
||||
# one line per release (eg <r><v>1.2.3</v><s>stable</s></r>)
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed -r 's#<r#\n<r#g')"
|
||||
if test -n "$resolveWantedPHPModuleVersion_wantedStability"; then
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed -r 's#<r#\n<r#g')"
|
||||
if test -n "$resolvePHPModuleVersion_wantedStability"; then
|
||||
# keep the lines with the wanted stability
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | grep "<s>$resolveWantedPHPModuleVersion_wantedStability</s>")"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | grep "<s>$resolvePHPModuleVersion_wantedStability</s>")"
|
||||
fi
|
||||
# remove everything's up to '<v>' (included)
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed 's#^.*<v>##')"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed 's#^.*<v>##')"
|
||||
# keep just the versions
|
||||
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | cut -d'<' -f1)"
|
||||
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | cut -d'<' -f1)"
|
||||
resetIFS
|
||||
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
|
||||
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
|
||||
if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion.}"; then
|
||||
for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do
|
||||
resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}"
|
||||
if test "$resolvePHPModuleVersion_version" != "${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion.}"; then
|
||||
# Example: looking for 1.0, found 1.0.1
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_version"
|
||||
printf '%s' "$resolvePHPModuleVersion_version"
|
||||
return
|
||||
fi
|
||||
done
|
||||
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
|
||||
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
|
||||
if test "$resolveWantedPHPModuleVersion_version" = "$resolveWantedPHPModuleVersion_suffix"; then
|
||||
for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do
|
||||
resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}"
|
||||
if test "$resolvePHPModuleVersion_version" = "$resolvePHPModuleVersion_suffix"; then
|
||||
continue
|
||||
fi
|
||||
if test -z "$resolveWantedPHPModuleVersion_suffix"; then
|
||||
if test -z "$resolvePHPModuleVersion_suffix"; then
|
||||
# Example: looking for 1.0, found exactly it
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_version"
|
||||
printf '%s' "$resolvePHPModuleVersion_version"
|
||||
return
|
||||
fi
|
||||
case "$resolveWantedPHPModuleVersion_suffix" in
|
||||
case "$resolvePHPModuleVersion_suffix" in
|
||||
[0-9])
|
||||
# Example: looking for 1.1, but this is 1.10
|
||||
;;
|
||||
*)
|
||||
# Example: looking for 1.1, this is 1.1rc1
|
||||
printf '%s' "$resolveWantedPHPModuleVersion_version"
|
||||
printf '%s' "$resolvePHPModuleVersion_version"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
done
|
||||
printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$1" "$resolveWantedPHPModuleVersion_raw" "$resolveWantedPHPModuleVersion_versions" >&2
|
||||
printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$resolvePHPModuleVersion_module" "$resolvePHPModuleVersion_raw" "$resolvePHPModuleVersion_versions" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -443,7 +450,8 @@ resolvePeclStabilityVersion() {
|
||||
return
|
||||
;;
|
||||
esac
|
||||
peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$1/$2.txt"
|
||||
resolvePeclStabilityVersion_peclModule="$(getPeclModuleName "$1")"
|
||||
peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$resolvePeclStabilityVersion_peclModule/$2.txt"
|
||||
if ! peclStabilityFlagToVersion_result="$(curl -sSLf "$peclStabilityFlagToVersion_url")"; then
|
||||
peclStabilityFlagToVersion_result=''
|
||||
fi
|
||||
@@ -671,7 +679,7 @@ buildRequiredPackageLists() {
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $PHPIZE_DEPS"
|
||||
fi
|
||||
if test -z "$(apk info 2>/dev/null | grep -E ^libssl)"; then
|
||||
buildRequiredPackageLists_libssl='^libssl[0-9]+(\.[0-9]+)*$'
|
||||
buildRequiredPackageLists_libssl="$(apk search | grep -E '^libssl[0-9]' | head -1 | cut -d- -f1)"
|
||||
elif test -z "$(apk info 2>/dev/null | grep -E '^libressl.*-libtls')" && test -z "$(apk info 2>/dev/null | grep -E '^libressl.*-libssl')" && test -z "$(apk info 2>/dev/null | grep -E '^libretls-')"; then
|
||||
buildRequiredPackageLists_libssl=$(apk search -q libressl*-libtls)
|
||||
else
|
||||
@@ -811,6 +819,12 @@ buildRequiredPackageLists() {
|
||||
ffi@debian)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libffi-dev"
|
||||
;;
|
||||
ftp@alpine)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
|
||||
;;
|
||||
ftp@debian)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
|
||||
;;
|
||||
gd@alpine)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetype libjpeg-turbo libpng libxpm"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev"
|
||||
@@ -848,7 +862,10 @@ buildRequiredPackageLists() {
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libwebp[0-9]+$"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libwebp-dev"
|
||||
if test $PHP_MAJMIN_VERSION -ge 801; then
|
||||
if ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then
|
||||
if test $DISTRO_VERSION_NUMBER -ge 12; then
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libavif[0-9]+$ ^libaom[0-9]+$ ^libdav1d[0-9]+$"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libavif-dev libaom-dev libdav1d-dev"
|
||||
elif ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then
|
||||
case "${IPE_GD_WITHOUTAVIF:-}" in
|
||||
1 | y* | Y*) ;;
|
||||
*)
|
||||
@@ -1297,6 +1314,9 @@ buildRequiredPackageLists() {
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libcurl4-gnutls-dev libxml2-dev"
|
||||
;;
|
||||
sourceguardian@alpine)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent eudev-libs"
|
||||
;;
|
||||
spx@alpine)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev"
|
||||
;;
|
||||
@@ -1438,6 +1458,14 @@ buildRequiredPackageLists() {
|
||||
wddx@debian)
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
|
||||
;;
|
||||
wikidiff2@alpine)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git"
|
||||
;;
|
||||
wikidiff2@debian)
|
||||
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libthai0"
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git libthai-dev"
|
||||
;;
|
||||
xdebug@alpine)
|
||||
if test $PHP_MAJMIN_VERSION -ge 800; then
|
||||
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile linux-headers"
|
||||
@@ -1985,11 +2013,11 @@ installOracleInstantClient() {
|
||||
mv "$installOracleInstantClient_src" "$ORACLE_INSTANTCLIENT_LIBPATH"
|
||||
echo 'done.'
|
||||
fi
|
||||
if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then
|
||||
if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk" && ! test -L "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then
|
||||
printf 'Downloading Oracle Instant SDK v%s... ' "$installOracleInstantClient_version"
|
||||
installOracleInstantClient_src="$(getPackageSource $installOracleInstantClient_sdk)"
|
||||
ln -sf "$installOracleInstantClient_src/sdk" "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"
|
||||
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS '$ORACLE_INSTANTCLIENT_LIBPATH/sdk'"
|
||||
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS $ORACLE_INSTANTCLIENT_LIBPATH/sdk"
|
||||
echo 'done.'
|
||||
fi
|
||||
case "$DISTRO" in
|
||||
@@ -2039,7 +2067,7 @@ installMicrosoftSqlServerODBC() {
|
||||
alpine)
|
||||
rm -rf /tmp/src/msodbcsql.apk
|
||||
if test $PHP_MAJMIN_VERSION -le 703; then
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.9.1.1-1_amd64.apk
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.10.6.1-1_amd64.apk
|
||||
else
|
||||
case $(uname -m) in
|
||||
aarch64 | arm64 | armv8)
|
||||
@@ -2049,7 +2077,7 @@ installMicrosoftSqlServerODBC() {
|
||||
installMicrosoftSqlServerODBC_arch=amd64
|
||||
;;
|
||||
esac
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.1.1-1_$installMicrosoftSqlServerODBC_arch.apk
|
||||
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.3.1-1_$installMicrosoftSqlServerODBC_arch.apk
|
||||
fi
|
||||
printf '\n' | apk add --allow-untrusted /tmp/src/msodbcsql.apk
|
||||
rm -rf /tmp/src/msodbcsql.apk
|
||||
@@ -2088,7 +2116,7 @@ installMicrosoftSqlServerODBC() {
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibaomInstalled() {
|
||||
if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so; then
|
||||
if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so && ! test -f /usr/lib/x86_64*/libaom.so; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/aom/aom_codec.h && ! test -f /usr/include/aom/aom_codec.h; then
|
||||
@@ -2100,7 +2128,18 @@ isLibaomInstalled() {
|
||||
# Install libaom
|
||||
installLibaom() {
|
||||
printf 'Installing libaom\n'
|
||||
installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v3.3.0.tar.gz)"
|
||||
installLibaom_version=3.8.1
|
||||
case "$DISTRO_VERSION" in
|
||||
debian@10)
|
||||
case $(uname -m) in
|
||||
aarch* | arm*)
|
||||
#see https://bugs.chromium.org/p/aomedia/issues/detail?id=3543
|
||||
installLibaom_version=3.5.0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v$installLibaom_version.tar.gz)"
|
||||
mkdir -- "$installLibaom_dir/my.build"
|
||||
cd -- "$installLibaom_dir/my.build"
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 -DCMAKE_INSTALL_LIBDIR:PATH=lib ..
|
||||
@@ -2127,7 +2166,7 @@ isLibdav1dInstalled() {
|
||||
# Install libdav1d
|
||||
installLibdav1d() {
|
||||
printf 'Installing libdav1d\n'
|
||||
installLibdav1d_dir="$(getPackageSource https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz)"
|
||||
installLibdav1d_dir="$(getPackageSource https://github.com/videolan/dav1d/archive/refs/tags/1.3.0.tar.gz)"
|
||||
mkdir -- "$installLibdav1d_dir/build"
|
||||
cd -- "$installLibdav1d_dir/build"
|
||||
meson --buildtype release -Dprefix=/usr ..
|
||||
@@ -2145,7 +2184,7 @@ installLibdav1d() {
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibyuvInstalled() {
|
||||
if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so; then
|
||||
if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so.*; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/libyuv.h && ! test -f /usr/include/libyuv.h; then
|
||||
@@ -2157,7 +2196,7 @@ isLibyuvInstalled() {
|
||||
# Install libyuv
|
||||
installLibyuv() {
|
||||
printf 'Installing libyuv\n'
|
||||
installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/25d0a5110be796eef47004412baf43333d9ecf26.tar.gz)"
|
||||
installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/d359a9f922af840b043535d43cf9d38b220d102e.tar.gz)"
|
||||
mkdir -- "$installLibyuv_dir/build"
|
||||
cd -- "$installLibyuv_dir/build"
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -B. ..
|
||||
@@ -2183,7 +2222,7 @@ isLibavifInstalled() {
|
||||
# Install libavif
|
||||
installLibavif() {
|
||||
printf 'Installing libavif\n'
|
||||
installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v0.9.3)"
|
||||
installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v1.0.3)"
|
||||
mkdir -- "$installLibavif_dir/build"
|
||||
cd -- "$installLibavif_dir/build"
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DAVIF_CODEC_AOM=ON -DCMAKE_INSTALL_LIBDIR:PATH=lib
|
||||
@@ -2201,6 +2240,59 @@ installLibMPDec() {
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
# Check if libdatrie is installed
|
||||
#
|
||||
# Return:
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibDatrieInstalled() {
|
||||
if ! test -f /usr/local/lib/libdatrie.so && ! test -f /usr/lib/libdatrie.so && ! test -f /usr/lib/x86_64*/libdatrie.so; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/datrie/trie.h && ! test -f /usr/include/datrie/trie.h; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Install libdatrie
|
||||
installLibDatrie() {
|
||||
printf 'Installing libdatrie\n'
|
||||
installLibDatrie_src="$(getPackageSource https://github.com/tlwg/libdatrie/releases/download/v0.2.13/libdatrie-0.2.13.tar.xz)"
|
||||
cd -- "$installLibDatrie_src"
|
||||
./configure
|
||||
make -j$(getProcessorCount)
|
||||
make install
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
# Check if libdatrie is installed
|
||||
#
|
||||
# Return:
|
||||
# 0 (true)
|
||||
# 1 (false)
|
||||
isLibThaiInstalled() {
|
||||
return 1
|
||||
if ! test -f /usr/local/lib/libthai.so && ! test -f /usr/lib/libthai.so && ! test -f /usr/lib/x86_64*/libthai.so; then
|
||||
return 1
|
||||
fi
|
||||
if ! test -f /usr/local/include/thai/thailib.h && ! test -f /usr/include/thai/thailib.h; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Install libdatrie
|
||||
installLibThai() {
|
||||
printf 'Installing libthai\n'
|
||||
installLibThai_src="$(getPackageSource https://github.com/tlwg/libthai/releases/download/v0.1.29/libthai-0.1.29.tar.xz)"
|
||||
cd -- "$installLibThai_src"
|
||||
./configure
|
||||
make -j$(getProcessorCount)
|
||||
make install
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
# Install Composer
|
||||
installComposer() {
|
||||
installComposer_version="$(getWantedPHPModuleVersion @composer)"
|
||||
@@ -2336,6 +2428,37 @@ installCargo() {
|
||||
fi
|
||||
}
|
||||
|
||||
installNewRelic() {
|
||||
printf '# Installing newrelic\n'
|
||||
installNewRelic_search='\bnewrelic-php[0-9.]*-[0-9]+(\.[0-9]+)*-linux'
|
||||
case "$DISTRO" in
|
||||
alpine)
|
||||
installNewRelic_search="$installNewRelic_search-musl"
|
||||
;;
|
||||
esac
|
||||
installNewRelic_file="$(curl -sSLf -o- https://download.newrelic.com/php_agent/release/ | sed -E 's/<[^>]*>//g' | grep -Eo "$installNewRelic_search.tar.gz" | sort | head -1)"
|
||||
installNewRelic_url="https://download.newrelic.com/php_agent/release/$installNewRelic_file"
|
||||
installNewRelic_src="$(getPackageSource "$installNewRelic_url")"
|
||||
cd -- "$installNewRelic_src"
|
||||
NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 ./newrelic-install install
|
||||
case "${IPE_NEWRELIC_DAEMON:-}" in
|
||||
1 | y* | Y*)
|
||||
NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 ./newrelic-install install_daemon
|
||||
;;
|
||||
esac
|
||||
cd - >/dev/null
|
||||
cat <<EOT
|
||||
NewRelic has been installed from $installNewRelic_url
|
||||
You may need to:
|
||||
- change the owner/permissions of /var/log/newrelic
|
||||
(for example: chown -R www-data:www-data /var/log/newrelic)
|
||||
- set the value of the newrelic.license configuration key in
|
||||
$PHP_INI_DIR/conf.d/newrelic.ini
|
||||
(if you didn't set the NR_INSTALL_KEY environment variable)
|
||||
|
||||
EOT
|
||||
}
|
||||
|
||||
# Install a bundled PHP module given its handle
|
||||
#
|
||||
# Arguments:
|
||||
@@ -2401,6 +2524,9 @@ EOF
|
||||
cd - >/dev/null
|
||||
fi
|
||||
;;
|
||||
ftp)
|
||||
docker-php-ext-configure ftp --with-openssl-dir=/usr
|
||||
;;
|
||||
gd)
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --with-vpx-dir
|
||||
@@ -2418,6 +2544,11 @@ EOF
|
||||
installBundledModule_tmp=1
|
||||
fi
|
||||
;;
|
||||
debian)
|
||||
if test $DISTRO_VERSION_NUMBER -ge 12; then
|
||||
installBundledModule_tmp=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test $installBundledModule_tmp -eq 0; then
|
||||
case "${IPE_GD_WITHOUTAVIF:-}" in
|
||||
@@ -2570,13 +2701,18 @@ EOF
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
php -r 'return;' >/dev/null 2>/dev/null || true
|
||||
installBundledModule_errAfter="$(php -r 'return;' 2>&1 || true)"
|
||||
if test "$installBundledModule_errAfter" != "$installBundledModule_errBefore"; then
|
||||
printf 'PHP has problems after installing the "%s" extension:\n%s\n' "$1" "$installBundledModule_errAfter" >&2
|
||||
rm "$PHP_INI_DIR/conf.d/docker-php-ext-$1.ini" || true
|
||||
return 1
|
||||
fi
|
||||
case "${IPE_SKIP_CHECK:-}" in
|
||||
1 | y* | Y*) ;;
|
||||
*)
|
||||
php -r 'return;' >/dev/null 2>/dev/null || true
|
||||
installBundledModule_errAfter="$(php -r 'return;' 2>&1 || true)"
|
||||
if test "$installBundledModule_errAfter" != "$installBundledModule_errBefore"; then
|
||||
printf 'PHP has problems after installing the "%s" extension:\n%s\n' "$1" "$installBundledModule_errAfter" >&2
|
||||
rm "$PHP_INI_DIR/conf.d/docker-php-ext-$1.ini" || true
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Fetch a tar.gz file, extract it and returns the path of the extracted folder.
|
||||
@@ -2623,7 +2759,7 @@ getPackageSource() {
|
||||
installRemoteModule() {
|
||||
installRemoteModule_module="$1"
|
||||
printf '### INSTALLING REMOTE MODULE %s ###\n' "$installRemoteModule_module"
|
||||
installRemoteModule_version="$(resolveWantedPHPModuleVersion "$installRemoteModule_module")"
|
||||
installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module")"
|
||||
installRemoteModule_path="$(getModuleSourceCodePath "$installRemoteModule_module")"
|
||||
rm -rf "$CONFIGURE_FILE"
|
||||
installRemoteModule_manuallyInstalled=0
|
||||
@@ -2716,7 +2852,7 @@ installRemoteModule() {
|
||||
if test $(compareVersions "$(cmake --version | head -n1 | sed -E 's/^.* //')" '3.7') -lt 0; then
|
||||
installRemoteModule_tmp=0.29.0
|
||||
else
|
||||
installRemoteModule_tmp=0.30.3
|
||||
installRemoteModule_tmp=0.31.0
|
||||
fi
|
||||
cd "$(getPackageSource https://github.com/commonmark/cmark/archive/$installRemoteModule_tmp.tar.gz)"
|
||||
make -s -j$(getProcessorCount) cmake_build
|
||||
@@ -2745,9 +2881,12 @@ installRemoteModule() {
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -lt 700; then
|
||||
installRemoteModule_version=0.75.0
|
||||
else
|
||||
installCargo
|
||||
fi
|
||||
else
|
||||
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
|
||||
fi
|
||||
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 0.75.0) -ge 0; then
|
||||
installCargo
|
||||
fi
|
||||
;;
|
||||
decimal)
|
||||
@@ -2949,6 +3088,12 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
imap)
|
||||
# Include Kerberos Support
|
||||
addConfigureOption with-kerberos yes
|
||||
# Include SSL Support
|
||||
addConfigureOption with-imap-ssl yes
|
||||
;;
|
||||
inotify)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
@@ -3161,6 +3306,10 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
newrelic)
|
||||
installNewRelic
|
||||
installRemoteModule_manuallyInstalled=2
|
||||
;;
|
||||
oauth)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
@@ -3168,6 +3317,14 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
oci8 | pdo_oci)
|
||||
installOracleInstantClient
|
||||
if test "$installRemoteModule_module" = oci8; then
|
||||
addConfigureOption with-oci8 "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH"
|
||||
elif test "$installRemoteModule_module" = pdo_oci; then
|
||||
addConfigureOption with-pdo-oci "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH"
|
||||
fi
|
||||
;;
|
||||
opencensus)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
installRemoteModule_version=alpha
|
||||
@@ -3274,11 +3431,6 @@ installRemoteModule() {
|
||||
addConfigureOption enable-swoole-curl yes
|
||||
fi
|
||||
;;
|
||||
opentelemetry)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
installRemoteModule_version=beta
|
||||
fi
|
||||
;;
|
||||
parallel)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 701; then
|
||||
@@ -3333,6 +3485,8 @@ installRemoteModule() {
|
||||
installRemoteModule_version=3.12.4
|
||||
elif test $PHP_MAJMIN_VERSION -lt 800; then
|
||||
installRemoteModule_version=3.24.4
|
||||
elif test $PHP_MAJMIN_VERSION -lt 801; then
|
||||
installRemoteModule_version=3.25.3
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@@ -3478,8 +3632,8 @@ installRemoteModule() {
|
||||
;;
|
||||
saxon)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 506; then
|
||||
installRemoteModule_version='11.6'
|
||||
if test $PHP_MAJMIN_VERSION -ge 800; then
|
||||
installRemoteModule_version='12.4.2'
|
||||
else
|
||||
installRemoteModule_version='12.3'
|
||||
fi
|
||||
@@ -3506,9 +3660,7 @@ installRemoteModule() {
|
||||
fi
|
||||
ldconfig || true
|
||||
fi
|
||||
set -x
|
||||
cd "$installRemoteModule_dir/Saxon.C.API"
|
||||
exit
|
||||
phpize
|
||||
./configure --enable-saxon
|
||||
make -j$(getProcessorCount) install
|
||||
@@ -3586,7 +3738,7 @@ installRemoteModule() {
|
||||
spx)
|
||||
if test -z "$installRemoteModule_path"; then
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
installRemoteModule_version=v0.4.14
|
||||
installRemoteModule_version=v0.4.15
|
||||
fi
|
||||
if test "${installRemoteModule_version%.*}" = "$installRemoteModule_version"; then
|
||||
installRemoteModule_displayVersion="$installRemoteModule_version"
|
||||
@@ -3618,6 +3770,8 @@ installRemoteModule() {
|
||||
installRemoteModule_version=5.9.0
|
||||
elif test $PHP_MAJMIN_VERSION -le 704; then
|
||||
installRemoteModule_version=5.10.1
|
||||
elif test $PHP_MAJMIN_VERSION -le 800; then
|
||||
installRemoteModule_version=5.11.1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@@ -3654,6 +3808,9 @@ installRemoteModule() {
|
||||
installRemoteModule_version=4.5.10
|
||||
elif test $PHP_MAJMIN_VERSION -le 704; then
|
||||
installRemoteModule_version=4.8.11
|
||||
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')"
|
||||
fi
|
||||
else
|
||||
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
|
||||
@@ -3871,7 +4028,7 @@ installRemoteModule() {
|
||||
installRemoteModule_architecture=alpine-arm64
|
||||
;;
|
||||
*)
|
||||
installRemoteModule_architecture=alpine
|
||||
installRemoteModule_architecture=alpine-x86_64
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -3887,6 +4044,10 @@ installRemoteModule() {
|
||||
;;
|
||||
esac
|
||||
installRemoteModule_url="$(curl -sSLf -o - https://tideways.com/profiler/downloads | grep -Eo "\"[^\"]+/tideways-php-([0-9]+\.[0-9]+\.[0-9]+)-$installRemoteModule_architecture.tar.gz\"" | cut -d'"' -f2)"
|
||||
if test -z "$installRemoteModule_url"; then
|
||||
echo 'Failed to find the tideways tarball to be downloaded'
|
||||
exit 1
|
||||
fi
|
||||
printf 'Downloading tideways from %s\n' "$installRemoteModule_url"
|
||||
installRemoteModule_src="$(getPackageSource $installRemoteModule_url)"
|
||||
if test -d "$installRemoteModule_src/dist"; then
|
||||
@@ -3953,6 +4114,33 @@ installRemoteModule() {
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
wikidiff2)
|
||||
case "$DISTRO" in
|
||||
alpine)
|
||||
if ! isLibDatrieInstalled; then
|
||||
installLibDatrie
|
||||
fi
|
||||
if ! isLibThaiInstalled; then
|
||||
installLibThai
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 702; then
|
||||
installRemoteModule_version=1.13.0
|
||||
else
|
||||
installRemoteModule_version="$(git -c versionsort.suffix=- ls-remote --tags --refs --quiet --exit-code --sort=version:refname https://github.com/wikimedia/mediawiki-php-wikidiff2.git 'refs/tags/*.*.*' | tail -1 | cut -d/ -f3)"
|
||||
fi
|
||||
fi
|
||||
installRemoteModule_src="$(getPackageSource "https://codeload.github.com/wikimedia/mediawiki-php-wikidiff2/tar.gz/refs/tags/$installRemoteModule_version")"
|
||||
cd -- "$installRemoteModule_src"
|
||||
phpize
|
||||
./configure
|
||||
make -j$(getProcessorCount)
|
||||
make install
|
||||
cd - >/dev/null
|
||||
installRemoteModule_manuallyInstalled=1
|
||||
;;
|
||||
xdebug)
|
||||
if test -z "$installRemoteModule_version"; then
|
||||
if test $PHP_MAJMIN_VERSION -le 500; then
|
||||
@@ -4133,8 +4321,15 @@ installRemoteModule() {
|
||||
installPeclPackage "$installRemoteModule_module" "$installRemoteModule_version" "$installRemoteModule_cppflags" "$installRemoteModule_path"
|
||||
fi
|
||||
postProcessModule "$installRemoteModule_module"
|
||||
checkModuleWorking "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
enablePhpExtension "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
if test $installRemoteModule_manuallyInstalled -lt 2; then
|
||||
case "${IPE_SKIP_CHECK:-}" in
|
||||
1 | y* | Y*) ;;
|
||||
*)
|
||||
checkModuleWorking "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
;;
|
||||
esac
|
||||
enablePhpExtension "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if a module/helper may be installed using the pecl archive
|
||||
@@ -4400,7 +4595,7 @@ fixLetsEncrypt() {
|
||||
invokeAptGetUpdate
|
||||
fi
|
||||
printf -- '- installing newer ca-certificates package\n'
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -qqy --no-install-recommends $IPE_APTGET_INSTALLOPTIONS ca-certificates
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -qqy --no-install-recommends ${IPE_APTGET_INSTALLOPTIONS:-} ca-certificates
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user