f499fe1c3479a52435e913116316cdc5d5d5baa2
[feed/packages.git] / libs / icu / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=icu4c
11 PKG_VERSION:=58.2
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-58_2-src.tgz
15 PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
16 PKG_MD5SUM:=fac212b32b7ec7ab007a12dff1f3aea1
17
18 PKG_LICENSE:=ICU-1.8.1+
19 PKG_LICENSE_FILES:=LICENSE
20
21 PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
26
27 PKG_BUILD_DEPENDS:=icu/host
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/host-build.mk
31
32 TAR_OPTIONS+= icu/source --strip-components 2
33 TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
34
35 define Package/icu
36 SECTION:=libs
37 CATEGORY:=Libraries
38 TITLE:=International Components for Unicode
39 URL:=http://icu-project.org
40 DEPENDS:=+libstdcpp +libpthread
41 endef
42
43 CONFIGURE_CMD:= ./runConfigureICU
44 CONFIGURE_ARGS:= \
45 Linux/gcc \
46 CC="$(TARGET_CC)" \
47 CXX="$(TARGET_CXX)" \
48 --target=$(GNU_TARGET_NAME) \
49 --host=$(GNU_TARGET_NAME) \
50 --build=$(GNU_HOST_NAME) \
51 --disable-debug \
52 --enable-release \
53 --enable-shared \
54 --enable-static \
55 --enable-draft \
56 --enable-renaming \
57 --disable-tracing \
58 --disable-extras \
59 --enable-dyload \
60 --disable-tools \
61 --disable-tests \
62 --disable-samples \
63 --with-cross-build="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
64 --prefix=/usr
65
66 HOST_CONFIGURE_CMD:= ./runConfigureICU
67 HOST_CONFIGURE_ARGS:= \
68 Linux/gcc \
69 CC="$(HOSTCC)" \
70 CXX="$(HOSTCXX)" \
71 --disable-debug \
72 --enable-release \
73 --enable-shared \
74 --enable-static \
75 --enable-draft \
76 --enable-renaming \
77 --disable-tracing \
78 --disable-extras \
79 --enable-dyload \
80 --prefix=$(HOST_BUILD_PREFIX)
81
82 define Build/InstallDev
83 $(INSTALL_DIR) \
84 $(1)/usr/include
85
86 $(CP) \
87 $(PKG_INSTALL_DIR)/usr/include/* \
88 $(1)/usr/include/
89
90 $(INSTALL_DIR) \
91 $(1)/usr/lib
92
93 $(CP) \
94 $(PKG_INSTALL_DIR)/usr/lib/* \
95 $(1)/usr/lib/
96 endef
97
98 define Host/Install
99 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config
100 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin
101 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib
102 $(INSTALL_DATA) $(HOST_BUILD_DIR)/config/icucross.* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config/
103 $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
104 $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
105 $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
106 endef
107
108 define Package/icu/install
109 $(INSTALL_DIR) \
110 $(1)/usr/lib
111
112 $(CP) \
113 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
114 $(1)/usr/lib/
115 endef
116
117 $(eval $(call BuildPackage,icu))
118 $(eval $(call HostBuild))