ghostscript.mk 1.7 KB

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