瀏覽代碼

package/ghostscript: add pdf support

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@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>
Fabrice Fontaine 2 年之前
父節點
當前提交
115d362e07
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      package/ghostscript/ghostscript.mk

+ 9 - 1
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 += \