Skip to content

Commit

Permalink
icu 73.2?
Browse files Browse the repository at this point in the history
  • Loading branch information
0tkl committed Oct 27, 2023
1 parent f0d0328 commit d1853f1
Show file tree
Hide file tree
Showing 15 changed files with 604 additions and 637 deletions.
10 changes: 1 addition & 9 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,7 @@ cc = meson.get_compiler('c')
deps += cc.find_library('m', required: false)
deps += cc.find_library('dl', required: false)

if meson.version().version_compare('>=0.60.0')
iconv_dep = dependency('iconv', fallback: ['iconv', 'libiconv_dep'])
else
iconv_dep = cc.find_library('iconv', required: false)
if not (iconv_dep.found() or cc.has_function('iconv_open'))
iconv_sp = subproject('iconv') # this really needs to be replaced with a proper port
iconv_dep = iconv_sp.get_variable('libiconv_dep')
endif
endif
iconv_dep = dependency('iconv', fallback: ['iconv', 'libiconv_dep'])
deps += iconv_dep

deps += dependency('libass', version: '>=0.16.0',
Expand Down
6 changes: 3 additions & 3 deletions subprojects/icu.wrap
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[wrap-file]
directory = icu
source_url = https://github.com/unicode-org/icu/releases/download/release-67-1/icu4c-67_1-src.tgz
source_filename = icu4c-67_1-src.tgz
source_hash = 94a80cd6f251a53bd2a997f6f1b5ac6653fe791dfab66e1eb0227740fb86d5dc
source_url = https://github.com/unicode-org/icu/releases/download/release-73-2/icu4c-73_2-src.tgz
source_filename = icu4c-73_2-src.tgz
source_hash = 818a80712ed3caacd9b652305e01afc7fa167e6f2e94996da44b90c2ab604ce1
patch_directory = icu

[provide]
Expand Down
57 changes: 43 additions & 14 deletions subprojects/packagefiles/icu/meson.build
Original file line number Diff line number Diff line change
@@ -1,32 +1,61 @@
project('icu', 'c', 'cpp',
version: '67.1',
meson_version: '>=1.0.0',
version: '73.2',
meson_version: '>=0.61.0',
default_options: 'cpp_std=c++17')

U_ICU_VERSION = meson.project_version()
PACKAGE_ICU_DESCRIPTION = 'International Components for Unicode'
PACKAGE_ICU_URL = 'http://icu-project.org'

cpp = meson.get_compiler('cpp')
cpp_native = meson.get_compiler('cpp', native: true)

have_elf_h = cpp.has_header('elf.h')

if host_machine.system() == 'windows'
add_project_arguments('-DWIN32', '-DWIN64', '-D_MBCS', '/utf-8', language : 'cpp')
add_project_arguments('-DWIN32', '-DWIN64', '-D_MBCS', '/utf-8', language : 'c')
add_project_arguments('-DU_PLATFORM_USES_ONLY_WIN32_API', language: 'cpp')
add_project_arguments('-DWIN32', '-DWIN64', '-D_MBCS', language: 'cpp')
add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'cpp')
# add_project_arguments('-DWINVER=0x0601', '-D_WIN32_WINNT=0x0601' , language: 'cpp')
add_project_arguments('-DU_PLATFORM_USES_ONLY_WIN32_API', language: 'c')
add_project_arguments('-DWIN32', '-DWIN64', '-D_MBCS', language: 'c')
add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'c')
# add_project_arguments('-DWINVER=0x0601', '-D_WIN32_WINNT=0x0601' , language: 'c')
endif

if cpp.has_header('elf.h')
add_project_arguments('-DU_HAVE_ELF_H=1', language: 'c')
add_project_arguments('-DU_HAVE_ELF_H=1', language: 'cpp')
add_project_arguments('-DU_ATTRIBUTE_DEPRECATED=', language: 'cpp')
if meson.version().version_compare('>= 0.62')
dl_dep = dependency('dl', required: false)
dl_native_dep = dependency('dl', required: false, native: true)
else
dl_dep = cpp.find_library('dl', required: false)
dl_native_dep = cpp_native.find_library('dl', required: false, native: true)
endif

dl_dep = cpp.find_library('dl', required: false)
thread_dep = dependency('threads')
windows = import('windows')
pkg = import('pkgconfig')

# Compiler flags the users of this library must use.
usage_args = []

if get_option('default_library') == 'static'
add_project_arguments('-DU_STATIC_IMPLEMENTATION', language : 'c')
add_project_arguments('-DU_STATIC_IMPLEMENTATION', language : 'cpp')
usage_args = ['-DU_STATIC_IMPLEMENTATION']
elif host_machine.system() == 'windows'
error('Shared library build not supported on Windows. Set default_library to static.')
add_project_arguments('-DU_STATIC_IMPLEMENTATION', language: 'c')
add_project_arguments('-DU_STATIC_IMPLEMENTATION', language: 'cpp')
usage_args = ['-DU_STATIC_IMPLEMENTATION']
if cpp.get_argument_syntax() == 'msvc'
library_prefix = ''
library_suffix = ''
else
library_prefix = 's'
if get_option('buildtype') == 'debug'
library_suffix = 'd'
else
library_suffix = ''
endif
endif
else
library_prefix = ''
library_suffix = ''
endif

subdir('source')
Loading

0 comments on commit d1853f1

Please sign in to comment.