Skip to content

Commit

Permalink
Update php74 install-php-extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
jingmian authored Sep 18, 2024
1 parent 4df395a commit fb3f5f1
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions services/php/extensions/install-php-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,12 @@ buildRequiredPackageLists() {
xmlrpc@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
;;
xpass@alpine)
if ! isLibXCryptInstalled; then
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile linux-headers"
COMPILE_LIBS="$COMPILE_LIBS libxcrypt"
fi
;;
xsl@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libxslt"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxslt-dev libgcrypt-dev"
Expand Down Expand Up @@ -2423,6 +2429,25 @@ installFirebird() {
cd - >/dev/null
fi
}

isLibXCryptInstalled() {
if ! test -f /usr/local/lib/libcrypt.so && ! test -f /usr/lib/libcrypt.so && ! test -f /usr/lib/x86_64*/libcrypt.so; then
return 1
fi
return 0
}

installLibXCrypt() {
printf 'Installing libxcrypt\n'
installLibXCrypt_version=4.4.36
installLibXCrypt_src="$(getPackageSource "https://github.com/besser82/libxcrypt/releases/download/v$installLibXCrypt_version/libxcrypt-$installLibXCrypt_version.tar.xz")"
cd -- "$installLibXCrypt_src"
./configure --prefix /usr
make -j$(getProcessorCount)
make install
cd - >/dev/null
}

# Install Composer
installComposer() {
installComposer_version="$(getWantedPHPModuleVersion @composer)"
Expand Down Expand Up @@ -2618,6 +2643,9 @@ compileLibs() {
if stringInList firebird "$COMPILE_LIBS"; then
installFirebird
fi
if stringInList libxcrypt "$COMPILE_LIBS"; then
installLibXCrypt
fi
}

# Install a bundled PHP module given its handle
Expand Down Expand Up @@ -3067,6 +3095,13 @@ installRemoteModule() {
installRemoteModule_version=alpha
fi
;;
ev)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -lt 800; then
installRemoteModule_version=1.1.5
fi
fi
;;
event)
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 2.4.0) -ge 0; then
Expand Down Expand Up @@ -3839,10 +3874,10 @@ installRemoteModule() {
snuffleupagus)
if test -z "$installRemoteModule_path"; then
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 704; then
if test $PHP_MAJMIN_VERSION -le 800; then
installRemoteModule_version=0.9.0
else
installRemoteModule_version=0.10.0
installRemoteModule_version=0.11.0
fi
fi
installRemoteModule_src="$(getPackageSource https://codeload.github.com/jvoisin/snuffleupagus/tar.gz/v$installRemoteModule_version)"
Expand Down

0 comments on commit fb3f5f1

Please sign in to comment.