# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/icu4c/icu4c.conf # Copyright (C) 2006 - 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- srcdir="*/icu4c/source" ICU_TEMP_FOLDER=$base/build/$SDECFG_ID/TOOLCHAIN/cross # files archive library static auto? #var_append confopt ' ' '--with-data-packaging=files' # TODO: resource files didn't work: patch their Makefile* / rules / Perl code proper # _V=${desc_V//-/.} [ $arch_bigendian = yes ] && endian=b || endian=l # hook_add inmake 5 "mkdir -p $root$datadir/icu/$_V/icudt${_V%%.*}$endian/{brkitr,\ # coll,curr,lang,locales,rbnf,region,translit,unit,zone}" # endianess byte-swapping is cursed broken beyond repair, grossly # hack hardcoded byteswapping AFTER native resource lirbary was linked icu4c_hotfix_endianess() { grep -qa U_IS_BIG_ENDIAN.*1 && host_bigendian=yes || host_bigendian=no [ $arch_bigendian != $host_bigendian ] && hook_add postmake 3 "icu4c_hotfix_endianess_rebuild" : } icu4c_hotfix_endianess_rebuild() { patch $patchopt < $confdir/hotfix-endianess.diff eval $MAKE $makeopt } # cross build needs native helpers to process and generate data files icu4c_postmake() { mkdir -p $ICU_TEMP_FOLDER/config cp -rfv config/icucross.{mk,inc} $ICU_TEMP_FOLDER/config/ cp -rfv lib bin tools $ICU_TEMP_FOLDER/ } if atstage toolchain; then makeinstopt= hook_add premake 5 "icu4c_hotfix_endianess" hook_add postmake 5 "icu4c_postmake" elif atstage cross; then createarchcache=1 var_append confopt ' ' '--with-cross-build=$ICU_TEMP_FOLDER' fi