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.

110 lines
3.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. PKG_VERSION:=59.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-59_1-src.tgz
  12. PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
  13. PKG_MD5SUM:=54923fa9fab5b2b83f235fb72523de37
  14. PKG_HASH:=7132fdaf9379429d004005217f10e00b7d2319d0fea22bdfddef8991c45b75fe
  15. PKG_LICENSE:=ICU-1.8.1+
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  21. PKG_BUILD_DEPENDS:=icu/host
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/host-build.mk
  24. TAR_OPTIONS+= icu/source --strip-components 2
  25. TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
  26. define Package/icu
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. TITLE:=International Components for Unicode
  30. URL:=http://icu-project.org
  31. DEPENDS:=+libstdcpp +libpthread
  32. endef
  33. CONFIGURE_CMD:= ./runConfigureICU
  34. CONFIGURE_ARGS:= \
  35. Linux/gcc \
  36. CC="$(TARGET_CC)" \
  37. CXX="$(TARGET_CXX)" \
  38. --target=$(GNU_TARGET_NAME) \
  39. --host=$(GNU_TARGET_NAME) \
  40. --build=$(GNU_HOST_NAME) \
  41. --disable-debug \
  42. --enable-release \
  43. --enable-shared \
  44. --enable-static \
  45. --enable-draft \
  46. --enable-renaming \
  47. --disable-tracing \
  48. --disable-extras \
  49. --enable-dyload \
  50. --disable-tools \
  51. --disable-tests \
  52. --disable-samples \
  53. --with-cross-build="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
  54. --prefix=/usr
  55. HOST_CONFIGURE_CMD:= ./runConfigureICU
  56. HOST_CONFIGURE_VARS:=
  57. HOST_CONFIGURE_ARGS:= \
  58. Linux/gcc \
  59. --disable-debug \
  60. --enable-release \
  61. --enable-shared \
  62. --enable-static \
  63. --enable-draft \
  64. --enable-renaming \
  65. --disable-tracing \
  66. --disable-extras \
  67. --enable-dyload \
  68. --prefix=$(STAGING_DIR_HOSTPKG)
  69. define Build/InstallDev
  70. $(INSTALL_DIR) $(1)/usr/include
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(INSTALL_DIR) $(1)/usr/bin
  73. $(INSTALL_DIR) $(2)/bin
  74. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icu-config $(1)/usr/bin/
  77. $(SED) 's,^\(prefix\|execprefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/icu-config
  78. $(LN) $(STAGING_DIR)/usr/bin/icu-config $(2)/bin/
  79. endef
  80. define Host/Install
  81. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config
  82. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin
  83. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib
  84. $(INSTALL_DATA) $(HOST_BUILD_DIR)/config/icucross.* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config/
  85. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  86. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
  87. $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
  88. endef
  89. define Package/icu/install
  90. $(INSTALL_DIR) $(1)/usr/lib
  91. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  92. endef
  93. $(eval $(call BuildPackage,icu))
  94. $(eval $(call HostBuild))