2 # Copyright (C) 2006-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_VERSION
:=$(MAJOR_VERSION
).
$(MINOR_VERSION
)
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
:=a457431de164b4aa7eca00ed134d00dfbf88a77c6986a10ae7774fc076bb8c45
21 PKG_LICENSE_FILES
:=LICENSE
22 PKG_CPE_ID
:=cpe
:/a
:icu-project
:international_components_for_unicode
24 PKG_MAINTAINER
:=Hirokazu MORIKAWA
<morikw2@gmail.com
>
28 HOST_BUILD_PARALLEL
:=1
30 PKG_BUILD_DEPENDS
:=icu
/host
31 HOST_BUILD_DEPENDS
:=python3
/host
33 include $(INCLUDE_DIR
)/package.mk
34 include $(INCLUDE_DIR
)/host-build.mk
36 TAR_OPTIONS
+= icu
/source
--strip-components
2
37 TAR_CMD
=$(HOST_TAR
) -C
$(1) $(TAR_OPTIONS
)
42 TITLE
:=International Components for Unicode
43 URL
:=http
://icu-project.org
44 DEPENDS
:=+libstdcpp
+libpthread
45 ABI_VERSION
:=$(MAJOR_VERSION
)
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
++.
53 define Package
/icu-full-data
57 URL
:=http
://icu-project.org
59 ABI_VERSION
:=$(MAJOR_VERSION
)
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
/
68 define Package
/icu-data-tools
71 TITLE
:=ICU Data manipulation tools
72 URL
:=http
://icu-project.org
76 define Package
/icu-data-tools
/description
77 This package provides tools for manipulating ICU data.
80 CONFIGURE_CMD
:= .
/runConfigureICU
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
) \
97 --with-data-packaging
=archive \
100 --with-cross-build
="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
103 HOST_CONFIGURE_CMD
:= .
/runConfigureICU
104 HOST_CONFIGURE_VARS
:=
105 ifeq ($(HOST_OS
),Darwin
)
106 HOST_CONFIGURE_ARGS
:= MacOSX
108 HOST_CONFIGURE_ARGS
:= Linux
/gcc
110 HOST_CONFIGURE_ARGS
+= \
120 --prefix=$(STAGING_DIR_HOSTPKG
)
123 $(call Build
/Prepare
/Default
)
124 mkdir
-p
$(PKG_BUILD_DIR
)/data
/out
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
/
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
/
149 $(CP
) $(HOST_BUILD_DIR
)/lib
/*.so
* $(STAGING_DIR_HOSTPKG
)/share
/icu
/$(PKG_VERSION
)/lib
/
151 $(RM
) $(STAGING_DIR_HOSTPKG
)/share
/icu
/current
152 (cd
$(STAGING_DIR_HOSTPKG
)/share
/icu
;$(LN
) $(PKG_VERSION
) current
)
155 define Package
/icu
/install
156 $(INSTALL_DIR
) $(1)/usr
/lib
157 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* $(1)/usr
/lib
/
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
)/
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
/
173 $(eval
$(call HostBuild
))
174 $(eval
$(call BuildPackage
,icu
))
175 $(eval
$(call BuildPackage
,icu-full-data
))
176 $(eval
$(call BuildPackage
,icu-data-tools
))