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.

165 lines
5.1 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:=67
  10. MINOR_VERSION:=1
  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:=94a80cd6f251a53bd2a997f6f1b5ac6653fe791dfab66e1eb0227740fb86d5dc
  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. HOST_CONFIGURE_ARGS:= \
  86. Linux/gcc \
  87. --disable-debug \
  88. --enable-release \
  89. --enable-shared \
  90. --enable-static \
  91. --enable-draft \
  92. --enable-renaming \
  93. --disable-tracing \
  94. --disable-extras \
  95. --enable-dyload \
  96. --prefix=$(STAGING_DIR_HOSTPKG)
  97. define Build/Prepare
  98. $(call Build/Prepare/Default)
  99. mkdir -p $(PKG_BUILD_DIR)/data/out
  100. endef
  101. define Build/InstallDev
  102. $(INSTALL_DIR) $(1)/usr/include
  103. $(INSTALL_DIR) $(1)/usr/lib
  104. $(INSTALL_DIR) $(1)/usr/bin
  105. $(INSTALL_DIR) $(2)/bin
  106. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  107. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  108. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icu-config $(1)/usr/bin/
  109. $(SED) 's,^\(prefix\|execprefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/icu-config
  110. $(LN) $(STAGING_DIR)/usr/bin/icu-config $(2)/bin/
  111. endef
  112. define Host/Install
  113. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config
  114. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin
  115. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib
  116. $(INSTALL_DATA) $(HOST_BUILD_DIR)/config/icucross.* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config/
  117. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  118. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  119. $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
  120. $(RM) $(STAGING_DIR_HOSTPKG)/share/icu/current
  121. (cd $(STAGING_DIR_HOSTPKG)/share/icu;$(LN) $(PKG_VERSION) current)
  122. endef
  123. define Package/icu/install
  124. $(INSTALL_DIR) $(1)/usr/lib
  125. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  126. endef
  127. define Package/icu-full-data/install
  128. $(INSTALL_DIR) $(1)/usr/share/icu/$(PKG_VERSION)
  129. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/icu/$(PKG_VERSION)/icudt*.dat \
  130. $(1)/usr/share/icu/$(PKG_VERSION)/
  131. endef
  132. define Package/icu-data-tools/install
  133. $(INSTALL_DIR) $(1)/usr/bin
  134. $(INSTALL_DIR) $(1)/usr/sbin
  135. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  136. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  137. endef
  138. $(eval $(call HostBuild))
  139. $(eval $(call BuildPackage,icu))
  140. $(eval $(call BuildPackage,icu-full-data))
  141. $(eval $(call BuildPackage,icu-data-tools))