Skip to content

Commit c16efc8

Browse files
committed
fix for new icu build
1 parent 73d3b07 commit c16efc8

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ graph_parallel, mpi, python
3939
use_frameworks!
4040
pod 'boost-iosx', '~> 1.80.0'
4141
# or optionally more precisely e.g.:
42-
# pod 'boost-iosx', :git => 'https://github.com/apotocki/boost-iosx', :tag => '1.80.0.1'
42+
# pod 'boost-iosx', :git => 'https://github.com/apotocki/boost-iosx', :tag => '1.80.0.2'
4343
```
4444
If you want to use particular boost libraries, specify them as in the following example for log and program_options libraries:
4545
```

boost-iosx.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "boost-iosx"
3-
s.version = "1.80.0.1"
3+
s.version = "1.80.0.2"
44
s.summary = "Boost C++ libraries"
55
s.homepage = "https://github.com/apotocki/boost-iosx"
66
s.license = "Boost Software License"

scripts/build.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
set -e
33
################## SETUP BEGIN
4+
THREAD_COUNT=$(sysctl hw.ncpu | awk '{print $2}')
45
HOST_ARC=$( uname -m )
56
XCODE_ROOT=$( xcode-select -print-path )
67
BOOST_VER=1.80.0
@@ -44,6 +45,7 @@ if [ ! -d $SCRIPT_DIR/Pods/icu4c-iosx/product ]; then
4445
pushd $SCRIPT_DIR
4546
pod repo update
4647
pod install --verbose
48+
pod update --verbose
4749
popd
4850
mkdir $SCRIPT_DIR/Pods/icu4c-iosx/product/lib
4951
fi
@@ -79,7 +81,8 @@ patch tools/build/src/tools/features/instruction-set-feature.jam $SCRIPT_DIR/ins
7981
#LIBS_TO_BUILD="--with-regex"
8082
LIBS_TO_BUILD="--with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave"
8183

82-
B2_BUILD_OPTIONS="release link=static runtime-link=shared define=BOOST_SPIRIT_THREADSAFE"
84+
B2_BUILD_OPTIONS="-j$THREAD_COUNT -sICU_PATH=\"$ICU_PATH\" address-model=64 release link=static runtime-link=shared define=BOOST_SPIRIT_THREADSAFE cxxflags=\"-std=c++20\""
85+
8386

8487
if true; then
8588
if [ -d bin.v2 ]; then
@@ -94,10 +97,10 @@ if true; then
9497
if [[ -f tools/build/src/user-config.jam ]]; then
9598
rm -f tools/build/src/user-config.jam
9699
fi
97-
cp $ICU_PATH/frameworks/icudata.xcframework/macos-$HOST_ARC/libicudata.a $ICU_PATH/lib/
98-
cp $ICU_PATH/frameworks/icui18n.xcframework/macos-$HOST_ARC/libicui18n.a $ICU_PATH/lib/
99-
cp $ICU_PATH/frameworks/icuuc.xcframework/macos-$HOST_ARC/libicuuc.a $ICU_PATH/lib/
100-
./b2 -j8 --stagedir=stage/macosx cxxflags="-std=c++17" -sICU_PATH="$ICU_PATH" toolset=darwin address-model=64 architecture=$BOOST_ARC $B2_BUILD_OPTIONS $LIBS_TO_BUILD
100+
cp $ICU_PATH/frameworks/icudata.xcframework/macos-*$HOST_ARC*/libicudata.a $ICU_PATH/lib/
101+
cp $ICU_PATH/frameworks/icui18n.xcframework/macos-*$HOST_ARC*/libicui18n.a $ICU_PATH/lib/
102+
cp $ICU_PATH/frameworks/icuuc.xcframework/macos-*$HOST_ARC*/libicuuc.a $ICU_PATH/lib/
103+
./b2 -j8 --stagedir=stage/macosx toolset=darwin architecture=$BOOST_ARC $B2_BUILD_OPTIONS $LIBS_TO_BUILD
101104
rm -rf bin.v2
102105
fi
103106

@@ -116,7 +119,7 @@ EOF
116119
cp $ICU_PATH/frameworks/icudata.xcframework/ios-*-maccatalyst/libicudata.a $ICU_PATH/lib/
117120
cp $ICU_PATH/frameworks/icui18n.xcframework/ios-*-maccatalyst/libicui18n.a $ICU_PATH/lib/
118121
cp $ICU_PATH/frameworks/icuuc.xcframework/ios-*-maccatalyst/libicuuc.a $ICU_PATH/lib/
119-
./b2 -j8 --stagedir=stage/catalyst-$1 cxxflags="-std=c++17" -sICU_PATH="$ICU_PATH" abi=$4 toolset=darwin-catalyst address-model=64 architecture=$3 $B2_BUILD_OPTIONS $LIBS_TO_BUILD
122+
./b2 --stagedir=stage/catalyst-$1 abi=$4 toolset=darwin-catalyst architecture=$3 $B2_BUILD_OPTIONS $LIBS_TO_BUILD
120123
rm -rf bin.v2
121124
}
122125

@@ -142,7 +145,7 @@ EOF
142145
cp $ICU_PATH/frameworks/icudata.xcframework/ios-arm64/libicudata.a $ICU_PATH/lib/
143146
cp $ICU_PATH/frameworks/icui18n.xcframework/ios-arm64/libicui18n.a $ICU_PATH/lib/
144147
cp $ICU_PATH/frameworks/icuuc.xcframework/ios-arm64/libicuuc.a $ICU_PATH/lib/
145-
./b2 -j8 --stagedir=stage/ios cxxflags="-std=c++17" -sICU_PATH="$ICU_PATH" toolset=darwin-ios address-model=64 instruction-set=arm64 architecture=arm binary-format=mach-o abi=aapcs target-os=iphone define=_LITTLE_ENDIAN define=BOOST_TEST_NO_MAIN $B2_BUILD_OPTIONS $LIBS_TO_BUILD
148+
./b2 --stagedir=stage/ios toolset=darwin-ios instruction-set=arm64 architecture=arm binary-format=mach-o abi=aapcs target-os=iphone define=_LITTLE_ENDIAN define=BOOST_TEST_NO_MAIN $B2_BUILD_OPTIONS $LIBS_TO_BUILD
146149
rm -rf bin.v2
147150
fi
148151

@@ -160,7 +163,7 @@ EOF
160163
cp $ICU_PATH/frameworks/icudata.xcframework/ios-*-simulator/libicudata.a $ICU_PATH/lib/
161164
cp $ICU_PATH/frameworks/icui18n.xcframework/ios-*-simulator/libicui18n.a $ICU_PATH/lib/
162165
cp $ICU_PATH/frameworks/icuuc.xcframework/ios-*-simulator/libicuuc.a $ICU_PATH/lib/
163-
./b2 -j8 --stagedir=stage/iossim-$1 cxxflags="-std=c++17" -sICU_PATH="$ICU_PATH" toolset=darwin-iossim abi=$3 address-model=64 architecture=$2 target-os=iphone define=BOOST_TEST_NO_MAIN $B2_BUILD_OPTIONS $LIBS_TO_BUILD
166+
./b2 --stagedir=stage/iossim-$1 toolset=darwin-iossim abi=$3 architecture=$2 target-os=iphone define=BOOST_TEST_NO_MAIN $B2_BUILD_OPTIONS $LIBS_TO_BUILD
164167
rm -rf bin.v2
165168
}
166169

0 commit comments

Comments
 (0)