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 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | file://fix-install-manx.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 26 | file://0001-icu-Added-armeb-support.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | " |
| 28 | |
| 29 | SRC_URI_append_class-target = "\ |
| 30 | file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \ |
| 31 | " |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 32 | SRC_URI[code.sha256sum] = "94a80cd6f251a53bd2a997f6f1b5ac6653fe791dfab66e1eb0227740fb86d5dc" |
| 33 | SRC_URI[data.sha256sum] = "7c16a59cc8c06128b7ecc1dc4fc056b36b17349312829b17408b9e67b05c4a7e" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 34 | |
| 35 | UPSTREAM_CHECK_REGEX = "icu4c-(?P<pver>\d+(_\d+)+)-src" |
| 36 | UPSTREAM_CHECK_URI = "https://github.com/unicode-org/icu/releases" |
| 37 | |
| 38 | EXTRA_OECONF_append_libc-musl = " ac_cv_func_strtod_l=no" |
| 39 | |
| 40 | do_make_icudata_class-target () { |
| 41 | cd ${S} |
| 42 | rm -rf data |
| 43 | cp -a ${WORKDIR}/data . |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 44 | AR='${BUILD_AR}' \ |
| 45 | CC='${BUILD_CC}' \ |
| 46 | CPP='${BUILD_CPP}' \ |
| 47 | CXX='${BUILD_CXX}' \ |
| 48 | RANLIB='${BUILD_RANLIB}' \ |
| 49 | CFLAGS='${BUILD_CFLAGS}' \ |
| 50 | CPPFLAGS='${BUILD_CPPFLAGS}' \ |
| 51 | CXXFLAGS='${BUILD_CXXFLAGS}' \ |
| 52 | LDFLAGS='${BUILD_LDFLAGS}' \ |
| 53 | ICU_DATA_FILTER_FILE=${WORKDIR}/filter.json \ |
| 54 | ./runConfigureICU Linux --with-data-packaging=archive |
| 55 | oe_runmake ${PARALLEL_MAKE} |
| 56 | install -Dm644 ${S}/data/out/icudt${ICU_MAJOR_VER}l.dat ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat |
| 57 | } |
| 58 | |
| 59 | do_make_icudata() { |
| 60 | : |
| 61 | } |
| 62 | |
| 63 | addtask make_icudata before do_configure after do_patch |