2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2008-03-06 19:12:45 +01:00
|
|
|
#
|
2013-07-22 07:30:22 +02:00
|
|
|
# icu
|
2008-03-06 19:12:45 +01:00
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2008-03-06 19:12:45 +01:00
|
|
|
|
2017-06-05 12:14:52 +02:00
|
|
|
ICU_VERSION = 59.1
|
2010-12-22 13:04:05 +01:00
|
|
|
ICU_SOURCE = icu4c-$(subst .,_,$(ICU_VERSION))-src.tgz
|
|
|
|
ICU_SITE = http://download.icu-project.org/files/icu4c/$(ICU_VERSION)
|
2013-01-20 10:22:33 +01:00
|
|
|
ICU_LICENSE = ICU License
|
2017-04-07 16:28:59 +02:00
|
|
|
ICU_LICENSE_FILES = LICENSE
|
2013-01-20 10:22:33 +01:00
|
|
|
|
2010-12-22 13:04:05 +01:00
|
|
|
ICU_DEPENDENCIES = host-icu
|
|
|
|
ICU_INSTALL_STAGING = YES
|
2013-02-07 13:35:05 +01:00
|
|
|
ICU_CONFIG_SCRIPTS = icu-config
|
2014-12-24 08:54:24 +01:00
|
|
|
ICU_CONF_OPTS = \
|
|
|
|
--with-cross-build=$(HOST_ICU_DIR)/source \
|
|
|
|
--disable-samples \
|
|
|
|
--disable-tests
|
icu: remove BR2_ARCH_HAS_ATOMICS dependency
The BR2_ARCH_HAS_ATOMICS was added because on ARC, atomic instructions
may not be provided by the architecture and therefore the compiler
does not provide the __sync_*() built-ins.
However, since then, icu was changed and is now able to use C++11
atomics, or even no atomic operations at all. In fact, icu will:
* If possible, it will use C++11 atomics, which internally rely on
the __atomic built-ins. These are available since gcc 4.7, and all
architectures provide it. On some architectures, you *must* link
with libatomic, on some other architectures, they are available
built-in, but in all cases, linking against libatomic does not
harm. Thanks to this, even ARC with no atomic support (which was
the original reason for adding the BR2_ARCH_HAS_ATOMICS) dependency
builds fine, provided -latomic is added to LIBS.
* If C++11 atomics are not available, then it falls back to
__sync_*() built-ins, which allows compilers older than 4.7 to be
supported.
* If really no atomic mechanism is available, then it falls back to a
basic implementation based on a mutex.
Conclusion:
- The BR2_ARCH_HAS_ATOMICS dependency is no longer needed.
- We need to link with -latomic when gcc >= 4.7 is used.
Note that reverse dependencies of icu are also changed accordingly.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-01-25 00:07:51 +01:00
|
|
|
|
2016-02-02 16:31:19 +01:00
|
|
|
# When available, icu prefers to use C++11 atomics, which rely on the
|
icu: remove BR2_ARCH_HAS_ATOMICS dependency
The BR2_ARCH_HAS_ATOMICS was added because on ARC, atomic instructions
may not be provided by the architecture and therefore the compiler
does not provide the __sync_*() built-ins.
However, since then, icu was changed and is now able to use C++11
atomics, or even no atomic operations at all. In fact, icu will:
* If possible, it will use C++11 atomics, which internally rely on
the __atomic built-ins. These are available since gcc 4.7, and all
architectures provide it. On some architectures, you *must* link
with libatomic, on some other architectures, they are available
built-in, but in all cases, linking against libatomic does not
harm. Thanks to this, even ARC with no atomic support (which was
the original reason for adding the BR2_ARCH_HAS_ATOMICS) dependency
builds fine, provided -latomic is added to LIBS.
* If C++11 atomics are not available, then it falls back to
__sync_*() built-ins, which allows compilers older than 4.7 to be
supported.
* If really no atomic mechanism is available, then it falls back to a
basic implementation based on a mutex.
Conclusion:
- The BR2_ARCH_HAS_ATOMICS dependency is no longer needed.
- We need to link with -latomic when gcc >= 4.7 is used.
Note that reverse dependencies of icu are also changed accordingly.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-01-25 00:07:51 +01:00
|
|
|
# __atomic builtins. On certain architectures, this requires linking
|
2016-02-02 16:31:19 +01:00
|
|
|
# with libatomic starting from gcc 4.8.
|
2016-03-06 21:47:17 +01:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
icu: remove BR2_ARCH_HAS_ATOMICS dependency
The BR2_ARCH_HAS_ATOMICS was added because on ARC, atomic instructions
may not be provided by the architecture and therefore the compiler
does not provide the __sync_*() built-ins.
However, since then, icu was changed and is now able to use C++11
atomics, or even no atomic operations at all. In fact, icu will:
* If possible, it will use C++11 atomics, which internally rely on
the __atomic built-ins. These are available since gcc 4.7, and all
architectures provide it. On some architectures, you *must* link
with libatomic, on some other architectures, they are available
built-in, but in all cases, linking against libatomic does not
harm. Thanks to this, even ARC with no atomic support (which was
the original reason for adding the BR2_ARCH_HAS_ATOMICS) dependency
builds fine, provided -latomic is added to LIBS.
* If C++11 atomics are not available, then it falls back to
__sync_*() built-ins, which allows compilers older than 4.7 to be
supported.
* If really no atomic mechanism is available, then it falls back to a
basic implementation based on a mutex.
Conclusion:
- The BR2_ARCH_HAS_ATOMICS dependency is no longer needed.
- We need to link with -latomic when gcc >= 4.7 is used.
Note that reverse dependencies of icu are also changed accordingly.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-01-25 00:07:51 +01:00
|
|
|
ICU_CONF_ENV += LIBS="-latomic"
|
|
|
|
endif
|
|
|
|
|
2016-12-12 21:54:25 +01:00
|
|
|
# strtod_l() is not supported by musl; also xlocale.h is missing
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
|
|
|
|
ICU_CONF_ENV += ac_cv_func_strtod_l=no
|
|
|
|
endif
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_ICU_CONF_OPTS = \
|
2013-03-09 05:03:00 +01:00
|
|
|
--disable-samples \
|
|
|
|
--disable-tests \
|
|
|
|
--disable-extras \
|
|
|
|
--disable-icuio \
|
2013-06-30 05:23:26 +02:00
|
|
|
--disable-layout \
|
|
|
|
--disable-renaming
|
2010-12-22 13:04:05 +01:00
|
|
|
ICU_SUBDIR = source
|
|
|
|
HOST_ICU_SUBDIR = source
|
|
|
|
|
2014-07-29 13:23:34 +02:00
|
|
|
ICU_CUSTOM_DATA_PATH = $(call qstrip,$(BR2_PACKAGE_ICU_CUSTOM_DATA_PATH))
|
|
|
|
|
|
|
|
ifneq ($(ICU_CUSTOM_DATA_PATH),)
|
2014-05-13 18:10:18 +02:00
|
|
|
define ICU_COPY_CUSTOM_DATA
|
2014-07-29 13:23:34 +02:00
|
|
|
cp $(ICU_CUSTOM_DATA_PATH) $(@D)/source/data/in/
|
2014-05-13 18:10:18 +02:00
|
|
|
endef
|
|
|
|
ICU_POST_PATCH_HOOKS += ICU_COPY_CUSTOM_DATA
|
|
|
|
endif
|
|
|
|
|
2016-03-09 17:25:22 +01:00
|
|
|
define ICU_REMOVE_DEV_FILES
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,derb genbrk gencfu gencnval gendict genrb icuinfo makeconv uconv)
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,genccode gencmn gennorm2 gensprep icupkg)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/icu
|
|
|
|
endef
|
|
|
|
ICU_POST_INSTALL_TARGET_HOOKS += ICU_REMOVE_DEV_FILES
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2012-07-03 00:06:54 +02:00
|
|
|
$(eval $(host-autotools-package))
|