2016-12-18 21:56:29 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# ghostscript
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2022-01-15 15:39:00 +01:00
|
|
|
GHOSTSCRIPT_VERSION = 9.55.0
|
2019-04-10 06:28:19 +02:00
|
|
|
GHOSTSCRIPT_SITE = https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$(subst .,,$(GHOSTSCRIPT_VERSION))
|
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
|
2021-02-04 20:46:52 +01:00
|
|
|
GHOSTSCRIPT_CPE_ID_VENDOR = artifex
|
2016-12-18 21:56:29 +01:00
|
|
|
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)" \
|
package/ghostscript: security bump to version 9.52
Fix a bunch of CVEs: CVE-2020-16287, CVE-2020-16288, CVE-2020-16289,
CVE-2020-16290, CVE-2020-16291, CVE-2020-16292, CVE-2020-16293,
CVE-2020-16294, CVE-2020-16295, CVE-2020-16296, CVE-2020-16297,
CVE-2020-16298, CVE-2020-16299, CVE-2020-16300, CVE-2020-16301,
CVE-2020-16302, CVE-2020-16303, CVE-2020-16304, CVE-2020-16305
CVE-2020-16308, CVE-2020-16309, CVE-2020-17538
PKGCONFIG must be passed since version 9.51 and
https://github.com/ArtifexSoftware/ghostpdl/commit/2d84ecc57837785b566ebd9d5909ba9edc9d697f
Also drop patch (already in version) and update indentation in hash file
(two spaces)
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-08-17 20:51:09 +02:00
|
|
|
CFLAGSAUX="$(HOST_CFLAGS) $(HOST_LDFLAGS)" \
|
|
|
|
PKGCONFIG="$(PKG_CONFIG_HOST_BINARY)"
|
2016-12-18 21:56:29 +01:00
|
|
|
|
|
|
|
GHOSTSCRIPT_CONF_OPTS = \
|
|
|
|
--disable-compile-inits \
|
|
|
|
--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 \
|
2022-01-15 15:39:00 +01:00
|
|
|
--without-pdf \
|
2016-12-18 21:56:29 +01:00
|
|
|
--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
|
|
|
|
|
2020-05-01 17:49:50 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_CUPS),y)
|
|
|
|
GHOSTSCRIPT_DEPENDENCIES += cups
|
2021-11-29 23:35:09 +01:00
|
|
|
GHOSTSCRIPT_CONF_OPTS += \
|
2020-05-01 17:49:50 +02:00
|
|
|
CUPSCONFIG=$(STAGING_DIR)/usr/bin/cups-config \
|
|
|
|
--enable-cups
|
|
|
|
else
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --disable-cups
|
|
|
|
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
|
|
|
|
|
2022-02-23 21:26:48 +01:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
|
|
|
|
GHOSTSCRIPT_CONF_OPTS += --without-tesseract
|
|
|
|
endif
|
|
|
|
|
2016-12-18 21:56:29 +01:00
|
|
|
$(eval $(autotools-package))
|