Skip to content

Commit 155a889

Browse files
authored
Merge pull request #558 from brefphp/fix-imagick
Fix imagick
2 parents 9014d5a + 3e303e5 commit 155a889

File tree

1 file changed

+15
-24
lines changed

1 file changed

+15
-24
lines changed

layers/imagick/Dockerfile

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,38 @@ RUN LD_LIBRARY_PATH= yum -y install libpng-devel libjpeg-devel lcms2-devel Image
1010

1111
# Compile libwebp since AL2 ships with v0.3, and v0.4 or higher is required to builder the other libs
1212
WORKDIR ${IMAGICK_BUILD_DIR}
13-
RUN curl -Ls -o libwebp.tar.gz https://github.com/webmproject/libwebp/archive/refs/tags/v1.3.2.tar.gz
13+
RUN curl -Ls -o libwebp.tar.gz https://github.com/webmproject/libwebp/archive/refs/tags/v1.4.0.tar.gz
1414
RUN tar xzf libwebp.tar.gz
15-
WORKDIR ${IMAGICK_BUILD_DIR}/libwebp-1.3.2
15+
WORKDIR ${IMAGICK_BUILD_DIR}/libwebp-1.4.0
1616
RUN autoreconf -i && automake && autoconf
1717
RUN ./configure --prefix ${INSTALL_DIR} --exec-prefix ${INSTALL_DIR}
18-
RUN make -j $(nproc)
19-
RUN make install
18+
RUN make -j $(nproc) && make install
2019

2120
# Compile libde265 (libheif dependency)
2221
WORKDIR ${IMAGICK_BUILD_DIR}
23-
RUN curl -Ls -o libde265.tar.gz https://github.com/strukturag/libde265/releases/download/v1.0.14/libde265-1.0.14.tar.gz
24-
RUN tar xzf libde265.tar.gz
25-
WORKDIR ${IMAGICK_BUILD_DIR}/libde265-1.0.14
22+
RUN curl -Ls -o libde265.tar.gz https://github.com/strukturag/libde265/releases/download/v1.0.15/libde265-1.0.15.tar.gz && tar xzf libde265.tar.gz
23+
WORKDIR ${IMAGICK_BUILD_DIR}/libde265-1.0.15
2624
RUN ./configure --prefix ${INSTALL_DIR} --exec-prefix ${INSTALL_DIR}
27-
RUN make -j $(nproc)
28-
RUN make install
25+
RUN make -j $(nproc) && make install
2926

3027
# Compile libheif
3128
WORKDIR ${IMAGICK_BUILD_DIR}
32-
RUN curl -Ls -o libheif.tar.gz https://github.com/strukturag/libheif/releases/download/v1.17.5/libheif-1.17.5.tar.gz
33-
RUN tar xzf libheif.tar.gz
34-
RUN mkdir ${IMAGICK_BUILD_DIR}/libheif-1.17.5/build
35-
WORKDIR ${IMAGICK_BUILD_DIR}/libheif-1.17.5/build
36-
RUN cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
37-
RUN make -j $(nproc)
38-
RUN make install
29+
RUN curl -Ls -o libheif.tar.gz https://github.com/strukturag/libheif/releases/download/v1.13.0/libheif-1.13.0.tar.gz && tar xzf libheif.tar.gz
30+
WORKDIR ${IMAGICK_BUILD_DIR}/libheif-1.13.0
31+
RUN ./configure --prefix ${INSTALL_DIR} --exec-prefix ${INSTALL_DIR}
32+
RUN make -j $(nproc) && make install
3933

4034
# Compile gs
4135
WORKDIR ${IMAGICK_BUILD_DIR}
42-
RUN curl -Ls -o ghostscript.tar.gz https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-9.56.1.tar.gz
43-
RUN tar xzf ghostscript.tar.gz
36+
RUN curl -Ls -o ghostscript.tar.gz https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-9.56.1.tar.gz && tar xzf ghostscript.tar.gz
4437
WORKDIR ${IMAGICK_BUILD_DIR}/ghostscript-9.56.1
4538
RUN ./configure --prefix ${INSTALL_DIR} --exec-prefix ${INSTALL_DIR} --without-x
46-
RUN make -j $(nproc)
47-
RUN cp bin/gs /tmp/gs
39+
RUN make -j $(nproc) && cp bin/gs /tmp/gs
4840

4941
# Compile the ImageMagick library
5042
WORKDIR ${IMAGICK_BUILD_DIR}
51-
RUN curl -Ls -o ImageMagick.tar.gz https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-22.tar.gz
52-
RUN tar xzf ImageMagick.tar.gz
53-
WORKDIR ${IMAGICK_BUILD_DIR}/ImageMagick-7.1.1-22
43+
RUN curl -Ls -o ImageMagick.tar.gz https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-38.tar.gz && tar xzf ImageMagick.tar.gz
44+
WORKDIR ${IMAGICK_BUILD_DIR}/ImageMagick-7.1.1-38
5445
RUN ./configure --prefix ${INSTALL_DIR} --exec-prefix ${INSTALL_DIR} --with-webp --with-heic --disable-static --with-freetype=yes
5546
RUN make -j $(nproc)
5647
RUN make install
@@ -62,7 +53,7 @@ RUN convert -list configure
6253
WORKDIR ${IMAGICK_BUILD_DIR}
6354
RUN git clone https://github.com/Imagick/imagick
6455
WORKDIR ${IMAGICK_BUILD_DIR}/imagick
65-
# TODO; update the commit hash once this PR has been merged with PHP 8.3 support: https://github.com/Imagick/imagick/pull/641
56+
# TODO; update the commit hash when there's a new release
6657
RUN git reset --hard 28f27044e435a2b203e32675e942eb8de620ee58
6758
RUN phpize
6859
RUN ./configure --with-imagick=${INSTALL_DIR}

0 commit comments

Comments
 (0)