Merge commit 'f8dd96543542220181c76afb8c084f4908213fb5' as 'third_party/mason'
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
language: cpp
|
||||
|
||||
sudo: false
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
compiler: clang
|
||||
- os: linux
|
||||
compiler: clang
|
||||
|
||||
script:
|
||||
- ./mason build ${MASON_NAME} ${MASON_VERSION}
|
||||
|
||||
after_success:
|
||||
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MASON_NAME=icu
|
||||
MASON_VERSION=54.1
|
||||
MASON_LIB_FILE=lib/libicuuc.a
|
||||
#MASON_PKGCONFIG_FILE=lib/pkgconfig/icu-uc.pc
|
||||
|
||||
. ${MASON_DIR}/mason.sh
|
||||
|
||||
function mason_load_source {
|
||||
mason_download \
|
||||
http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz \
|
||||
d0f79be346f75862ccef8fd641e429d9c129ac14
|
||||
|
||||
mason_extract_tar_gz
|
||||
|
||||
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}
|
||||
}
|
||||
|
||||
function mason_compile {
|
||||
# note: -DUCONFIG_NO_BREAK_ITERATION=1 is desired by mapnik (for toTitle)
|
||||
# http://www.icu-project.org/apiref/icu4c/uconfig_8h_source.html
|
||||
export ICU_CORE_CPP_FLAGS="-DU_CHARSET_IS_UTF8=1"
|
||||
# disabled due to breakage with node-mapnik on OS X: https://github.com/mapnik/mapnik-packaging/issues/98
|
||||
# -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION=1 -DU_TIMEZONE=0 -DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1"
|
||||
export ICU_EXTRA_CPP_FLAGS="${ICU_CORE_CPP_FLAGS} -DUCONFIG_NO_COLLATION=1"
|
||||
cd ./source
|
||||
CFLAGS="${CFLAGS} -fvisibility=hidden"
|
||||
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
|
||||
./configure ${MASON_HOST_ARG} --prefix=${MASON_PREFIX} \
|
||||
--with-data-packaging=archive \
|
||||
--enable-renaming \
|
||||
--enable-strict \
|
||||
--enable-release \
|
||||
--enable-static \
|
||||
--enable-draft \
|
||||
--enable-tools \
|
||||
--disable-rpath \
|
||||
--disable-debug \
|
||||
--disable-shared \
|
||||
--disable-tests \
|
||||
--disable-extras \
|
||||
--disable-tracing \
|
||||
--disable-layout \
|
||||
--disable-icuio \
|
||||
--disable-samples \
|
||||
--disable-dyload
|
||||
|
||||
make -j${MASON_CONCURRENCY}
|
||||
make install
|
||||
}
|
||||
|
||||
function mason_ldflags {
|
||||
echo "-lharfbuzz"
|
||||
}
|
||||
|
||||
function mason_clean {
|
||||
make clean
|
||||
}
|
||||
|
||||
mason_run "$@"
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
language: cpp
|
||||
|
||||
sudo: false
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
osx_image: xcode6
|
||||
compiler: clang
|
||||
- os: osx
|
||||
osx_image: xcode7
|
||||
compiler: clang
|
||||
- os: linux
|
||||
compiler: clang
|
||||
|
||||
script:
|
||||
- ./mason build ${MASON_NAME} ${MASON_VERSION}
|
||||
|
||||
after_success:
|
||||
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MASON_NAME=icu
|
||||
MASON_VERSION=55.1
|
||||
MASON_LIB_FILE=lib/libicuuc.a
|
||||
#MASON_PKGCONFIG_FILE=lib/pkgconfig/icu-uc.pc
|
||||
|
||||
. ${MASON_DIR}/mason.sh
|
||||
|
||||
function mason_load_source {
|
||||
mason_download \
|
||||
http://download.icu-project.org/files/icu4c/55.1/icu4c-55_1-src.tgz \
|
||||
0b38bcdde97971917f0039eeeb5d070ed29e5ad7
|
||||
|
||||
mason_extract_tar_gz
|
||||
|
||||
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}
|
||||
}
|
||||
|
||||
function mason_compile {
|
||||
# note: -DUCONFIG_NO_BREAK_ITERATION=1 is desired by mapnik (for toTitle)
|
||||
# http://www.icu-project.org/apiref/icu4c/uconfig_8h_source.html
|
||||
export ICU_CORE_CPP_FLAGS="-DU_CHARSET_IS_UTF8=1"
|
||||
# disabled due to breakage with node-mapnik on OS X: https://github.com/mapnik/mapnik-packaging/issues/98
|
||||
# -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION=1 -DU_TIMEZONE=0 -DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1"
|
||||
export ICU_EXTRA_CPP_FLAGS="${ICU_CORE_CPP_FLAGS} -DUCONFIG_NO_COLLATION=1"
|
||||
cd ./source
|
||||
CFLAGS="${CFLAGS} -fvisibility=hidden"
|
||||
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
|
||||
./configure ${MASON_HOST_ARG} --prefix=${MASON_PREFIX} \
|
||||
--with-data-packaging=archive \
|
||||
--enable-renaming \
|
||||
--enable-strict \
|
||||
--enable-release \
|
||||
--enable-static \
|
||||
--enable-draft \
|
||||
--enable-tools \
|
||||
--disable-rpath \
|
||||
--disable-debug \
|
||||
--disable-shared \
|
||||
--disable-tests \
|
||||
--disable-extras \
|
||||
--disable-tracing \
|
||||
--disable-layout \
|
||||
--disable-icuio \
|
||||
--disable-samples \
|
||||
--disable-dyload
|
||||
|
||||
make -j${MASON_CONCURRENCY}
|
||||
make install
|
||||
}
|
||||
|
||||
function mason_ldflags {
|
||||
echo "-licuuc"
|
||||
}
|
||||
|
||||
function mason_clean {
|
||||
make clean
|
||||
}
|
||||
|
||||
mason_run "$@"
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
language: generic
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
compiler: clang
|
||||
sudo: false
|
||||
- os: osx
|
||||
env: MASON_PLATFORM=ios
|
||||
compiler: clang
|
||||
- os: linux
|
||||
compiler: clang
|
||||
sudo: false
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libstdc++-5-dev
|
||||
- os: osx
|
||||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v5
|
||||
- os: osx
|
||||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v7
|
||||
- os: osx
|
||||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v8
|
||||
- os: osx
|
||||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86
|
||||
- os: osx
|
||||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86-64
|
||||
- os: osx
|
||||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips
|
||||
- os: osx
|
||||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips-64
|
||||
|
||||
script:
|
||||
- ./mason build ${MASON_NAME} ${MASON_VERSION}
|
||||
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build ICU common package (libicuuc.a) with data file separate and with support for legacy conversion and break iteration turned off in order to minimize size
|
||||
|
||||
MASON_NAME=icu
|
||||
MASON_VERSION=58.1
|
||||
MASON_LIB_FILE=lib/libicuuc.a
|
||||
#MASON_PKGCONFIG_FILE=lib/pkgconfig/icu-uc.pc
|
||||
|
||||
. ${MASON_DIR}/mason.sh
|
||||
|
||||
MASON_BUILD_DEBUG=0 # Enable to build library with debug symbols
|
||||
MASON_CROSS_BUILD=0
|
||||
|
||||
function mason_load_source {
|
||||
mason_download \
|
||||
http://download.icu-project.org/files/icu4c/58.1/icu4c-58_1-src.tgz \
|
||||
ad6995ba349ed79dde0f25d125a9b0bb56979420
|
||||
|
||||
mason_extract_tar_gz
|
||||
|
||||
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}
|
||||
}
|
||||
|
||||
function mason_prepare_compile {
|
||||
if [[ ${MASON_PLATFORM} == 'ios' || ${MASON_PLATFORM} == 'android' ]]; then
|
||||
mason_substep "Cross-compiling ICU. Starting with host build of ICU to generate tools."
|
||||
|
||||
pushd ${MASON_ROOT}/..
|
||||
env -i HOME="$HOME" PATH="$PATH" USER="$USER" ${MASON_DIR}/mason build icu ${MASON_VERSION}
|
||||
popd
|
||||
|
||||
# TODO: Copies a bunch of files to a kind of orphaned place, do we need to do something to clean up after the build?
|
||||
# Copying the whole build directory is the easiest way to do a cross build, but we could limit this to a small subset of files (icucross.mk, the tools directory, probably a few others...)
|
||||
# Also instead of using the regular build steps, we could use a dedicated built target that just builds the tools
|
||||
mason_substep "Moving host ICU build directory to ${MASON_ROOT}/.build/icu-host"
|
||||
rm -rf ${MASON_ROOT}/.build/icu-host
|
||||
cp -R ${MASON_BUILD_PATH}/source ${MASON_ROOT}/.build/icu-host
|
||||
fi
|
||||
}
|
||||
|
||||
function mason_compile {
|
||||
if [[ ${MASON_PLATFORM} == 'ios' || ${MASON_PLATFORM} == 'android' ]]; then
|
||||
MASON_CROSS_BUILD=1
|
||||
fi
|
||||
mason_compile_base
|
||||
}
|
||||
|
||||
function mason_compile_base {
|
||||
pushd ${MASON_BUILD_PATH}/source
|
||||
|
||||
# Using uint_least16_t instead of char16_t because Android Clang doesn't recognize char16_t
|
||||
# I'm being shady and telling users of the library to use char16_t, so there's an implicit raw cast
|
||||
ICU_CORE_CPP_FLAGS="-DU_CHARSET_IS_UTF8=1 -DU_CHAR_TYPE=uint_least16_t"
|
||||
ICU_MODULE_CPP_FLAGS="${ICU_CORE_CPP_FLAGS} -DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_BREAK_ITERATION=1"
|
||||
|
||||
CPPFLAGS="${CPPFLAGS} ${ICU_CORE_CPP_FLAGS} ${ICU_MODULE_CPP_FLAGS} -fvisibility=hidden $(icu_debug_cpp)"
|
||||
#CXXFLAGS="--std=c++0x"
|
||||
|
||||
echo "Configuring with ${MASON_HOST_ARG}"
|
||||
|
||||
./configure ${MASON_HOST_ARG} --prefix=${MASON_PREFIX} \
|
||||
$(icu_debug_configure) \
|
||||
$(cross_build_configure) \
|
||||
--with-data-packaging=archive \
|
||||
--enable-renaming \
|
||||
--enable-strict \
|
||||
--enable-static \
|
||||
--enable-draft \
|
||||
--disable-rpath \
|
||||
--disable-shared \
|
||||
--disable-tests \
|
||||
--disable-extras \
|
||||
--disable-tracing \
|
||||
--disable-layout \
|
||||
--disable-icuio \
|
||||
--disable-samples \
|
||||
--disable-dyload || cat config.log
|
||||
|
||||
|
||||
# Must do make clean after configure to clear out object files left over from previous build on different architecture
|
||||
make clean
|
||||
make -j${MASON_CONCURRENCY}
|
||||
make install
|
||||
popd
|
||||
}
|
||||
|
||||
function icu_debug_cpp {
|
||||
if [ ${MASON_BUILD_DEBUG} ]; then
|
||||
echo "-glldb"
|
||||
fi
|
||||
}
|
||||
|
||||
function icu_debug_configure {
|
||||
if [ ${MASON_BUILD_DEBUG} == 1 ]; then
|
||||
echo "--enable-debug --disable-release"
|
||||
else
|
||||
echo "--enable-release --disable-debug"
|
||||
fi
|
||||
}
|
||||
|
||||
function cross_build_configure {
|
||||
# Building tools is disabled in cross-build mode. Using the host-built version of the tools is the whole point of the --with-cross-build flag
|
||||
if [ ${MASON_CROSS_BUILD} == 1 ]; then
|
||||
echo "--with-cross-build=${MASON_ROOT}/.build/icu-host --disable-tools"
|
||||
else
|
||||
echo "--enable-tools"
|
||||
fi
|
||||
}
|
||||
|
||||
function mason_cflags {
|
||||
echo "-I${MASON_PREFIX}/include -DUCHAR_TYPE=char16_t"
|
||||
}
|
||||
|
||||
function mason_ldflags {
|
||||
echo ""
|
||||
}
|
||||
|
||||
mason_run "$@"
|
||||
@@ -0,0 +1,16 @@
|
||||
language: cpp
|
||||
|
||||
sudo: false
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
compiler: clang
|
||||
- os: linux
|
||||
compiler: clang
|
||||
|
||||
script:
|
||||
- ./mason build ${MASON_NAME} ${MASON_VERSION}
|
||||
|
||||
after_success:
|
||||
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MASON_NAME=icu
|
||||
MASON_VERSION=latest
|
||||
MASON_LIB_FILE=lib/libicuuc.a
|
||||
#MASON_PKGCONFIG_FILE=lib/pkgconfig/icu-uc.pc
|
||||
|
||||
. ${MASON_DIR}/mason.sh
|
||||
|
||||
function mason_load_source {
|
||||
export MASON_BUILD_PATH=${MASON_ROOT}/.build/icu-trunk
|
||||
if [[ ! -d ${MASON_BUILD_PATH} ]]; then
|
||||
svn co http://source.icu-project.org/repos/icu/icu/trunk/source/ ${MASON_BUILD_PATH}
|
||||
else
|
||||
(cd ${MASON_BUILD_PATH} && svn update)
|
||||
fi
|
||||
}
|
||||
|
||||
function mason_compile {
|
||||
# note: -DUCONFIG_NO_BREAK_ITERATION=1 is desired by mapnik (for toTitle)
|
||||
# http://www.icu-project.org/apiref/icu4c/uconfig_8h_source.html
|
||||
export ICU_CORE_CPP_FLAGS="-DU_CHARSET_IS_UTF8=1"
|
||||
# disabled due to breakage with node-mapnik on OS X: https://github.com/mapnik/mapnik-packaging/issues/98
|
||||
# -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION=1 -DU_TIMEZONE=0 -DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1"
|
||||
export ICU_EXTRA_CPP_FLAGS="${ICU_CORE_CPP_FLAGS} -DUCONFIG_NO_COLLATION=1"
|
||||
CFLAGS="${CFLAGS} -fvisibility=hidden"
|
||||
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
|
||||
./configure ${MASON_HOST_ARG} --prefix=${MASON_PREFIX} \
|
||||
--with-data-packaging=archive \
|
||||
--enable-renaming \
|
||||
--enable-strict \
|
||||
--enable-release \
|
||||
--enable-static \
|
||||
--enable-draft \
|
||||
--enable-tools \
|
||||
--disable-rpath \
|
||||
--disable-debug \
|
||||
--disable-shared \
|
||||
--disable-tests \
|
||||
--disable-extras \
|
||||
--disable-tracing \
|
||||
--disable-layout \
|
||||
--disable-icuio \
|
||||
--disable-samples \
|
||||
--disable-dyload
|
||||
|
||||
make -j${MASON_CONCURRENCY}
|
||||
make install
|
||||
}
|
||||
|
||||
function mason_ldflags {
|
||||
echo ""
|
||||
}
|
||||
|
||||
function mason_clean {
|
||||
make clean
|
||||
}
|
||||
|
||||
mason_run "$@"
|
||||
Reference in New Issue
Block a user