From 16eeec2dec4c7d28600ab8045355f4398c266e73 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Fri, 6 Dec 2019 17:12:05 +0100 Subject: [PATCH] Fix GD and ZIP configuration with PHP 7.4.0 Test: gd, zip --- install-php-extensions | 14 ++++++++++---- scripts/travisci-test-new-extensions | 10 +++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/install-php-extensions b/install-php-extensions index 76ee76a..dd0801f 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -327,12 +327,14 @@ installBundledModule () { printf '### INSTALLING BUNDLED MODULE %s ###\n' "${2}" case "${2}" in gd) - if test $1 -lt 700; then + if test $1 -le 506; then docker-php-ext-configure gd --with-gd --with-vpx-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf - elif test $1 -lt 702; then + elif test $1 -le 701; then docker-php-ext-configure gd --with-gd --with-webp-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf - else + elif test $1 -le 703; then docker-php-ext-configure gd --with-gd --with-webp-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir + else + docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype fi ;; gmp) @@ -386,7 +388,11 @@ installBundledModule () { cmake .. make install cd - - docker-php-ext-configure zip --with-libzip + if test $1 -le 703; then + docker-php-ext-configure zip --with-libzip + else + docker-php-ext-configure zip --with-zip + fi ;; esac docker-php-ext-install -j$(nproc) "${2}" diff --git a/scripts/travisci-test-new-extensions b/scripts/travisci-test-new-extensions index 3aae496..572ca57 100755 --- a/scripts/travisci-test-new-extensions +++ b/scripts/travisci-test-new-extensions @@ -27,11 +27,11 @@ fi # Outputs: # the full docker image ID getExtensionImage () { - if test "${2}" = '7.4'; then - getExtensionImage_version='7.4.0RC3' - else - getExtensionImage_version="${2}" - fi + case "${2}" in + *) + getExtensionImage_version="${2}" + ;; + esac getExtensionImage_result="php:${getExtensionImage_version}-cli" getExtensionImage_reqs="${TRAVIS_BUILD_DIR}/data/special-requirements" if test -f "${getExtensionImage_reqs}"; then