diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-support/icu | |
download | poky-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')
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 @@ | |||
1 | From 0c82d6aa02c08e41b13c83b14782bd7024e25d59 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 15 Feb 2014 21:06:42 +0000 | ||
4 | Subject: [PATCH] Disable LDFLAGSICUDT for Linux | ||
5 | |||
6 | Upstream-Status: Inappropriate [ OE Configuration ] | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | source/config/mh-linux | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/config/mh-linux b/config/mh-linux | ||
14 | index 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 | -- | ||
27 | 1.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 @@ | |||
1 | pkgdata.cpp: use LARGE_BUFFER_MAX_SIZE for cmd | ||
2 | |||
3 | Use LARGE_BUFFER_MAX_SIZE for cmd rather than SMALL_BUFFER_MAX_SIZE, | ||
4 | otherwise there was a Segmentation fault error when the command line is | ||
5 | long, this should be a misplay since other cmd uses | ||
6 | LARGE_BUFFER_MAX_SIZE. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
11 | --- | ||
12 | tools/pkgdata/pkgdata.cpp | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --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 | -- | ||
28 | 1.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 @@ | |||
1 | SUMMARY = "International Component for Unicode libraries" | ||
2 | DESCRIPTION = "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." | ||
3 | HOMEPAGE = "http://site.icu-project.org/" | ||
4 | |||
5 | LICENSE = "ICU" | ||
6 | DEPENDS = "icu-native" | ||
7 | DEPENDS_class-native = "" | ||
8 | |||
9 | S = "${WORKDIR}/icu/source" | ||
10 | STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}" | ||
11 | |||
12 | PARALLEL_MAKE = "" | ||
13 | CPPFLAGS_append_libc-uclibc = " -DU_TIMEZONE=0" | ||
14 | |||
15 | inherit 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. | ||
20 | EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | ||
21 | EXTRA_OECONF_class-native = "" | ||
22 | EXTRA_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 | ||
29 | do_configure_prepend() { | ||
30 | [ -f ${S}/acinclude.m4 ] || cp ${S}/aclocal.m4 ${S}/acinclude.m4 | ||
31 | } | ||
32 | |||
33 | do_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 | |||
43 | PACKAGES =+ "libicudata libicuuc libicui18n libicule libiculx libicutu libicuio" | ||
44 | |||
45 | FILES_${PN}-dev += "${libdir}/${BPN}/" | ||
46 | |||
47 | FILES_libicudata = "${libdir}/libicudata.so.*" | ||
48 | FILES_libicuuc = "${libdir}/libicuuc.so.*" | ||
49 | FILES_libicui18n = "${libdir}/libicui18n.so.*" | ||
50 | FILES_libicule = "${libdir}/libicule.so.*" | ||
51 | FILES_libiculx = "${libdir}/libiculx.so.*" | ||
52 | FILES_libicutu = "${libdir}/libicutu.so.*" | ||
53 | FILES_libicuio = "${libdir}/libicuio.so.*" | ||
54 | |||
55 | BBCLASSEXTEND = "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 @@ | |||
1 | require icu.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://../license.html;md5=443a74288a72fad9069a74e7637192c1" | ||
4 | |||
5 | |||
6 | BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-51_2-src.tgz" | ||
7 | SRC_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 | |||
12 | SRC_URI_append_class-target = "\ | ||
13 | file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \ | ||
14 | " | ||
15 | SRC_URI[md5sum] = "072e501b87065f3a0ca888f1b5165709" | ||
16 | SRC_URI[sha256sum] = "deb027a05f1b3bec03298b96fb93b28c84e9683c22e6f94effa67fdc7bd704cc" | ||