<commit_before>package=icu
$(package)_version=58.1
$(package)_download_path=http://download.icu-project.org/files/icu4c/58.1
$(package)_file_name=icu4c-58_1-src.tgz
$(package)_sha256_hash=0eb46ba3746a9c2092c8ad347a29b1a1b4941144772d13a88667a7b11ea30309
$(package)_build_subdir=source


define $(package)_set_vars
$(package)_config_opts=
endef

define $(package)_config_cmds
  find . -name *.cpp | xargs sed -i 's|xlocale[.]h|locale.h|' && \
  mkdir native && cd native && \
  PATH=${HOST_NATIVE_PATH} ../configure && \
  PATH=${HOST_NATIVE_PATH}  make -j 10 && cd .. && \
  $($(package)_autoconf) --with-cross-build=$($(package)_build_dir)/native --prefix=$(host_prefix) --enable-extras=no \
  --enable-strict=no -enable-shared=yes --enable-tests=no \
  --enable-samples=no --enable-dyload=no --enable-tools=no
endef

define $(package)_build_cmds
  sed -i.old 's|gCLocale = _create_locale(LC_ALL, "C");|gCLocale = NULL;|' i18n/digitlst.cpp && \
  sed -i.old "s|freelocale(gCLocale);||" i18n/digitlst.cpp && \
  $(MAKE)
endef

define $(package)_stage_cmds
  $(MAKE) DESTDIR=$($(package)_staging_dir) install $($(package)_build_opts)
endef
<commit_msg>Fix (non-gitian) icu build on bionic<commit_after>package=icu
$(package)_version=58.1
$(package)_download_path=http://download.icu-project.org/files/icu4c/58.1
$(package)_file_name=icu4c-58_1-src.tgz
$(package)_sha256_hash=0eb46ba3746a9c2092c8ad347a29b1a1b4941144772d13a88667a7b11ea30309
$(package)_build_subdir=source


define $(package)_set_vars
$(package)_config_opts=
endef

define $(package)_config_cmds
  find . -name *.cpp | xargs sed -i 's|xlocale[.]h|locale.h|' && \
  mkdir native && cd native && \
	PATH="${HOST_NATIVE_PATH}:${PATH}" ../configure && \
  PATH="${HOST_NATIVE_PATH}:${PATH}"  make -j 10 && cd .. && \
  $($(package)_autoconf) --with-cross-build=$($(package)_build_dir)/native --prefix=$(host_prefix) --enable-extras=no \
  --enable-strict=no -enable-shared=yes --enable-tests=no \
  --enable-samples=no --enable-dyload=no --enable-tools=no
endef

define $(package)_build_cmds
  sed -i.old 's|gCLocale = _create_locale(LC_ALL, "C");|gCLocale = NULL;|' i18n/digitlst.cpp && \
  sed -i.old "s|freelocale(gCLocale);||" i18n/digitlst.cpp && \
  $(MAKE)
endef

define $(package)_stage_cmds
  $(MAKE) DESTDIR=$($(package)_staging_dir) install $($(package)_build_opts)
endef

{'fraction_non_alphanumeric': 0.18317677198975235, 'fraction_numerical': 0.05550811272416738, 'mean_word_length': 5.401639344262295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '478511', 'n_tokens_mistral': 1017, 'n_tokens_neox': 932, 'n_words': 131}