icu.mk 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ################################################################################
  2. #
  3. # icu
  4. #
  5. ################################################################################
  6. # Git tags (and therefore versions on release-monitoring.org) use the
  7. # XX-Y format, but the tarballs are named XX_Y and the containing
  8. # directories XX.Y.
  9. ICU_VERSION = 67-1
  10. ICU_SOURCE = icu4c-$(subst -,_,$(ICU_VERSION))-src.tgz
  11. ICU_SITE = \
  12. https://github.com/unicode-org/icu/releases/download/release-$(ICU_VERSION)
  13. ICU_LICENSE = ICU License
  14. ICU_LICENSE_FILES = LICENSE
  15. ICU_DEPENDENCIES = host-icu
  16. ICU_INSTALL_STAGING = YES
  17. ICU_CONFIG_SCRIPTS = icu-config
  18. ICU_CONF_OPTS = \
  19. --with-cross-build=$(HOST_ICU_DIR)/source \
  20. --disable-samples \
  21. --disable-tests
  22. # When available, icu prefers to use C++11 atomics, which rely on the
  23. # __atomic builtins. On certain architectures, this requires linking
  24. # with libatomic starting from gcc 4.8.
  25. ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
  26. ICU_CONF_ENV += LIBS="-latomic"
  27. endif
  28. # strtod_l() is not supported by musl; also xlocale.h is missing
  29. ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
  30. ICU_CONF_ENV += ac_cv_func_strtod_l=no
  31. endif
  32. HOST_ICU_CONF_OPTS = \
  33. --disable-samples \
  34. --disable-tests \
  35. --disable-extras \
  36. --disable-icuio \
  37. --disable-layout \
  38. --disable-renaming
  39. ICU_SUBDIR = source
  40. HOST_ICU_SUBDIR = source
  41. ICU_CUSTOM_DATA_PATH = $(call qstrip,$(BR2_PACKAGE_ICU_CUSTOM_DATA_PATH))
  42. ifneq ($(ICU_CUSTOM_DATA_PATH),)
  43. define ICU_COPY_CUSTOM_DATA
  44. cp $(ICU_CUSTOM_DATA_PATH) $(@D)/source/data/in/
  45. endef
  46. ICU_POST_PATCH_HOOKS += ICU_COPY_CUSTOM_DATA
  47. endif
  48. define ICU_REMOVE_DEV_FILES
  49. rm -f $(addprefix $(TARGET_DIR)/usr/bin/,derb genbrk gencfu gencnval gendict genrb icuinfo makeconv uconv)
  50. rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,genccode gencmn gennorm2 gensprep icupkg)
  51. rm -rf $(TARGET_DIR)/usr/share/icu
  52. endef
  53. ICU_POST_INSTALL_TARGET_HOOKS += ICU_REMOVE_DEV_FILES
  54. $(eval $(autotools-package))
  55. $(eval $(host-autotools-package))