diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-support/icu | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-support/icu')
5 files changed, 187 insertions, 0 deletions
diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc new file mode 100644 index 0000000000..15d002dbef --- /dev/null +++ b/meta/recipes-support/icu/icu.inc | |||
@@ -0,0 +1,59 @@ | |||
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 | SPDX_S = "${WORKDIR}/icu" | ||
11 | STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}" | ||
12 | |||
13 | PARALLEL_MAKE = "" | ||
14 | CPPFLAGS_append_libc-uclibc = " -DU_TIMEZONE=0" | ||
15 | |||
16 | BINCONFIG = "${bindir}/icu-config" | ||
17 | |||
18 | inherit autotools pkgconfig binconfig | ||
19 | |||
20 | # ICU needs the native build directory as an argument to its --with-cross-build option when | ||
21 | # cross-compiling. Taken the situation that different builds may share a common sstate-cache | ||
22 | # into consideration, the native build directory needs to be staged. | ||
23 | EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | ||
24 | EXTRA_OECONF_class-native = "" | ||
25 | EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | ||
26 | |||
27 | # ICU puts custom m4 autoconf functions in aclocal.m4. | ||
28 | # However, this file is deleted in our build system. | ||
29 | # To make it work, we copy aclocal.m4 to acinclude.m4. | ||
30 | # This is a bug of ICU. See bug reference: | ||
31 | # http://bugs.icu-project.org/trac/ticket/9790 | ||
32 | do_configure_prepend() { | ||
33 | [ -f ${S}/acinclude.m4 ] || cp ${S}/aclocal.m4 ${S}/acinclude.m4 | ||
34 | } | ||
35 | |||
36 | do_install_append_class-native() { | ||
37 | mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
38 | cp -r ${B}/config/icucross.mk ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
39 | cp -r ${B}/config/icucross.inc ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
40 | cp -r ${B}/lib ${D}/${STAGING_ICU_DIR_NATIVE} | ||
41 | cp -r ${B}/bin ${D}/${STAGING_ICU_DIR_NATIVE} | ||
42 | cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE} | ||
43 | |||
44 | } | ||
45 | |||
46 | PACKAGES =+ "libicudata libicuuc libicui18n libicule libiculx libicutu libicuio" | ||
47 | |||
48 | FILES_${PN}-dev += "${libdir}/${BPN}/" | ||
49 | |||
50 | FILES_libicudata = "${libdir}/libicudata.so.*" | ||
51 | FILES_libicuuc = "${libdir}/libicuuc.so.*" | ||
52 | FILES_libicui18n = "${libdir}/libicui18n.so.*" | ||
53 | FILES_libicule = "${libdir}/libicule.so.*" | ||
54 | FILES_libiculx = "${libdir}/libiculx.so.*" | ||
55 | FILES_libicutu = "${libdir}/libicutu.so.*" | ||
56 | FILES_libicuio = "${libdir}/libicuio.so.*" | ||
57 | |||
58 | BBCLASSEXTEND = "native nativesdk" | ||
59 | |||
diff --git a/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch b/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch new file mode 100644 index 0000000000..2968d571bb --- /dev/null +++ b/meta/recipes-support/icu/icu/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/icu-CVE-2014-8146-CVE-2014-8147.patch b/meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch new file mode 100644 index 0000000000..2460357f10 --- /dev/null +++ b/meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | icu: CVE-2014-8146-CVE-2014-8147 | ||
2 | |||
3 | CVE-2014-8146 icu: heap overflow via incorrect isolateCount | ||
4 | CVE-2014-8147 icu: integer truncation in the resolveImplicitLevels function | ||
5 | |||
6 | References: | ||
7 | [1] https://github.com/pedrib/PoC/raw/master/generic/i-c-u-fail.7z | ||
8 | [2] https://www.kb.cert.org/vuls/id/602540 | ||
9 | [3] http://bugs.icu-project.org/trac/changeset/37080 | ||
10 | [4] http://bugs.icu-project.org/trac/changeset/37162 | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
15 | --- | ||
16 | diff -ruN a/common/ubidi.c b/common/ubidi.c | ||
17 | --- a/common/ubidi.c 2014-10-03 18:11:20.000000000 +0200 | ||
18 | +++ b/common/ubidi.c 2015-08-28 08:22:39.455906194 +0200 | ||
19 | @@ -2138,7 +2138,7 @@ | ||
20 | /* The isolates[] entries contain enough information to | ||
21 | resume the bidi algorithm in the same state as it was | ||
22 | when it was interrupted by an isolate sequence. */ | ||
23 | - if(dirProps[start]==PDI) { | ||
24 | + if(dirProps[start]==PDI && pBiDi->isolateCount >= 0) { | ||
25 | levState.startON=pBiDi->isolates[pBiDi->isolateCount].startON; | ||
26 | start1=pBiDi->isolates[pBiDi->isolateCount].start1; | ||
27 | stateImp=pBiDi->isolates[pBiDi->isolateCount].stateImp; | ||
28 | diff -ruN a/common/ubidiimp.h b/common/ubidiimp.h | ||
29 | --- a/common/ubidiimp.h 2014-10-03 18:11:16.000000000 +0200 | ||
30 | +++ b/common/ubidiimp.h 2015-08-28 08:28:24.069163845 +0200 | ||
31 | @@ -1,7 +1,7 @@ | ||
32 | /* | ||
33 | ****************************************************************************** | ||
34 | * | ||
35 | -* Copyright (C) 1999-2014, International Business Machines | ||
36 | +* Copyright (C) 1999-2015, International Business Machines | ||
37 | * Corporation and others. All Rights Reserved. | ||
38 | * | ||
39 | ****************************************************************************** | ||
40 | @@ -184,8 +184,8 @@ | ||
41 | typedef struct Isolate { | ||
42 | int32_t startON; | ||
43 | int32_t start1; | ||
44 | + int32_t state; | ||
45 | int16_t stateImp; | ||
46 | - int16_t state; | ||
47 | } Isolate; | ||
48 | |||
49 | typedef struct Run { | ||
diff --git a/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch b/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch new file mode 100644 index 0000000000..6e40659227 --- /dev/null +++ b/meta/recipes-support/icu/icu/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_53.1.bb b/meta/recipes-support/icu/icu_53.1.bb new file mode 100644 index 0000000000..2906e8f864 --- /dev/null +++ b/meta/recipes-support/icu/icu_53.1.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | require icu.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://../license.html;md5=8b139ac5b93769623bd343318048238c" | ||
4 | |||
5 | def icu_download_version(d): | ||
6 | pvsplit = d.getVar('PV', True).split('.') | ||
7 | return pvsplit[0] + "_" + pvsplit[1] | ||
8 | |||
9 | ICU_PV = "${@icu_download_version(d)}" | ||
10 | |||
11 | BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz" | ||
12 | SRC_URI = "${BASE_SRC_URI} \ | ||
13 | file://icu-pkgdata-large-cmd.patch \ | ||
14 | file://icu-CVE-2014-8146-CVE-2014-8147.patch \ | ||
15 | " | ||
16 | |||
17 | SRC_URI_append_class-target = "\ | ||
18 | file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \ | ||
19 | " | ||
20 | |||
21 | SRC_URI[md5sum] = "b73baa6fbdfef197608d1f69300919b9" | ||
22 | SRC_URI[sha256sum] = "6fa74fb5aac070c23eaba1711a7178fe582c59867484c5ec07c49002787a9a28" | ||