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.

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