[Buildroot] [git commit] package/ghostscript: add pdf support
Yann E. MORIN
yann.morin.1998 at free.fr
Sun Apr 16 13:10:28 UTC 2023
commit: https://git.buildroot.net/buildroot/commit/?id=115d362e079a2c733508f5d1b37fafabcdd27370
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
PDF support was disabled in commit 7a4944569ce8 (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 at gmail.com>
[yann.morin.1998 at 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 at free.fr>
---
package/ghostscript/ghostscript.mk | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/package/ghostscript/ghostscript.mk b/package/ghostscript/ghostscript.mk
index 5bf8b08966..364fa1469a 100644
--- a/package/ghostscript/ghostscript.mk
+++ b/package/ghostscript/ghostscript.mk
@@ -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 += \
More information about the buildroot
mailing list