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.

109 lines
3.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. PKG_VERSION:=61.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-61_1-src.tgz
  12. PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
  13. PKG_HASH:=d007f89ae8a2543a53525c74359b65b36412fa84b3349f1400be6dcf409fafef
  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. CONFIGURE_CMD:= ./runConfigureICU
  33. CONFIGURE_ARGS:= \
  34. Linux/gcc \
  35. CC="$(TARGET_CC)" \
  36. CXX="$(TARGET_CXX)" \
  37. --target=$(GNU_TARGET_NAME) \
  38. --host=$(GNU_TARGET_NAME) \
  39. --build=$(GNU_HOST_NAME) \
  40. --disable-debug \
  41. --enable-release \
  42. --enable-shared \
  43. --enable-static \
  44. --enable-draft \
  45. --enable-renaming \
  46. --disable-tracing \
  47. --disable-extras \
  48. --enable-dyload \
  49. --disable-tools \
  50. --disable-tests \
  51. --disable-samples \
  52. --with-cross-build="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
  53. --prefix=/usr
  54. HOST_CONFIGURE_CMD:= ./runConfigureICU
  55. HOST_CONFIGURE_VARS:=
  56. HOST_CONFIGURE_ARGS:= \
  57. Linux/gcc \
  58. --disable-debug \
  59. --enable-release \
  60. --enable-shared \
  61. --enable-static \
  62. --enable-draft \
  63. --enable-renaming \
  64. --disable-tracing \
  65. --disable-extras \
  66. --enable-dyload \
  67. --prefix=$(STAGING_DIR_HOSTPKG)
  68. define Build/InstallDev
  69. $(INSTALL_DIR) $(1)/usr/include
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(INSTALL_DIR) $(2)/bin
  73. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icu-config $(1)/usr/bin/
  76. $(SED) 's,^\(prefix\|execprefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/icu-config
  77. $(LN) $(STAGING_DIR)/usr/bin/icu-config $(2)/bin/
  78. endef
  79. define Host/Install
  80. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config
  81. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin
  82. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib
  83. $(INSTALL_DATA) $(HOST_BUILD_DIR)/config/icucross.* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config/
  84. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  85. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  86. $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
  87. endef
  88. define Package/icu/install
  89. $(INSTALL_DIR) $(1)/usr/lib
  90. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  91. endef
  92. $(eval $(call BuildPackage,icu))
  93. $(eval $(call HostBuild))