package/ghostscript: add optional dependency to jbig2dec

Remove jbig2dec source files included in upstream tarball as well.

Needs http://patchwork.ozlabs.org/patch/1161981/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Bernd Kuhls 2019-11-06 22:10:04 +01:00 committed by Thomas Petazzoni
parent 29d8b9e53b
commit b3c1e64a23

View File

@ -27,8 +27,8 @@ GHOSTSCRIPT_DEPENDENCIES = \
# Inspired by linuxfromscratch: # Inspired by linuxfromscratch:
# http://www.linuxfromscratch.org/blfs/view/svn/pst/gs.html # http://www.linuxfromscratch.org/blfs/view/svn/pst/gs.html
define GHOSTSCRIPT_REMOVE_LIBS define GHOSTSCRIPT_REMOVE_LIBS
rm -rf $(@D)/freetype $(@D)/ijs $(@D)/jpeg $(@D)/lcms2mt \ rm -rf $(@D)/freetype $(@D)/ijs $(@D)/jbig2dec $(@D)/jpeg \
$(@D)/libpng $(@D)/tiff $(@D)/zlib $(@D)/lcms2mt $(@D)/libpng $(@D)/tiff $(@D)/zlib
endef endef
GHOSTSCRIPT_POST_PATCH_HOOKS += GHOSTSCRIPT_REMOVE_LIBS GHOSTSCRIPT_POST_PATCH_HOOKS += GHOSTSCRIPT_REMOVE_LIBS
@ -43,10 +43,16 @@ GHOSTSCRIPT_CONF_OPTS = \
--with-fontpath=/usr/share/fonts \ --with-fontpath=/usr/share/fonts \
--enable-freetype \ --enable-freetype \
--disable-gtk \ --disable-gtk \
--without-jbig2dec \
--without-libpaper \ --without-libpaper \
--with-system-libtiff --with-system-libtiff
ifeq ($(BR2_PACKAGE_JBIG2DEC),y)
GHOSTSCRIPT_DEPENDENCIES += jbig2dec
GHOSTSCRIPT_CONF_OPTS += --with-jbig2dec
else
GHOSTSCRIPT_CONF_OPTS += --without-jbig2dec
endif
ifeq ($(BR2_PACKAGE_LIBIDN),y) ifeq ($(BR2_PACKAGE_LIBIDN),y)
GHOSTSCRIPT_DEPENDENCIES += libidn GHOSTSCRIPT_DEPENDENCIES += libidn
GHOSTSCRIPT_CONF_OPTS += --with-libidn GHOSTSCRIPT_CONF_OPTS += --with-libidn