libupnp: update to 1.14.18
[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 MAJOR_VERSION:=74
12 MINOR_VERSION:=2
13 PKG_VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION)
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(MAJOR_VERSION)_$(MINOR_VERSION)-src.tgz
17 PKG_SOURCE_URL:=https://github.com/unicode-org/icu/releases/download/release-$(MAJOR_VERSION)-$(MINOR_VERSION)
18 PKG_HASH:=5e4fb11d6a3e6b85afb55de8da8a71538f1d8fd64fce893986b37d60e5bb0091
19
20 PKG_LICENSE:=ICU
21 PKG_LICENSE_FILES:=LICENSE
22 PKG_CPE_ID:=cpe:/a:icu-project:international_components_for_unicode
23
24 PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
25
26 PKG_INSTALL:=1
27 PKG_BUILD_PARALLEL:=1
28 HOST_BUILD_PARALLEL:=1
29
30 PKG_BUILD_DEPENDS:=icu/host
31 HOST_BUILD_DEPENDS:=python3/host
32
33 include $(INCLUDE_DIR)/package.mk
34 include $(INCLUDE_DIR)/host-build.mk
35
36 TAR_OPTIONS+= icu/source --strip-components 2
37 TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
38
39 define Package/icu
40 SECTION:=libs
41 CATEGORY:=Libraries
42 TITLE:=International Components for Unicode
43 URL:=http://icu-project.org
44 DEPENDS:=+libstdcpp +libpthread
45 ABI_VERSION:=$(MAJOR_VERSION)
46 endef
47
48 define Package/icu/description
49 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.
50 This package supports C/C++.
51 endef
52
53 define Package/icu-full-data
54 SECTION:=libs
55 CATEGORY:=Libraries
56 TITLE:=Full ICU Data
57 URL:=http://icu-project.org
58 DEPENDS:=+icu
59 ABI_VERSION:=$(MAJOR_VERSION)
60 endef
61
62 define Package/icu-full-data/description
63 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.
64 This package contains the complete data library provided by ICU.
65 A custom data library can be generated at http://apps.icu-project.org/datacustom/
66 endef
67
68 define Package/icu-data-tools
69 SECTION:=libs
70 CATEGORY:=Libraries
71 TITLE:=ICU Data manipulation tools
72 URL:=http://icu-project.org
73 DEPENDS:=+icu
74 endef
75
76 define Package/icu-data-tools/description
77 This package provides tools for manipulating ICU data.
78 endef
79
80 CONFIGURE_CMD:= ./runConfigureICU
81 CONFIGURE_ARGS:= \
82 Linux/gcc \
83 CC="$(TARGET_CC_NOCACHE)" \
84 CXX="$(TARGET_CXX_NOCACHE)" \
85 --target=$(GNU_TARGET_NAME) \
86 --host=$(GNU_TARGET_NAME) \
87 --build=$(GNU_HOST_NAME) \
88 --disable-debug \
89 --enable-release \
90 --enable-shared \
91 --enable-static \
92 --enable-draft \
93 --enable-renaming \
94 --disable-tracing \
95 --disable-extras \
96 --enable-dyload \
97 --with-data-packaging=archive \
98 --disable-tests \
99 --disable-samples \
100 --with-cross-build="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
101 --prefix=/usr
102
103 HOST_CONFIGURE_CMD:= ./runConfigureICU
104 HOST_CONFIGURE_VARS:=
105 ifeq ($(HOST_OS),Darwin)
106 HOST_CONFIGURE_ARGS:= MacOSX
107 else
108 HOST_CONFIGURE_ARGS:= Linux/gcc
109 endif
110 HOST_CONFIGURE_ARGS+= \
111 --disable-debug \
112 --enable-release \
113 --enable-shared \
114 --enable-static \
115 --enable-draft \
116 --enable-renaming \
117 --disable-tracing \
118 --disable-extras \
119 --enable-dyload \
120 --prefix=$(STAGING_DIR_HOSTPKG)
121
122 define Build/Prepare
123 $(call Build/Prepare/Default)
124 mkdir -p $(PKG_BUILD_DIR)/data/out
125 endef
126
127 define Build/InstallDev
128 $(INSTALL_DIR) $(1)/usr/include
129 $(INSTALL_DIR) $(1)/usr/lib
130 $(INSTALL_DIR) $(1)/usr/bin
131 $(INSTALL_DIR) $(2)/bin
132 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
133 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
134 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icu-config $(1)/usr/bin/
135 $(SED) 's,^\(prefix\|execprefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/icu-config
136 $(LN) $(STAGING_DIR)/usr/bin/icu-config $(2)/bin/
137 endef
138
139 define Host/Install
140 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config
141 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin
142 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib
143 $(INSTALL_DATA) $(HOST_BUILD_DIR)/config/icucross.* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/config/
144 $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
145 $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/
146 ifeq ($(HOST_OS),Darwin)
147 $(CP) $(HOST_BUILD_DIR)/lib/*.dylib* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
148 else
149 $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/
150 endif
151 $(RM) $(STAGING_DIR_HOSTPKG)/share/icu/current
152 (cd $(STAGING_DIR_HOSTPKG)/share/icu;$(LN) $(PKG_VERSION) current)
153 endef
154
155 define Package/icu/install
156 $(INSTALL_DIR) $(1)/usr/lib
157 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
158 endef
159
160 define Package/icu-full-data/install
161 $(INSTALL_DIR) $(1)/usr/share/icu/$(PKG_VERSION)
162 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/icu/$(PKG_VERSION)/icudt*.dat \
163 $(1)/usr/share/icu/$(PKG_VERSION)/
164 endef
165
166 define Package/icu-data-tools/install
167 $(INSTALL_DIR) $(1)/usr/bin
168 $(INSTALL_DIR) $(1)/usr/sbin
169 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
170 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
171 endef
172
173 $(eval $(call HostBuild))
174 $(eval $(call BuildPackage,icu))
175 $(eval $(call BuildPackage,icu-full-data))
176 $(eval $(call BuildPackage,icu-data-tools))