systemd: bump version to 233
[buildroot-gz.git] / package / ghostscript / ghostscript.mk
blobe568b2047563544dd161828f4219149264bfa48e
1 ################################################################################
3 # ghostscript
5 ################################################################################
7 GHOSTSCRIPT_VERSION = 9.21
8 GHOSTSCRIPT_SITE = https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs921
9 GHOSTSCRIPT_SOURCE = ghostscript-$(GHOSTSCRIPT_VERSION).tar.xz
10 GHOSTSCRIPT_LICENSE = AGPLv3
11 GHOSTSCRIPT_LICENSE_FILES = LICENSE
12 # 0001-Fix-cross-compilation-issue.patch
13 GHOSTSCRIPT_AUTORECONF = YES
14 GHOSTSCRIPT_DEPENDENCIES = \
15 host-lcms2 \
16 host-libjpeg \
17 host-pkgconf \
18 fontconfig \
19 ghostscript-fonts \
20 jpeg \
21 lcms2 \
22 libpng \
23 tiff
25 # Ghostscript includes (old) copies of several libraries, delete them.
26 # Inspired by linuxfromscratch:
27 # http://www.linuxfromscratch.org/blfs/view/svn/pst/gs.html
28 define GHOSTSCRIPT_REMOVE_LIBS
29 rm -rf $(@D)/freetype $(@D)/ijs $(@D)/jpeg $(@D)/lcms2 $(@D)/libpng $(@D)/tiff $(@D)/zlib
30 endef
31 GHOSTSCRIPT_POST_PATCH_HOOKS += GHOSTSCRIPT_REMOVE_LIBS
33 GHOSTSCRIPT_CONF_ENV = \
34 CCAUX=$(HOSTCC) \
35 CFLAGSAUX="$(HOST_CFLAGS) $(HOST_LDFLAGS)"
37 GHOSTSCRIPT_CONF_OPTS = \
38 --disable-compile-inits \
39 --disable-cups \
40 --enable-fontconfig \
41 --with-fontpath=$(GHOSTSCRIPT_FONTS_TARGET_DIR) \
42 --enable-freetype \
43 --disable-gtk \
44 --without-jbig2dec \
45 --without-libpaper \
46 --with-system-libtiff
48 ifeq ($(BR2_PACKAGE_LIBIDN),y)
49 GHOSTSCRIPT_DEPENDENCIES += libidn
50 GHOSTSCRIPT_CONF_OPTS += --with-libidn
51 else
52 GHOSTSCRIPT_CONF_OPTS += --without-libidn
53 endif
55 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
56 GHOSTSCRIPT_DEPENDENCIES += xlib_libX11
57 GHOSTSCRIPT_CONF_OPTS += --with-x
58 else
59 GHOSTSCRIPT_CONF_OPTS += --without-x
60 endif
62 $(eval $(autotools-package))