mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-01-31 20:47:14 +07:00
Add support for arm64 icu and intl builds
This commit is contained in:
parent
7b76fc1ec5
commit
296db28120
@ -2,7 +2,7 @@
|
||||
install_icu() {
|
||||
icu=$1
|
||||
if [ "$(php -i | grep "ICU version =>" | sed -e "s|.*=> s*||")" != "$icu" ]; then
|
||||
get -q -n /tmp/icu.tar.zst "https://github.com/shivammathur/icu-intl/releases/download/icu4c/icu4c-$icu.tar.zst"
|
||||
get -q -n /tmp/icu.tar.zst "https://github.com/shivammathur/icu-intl/releases/download/icu4c/icu4c-$icu$arch_suffix.tar.zst"
|
||||
sudo tar -I zstd -xf /tmp/icu.tar.zst -C /usr/local
|
||||
sudo cp -r /usr/local/icu/lib/* /usr/lib/"$(uname -m)"-linux-gnu/
|
||||
fi
|
||||
@ -17,8 +17,11 @@ add_intl() {
|
||||
else
|
||||
[ "${ts:?}" = 'zts' ] && suffix='-zts'
|
||||
install_icu "$icu" >/dev/null 2>&1
|
||||
get -q -n "${ext_dir:?}/intl.so" "https://github.com/shivammathur/icu-intl/releases/download/intl/php${version:?}-intl-$icu$suffix.so"
|
||||
get -q -n "${ext_dir:?}/intl.so" "https://github.com/shivammathur/icu-intl/releases/download/intl/php${version:?}-intl-$icu$suffix$arch_suffix.so"
|
||||
enable_extension intl extension
|
||||
add_extension_log intl "Installed and enabled with ICU $icu"
|
||||
fi
|
||||
}
|
||||
|
||||
arch="$(uname -m)"
|
||||
[[ "$arch" = 'arm64' || "$arch" = 'aarch64' ]] && arch_suffix='-arm64' || arch_suffix=''
|
||||
|
Loading…
Reference in New Issue
Block a user