summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/icu
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-support/icu
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-support/icu')
-rw-r--r--meta/recipes-support/icu/icu-51.2/0001-Disable-LDFLAGSICUDT-for-Linux.patch28
-rw-r--r--meta/recipes-support/icu/icu-51.2/add_buffer_length_check_to_UTF_16_or_32_detector.patch33
-rw-r--r--meta/recipes-support/icu/icu-51.2/icu-pkgdata-large-cmd.patch29
-rw-r--r--meta/recipes-support/icu/icu.inc56
-rw-r--r--meta/recipes-support/icu/icu_51.2.bb16
5 files changed, 162 insertions, 0 deletions
diff --git a/meta/recipes-support/icu/icu-51.2/0001-Disable-LDFLAGSICUDT-for-Linux.patch b/meta/recipes-support/icu/icu-51.2/0001-Disable-LDFLAGSICUDT-for-Linux.patch
new file mode 100644
index 0000000000..2968d571bb
--- /dev/null
+++ b/meta/recipes-support/icu/icu-51.2/0001-Disable-LDFLAGSICUDT-for-Linux.patch
@@ -0,0 +1,28 @@
1From 0c82d6aa02c08e41b13c83b14782bd7024e25d59 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 15 Feb 2014 21:06:42 +0000
4Subject: [PATCH] Disable LDFLAGSICUDT for Linux
5
6Upstream-Status: Inappropriate [ OE Configuration ]
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 source/config/mh-linux | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/config/mh-linux b/config/mh-linux
14index 366f0cc..2689aab 100644
15--- a/config/mh-linux
16+++ b/config/mh-linux
17@@ -21,7 +21,7 @@ LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
18 LD_RPATH_PRE = -Wl,-rpath,
19
20 ## These are the library specific LDFLAGS
21-LDFLAGSICUDT=-nodefaultlibs -nostdlib
22+# LDFLAGSICUDT=-nodefaultlibs -nostdlib
23
24 ## Compiler switch to embed a library name
25 # The initial tab in the next line is to prevent icu-config from reading it.
26--
271.7.10.4
28
diff --git a/meta/recipes-support/icu/icu-51.2/add_buffer_length_check_to_UTF_16_or_32_detector.patch b/meta/recipes-support/icu/icu-51.2/add_buffer_length_check_to_UTF_16_or_32_detector.patch
new file mode 100644
index 0000000000..ad4d61c3ea
--- /dev/null
+++ b/meta/recipes-support/icu/icu-51.2/add_buffer_length_check_to_UTF_16_or_32_detector.patch
@@ -0,0 +1,33 @@
1--- source/i18n/csrucode.cpp
2+++ source/i18n/csrucode.cpp
3@@ -33,8 +33,9 @@ UBool CharsetRecog_UTF_16_BE::match(Inpu
4 {
5 const uint8_t *input = textIn->fRawInput;
6 int32_t confidence = 0;
7+ int32_t length = textIn->fRawLength;
8
9- if (input[0] == 0xFE && input[1] == 0xFF) {
10+ if (length >=2 && input[0] == 0xFE && input[1] == 0xFF) {
11 confidence = 100;
12 }
13
14@@ -57,8 +58,9 @@ UBool CharsetRecog_UTF_16_LE::match(Inpu
15 {
16 const uint8_t *input = textIn->fRawInput;
17 int32_t confidence = 0;
18+ int32_t length = textIn->fRawLength;
19
20- if (input[0] == 0xFF && input[1] == 0xFE && (input[2] != 0x00 || input[3] != 0x00)) {
21+ if (length >= 4 && input[0] == 0xFF && input[1] == 0xFE && (input[2] != 0x00 || input[3] != 0x00)) {
22 confidence = 100;
23 }
24
25@@ -81,7 +83,7 @@ UBool CharsetRecog_UTF_32::match(InputTe
26 bool hasBOM = FALSE;
27 int32_t confidence = 0;
28
29- if (getChar(input, 0) == 0x0000FEFFUL) {
30+ if (limit > 0 && getChar(input, 0) == 0x0000FEFFUL) {
31 hasBOM = TRUE;
32 }
33
diff --git a/meta/recipes-support/icu/icu-51.2/icu-pkgdata-large-cmd.patch b/meta/recipes-support/icu/icu-51.2/icu-pkgdata-large-cmd.patch
new file mode 100644
index 0000000000..6e40659227
--- /dev/null
+++ b/meta/recipes-support/icu/icu-51.2/icu-pkgdata-large-cmd.patch
@@ -0,0 +1,29 @@
1pkgdata.cpp: use LARGE_BUFFER_MAX_SIZE for cmd
2
3Use LARGE_BUFFER_MAX_SIZE for cmd rather than SMALL_BUFFER_MAX_SIZE,
4otherwise there was a Segmentation fault error when the command line is
5long, this should be a misplay since other cmd uses
6LARGE_BUFFER_MAX_SIZE.
7
8Upstream-Status: Pending
9
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11---
12 tools/pkgdata/pkgdata.cpp | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/tools/pkgdata/pkgdata.cpp b/tools/pkgdata/pkgdata.cpp
16--- a/tools/pkgdata/pkgdata.cpp
17+++ b/tools/pkgdata/pkgdata.cpp
18@@ -1019,7 +1019,7 @@ normal_symlink_mode:
19
20 static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, UBool noVersion) {
21 int32_t result = 0;
22- char cmd[SMALL_BUFFER_MAX_SIZE];
23+ char cmd[LARGE_BUFFER_MAX_SIZE];
24
25 sprintf(cmd, "cd %s && %s %s %s%s%s",
26 targetDir,
27--
281.7.10.4
29
diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc
new file mode 100644
index 0000000000..c592f85911
--- /dev/null
+++ b/meta/recipes-support/icu/icu.inc
@@ -0,0 +1,56 @@
1SUMMARY = "International Component for Unicode libraries"
2DESCRIPTION = "The International Component for Unicode (ICU) is a mature, portable set of C/C++ and Java libraries for Unicode support, software internationalization (I18N) and globalization (G11N), giving applications the same results on all platforms."
3HOMEPAGE = "http://site.icu-project.org/"
4
5LICENSE = "ICU"
6DEPENDS = "icu-native"
7DEPENDS_class-native = ""
8
9S = "${WORKDIR}/icu/source"
10STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
11
12PARALLEL_MAKE = ""
13CPPFLAGS_append_libc-uclibc = " -DU_TIMEZONE=0"
14
15inherit autotools pkgconfig binconfig
16
17# ICU needs the native build directory as an argument to its --with-cross-build option when
18# cross-compiling. Taken the situation that different builds may share a common sstate-cache
19# into consideration, the native build directory needs to be staged.
20EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
21EXTRA_OECONF_class-native = ""
22EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
23
24# ICU puts custom m4 autoconf functions in aclocal.m4.
25# However, this file is deleted in our build system.
26# To make it work, we copy aclocal.m4 to acinclude.m4.
27# This is a bug of ICU. See bug reference:
28# http://bugs.icu-project.org/trac/ticket/9790
29do_configure_prepend() {
30 [ -f ${S}/acinclude.m4 ] || cp ${S}/aclocal.m4 ${S}/acinclude.m4
31}
32
33do_install_append_class-native() {
34 mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
35 cp -r ${B}/config/icucross.mk ${D}/${STAGING_ICU_DIR_NATIVE}/config
36 cp -r ${B}/config/icucross.inc ${D}/${STAGING_ICU_DIR_NATIVE}/config
37 cp -r ${B}/lib ${D}/${STAGING_ICU_DIR_NATIVE}
38 cp -r ${B}/bin ${D}/${STAGING_ICU_DIR_NATIVE}
39 cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE}
40
41}
42
43PACKAGES =+ "libicudata libicuuc libicui18n libicule libiculx libicutu libicuio"
44
45FILES_${PN}-dev += "${libdir}/${BPN}/"
46
47FILES_libicudata = "${libdir}/libicudata.so.*"
48FILES_libicuuc = "${libdir}/libicuuc.so.*"
49FILES_libicui18n = "${libdir}/libicui18n.so.*"
50FILES_libicule = "${libdir}/libicule.so.*"
51FILES_libiculx = "${libdir}/libiculx.so.*"
52FILES_libicutu = "${libdir}/libicutu.so.*"
53FILES_libicuio = "${libdir}/libicuio.so.*"
54
55BBCLASSEXTEND = "native nativesdk"
56
diff --git a/meta/recipes-support/icu/icu_51.2.bb b/meta/recipes-support/icu/icu_51.2.bb
new file mode 100644
index 0000000000..2d1fd42924
--- /dev/null
+++ b/meta/recipes-support/icu/icu_51.2.bb
@@ -0,0 +1,16 @@
1require icu.inc
2
3LIC_FILES_CHKSUM = "file://../license.html;md5=443a74288a72fad9069a74e7637192c1"
4
5
6BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-51_2-src.tgz"
7SRC_URI = "${BASE_SRC_URI} \
8 file://icu-pkgdata-large-cmd.patch \
9 file://add_buffer_length_check_to_UTF_16_or_32_detector.patch \
10 "
11
12SRC_URI_append_class-target = "\
13 file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
14 "
15SRC_URI[md5sum] = "072e501b87065f3a0ca888f1b5165709"
16SRC_URI[sha256sum] = "deb027a05f1b3bec03298b96fb93b28c84e9683c22e6f94effa67fdc7bd704cc"