Update Boost to 1.83, replace Boost Locale with deprecated codecvt STL (#1660)

Co-authored-by: mwilsnd <mwilsnd@gmail.com>
This commit is contained in:
Bart Louwers
2023-09-27 12:02:15 +02:00
committed by GitHub
parent ad6aac2930
commit 34a2097bdd
18 changed files with 72 additions and 94 deletions

View File

@@ -2,30 +2,13 @@
set -eu
pushd "$BOOST"
if [ ! -f dist/bin/bcp ]; then
# Build bcp
./bootstrap.sh
./b2 tools/bcp
fi
popd
# Extract boost modules that we need
rm -rf vendor/boost/include
mkdir -p vendor/boost/include
"$BOOST/dist/bin/bcp" --boost="$BOOST" --scan $(find {src,include,test,platform,bin} -name "*.cpp" -o -name "*.hpp") vendor/boost/include
bcp --boost="$BOOST" --scan $(find {src,include,test,platform,bin,render-test} -name "*.cpp" -o -name "*.hpp") vendor/boost/include
pushd vendor/boost
VERSION=$(sed -n 's/^#define BOOST_LIB_VERSION "\([^"]*\)"$/\1/p' include/boost/version.hpp)
echo "libboost ${VERSION/_/.} for Mapbox GL Native" > README.md
echo "libboost ${VERSION/_/.} for MapLibre Native" > README.md
git add README.md include
popd
echo "If everything works, run:"
echo ""
echo " git -C vendor/boost checkout main"
echo " git -C vendor/boost commit -m \"update boost to ${VERSION/_/.}\""
echo " git -C vendor/boost push"
echo " git add vendor/boost"
echo ""
echo "and commit."

25
scripts/vendor/icu.sh vendored
View File

@@ -2,10 +2,11 @@
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
NAME=icu
VERSION=61.1
VERSION=73.2
ROOT=icu/source
download "http://download.icu-project.org/files/icu4c/$VERSION/icu4c-${VERSION//./_}-src.tgz"
VERSION_=${VERSION//./_}
download "https://github.com/unicode-org/icu/releases/download/release-${VERSION//./-}/icu4c-${VERSION_}-src.tgz"
init
STRIP_COMPONENTS=2 extract_gzip "${ROOT}/common/*.h" "${ROOT}/common/*.cpp"
STRIP_COMPONENTS=1 extract_gzip "icu/LICENSE"
@@ -33,7 +34,7 @@ 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/ *\\$//'))
ALL+=($(cd "common" && $CXX -std=c++17 -I. -c "$FILE" -M | sed -e 's/^[a-z0-9._-]*: *//;s/ *\\$//'))
done
# Remove duplicates
@@ -49,24 +50,6 @@ for FILE in "${ALL[@]}"; do
sed 's/^#include \"\(unicode\/[^\"]\{1,\}\)\"/#include <\1>/' "common/$FILE" > "$DIR/$FILE"
done
# Apply patch from https://github.com/LibreOffice/core/blob/master/external/icu/icu4c-ubsan.patch.1
# Shifting signed int to a number greater than can be represented is undefined behavior
patch -p0 << PATCH
--- src/ubidiimp.h
+++ src/ubidiimp.h
@@ -198,8 +198,8 @@
/* in a Run, logicalStart will get this bit set if the run level is odd */
#define INDEX_ODD_BIT (1UL<<31)
-#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)(level)<<31))
+#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((uint32_t)(level)<<31))
-#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((int32_t)(level)<<31))
+#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((uint32_t)(level)<<31))
#define REMOVE_ODD_BIT(x) ((x)&=~INDEX_ODD_BIT)
#define GET_INDEX(x) ((x)&~INDEX_ODD_BIT)
PATCH
rm -rf common
file_list include src -name "*.h" -o -name "*.cpp"