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.

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