1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-09 00:22:40 +00:00

fixes for enchant extension on alpine3.12

disable enchant on some version/distro combos
This commit is contained in:
Fred Cox 2020-09-18 21:02:07 +03:00
parent 01c511fbeb
commit f15031994b
4 changed files with 28 additions and 4 deletions

View file

@ -27,7 +27,9 @@ setDistro() {
exit 1
fi
DISTRO="$(cat /etc/os-release | grep -E ^ID= | cut -d = -f 2)"
DISTRO_VERSION="$(printf '%s@%s' $DISTRO $(cat /etc/os-release | grep -E ^VERSION_ID= | cut -d = -f 2 | cut -d '"' -f 2 | cut -d . -f 1,2))"
DISTRO_VERSION_NUMBER="$(cat /etc/os-release | grep -E ^VERSION_ID= | cut -d = -f 2 | cut -d '"' -f 2 | cut -d . -f 1,2)"
DISTRO_VERSION="$(printf '%s@%s' $DISTRO $DISTRO_VERSION_NUMBER)"
DISTRO_MAJMIN_VERSION="$(echo "$DISTRO_VERSION_NUMBER" | awk -F. '{print $1*100+$2}')"
}
# Set the PHP_MAJMIN_VERSION variable containing the PHP Major-Minor version as an integer value, in format MMmm (example: 506 for PHP 5.6.15)
@ -241,8 +243,13 @@ buildRequiredPackageLists() {
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmpdec-dev"
;;
enchant@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent enchant"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile enchant-dev"
if test $DISTRO_MAJMIN_VERSION -ge 312; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent enchant2"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile enchant2-dev"
else
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent enchant"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile enchant-dev"
fi
;;
enchant@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libenchant1c2a"