Skip to contentSkip to conversation

package/ghostscript: add pdf support

PATCH Applied Fabrice Fontaine 2 participants 2 messages Sep 4, 2022 – Apr 16, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/ghostscript: add pdf support

pdf support was disabled in commit
7a4944569ce83b0b7b0cabd6e8aa184b8cb72a22

It depends on openjpeg and jbig2dec

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

---
 package/ghostscript/ghostscript.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/ghostscript/ghostscript.mk +6 -1
index 5bf8b08966..a11aec1c54 100644
@@ -43,7 +43,6 @@ GHOSTSCRIPT_CONF_OPTS = \
 	--enable-freetype \
 	--disable-gtk \
 	--without-libpaper \
-	--without-pdf \
 	--with-system-libtiff
 
 ifeq ($(BR2_PACKAGE_JBIG2DEC),y)
@@ -63,6 +62,12 @@ endif
 ifeq ($(BR2_PACKAGE_OPENJPEG),y)
 GHOSTSCRIPT_DEPENDENCIES += openjpeg
 GHOSTSCRIPT_CONF_OPTS += --enable-openjpeg
+
+ifeq ($(BR2_PACKAGE_JBIG2DEC),y)
+GHOSTSCRIPT_CONF_OPTS += --with-pdf
+else
+GHOSTSCRIPT_CONF_OPTS += --without-pdf
+endif
 else
 GHOSTSCRIPT_CONF_OPTS += --disable-openjpeg
 endif
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Fabrice, All,

On 2022-09-04 16:45 +0200, Fabrice Fontaine spake thusly:

Quoted 26 lines

pdf support was disabled in commit
7a4944569ce83b0b7b0cabd6e8aa184b8cb72a22

It depends on openjpeg and jbig2dec

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

---
 package/ghostscript/ghostscript.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/ghostscript/ghostscript.mk +0 -1
index 5bf8b08966..a11aec1c54 100644
@@ -43,7 +43,6 @@ GHOSTSCRIPT_CONF_OPTS = \
 	--enable-freetype \
 	--disable-gtk \
 	--without-libpaper \
-	--without-pdf \
 	--with-system-libtiff
 
 ifeq ($(BR2_PACKAGE_JBIG2DEC),y)

package/ghostscript/ghostscript.mk endif · line 70

Quoted 9 lines
package/ghostscript/ghostscript.mk +6 -0
@@ -63,6 +62,12 @@ endif
 ifeq ($(BR2_PACKAGE_OPENJPEG),y)
 GHOSTSCRIPT_DEPENDENCIES += openjpeg
 GHOSTSCRIPT_CONF_OPTS += --enable-openjpeg
+
+ifeq ($(BR2_PACKAGE_JBIG2DEC),y)
+GHOSTSCRIPT_CONF_OPTS += --with-pdf
+else
+GHOSTSCRIPT_CONF_OPTS += --without-pdf
+endif

I found it weird that the dependency on jbig2dec was not added, but that's because of the conditional block, above...

Furthemore, that would no longer explicitly disable PDF if jbig2dec was enabled but openjpeg was not.

So, I extracted that and moved it to a dedicated conditional block:

   69 ifeq ($(BR2_PACKAGE_OPENJPEG)$(BR2_PACKAGE_JBIG2DEC),yy)
   70 # Dependencies already handle on per-package basis above,
   71 # but duplicated here for consistency.
   72 GHOSTSCRIPT_DEPENDENCIES += openjpeg jbig2dec
   73 GHOSTSCRIPT_CONF_OPTS += --with-pdf
   74 else
   75 GHOSTSCRIPT_CONF_OPTS += --without-pdf
   76 endif

Applied to master with the above change, thanks.

Regards,
Yann E. MORIN.

Quoted 10 lines
package/ghostscript/ghostscript.mk +0 -0
 else
 GHOSTSCRIPT_CONF_OPTS += --disable-openjpeg
 endif
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot