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.

175 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:=69
  10. MINOR_VERSION:=1
  11. PKG_VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION)
  12. PKG_RELEASE:=1
  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:=4cba7b7acd1d3c42c44bb0c14be6637098c7faf2b330ce876bc5f3b915d09745
  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. ABI_VERSION:=$(MAJOR_VERSION)
  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. ABI_VERSION:=$(MAJOR_VERSION)
  47. endef
  48. define Package/icu-full-data/description
  49. 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.
  50. This package contains the complete data library provided by ICU.
  51. A custom data library can be generated at http://apps.icu-project.org/datacustom/
  52. endef
  53. define Package/icu-data-tools
  54. SECTION:=libs
  55. CATEGORY:=Libraries
  56. TITLE:=ICU Data manipulation tools
  57. URL:=http://icu-project.org
  58. DEPENDS:=+icu
  59. endef
  60. define Package/icu-data-tools/description
  61. This package provides tools for manipulating ICU data.
  62. endef
  63. CONFIGURE_CMD:= ./runConfigureICU
  64. CONFIGURE_ARGS:= \
  65. Linux/gcc \
  66. CC="$(TARGET_CC)" \
  67. CXX="$(TARGET_CXX)" \
  68. --target=$(GNU_TARGET_NAME) \
  69. --host=$(GNU_TARGET_NAME) \
  70. --build=$(GNU_HOST_NAME) \
  71. --disable-debug \
  72. --enable-release \
  73. --enable-shared \
  74. --enable-static \
  75. --enable-draft \
  76. --enable-renaming \
  77. --disable-tracing \
  78. --disable-extras \
  79. --enable-dyload \
  80. --with-data-packaging=archive \
  81. --disable-tests \
  82. --disable-samples \
  83. --with-cross-build="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
  84. --prefix=/usr
  85. HOST_CONFIGURE_CMD:= ./runConfigureICU
  86. HOST_CONFIGURE_VARS:=
  87. ifeq ($(HOST_OS),Darwin)
  88. HOST_CONFIGURE_ARGS:= MacOSX
  89. else
  90. HOST_CONFIGURE_ARGS:= Linux/gcc
  91. endif
  92. HOST_CONFIGURE_ARGS+= \
  93. --disable-debug \
  94. --enable-release \
  95. --enable-shared \
  96. --enable-static \
  97. --enable-draft \
  98. --enable-renaming \
  99. --disable-tracing \
  100. --disable-extras \
  101. --enable-dyload \
  102. --prefix=$(STAGING_DIR_HOSTPKG)
  103. define Build/Prepare
  104. $(call Build/Prepare/Default)
  105. mkdir -p $(PKG_BUILD_DIR)/data/out
  106. endef
  107. define Build/InstallDev
  108. $(INSTALL_DIR) $(1)/usr/include
  109. $(INSTALL_DIR) $(1)/usr/lib
  110. $(INSTALL_DIR) $(1)/usr/bin
  111. $(INSTALL_DIR) $(2)/bin
  112. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  113. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  114. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icu-config $(1)/usr/bin/
  115. $(SED) 's,^\(prefix\|execprefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/icu-config
  116. $(LN) $(STAGING_DIR)/usr/bin/icu-config $(2)/bin/
  117. endef
  118. define Host/Install
  119. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config
  120. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin
  121. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib
  122. $(INSTALL_DATA) $(HOST_BUILD_DIR)/config/icucross.* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config/
  123. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  124. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  125. ifeq ($(HOST_OS),Darwin)
  126. $(CP) $(HOST_BUILD_DIR)/lib/*.dylib* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
  127. else
  128. $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
  129. endif
  130. $(RM) $(STAGING_DIR_HOSTPKG)/share/icu/current
  131. (cd $(STAGING_DIR_HOSTPKG)/share/icu;$(LN) $(PKG_VERSION) current)
  132. endef
  133. define Package/icu/install
  134. $(INSTALL_DIR) $(1)/usr/lib
  135. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  136. endef
  137. define Package/icu-full-data/install
  138. $(INSTALL_DIR) $(1)/usr/share/icu/$(PKG_VERSION)
  139. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/icu/$(PKG_VERSION)/icudt*.dat \
  140. $(1)/usr/share/icu/$(PKG_VERSION)/
  141. endef
  142. define Package/icu-data-tools/install
  143. $(INSTALL_DIR) $(1)/usr/bin
  144. $(INSTALL_DIR) $(1)/usr/sbin
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  146. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  147. endef
  148. $(eval $(call HostBuild))
  149. $(eval $(call BuildPackage,icu))
  150. $(eval $(call BuildPackage,icu-full-data))
  151. $(eval $(call BuildPackage,icu-data-tools))