Skip to content

Commit

Permalink
PS-719 add heic support to imagick for php8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Nov 13, 2024
1 parent e1e7a1c commit d4f5449
Show file tree
Hide file tree
Showing 3 changed files with 374 additions and 363 deletions.
23 changes: 16 additions & 7 deletions databox/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ ARG BASE_TAG=latest
ARG REGISTRY_NAMESPACE
FROM ${REGISTRY_NAMESPACE}php-fpm-base:${BASE_TAG} AS api-php

ENV IMAGICK_PHP83_FIX_COMMIT=9df92616f577e38625b96b7b903582a46c064739
# IMAGICK_VERSION=3.7.0
ENV IMAGICK_PHP83_FIX_COMMIT=28f27044e435a2b203e32675e942eb8de620ee58

RUN apk add --no-cache \
perl \
Expand All @@ -12,6 +11,7 @@ RUN apk add --no-cache \
libjpeg-turbo \
libpng \
libwebp \
libheif \
ffmpeg \
libreoffice \
&& apk add --no-cache --virtual build-essentials \
Expand All @@ -24,12 +24,21 @@ RUN apk add --no-cache \
libjpeg-turbo-dev \
freetype-dev \
imagemagick-dev \
&& curl -L https://github.com/remicollet/imagick/archive/${IMAGICK_PHP83_FIX_COMMIT}.zip -o /tmp/imagick-issue-php83.zip \
&& unzip /tmp/imagick-issue-php83.zip -d /tmp \
&& pecl install /tmp/imagick-${IMAGICK_PHP83_FIX_COMMIT}/package.xml \
# && pecl install \
# imagick-${IMAGICK_VERSION} \
&& pecl clear-cache \
&& wget -O /tmp/imagick.zip https://github.com/Imagick/imagick/archive/${IMAGICK_PHP83_FIX_COMMIT}/master.zip \
&& unzip -qq -d /tmp/imagick /tmp/imagick.zip \
&& ls -la /tmp/imagick \
&& (cd /tmp/imagick/imagick-${IMAGICK_PHP83_FIX_COMMIT} \
&& phpize \
&& ./configure \
--with-heic=yes \
--with-jpeg=yes \
--with-png=yes \
--with-tiff=yes \
--with-webp=yes \
&& make \
&& make install \
) \
&& docker-php-ext-install \
exif \
&& docker-php-ext-enable \
Expand Down
Loading

0 comments on commit d4f5449

Please sign in to comment.