Added imagick PDF support (via ghostscript)

This commit is contained in:
cytopia
2020-08-08 11:08:05 +02:00
parent 10285279c7
commit 3153b329f1
10 changed files with 49 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ RUN set -eux \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
@@ -703,6 +704,7 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \

View File

@@ -12,6 +12,7 @@ RUN set -eux \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
@@ -719,6 +720,7 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \

View File

@@ -12,6 +12,7 @@ RUN set -eux \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
@@ -765,6 +766,7 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \

View File

@@ -12,6 +12,7 @@ RUN set -eux \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
@@ -774,6 +775,7 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \

View File

@@ -12,6 +12,7 @@ RUN set -eux \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
@@ -778,6 +779,7 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \

View File

@@ -12,6 +12,7 @@ RUN set -eux \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
@@ -778,6 +779,7 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \

View File

@@ -12,6 +12,7 @@ RUN set -eux \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
@@ -733,6 +734,7 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \

View File

@@ -346,18 +346,18 @@ extensions_available:
disabled: [5.2, 5.3, 5.4, 8.0] # Only available since 5.3. 5.3 and 5.4 segfaults disabled: [5.2, 5.3, 5.4, 8.0] # Only available since 5.3. 5.3 and 5.4 segfaults
5.5: 5.5:
type: pecl type: pecl
build_dep: [libmagickwand-dev, libwebp5] build_dep: [libmagickwand-dev, libwebp5, ghostscript]
run_dep: [libmagickwand-6.q16-2, libwebp5] run_dep: [libmagickwand-6.q16-2, libwebp5, ghostscript]
5.6: 5.6:
type: pecl type: pecl
run_dep: [libmagickwand-6.q16-3, libwebp6] run_dep: [libmagickwand-6.q16-3, libwebp6, ghostscript]
7.0: 7.0:
type: pecl type: pecl
run_dep: [libmagickwand-6.q16-3, libwebp6] run_dep: [libmagickwand-6.q16-3, libwebp6, ghostscript]
all: all:
type: pecl type: pecl
build_dep: [libmagickwand-dev, libwebp6] build_dep: [libmagickwand-dev, libwebp6, ghostscript]
run_dep: [libmagickwand-6.q16-6, libwebp-dev] run_dep: [libmagickwand-6.q16-6, libwebp-dev, ghostscript]
# https://bugs.php.net/bug.php?id=77683 # https://bugs.php.net/bug.php?id=77683
post: sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml post: sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml
imap: imap:

Binary file not shown.

View File

@@ -0,0 +1,29 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$PHP_VERSION = str_replace('-dev', '', PHP_VERSION);
// Only available since 5.3.0 (PHP 5.3 and 5.4 segfaults)
if (version_compare($PHP_VERSION, '5.5.0', '<')) {
echo 'SKIP';
exit(0);
}
// FIXME: Currently not supported on PHP 8
if (version_compare($PHP_VERSION, '8.0.0', '>=')) {
echo 'SKIP';
exit(0);
}
$img = new Imagick();
if ($img->readImage('dummy.pdf') !== True) {
echo 'FAIL: newImage()';
exit(1);
}
echo 'OK';