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