2016-12-18 21:56:29 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# ghostscript
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2019-10-20 13:18:12 +02:00
|
|
|
GHOSTSCRIPT_VERSION = 9.50
|
2019-04-10 06:28:19 +02:00
|
|
|
GHOSTSCRIPT_SITE = https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$(subst .,,$(GHOSTSCRIPT_VERSION))
|
2016-12-18 21:56:29 +01:00
|
|
|
GHOSTSCRIPT_SOURCE = ghostscript-$(GHOSTSCRIPT_VERSION).tar.xz
|
2017-03-30 15:43:36 +02:00
|
|
|
GHOSTSCRIPT_LICENSE = AGPL-3.0
|
2016-12-18 21:56:29 +01:00
|
|
|
GHOSTSCRIPT_LICENSE_FILES = LICENSE
|
|
|
|
# 0001-Fix-cross-compilation-issue.patch
|
|
|
|
GHOSTSCRIPT_AUTORECONF = YES
|
|
|
|
GHOSTSCRIPT_DEPENDENCIES = \
|
|
|
|
host-lcms2 \
|
|
|
|
host-libjpeg \
|
|
|
|
host-pkgconf \
|
2017-03-26 22:00:17 +02:00
|
|
|
host-zlib \
|
2016-12-18 21:56:29 +01:00
|
|
|
fontconfig \
|
|
|
|
ghostscript-fonts \
|
|
|
|
jpeg \
|
|
|
|
lcms2 \
|
|
|
|
libpng \
|
|
|
|
tiff
|
|
|
|
|
|
|
|
# Ghostscript includes (old) copies of several libraries, delete them.
|
|
|
|
# Inspired by linuxfromscratch:
|
|
|
|
# http://www.linuxfromscratch.org/blfs/view/svn/pst/gs.html
|
|
|
|
define GHOSTSCRIPT_REMOVE_LIBS
|
2019-11-06 22:10:04 +01:00
|
|
|
rm -rf $(@D)/freetype $(@D)/ijs $(@D)/jbig2dec $(@D)/jpeg \
|
2019-11-06 22:10:05 +01:00
|
|
|
$(@D)/lcms2mt $(@D)/libpng $(@D)/openjpeg $(@D)/tiff \
|
|
|
|
$(@D)/zlib
|
2016-12-18 21:56:29 +01:00
|
|
|
endef
|
|
|
|
GHOSTSCRIPT_POST_PATCH_HOOKS += GHOSTSCRIPT_REMOVE_LIBS
|
|
|
|
|
|
|
|
GHOSTSCRIPT_CONF_ENV = \
|
2017-03-26 22:00:17 +02:00
|
|
|
CCAUX="$(HOSTCC)" \
|
2016-12-18 21:56:29 +01:00
|
|
|
CFLAGSAUX="$(HOST_CFLAGS) $(HOST_LDFLAGS)"
|
|
|
|
|
|
|
|
GHOSTSCRIPT_CONF_OPTS = \
|
|
|
|
--disable-compile-inits \
|
|
|
|
--disable-cups \
|
|
|
|
--enable-fontconfig \
|
2018-07-25 13:46:28 +02:00
|
|
|
--with-fontpath=/usr/share/fonts \
|
2016-12-18 21:56:29 +01:00
|
|
|
--enable-freetype \
|
|
|
|
--disable-gtk \
|
|
|
|
--without-libpaper \
|
|
|
|
--with-system-libtiff
|
|
|
|
|
2019-11-06 22:10:04 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_JBIG2DEC),y)
|
|
|
|
GHOSTSCRIPT_DEPENDENCIES += jbig2dec
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --with-jbig2dec
|
|
|
|
else
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --without-jbig2dec
|
|
|
|
endif
|
|
|
|
|
2016-12-18 21:56:29 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIDN),y)
|
|
|
|
GHOSTSCRIPT_DEPENDENCIES += libidn
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --with-libidn
|
|
|
|
else
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --without-libidn
|
|
|
|
endif
|
|
|
|
|
2019-11-06 22:10:05 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENJPEG),y)
|
|
|
|
GHOSTSCRIPT_DEPENDENCIES += openjpeg
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --enable-openjpeg
|
|
|
|
else
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --disable-openjpeg
|
|
|
|
endif
|
|
|
|
|
2016-12-18 21:56:29 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
|
|
|
|
GHOSTSCRIPT_DEPENDENCIES += xlib_libX11
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --with-x
|
|
|
|
else
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --without-x
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(eval $(autotools-package))
|