This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
177 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
add_vendor_target(icu STATIC) | ||
|
||
target_compile_definitions(icu | ||
PRIVATE "-D_REENTRANT" | ||
PRIVATE "-DU_HAVE_ATOMIC=1" | ||
PRIVATE "-DU_HAVE_STRTOD_L=0" | ||
PRIVATE "-DU_CHARSET_IS_UTF8=1" | ||
PRIVATE "-DU_CHAR_TYPE=uint_least16_t" | ||
PRIVATE "-DUCONFIG_NO_LEGACY_CONVERSION=1" | ||
PRIVATE "-DUCONFIG_NO_BREAK_ITERATION=1" | ||
) | ||
|
||
target_compile_options(icu | ||
PRIVATE "-Wno-shadow" | ||
) | ||
|
||
if(MBGL_PLATFORM STREQUAL "android") | ||
target_compile_options(icu | ||
PRIVATE "-Wno-tautological-unsigned-enum-zero-compare" | ||
) | ||
elseif(MBGL_PLATFORM STREQUAL "ios") | ||
target_compile_options(icu | ||
PRIVATE "-Wno-shorten-64-to-32" | ||
) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
source "$(dirname "${BASH_SOURCE[0]}")/common.sh" | ||
|
||
NAME=icu | ||
VERSION=61.1 | ||
ROOT=icu/source | ||
|
||
download "http://download.icu-project.org/files/icu4c/$VERSION/icu4c-${VERSION//./_}-src.tgz" | ||
init | ||
STRIP_COMPONENTS=2 extract_gzip "${ROOT}/common/*.h" "${ROOT}/common/*.cpp" | ||
STRIP_COMPONENTS=1 extract_gzip "icu/LICENSE" | ||
|
||
# List all files we want to extract | ||
FILES=( | ||
ushape.cpp | ||
ubidi.cpp | ||
ubidi_props.cpp | ||
ubidiln.cpp | ||
ubidiwrt.cpp | ||
ustring.cpp | ||
uinvchar.cpp | ||
uchar.cpp | ||
udataswp.cpp | ||
umath.cpp | ||
utrie2.cpp | ||
utf_impl.cpp | ||
utypes.cpp | ||
cmemory.cpp | ||
cstring.cpp | ||
) | ||
|
||
# Find dependencies for all of these files | ||
echo ">> Finding dependencies..." | ||
ALL=() | ||
for FILE in "${FILES[@]}"; do | ||
ALL+=($(cd "common" && $CXX -std=c++14 -I. -c "$FILE" -M | sed -e 's/^[a-z0-9._-]*: *//;s/ *\\$//')) | ||
done | ||
|
||
# Remove duplicates | ||
IFS=$'\n' ALL=($(sort <<< "${ALL[*]}" | uniq | sed '/^\//d')) | ||
unset IFS | ||
|
||
echo ">> Copying files..." | ||
mkdir -p src include/unicode | ||
for FILE in "${ALL[@]}"; do | ||
[[ "$FILE" = unicode/* ]] && DIR="include" || DIR="src" | ||
# Copy file and replace #include "unicode/*" with #include <unicode/*> so that we can separate | ||
# includes and source-only files. | ||
sed 's/^#include \"\(unicode\/[^\"]\{1,\}\)\"/#include <\1>/' "common/$FILE" > "$DIR/$FILE" | ||
done | ||
|
||
rm -rf common | ||
|
||
file_list include src -name "*.h" -o -name "*.cpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
include/unicode/bytestream.h | ||
include/unicode/char16ptr.h | ||
include/unicode/localpointer.h | ||
include/unicode/platform.h | ||
include/unicode/ptypes.h | ||
include/unicode/putil.h | ||
include/unicode/rep.h | ||
include/unicode/std_string.h | ||
include/unicode/stringoptions.h | ||
include/unicode/stringpiece.h | ||
include/unicode/ubidi.h | ||
include/unicode/uchar.h | ||
include/unicode/uclean.h | ||
include/unicode/uconfig.h | ||
include/unicode/udata.h | ||
include/unicode/uiter.h | ||
include/unicode/umachine.h | ||
include/unicode/unistr.h | ||
include/unicode/uobject.h | ||
include/unicode/urename.h | ||
include/unicode/uscript.h | ||
include/unicode/uset.h | ||
include/unicode/ushape.h | ||
include/unicode/ustring.h | ||
include/unicode/utf.h | ||
include/unicode/utf16.h | ||
include/unicode/utf8.h | ||
include/unicode/utf_old.h | ||
include/unicode/utypes.h | ||
include/unicode/uvernum.h | ||
include/unicode/uversion.h | ||
src/cmemory.cpp | ||
src/cmemory.h | ||
src/cstring.cpp | ||
src/cstring.h | ||
src/cwchar.h | ||
src/mutex.h | ||
src/putilimp.h | ||
src/uassert.h | ||
src/ubidi.cpp | ||
src/ubidi_props.cpp | ||
src/ubidi_props.h | ||
src/ubidi_props_data.h | ||
src/ubidiimp.h | ||
src/ubidiln.cpp | ||
src/ubidiwrt.cpp | ||
src/uchar.cpp | ||
src/uchar_props_data.h | ||
src/ucln.h | ||
src/ucln_cmn.h | ||
src/ucmndata.h | ||
src/udatamem.h | ||
src/udataswp.cpp | ||
src/udataswp.h | ||
src/uinvchar.cpp | ||
src/uinvchar.h | ||
src/umapfile.h | ||
src/umath.cpp | ||
src/umutex.h | ||
src/uprops.h | ||
src/uset_imp.h | ||
src/ushape.cpp | ||
src/ustr_imp.h | ||
src/ustring.cpp | ||
src/utf_impl.cpp | ||
src/utrie2.cpp | ||
src/utrie2.h | ||
src/utrie2_impl.h | ||
src/utypes.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
61.1 |