freetype.mk 2.0 KB

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