Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions tools/ports/icu.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ def get_lib_name(base_name, settings):

def get(ports, settings, shared):
ports.fetch_project('icu', f'https://github.com/unicode-org/icu/releases/download/{TAG}/icu4c-{VERSION}-src.zip', sha512hash=HASH)
icu_source_path = None

def prepare_build():
nonlocal icu_source_path
source_path = ports.get_dir('icu', 'icu') # downloaded icu4c path
icu_source_path = os.path.join(source_path, 'source')
source_path = ports.get_dir('icu', 'icu') # downloaded icu4c path
icu_source_path = os.path.join(source_path, 'source')

def build_lib(lib_output, lib_src, other_includes, build_flags):
additional_build_flags = [
Expand Down Expand Up @@ -61,7 +57,6 @@ def build_lib(lib_output, lib_src, other_includes, build_flags):

# creator for libicu_common
def create_libicu_common(lib_output):
prepare_build()
lib_src = os.path.join(icu_source_path, 'common')
ports.install_headers(os.path.join(lib_src, 'unicode'), target='unicode')
ports.make_pkg_config('ici', VERSION, '-sUSE_ICU')
Expand All @@ -82,7 +77,6 @@ def create_libicu_i18n(lib_output):

# creator for libicu_io
def create_libicu_io(lib_output):
prepare_build()
lib_src = os.path.join(icu_source_path, 'io')
ports.install_headers(os.path.join(lib_src, 'unicode'), target='unicode')
other_includes = [os.path.join(icu_source_path, 'common'), os.path.join(icu_source_path, 'i18n')]
Expand Down
Loading