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.

164 lines
5.0 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:=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. HOST_BUILD_DEPENDS:=python3/host
  25. include $(INCLUDE_DIR)/package.mk
  26. include $(INCLUDE_DIR)/host-build.mk
  27. TAR_OPTIONS+= icu/source --strip-components 2
  28. TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
  29. define Package/icu
  30. SECTION:=libs
  31. CATEGORY:=Libraries
  32. TITLE:=International Components for Unicode
  33. URL:=http://icu-project.org
  34. DEPENDS:=+libstdcpp +libpthread
  35. endef
  36. define Package/icu/description
  37. 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.
  38. This package supports C/C++.
  39. endef
  40. define Package/icu-full-data
  41. SECTION:=libs
  42. CATEGORY:=Libraries
  43. TITLE:=Full ICU Data
  44. URL:=http://icu-project.org
  45. DEPENDS:=+icu
  46. endef
  47. define Package/icu-full-data/description
  48. 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.
  49. This package contains the complete data library provided by ICU.
  50. A custom data library can be generated at http://apps.icu-project.org/datacustom/
  51. endef
  52. define Package/icu-data-tools
  53. SECTION:=libs
  54. CATEGORY:=Libraries
  55. TITLE:=ICU Data manipulation tools
  56. URL:=http://icu-project.org
  57. DEPENDS:=+icu
  58. endef
  59. define Package/icu-data-tools/description
  60. This package provides tools for manipulating ICU data.
  61. endef
  62. CONFIGURE_CMD:= ./runConfigureICU
  63. CONFIGURE_ARGS:= \
  64. Linux/gcc \
  65. CC="$(TARGET_CC)" \
  66. CXX="$(TARGET_CXX)" \
  67. --target=$(GNU_TARGET_NAME) \
  68. --host=$(GNU_TARGET_NAME) \
  69. --build=$(GNU_HOST_NAME) \
  70. --disable-debug \
  71. --enable-release \
  72. --enable-shared \
  73. --enable-static \
  74. --enable-draft \
  75. --enable-renaming \
  76. --disable-tracing \
  77. --disable-extras \
  78. --enable-dyload \
  79. --with-data-packaging=archive \
  80. --disable-tests \
  81. --disable-samples \
  82. --with-cross-build="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
  83. --prefix=/usr
  84. HOST_CONFIGURE_CMD:= ./runConfigureICU
  85. HOST_CONFIGURE_VARS:=
  86. HOST_CONFIGURE_ARGS:= \
  87. Linux/gcc \
  88. --disable-debug \
  89. --enable-release \
  90. --enable-shared \
  91. --enable-static \
  92. --enable-draft \
  93. --enable-renaming \
  94. --disable-tracing \
  95. --disable-extras \
  96. --enable-dyload \
  97. --prefix=$(STAGING_DIR_HOSTPKG)
  98. define Build/Prepare
  99. $(call Build/Prepare/Default)
  100. mkdir -p $(PKG_BUILD_DIR)/data/out
  101. endef
  102. define Build/InstallDev
  103. $(INSTALL_DIR) $(1)/usr/include
  104. $(INSTALL_DIR) $(1)/usr/lib
  105. $(INSTALL_DIR) $(1)/usr/bin
  106. $(INSTALL_DIR) $(2)/bin
  107. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  108. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  109. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icu-config $(1)/usr/bin/
  110. $(SED) 's,^\(prefix\|execprefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/icu-config
  111. $(LN) $(STAGING_DIR)/usr/bin/icu-config $(2)/bin/
  112. endef
  113. define Host/Install
  114. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config
  115. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin
  116. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib
  117. $(INSTALL_DATA) $(HOST_BUILD_DIR)/config/icucross.* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config/
  118. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  119. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  120. $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
  121. endef
  122. define Package/icu/install
  123. $(INSTALL_DIR) $(1)/usr/lib
  124. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  125. endef
  126. define Package/icu-full-data/install
  127. $(INSTALL_DIR) $(1)/usr/share/icu/$(PKG_VERSION)
  128. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/icu/$(PKG_VERSION)/icudt*.dat \
  129. $(1)/usr/share/icu/$(PKG_VERSION)/
  130. endef
  131. define Package/icu-data-tools/install
  132. $(INSTALL_DIR) $(1)/usr/bin
  133. $(INSTALL_DIR) $(1)/usr/sbin
  134. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  135. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  136. endef
  137. $(eval $(call HostBuild))
  138. $(eval $(call BuildPackage,icu))
  139. $(eval $(call BuildPackage,icu-full-data))
  140. $(eval $(call BuildPackage,icu-data-tools))