package/ghostscript: add optional dependency to openjpeg
authorBernd Kuhls <bernd.kuhls@t-online.de>
Wed, 6 Nov 2019 21:10:05 +0000 (22:10 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 29 Mar 2020 20:55:39 +0000 (22:55 +0200)
Remove openjpeg source files included in upstream tarball as well.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/ghostscript/ghostscript.mk

index d0f46187c32f1ac91d333a27a31bfb5e339e9a58..1d6f8d04a0b937c1c3c92f439e0b09d26ec41d30 100644 (file)
@@ -28,7 +28,8 @@ GHOSTSCRIPT_DEPENDENCIES = \
 # http://www.linuxfromscratch.org/blfs/view/svn/pst/gs.html
 define GHOSTSCRIPT_REMOVE_LIBS
        rm -rf $(@D)/freetype $(@D)/ijs $(@D)/jbig2dec $(@D)/jpeg \
-               $(@D)/lcms2mt $(@D)/libpng $(@D)/tiff $(@D)/zlib
+               $(@D)/lcms2mt $(@D)/libpng $(@D)/openjpeg $(@D)/tiff \
+               $(@D)/zlib
 endef
 GHOSTSCRIPT_POST_PATCH_HOOKS += GHOSTSCRIPT_REMOVE_LIBS
 
@@ -60,6 +61,13 @@ else
 GHOSTSCRIPT_CONF_OPTS += --without-libidn
 endif
 
+ifeq ($(BR2_PACKAGE_OPENJPEG),y)
+GHOSTSCRIPT_DEPENDENCIES += openjpeg
+GHOSTSCRIPT_CONF_OPTS += --enable-openjpeg
+else
+GHOSTSCRIPT_CONF_OPTS += --disable-openjpeg
+endif
+
 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
 GHOSTSCRIPT_DEPENDENCIES += xlib_libX11
 GHOSTSCRIPT_CONF_OPTS += --with-x