1
0

Makefile 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=icu4c
  9. MAJOR_VERSION:=64
  10. MINOR_VERSION:=2
  11. PKG_VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION)
  12. PKG_RELEASE:=2
  13. PKG_SOURCE:=$(PKG_NAME)-$(MAJOR_VERSION)_$(MINOR_VERSION)-src.tgz
  14. PKG_SOURCE_URL:=https://github.com/unicode-org/icu/releases/download/release-$(MAJOR_VERSION)-$(MINOR_VERSION)
  15. PKG_HASH:=627d5d8478e6d96fc8c90fed4851239079a561a6a8b9e48b0892f24e82d31d6c
  16. PKG_LICENSE:=ICU-1.8.1+
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_CPE_ID:=cpe:/a:icu-project:international_components_for_unicode
  19. PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
  20. PKG_INSTALL:=1
  21. PKG_BUILD_PARALLEL:=1
  22. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  23. PKG_BUILD_DEPENDS:=icu/host
  24. include $(INCLUDE_DIR)/package.mk
  25. include $(INCLUDE_DIR)/host-build.mk
  26. TAR_OPTIONS+= icu/source --strip-components 2
  27. TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
  28. define Package/icu
  29. SECTION:=libs
  30. CATEGORY:=Libraries
  31. TITLE:=International Components for Unicode
  32. URL:=http://icu-project.org
  33. DEPENDS:=+libstdcpp +libpthread
  34. endef
  35. define Package/icu/description
  36. ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Java software.
  37. This package supports C/C++.
  38. endef
  39. define Package/icu-full-data
  40. SECTION:=libs
  41. CATEGORY:=Libraries
  42. TITLE:=Full ICU Data
  43. URL:=http://icu-project.org
  44. DEPENDS:=+icu
  45. endef
  46. define Package/icu-full-data/description
  47. ICU makes use of a wide variety of data tables to provide many of its services. Examples include converter mapping tables, collation rules, transliteration rules, break iterator rules and dictionaries, and other locale data.
  48. This package contains the complete data library provided by ICU.
  49. A custom data library can be generated at http://apps.icu-project.org/datacustom/
  50. endef
  51. define Package/icu-data-tools
  52. SECTION:=libs
  53. CATEGORY:=Libraries
  54. TITLE:=ICU Data manipulation tools
  55. URL:=http://icu-project.org
  56. DEPENDS:=+icu
  57. endef
  58. define Package/icu-data-tools/description
  59. This package provides tools for manipulating ICU data.
  60. endef
  61. CONFIGURE_CMD:= ./runConfigureICU
  62. CONFIGURE_ARGS:= \
  63. Linux/gcc \
  64. CC="$(TARGET_CC)" \
  65. CXX="$(TARGET_CXX)" \
  66. --target=$(GNU_TARGET_NAME) \
  67. --host=$(GNU_TARGET_NAME) \
  68. --build=$(GNU_HOST_NAME) \
  69. --disable-debug \
  70. --enable-release \
  71. --enable-shared \
  72. --enable-static \
  73. --enable-draft \
  74. --enable-renaming \
  75. --disable-tracing \
  76. --disable-extras \
  77. --enable-dyload \
  78. --with-data-packaging=archive \
  79. --disable-tests \
  80. --disable-samples \
  81. --with-cross-build="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
  82. --prefix=/usr
  83. HOST_CONFIGURE_CMD:= ./runConfigureICU
  84. HOST_CONFIGURE_VARS:=
  85. HOST_CONFIGURE_ARGS:= \
  86. Linux/gcc \
  87. --disable-debug \
  88. --enable-release \
  89. --enable-shared \
  90. --enable-static \
  91. --enable-draft \
  92. --enable-renaming \
  93. --disable-tracing \
  94. --disable-extras \
  95. --enable-dyload \
  96. --prefix=$(STAGING_DIR_HOSTPKG)
  97. define Build/Prepare
  98. $(call Build/Prepare/Default)
  99. mkdir -p $(PKG_BUILD_DIR)/data/out
  100. endef
  101. define Build/InstallDev
  102. $(INSTALL_DIR) $(1)/usr/include
  103. $(INSTALL_DIR) $(1)/usr/lib
  104. $(INSTALL_DIR) $(1)/usr/bin
  105. $(INSTALL_DIR) $(2)/bin
  106. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  107. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  108. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icu-config $(1)/usr/bin/
  109. $(SED) 's,^\(prefix\|execprefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/icu-config
  110. $(LN) $(STAGING_DIR)/usr/bin/icu-config $(2)/bin/
  111. endef
  112. define Host/Install
  113. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config
  114. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin
  115. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib
  116. $(INSTALL_DATA) $(HOST_BUILD_DIR)/config/icucross.* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config/
  117. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  118. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  119. $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
  120. endef
  121. define Package/icu/install
  122. $(INSTALL_DIR) $(1)/usr/lib
  123. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  124. endef
  125. define Package/icu-full-data/install
  126. $(INSTALL_DIR) $(1)/usr/share/icu/$(PKG_VERSION)
  127. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/icu/$(PKG_VERSION)/icudt*.dat \
  128. $(1)/usr/share/icu/$(PKG_VERSION)/
  129. endef
  130. define Package/icu-data-tools/install
  131. $(INSTALL_DIR) $(1)/usr/bin
  132. $(INSTALL_DIR) $(1)/usr/sbin
  133. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  134. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  135. endef
  136. $(eval $(call HostBuild))
  137. $(eval $(call BuildPackage,icu))
  138. $(eval $(call BuildPackage,icu-full-data))
  139. $(eval $(call BuildPackage,icu-data-tools))