You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
5.3 KiB

icu: support OpenWrt trunk host-build.mk issue Maintainer: me Compile tested: ar71xx, mips_34kc_gcc-5.3.0_musl, OpenWrt trunk 50104 ar71xx, mips_24kc_gcc-5.4.0_musl, LEDE trunk r3503-a112435 Run tested: NONE Description: openwrt buildbot report build fail ``` ./runConfigureICU CC="gcc" CFLAGS="-O2 -I/home/builder/trunk/openwrt/staging_dir/host/include -I/home/builder/trunk/openwrt/staging_dir/host/usr/include -I/home/builder/trunk/openwrt/staging_dir/target-i386_pentium4_glibc-2.22/host/include" CPPFLAGS="-I/home/builder/trunk/openwrt/staging_dir/host/include -I/home/builder/trunk/openwrt/staging_dir/host/usr/include -I/home/builder/trunk/openwrt/staging_dir/target-i386_pentium4_glibc-2.22/host/include" LDFLAGS="-L/home/builder/trunk/openwrt/staging_dir/host/lib -L/home/builder/trunk/openwrt/staging_dir/host/usr/lib -L/home/builder/trunk/openwrt/staging_dir/target-i386_pentium4_glibc-2.22/host/lib" SHELL="/usr/bin/env bash" Linux/gcc CC="gcc" CXX="g++" --disable-debug --enable-release --enable-shared --enable-static --enable-draft --enable-renaming --disable-tracing --disable-extras --enable-dyload --prefix=/home/builder/trunk/openwrt/staging_dir/target-i386_pentium4_glibc-2.22/host ; fi ) runConfigureICU: unrecognized platform "CC=gcc" (use --help for help) ``` "host-build.mk" is differs between OpenWrt and LEDE. https://github.com/openwrt/packages/pull/3993 https://github.com/lede-project/source/commit/83b6bfc2357458f219872f97ed9c4894106131a1 Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
8 years ago
  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:=68
  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:=c79193dee3907a2199b8296a93b52c5cb74332c26f3d167269487680d479d625
  16. PKG_LICENSE:=ICU
  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_DEPENDS:=icu/host
  23. HOST_BUILD_DEPENDS:=python3/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. ifeq ($(HOST_OS),Darwin)
  86. HOST_CONFIGURE_ARGS:= MacOSX
  87. else
  88. HOST_CONFIGURE_ARGS:= Linux/gcc
  89. endif
  90. HOST_CONFIGURE_ARGS+= \
  91. --disable-debug \
  92. --enable-release \
  93. --enable-shared \
  94. --enable-static \
  95. --enable-draft \
  96. --enable-renaming \
  97. --disable-tracing \
  98. --disable-extras \
  99. --enable-dyload \
  100. --prefix=$(STAGING_DIR_HOSTPKG)
  101. define Build/Prepare
  102. $(call Build/Prepare/Default)
  103. mkdir -p $(PKG_BUILD_DIR)/data/out
  104. endef
  105. define Build/InstallDev
  106. $(INSTALL_DIR) $(1)/usr/include
  107. $(INSTALL_DIR) $(1)/usr/lib
  108. $(INSTALL_DIR) $(1)/usr/bin
  109. $(INSTALL_DIR) $(2)/bin
  110. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  111. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  112. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icu-config $(1)/usr/bin/
  113. $(SED) 's,^\(prefix\|execprefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/icu-config
  114. $(LN) $(STAGING_DIR)/usr/bin/icu-config $(2)/bin/
  115. endef
  116. define Host/Install
  117. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config
  118. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin
  119. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib
  120. $(INSTALL_DATA) $(HOST_BUILD_DIR)/config/icucross.* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config/
  121. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  122. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  123. ifeq ($(HOST_OS),Darwin)
  124. $(CP) $(HOST_BUILD_DIR)/lib/*.dylib* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
  125. else
  126. $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
  127. endif
  128. $(RM) $(STAGING_DIR_HOSTPKG)/share/icu/current
  129. (cd $(STAGING_DIR_HOSTPKG)/share/icu;$(LN) $(PKG_VERSION) current)
  130. endef
  131. define Package/icu/install
  132. $(INSTALL_DIR) $(1)/usr/lib
  133. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  134. endef
  135. define Package/icu-full-data/install
  136. $(INSTALL_DIR) $(1)/usr/share/icu/$(PKG_VERSION)
  137. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/icu/$(PKG_VERSION)/icudt*.dat \
  138. $(1)/usr/share/icu/$(PKG_VERSION)/
  139. endef
  140. define Package/icu-data-tools/install
  141. $(INSTALL_DIR) $(1)/usr/bin
  142. $(INSTALL_DIR) $(1)/usr/sbin
  143. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  144. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  145. endef
  146. $(eval $(call HostBuild))
  147. $(eval $(call BuildPackage,icu))
  148. $(eval $(call BuildPackage,icu-full-data))
  149. $(eval $(call BuildPackage,icu-data-tools))