From a814bd12a729fb60645f7c39c3f88f4757345f62 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Thu, 17 Dec 2020 16:56:23 +0100 Subject: [PATCH] Build imagick from master on PHP 8.0 Test: imagick --- data/supported-extensions | 2 +- install-php-extensions | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/data/supported-extensions b/data/supported-extensions index a52a638..76da6ab 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -19,7 +19,7 @@ gnupg 5.5 5.6 7.0 7.1 7.2 7.3 7.4 grpc 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 http 5.5 5.6 7.0 7.1 7.2 7.3 7.4 igbinary 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 -imagick 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +imagick 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 imap 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 interbase 5.5 5.6 7.0 7.1 7.2 7.3 intl 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 diff --git a/install-php-extensions b/install-php-extensions index d44f8e8..fefde8b 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1402,6 +1402,26 @@ installRemoteModule() { fi fi ;; + imagick) + if test $PHP_MAJMIN_VERSION -ge 800; then + if test -z "$installRemoteModule_version"; then + installRemoteModule_version=132a11fd26675db9eb9f0e9a3e2887c161875206 + fi + if test "${installRemoteModule_version%.*}" = "$installRemoteModule_version"; then + installRemoteModule_displayVersion="$installRemoteModule_version" + else + installRemoteModule_displayVersion="git--master-$installRemoteModule_version" + fi + installRemoteModule_src="$(getPackageSource https://codeload.github.com/Imagick/imagick/tar.gz/$installRemoteModule_version)" + cd -- "$installRemoteModule_src" + sed -Ei "s/^([ \t]*#define[ \t]+PHP_IMAGICK_VERSION[ \t]+\")@PACKAGE_VERSION@(\")/\1git--master-$installRemoteModule_displayVersion\2/" php_imagick.h + phpize + ./configure + make -j$(getProcessorCount) + make install + installRemoteModule_manuallyInstalled=1 + fi + ;; ioncube_loader) installRemoteModule_src='https://downloads.ioncube.com/loader_downloads/' if test $(php -r 'echo PHP_INT_SIZE;') -eq 4; then @@ -1932,6 +1952,9 @@ configureInstaller() { if test "${PHP_MODULE_TO_INSTALL#@}" != "$PHP_MODULE_TO_INSTALL"; then continue fi + if test "$PHP_MODULE_TO_INSTALL" = 'imagick' && test $PHP_MAJMIN_VERSION -ge 800; then + continue + fi if ! stringInList "$PHP_MODULE_TO_INSTALL" "$BUNDLED_MODULES"; then if test $PHP_MAJMIN_VERSION -lt 800; then pecl channel-update pecl.php.net || true