freetype.mk 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ################################################################################
  2. #
  3. # freetype
  4. #
  5. ################################################################################
  6. FREETYPE_VERSION = 2.13.2
  7. FREETYPE_SOURCE = freetype-$(FREETYPE_VERSION).tar.xz
  8. FREETYPE_SITE = http://download.savannah.gnu.org/releases/freetype
  9. FREETYPE_INSTALL_STAGING = YES
  10. FREETYPE_MAKE_OPTS = CCexe="$(HOSTCC)"
  11. FREETYPE_LICENSE = FTL or GPL-2.0+
  12. FREETYPE_LICENSE_FILES = LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
  13. FREETYPE_CPE_ID_VENDOR = freetype
  14. FREETYPE_DEPENDENCIES = host-pkgconf
  15. FREETYPE_CONFIG_SCRIPTS = freetype-config
  16. # harfbuzz already depends on freetype so disable harfbuzz in freetype to avoid
  17. # a circular dependency
  18. FREETYPE_CONF_OPTS = --without-harfbuzz
  19. HOST_FREETYPE_DEPENDENCIES = host-pkgconf
  20. HOST_FREETYPE_CONF_OPTS = \
  21. --without-brotli \
  22. --without-bzip2 \
  23. --without-harfbuzz \
  24. --without-png \
  25. --without-zlib
  26. # since 2.9.1 needed for freetype-config install
  27. FREETYPE_CONF_OPTS += --enable-freetype-config
  28. HOST_FREETYPE_CONF_OPTS += --enable-freetype-config
  29. ifeq ($(BR2_PACKAGE_ZLIB),y)
  30. FREETYPE_DEPENDENCIES += zlib
  31. FREETYPE_CONF_OPTS += --with-zlib
  32. else
  33. FREETYPE_CONF_OPTS += --without-zlib
  34. endif
  35. ifeq ($(BR2_PACKAGE_BROTLI),y)
  36. FREETYPE_DEPENDENCIES += brotli
  37. FREETYPE_CONF_OPTS += --with-brotli
  38. else
  39. FREETYPE_CONF_OPTS += --without-brotli
  40. endif
  41. ifeq ($(BR2_PACKAGE_BZIP2),y)
  42. FREETYPE_DEPENDENCIES += bzip2
  43. FREETYPE_CONF_OPTS += --with-bzip2
  44. else
  45. FREETYPE_CONF_OPTS += --without-bzip2
  46. endif
  47. ifeq ($(BR2_PACKAGE_LIBPNG),y)
  48. FREETYPE_DEPENDENCIES += libpng
  49. FREETYPE_CONF_OPTS += --with-png
  50. else
  51. FREETYPE_CONF_OPTS += --without-png
  52. endif
  53. # Extra fixing since includedir and libdir are expanded from configure values
  54. define FREETYPE_FIX_CONFIG_FILE
  55. $(SED) 's:^includedir=.*:includedir="$${prefix}/include":' \
  56. -e 's:^libdir=.*:libdir="$${exec_prefix}/lib":' \
  57. $(STAGING_DIR)/usr/bin/freetype-config
  58. endef
  59. FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE
  60. $(eval $(autotools-package))
  61. $(eval $(host-autotools-package))