Use redis version from pecl, even with PHP 8

Test: redis
pull/192/head
Michele Locati 2020-12-02 18:21:43 +01:00
parent 12b5bfbe8c
commit 6a95436f32
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 26 additions and 39 deletions

View File

@ -1302,47 +1302,34 @@ installPECLModule() {
fi fi
;; ;;
redis) redis)
if test $PHP_MAJMIN_VERSION -ge 800; then # Enable igbinary serializer support?
installPECLModule_src="$(getPackageSource https://codeload.github.com/phpredis/phpredis/tar.gz/develop)" if php --ri igbinary >/dev/null 2>/dev/null; then
cd -- "$installPECLModule_src" addConfigureOption 'enable-redis-igbinary' 'yes'
installPECLModule_cmd='./configure'
php --ri igbinary >/dev/null 2>/dev/null && installPECLModule_cmd="$installPECLModule_cmd --enable-redis-igbinary"
phpize
$installPECLModule_cmd
make -j$(getProcessorCount)
make install
cd - >/dev/null
installPECLModule_manuallyInstalled=1
else else
# Enable igbinary serializer support? addConfigureOption 'enable-redis-igbinary' 'no'
if php --ri igbinary >/dev/null 2>/dev/null; then fi
addConfigureOption 'enable-redis-igbinary' 'yes' # Enable lzf compression support?
else addConfigureOption 'enable-redis-lzf' 'yes'
addConfigureOption 'enable-redis-igbinary' 'no' if test $PHP_MAJMIN_VERSION -le 506; then
fi installPECLModule_actual="$1-4.3.0"
# Enable lzf compression support? else
addConfigureOption 'enable-redis-lzf' 'yes' installPECLModule_machine=$(getTargetTriplet)
if test $PHP_MAJMIN_VERSION -le 506; then if ! test -e /usr/include/zstd.h || ! test -e /usr/lib/libzstd.so -o -e "/usr/lib/$installPECLModule_machine/libzstd.so"; then
installPECLModule_actual="$1-4.3.0" installPECLModule_zstdVersion=1.4.4
else installPECLModule_zstdVersionMajor=$(echo $installPECLModule_zstdVersion | cut -d. -f1)
installPECLModule_machine=$(getTargetTriplet) rm -rf /tmp/src/zstd
if ! test -e /usr/include/zstd.h || ! test -e /usr/lib/libzstd.so -o -e "/usr/lib/$installPECLModule_machine/libzstd.so"; then mv "$(getPackageSource https://github.com/facebook/zstd/releases/download/v1.4.4/zstd-$installPECLModule_zstdVersion.tar.gz)" /tmp/src/zstd
installPECLModule_zstdVersion=1.4.4 cd /tmp/src/zstd
installPECLModule_zstdVersionMajor=$(echo $installPECLModule_zstdVersion | cut -d. -f1) make V=0 -j$(getProcessorCount) lib
rm -rf /tmp/src/zstd cp -f lib/libzstd.so "/usr/lib/$installPECLModule_machine/libzstd.so.$installPECLModule_zstdVersion"
mv "$(getPackageSource https://github.com/facebook/zstd/releases/download/v1.4.4/zstd-$installPECLModule_zstdVersion.tar.gz)" /tmp/src/zstd ln -sf "/usr/lib/$installPECLModule_machine/libzstd.so.$installPECLModule_zstdVersion" "/usr/lib/$installPECLModule_machine/libzstd.so.$installPECLModule_zstdVersionMajor"
cd /tmp/src/zstd ln -sf "/usr/lib/$installPECLModule_machine/libzstd.so.$installPECLModule_zstdVersion" "/usr/lib/$installPECLModule_machine/libzstd.so"
make V=0 -j$(getProcessorCount) lib ln -sf /tmp/src/zstd/lib/zstd.h /usr/include/zstd.h
cp -f lib/libzstd.so "/usr/lib/$installPECLModule_machine/libzstd.so.$installPECLModule_zstdVersion" UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS /usr/include/zstd.h"
ln -sf "/usr/lib/$installPECLModule_machine/libzstd.so.$installPECLModule_zstdVersion" "/usr/lib/$installPECLModule_machine/libzstd.so.$installPECLModule_zstdVersionMajor" cd - >/dev/null
ln -sf "/usr/lib/$installPECLModule_machine/libzstd.so.$installPECLModule_zstdVersion" "/usr/lib/$installPECLModule_machine/libzstd.so"
ln -sf /tmp/src/zstd/lib/zstd.h /usr/include/zstd.h
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS /usr/include/zstd.h"
cd - >/dev/null
fi
# Enable zstd compression support?
addConfigureOption 'enable-redis-zstd' 'yes'
fi fi
# Enable zstd compression support?
addConfigureOption 'enable-redis-zstd' 'yes'
fi fi
;; ;;
solr) solr)