Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | require icu.inc |
| 2 | |
| 3 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=a3808a5b70071b07f87ff2205e4d75a0" |
| 4 | |
| 5 | def icu_download_version(d): |
| 6 | pvsplit = d.getVar('PV').split('.') |
| 7 | return pvsplit[0] + "_" + pvsplit[1] |
| 8 | |
| 9 | def icu_download_folder(d): |
| 10 | pvsplit = d.getVar('PV').split('.') |
| 11 | return pvsplit[0] + "-" + pvsplit[1] |
| 12 | |
| 13 | ICU_PV = "${@icu_download_version(d)}" |
| 14 | ICU_FOLDER = "${@icu_download_folder(d)}" |
| 15 | |
| 16 | # http://errors.yoctoproject.org/Errors/Details/20486/ |
| 17 | ARM_INSTRUCTION_SET_armv4 = "arm" |
| 18 | ARM_INSTRUCTION_SET_armv5 = "arm" |
| 19 | |
| 20 | BASE_SRC_URI = "https://github.com/unicode-org/icu/releases/download/release-${ICU_FOLDER}/icu4c-${ICU_PV}-src.tgz" |
| 21 | DATA_SRC_URI = "https://github.com/unicode-org/icu/releases/download/release-${ICU_FOLDER}/icu4c-${ICU_PV}-data.zip" |
| 22 | SRC_URI = "${BASE_SRC_URI};name=code \ |
| 23 | ${DATA_SRC_URI};name=data \ |
| 24 | file://filter.json \ |
| 25 | file://icu-pkgdata-large-cmd.patch \ |
| 26 | file://fix-install-manx.patch \ |
| 27 | file://0001-Fix-big-endian-build.patch;apply=no \ |
| 28 | file://0001-icu-Added-armeb-support.patch \ |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 29 | file://CVE-2020-10531.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 30 | " |
| 31 | |
| 32 | SRC_URI_append_class-target = "\ |
| 33 | file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \ |
| 34 | " |
| 35 | SRC_URI[code.sha256sum] = "52a3f2209ab95559c1cf0a14f24338001f389615bf00e2585ef3dbc43ecf0a2e" |
| 36 | SRC_URI[data.sha256sum] = "8be647f738891d2beb79d48f99077b3499948430eae6f1be112553b15ab0243e" |
| 37 | |
| 38 | UPSTREAM_CHECK_REGEX = "icu4c-(?P<pver>\d+(_\d+)+)-src" |
| 39 | UPSTREAM_CHECK_URI = "https://github.com/unicode-org/icu/releases" |
| 40 | |
| 41 | EXTRA_OECONF_append_libc-musl = " ac_cv_func_strtod_l=no" |
| 42 | |
| 43 | do_make_icudata_class-target () { |
| 44 | cd ${S} |
| 45 | rm -rf data |
| 46 | cp -a ${WORKDIR}/data . |
| 47 | patch -p1 < ${WORKDIR}/0001-Fix-big-endian-build.patch |
| 48 | AR='${BUILD_AR}' \ |
| 49 | CC='${BUILD_CC}' \ |
| 50 | CPP='${BUILD_CPP}' \ |
| 51 | CXX='${BUILD_CXX}' \ |
| 52 | RANLIB='${BUILD_RANLIB}' \ |
| 53 | CFLAGS='${BUILD_CFLAGS}' \ |
| 54 | CPPFLAGS='${BUILD_CPPFLAGS}' \ |
| 55 | CXXFLAGS='${BUILD_CXXFLAGS}' \ |
| 56 | LDFLAGS='${BUILD_LDFLAGS}' \ |
| 57 | ICU_DATA_FILTER_FILE=${WORKDIR}/filter.json \ |
| 58 | ./runConfigureICU Linux --with-data-packaging=archive |
| 59 | oe_runmake ${PARALLEL_MAKE} |
| 60 | install -Dm644 ${S}/data/out/icudt${ICU_MAJOR_VER}l.dat ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat |
| 61 | } |
| 62 | |
| 63 | do_make_icudata() { |
| 64 | : |
| 65 | } |
| 66 | |
| 67 | addtask make_icudata before do_configure after do_patch |