ghostscript.mk 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 = AGPLv3
  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. fontconfig \
  18. ghostscript-fonts \
  19. jpeg \
  20. lcms2 \
  21. libpng \
  22. tiff
  23. # Ghostscript includes (old) copies of several libraries, delete them.
  24. # Inspired by linuxfromscratch:
  25. # http://www.linuxfromscratch.org/blfs/view/svn/pst/gs.html
  26. define GHOSTSCRIPT_REMOVE_LIBS
  27. rm -rf $(@D)/freetype $(@D)/jpeg $(@D)/lcms2 $(@D)/libpng $(@D)/tiff $(@D)/zlib
  28. endef
  29. GHOSTSCRIPT_POST_PATCH_HOOKS += GHOSTSCRIPT_REMOVE_LIBS
  30. GHOSTSCRIPT_CONF_ENV = \
  31. CCAUX=$(HOSTCC) \
  32. CFLAGSAUX="$(HOST_CFLAGS) $(HOST_LDFLAGS)"
  33. GHOSTSCRIPT_CONF_OPTS = \
  34. --disable-compile-inits \
  35. --disable-cups \
  36. --enable-fontconfig \
  37. --with-fontpath=$(GHOSTSCRIPT_FONTS_TARGET_DIR) \
  38. --enable-freetype \
  39. --disable-gtk \
  40. --without-jbig2dec \
  41. --without-libpaper \
  42. --with-system-libtiff
  43. ifeq ($(BR2_PACKAGE_LIBIDN),y)
  44. GHOSTSCRIPT_DEPENDENCIES += libidn
  45. GHOSTSCRIPT_CONF_OPTS += --with-libidn
  46. else
  47. GHOSTSCRIPT_CONF_OPTS += --without-libidn
  48. endif
  49. ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
  50. GHOSTSCRIPT_DEPENDENCIES += xlib_libX11
  51. GHOSTSCRIPT_CONF_OPTS += --with-x
  52. else
  53. GHOSTSCRIPT_CONF_OPTS += --without-x
  54. endif
  55. $(eval $(autotools-package))