Skip to content

Commit bea1621

Browse files
committed
Intermediate changes
commit_hash:1206f30a903c5e103cde7612d6318ff5005d27a0
1 parent 014cc62 commit bea1621

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

contrib/libs/icu/.yandex_meta/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@
66
from devtools.yamaker.project import NixProject
77

88

9+
def _get_major_version(version: str) -> str:
10+
return version.split('.')[0]
11+
12+
913
def post_build(self):
1014
# copying icudt.dat file from original repository
11-
icu_dat_path = f"{self.srcdir}/data/in/icudt77l.dat"
12-
rodata_path = f"{self.dstdir}/icudt77_dat.rodata"
15+
major_version = _get_major_version(self.version)
16+
icu_dat_path = f"{self.srcdir}/data/in/icudt{major_version}l.dat"
17+
rodata_path = f"{self.dstdir}/icudt{major_version}_dat.rodata"
1318
shutil.copy(icu_dat_path, rodata_path)
1419

1520

1621
def post_install(self):
1722
result_target = self.yamakes["."]
1823

19-
result_target.SRCS.add("icudt77_dat.rodata")
24+
major_version = _get_major_version(self.version)
25+
result_target.SRCS.add(f"icudt{major_version}_dat.rodata")
2026

2127
result_target.CFLAGS = [
2228
"-DU_COMMON_IMPLEMENTATION",
@@ -84,7 +90,7 @@ def post_install(self):
8490
"g:cpp-contrib",
8591
],
8692
arcdir="contrib/libs/icu",
87-
nixattr="icu74",
93+
nixattr="icu",
8894
put_with={
8995
"icuio": [
9096
"icuuc",

0 commit comments

Comments
 (0)