package/ghostscript: add pdf support

PDF support was disabled in commit 7a4944569c (package/ghostscript:
bump to version 9.55.0) as it was then a new option which broke the
build.

PDF support depends on both openjpeg and jbig2dec. There is already a
conditional block for each, but it is not trivial to merge sanely, so we
introduce a third conditionl block to enable PDF. AS explained in the
comment, the dependencies are duplicated in that conditional block: in
case the other conditions get dropped in the future, we will still want
to depend on both for PDF support (unless that changes too, in which
case it will also be easier to spot and update).

Fixes:
 - https://bugs.buildroot.org/show_bug.cgi?id=14976

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[yann.morin.1998@free.fr:
  - move to its own conditional block
  - add a comment about duplicated dependencies
  - expadn commit log.
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Fabrice Fontaine 2022-09-04 16:45:41 +02:00 committed by Yann E. MORIN
parent 4468f82885
commit 115d362e07

View File

@ -43,7 +43,6 @@ GHOSTSCRIPT_CONF_OPTS = \
--enable-freetype \
--disable-gtk \
--without-libpaper \
--without-pdf \
--with-system-libtiff
ifeq ($(BR2_PACKAGE_JBIG2DEC),y)
@ -67,6 +66,15 @@ else
GHOSTSCRIPT_CONF_OPTS += --disable-openjpeg
endif
ifeq ($(BR2_PACKAGE_OPENJPEG)$(BR2_PACKAGE_JBIG2DEC),yy)
# Dependencies already handle on per-package basis above,
# but duplicated here for consistency.
GHOSTSCRIPT_DEPENDENCIES += openjpeg jbig2dec
GHOSTSCRIPT_CONF_OPTS += --with-pdf
else
GHOSTSCRIPT_CONF_OPTS += --without-pdf
endif
ifeq ($(BR2_PACKAGE_CUPS),y)
GHOSTSCRIPT_DEPENDENCIES += cups
GHOSTSCRIPT_CONF_OPTS += \