├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── FUNDING.yml
├── LICENSE
├── LOCATIONS
├── README.md
├── boost-iosx.podspec
└── scripts
├── ICUdep.xcodeproj
└── project.pbxproj
├── Podfile
├── build.sh
└── instruction-set-feature.jam.patch
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Build Boost Libraries
2 | on:
3 | release:
4 | types: [published]
5 | push:
6 | tags:
7 | - 1.**
8 | workflow_dispatch:
9 | jobs:
10 | Build:
11 | runs-on: macos-latest
12 | timeout-minutes: 120
13 | steps:
14 | - uses: actions/checkout@v3
15 | - name: Build
16 | run: |
17 | export ICU4C_RELEASE_LINK=https://github.com/apotocki/icu4c-iosx/releases/download/77.1.0
18 | scripts/build.sh -p=macosx-both,ios,iossim-both,catalyst-both,xros,xrossim-both,watchos,watchossim-both,tvos,tvossim-both
19 | for i in frameworks/*.xcframework/; do cd frameworks && zip -9 -r "$(basename -- $i).zip" $(basename -- $i) & done; wait
20 | cd frameworks
21 | mv Headers include
22 | zip -9 -r include.zip include
23 | wait
24 | - name: Release
25 | uses: softprops/action-gh-release@v1
26 | if: startsWith(github.ref, 'refs/tags/')
27 | with:
28 | files: |
29 | frameworks/*.zip
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.DS_STORE
2 | scripts/.DS_Store
3 | /boost*
4 | /frameworks
5 | /scripts/ICUdep.xcworkspace
6 | /scripts/Pods
7 | /scripts/Podfile.lock
8 | /frameworks.built
--------------------------------------------------------------------------------
/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # repo: apotocki/boost-iosx
2 | # filename: FUNDING.YML
3 |
4 | github: apotocki
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Boost Software License - Version 1.0 - August 17th, 2003
2 |
3 | Permission is hereby granted, free of charge, to any person or organization
4 | obtaining a copy of the software and accompanying documentation covered by
5 | this license (the "Software") to use, reproduce, display, distribute,
6 | execute, and transmit the Software, and to prepare derivative works of the
7 | Software, and to permit third-parties to whom the Software is furnished to
8 | do so, all subject to the following:
9 |
10 | The copyright notices in the Software and this entire statement, including
11 | the above license grant, this restriction and the following disclaimer,
12 | must be included in all copies of the Software, in whole or in part, and
13 | all derivative works of the Software, unless such copies or derivative
14 | works are solely in the form of machine-executable object code generated by
15 | a source language processor.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 | DEALINGS IN THE SOFTWARE.
24 |
--------------------------------------------------------------------------------
/LOCATIONS:
--------------------------------------------------------------------------------
1 | https://archives.boost.io/release/DOTVERSION/source/FILENAME
2 | https://sourceforge.net/projects/boost/files/boost/DOTVERSION/FILENAME
3 | https://boostorg.jfrog.io/artifactory/main/release/DOTVERSION/source/FILENAME
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Boost C++ for iOS, watchOS, tvOS, visionOS, macOS, Catalyst, Simulators - Intel(x86_64) / Apple Silicon(arm64)
2 |
3 | Supported versions: 1.88.0, 1.87.0, 1.86.0, 1.85.0, 1.84.0, 1.83.0, 1.82.0, 1.81.0, 1.80.0, 1.79.0, 1.78.0, 1.77.0, 1.76.0, 1.75.0 (use the appropriate tag or branch to choose a version)
4 |
5 | This repo provides a universal script for building static Boost C++ libraries for use in iOS, watchOS, tvOS, visionOS, and macOS & Catalyst applications.
6 |
7 | Since Boost distribution URLs are often unreliable and subject to change, the script attempts to download Boost from the links specified in the `LOCATIONS` file on the master branch. Only after verifying the SHA256 hash of the downloaded archive are the libraries unpacked and compiled.
8 |
9 | ## Built Libraries
10 | atomic, charconv, chrono, cobalt (requires apple clang-15.0.0 or later), container, context, contract, coroutine, date_time, exception, fiber, filesystem, graph, iostreams, json, locale, log, math, nowide, program_options, random, regex, serialization, stacktrace, system, test, thread, timer, type_erasure, url, wave
11 |
12 | ## Excluded Libraries
13 | graph_parallel, mpi, python
14 |
15 | ## Prerequisites
16 |
17 | 1. **Install Xcode**: Ensure Xcode is installed, as `xcodebuild` is required to create `xcframeworks`.
18 |
19 | 2. **Verify Xcode Developer Directory**:
20 | - The `xcode-select -p` command must point to the Xcode app's developer directory (e.g., `/Applications/Xcode.app/Contents/Developer`).
21 | - If it points to the CommandLineTools directory, reset it using one of the following commands:
22 | ```bash
23 | sudo xcode-select --reset
24 | ```
25 | or
26 | ```bash
27 | sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
28 | ```
29 |
30 | 3. **Remove User-Specific Configurations**: Ensure you do not have a `user-config.jam` file in your home directory, as it may interfere with the build process.
31 |
32 | 4. **Install Required SDKs**: To build for tvOS, watchOS, visionOS, and their simulators, make sure the corresponding SDKs are installed in the folder:
33 | ```
34 | /Applications/Xcode.app/Contents/Developer/Platforms
35 | ```
36 | ## Building Notes
37 |
38 | 1. **ICU Backend for `locale` and `regex` Libraries**:
39 | - These libraries are built using the ICU backend. There are two ways to obtain the ICU libraries:
40 | 1. **Default Method**: The ICU libraries are automatically built before Boost using the build script available at:
41 | [https://github.com/apotocki/icu4c-iosx](https://github.com/apotocki/icu4c-iosx).
42 | 2. **Prebuilt Binaries**: Specify the `ICU4C_RELEASE_LINK` environment variable to download prebuilt binaries.
43 |
44 | 2. **`test` Library for iOS and visionOS**:
45 | - The `test` library is built with the `BOOST_TEST_NO_MAIN` flag.
46 |
47 | 3. **`test` Library for watchOS and tvOS**:
48 | - The `test` library is built with the `BOOST_TEST_NO_MAIN` and `BOOST_TEST_DISABLE_ALT_STACK` flags.
49 |
50 | # Build Manually
51 | ```
52 | # clone the repo
53 | git clone https://github.com/apotocki/boost-iosx
54 |
55 | # build libraries
56 | cd boost-iosx
57 | scripts/build.sh
58 |
59 | # However, if you wish, you can skip building the ICU libraries during the boost build and use pre-built binaries from my ICU repository:
60 | # ICU4C_RELEASE_LINK=https://github.com/apotocki/icu4c-iosx/releases/download/77.1.0 scripts/build.sh
61 |
62 | # have fun, the result artifacts will be located in 'frameworks' folder.
63 | # Then you can add desirable xcframeworks in your XCode project. The process is described, e.g., at https://www.simpleswiftguide.com/how-to-add-xcframework-to-xcode-project/
64 | ```
65 | # Selecting Platforms and Architectures
66 | build.sh without arguments builds xcframeworks for iOS, macOS, Catalyst and also for watchOS, tvOS, visionOS if their SDKs are installed on the system. It also builds xcframeworks for their simulators with the architecture (arm64 or x86_64) depending on the current host.
67 | If you are interested in a specific set of platforms and architectures, you can specify them explicitly using the -p argument, for example:
68 | ```
69 | scripts/build.sh -p=ios,iossim-x86_64
70 | # builts xcframeworks only for iOS and iOS Simulator with x86_64 architecture
71 | ```
72 | Here is a list of all possible values for '-p' option:
73 | ```
74 | macosx,macosx-arm64,macosx-x86_64,macosx-both,ios,iossim,iossim-arm64,iossim-x86_64,iossim-both,catalyst,catalyst-arm64,catalyst-x86_64,catalyst-both,xros,xrossim,xrossim-arm64,xrossim-x86_64,xrossim-both,tvos,tvossim,tvossim-arm64,tvossim-x86_64,tvossim-both,watchos,watchossim,watchossim-arm64,watchossim-x86_64,watchossim-both
75 | ```
76 | Suffix '-both' means that xcframeworks will be built for both arm64 and x86_64 architectures.
77 | The platform names for macosx and simulators without an architecture suffix (e.g. macosx, iossim, tvossim) mean that xcframeworks are only built for the current host architecture.
78 |
79 | ## Selecting Libraries
80 | If you want to build specific boost libraries, specify them with the -l option:
81 | ```
82 | scripts/build.sh -l=log,program_options
83 | # Note: Some libraries depend on other Boost libraries. In this case, you should explicitly add them all in the -l option.
84 | ```
85 | ## Rebuild ICU option
86 | To rebuild the ICU library, which is used when building some Boost libraries (locale and regex), use the --rebuildicu option.
87 | ```
88 | scripts/build.sh -p=ios,iossim-x86_64 --rebuildicu
89 | ```
90 | ## Rebuild option
91 | To rebuild the libraries without using the results of previous builds, use the --rebuild option
92 | ```
93 | scripts/build.sh -p=ios,iossim-x86_64 --rebuild
94 |
95 | ```
96 |
97 | # Build Using Cocoapods.
98 | Add the following lines into your project's Podfile:
99 | ```
100 | use_frameworks!
101 |
102 | pod 'boost-iosx'
103 | # or optionally more precisely, e.g.:
104 | # pod 'boost-iosx', :git => 'https://github.com/apotocki/boost-iosx'
105 | ```
106 | If you want to use specific boost libraries, specify them as in the following example for log and program_options libraries:
107 | ```
108 | pod 'boost-iosx/log'
109 | pod 'boost-iosx/program_options'
110 | # Note: Some libraries depend on other Boost libraries. In this case, you should explicitly add all their dependencies to your Podfile.
111 | ```
112 | Then install new dependencies:
113 | ```
114 | pod install --verbose
115 | ```
116 |
117 | ## As an advertisement...
118 | The Boost libraries built by this project are used in my iOS application on the App Store:
119 |
120 | [
]()
121 |
122 | This application is designed to view and edit files at the byte or character level; calculate different hashes, encode/decode, and compress/decompress desired byte regions.
123 |
124 | You can support my open-source development by trying the [App](https://apps.apple.com/us/app/potohex/id1620963302).
125 |
126 | Feedback is welcome!
127 |
--------------------------------------------------------------------------------
/boost-iosx.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "boost-iosx"
3 | s.version = "1.88.0.1"
4 | s.summary = "Boost C++ libraries for macOS, iOS, watchOS, tvOS, and visionOS, including builds for Mac Catalyst, iOS Simulator, watchOS Simulator, tvOS Simulator, and visionOS Simulator."
5 | s.homepage = "https://github.com/apotocki/boost-iosx"
6 | s.license = "Boost Software License"
7 | s.author = { "Alexander Pototskiy" => "alex.a.potocki@gmail.com" }
8 | s.social_media_url = "https://www.linkedin.com/in/alexander-pototskiy"
9 | s.ios.deployment_target = "13.4"
10 | s.osx.deployment_target = "11.0"
11 | s.tvos.deployment_target = "13.0"
12 | s.watchos.deployment_target = "11.0"
13 | s.visionos.deployment_target = "1.0"
14 | s.ios.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
15 | s.osx.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
16 | s.tvos.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
17 | s.watchos.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
18 | s.visionos.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
19 | s.ios.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
20 | s.osx.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
21 | s.tvos.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
22 | s.watchos.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
23 | s.visionos.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
24 | s.static_framework = true
25 | s.prepare_command = "sh scripts/build.sh"
26 | s.source = { :git => "https://github.com/apotocki/boost-iosx.git", :tag => "#{s.version}" }
27 |
28 | s.header_mappings_dir = "frameworks/Headers"
29 | #s.public_header_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
30 |
31 | s.default_subspec = "all"
32 |
33 | s.subspec 'all' do |ss|
34 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
35 | ss.vendored_frameworks = "frameworks/boost_atomic.xcframework", "frameworks/boost_charconv.xcframework", "frameworks/boost_chrono.xcframework", "frameworks/boost_cobalt.xcframework", "frameworks/boost_container.xcframework", "frameworks/boost_context.xcframework", "frameworks/boost_contract.xcframework", "frameworks/boost_coroutine.xcframework", "frameworks/boost_date_time.xcframework", "frameworks/boost_exception.xcframework", "frameworks/boost_fiber.xcframework", "frameworks/boost_filesystem.xcframework", "frameworks/boost_graph.xcframework", "frameworks/boost_iostreams.xcframework", "frameworks/boost_json.xcframework", "frameworks/boost_locale.xcframework", "frameworks/boost_log.xcframework", "frameworks/boost_log_setup.xcframework", "frameworks/boost_nowide.xcframework", "frameworks/boost_program_options.xcframework", "frameworks/boost_random.xcframework", "frameworks/boost_regex.xcframework", "frameworks/boost_serialization.xcframework", "frameworks/boost_stacktrace_basic.xcframework", "frameworks/boost_prg_exec_monitor.xcframework", "frameworks/boost_test_exec_monitor.xcframework", "frameworks/boost_unit_test_framework.xcframework", "frameworks/boost_thread.xcframework", "frameworks/boost_timer.xcframework", "frameworks/boost_type_erasure.xcframework", "frameworks/boost_system.xcframework", "frameworks/boost_url.xcframework", "frameworks/boost_wave.xcframework"
36 | end
37 |
38 | s.subspec 'atomic' do |ss|
39 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
40 | ss.vendored_frameworks = "frameworks/boost_atomic.xcframework"
41 | end
42 | s.subspec 'charconv' do |ss|
43 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
44 | ss.vendored_frameworks = "frameworks/boost_charconv.xcframework"
45 | end
46 | s.subspec 'chrono' do |ss|
47 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
48 | ss.vendored_frameworks = "frameworks/boost_chrono.xcframework"
49 | end
50 | s.subspec 'cobalt' do |ss|
51 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
52 | ss.vendored_frameworks = "frameworks/boost_cobalt.xcframework"
53 | end
54 | s.subspec 'container' do |ss|
55 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
56 | ss.vendored_frameworks = "frameworks/boost_container.xcframework"
57 | end
58 | s.subspec 'context' do |ss|
59 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
60 | ss.vendored_frameworks = "frameworks/boost_context.xcframework"
61 | end
62 | s.subspec 'contract' do |ss|
63 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
64 | ss.vendored_frameworks = "frameworks/boost_contract.xcframework"
65 | end
66 | s.subspec 'coroutine' do |ss|
67 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
68 | ss.vendored_frameworks = "frameworks/boost_coroutine.xcframework"
69 | end
70 | s.subspec 'date_time' do |ss|
71 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
72 | ss.vendored_frameworks = "frameworks/boost_date_time.xcframework"
73 | end
74 | s.subspec 'exception' do |ss|
75 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
76 | ss.vendored_frameworks = "frameworks/boost_exception.xcframework"
77 | end
78 | s.subspec 'fiber' do |ss|
79 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
80 | ss.vendored_frameworks = "frameworks/boost_fiber.xcframework", "frameworks/boost_context.xcframework"
81 | end
82 | s.subspec 'filesystem' do |ss|
83 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
84 | ss.vendored_frameworks = "frameworks/boost_filesystem.xcframework"
85 | end
86 | s.subspec 'graph' do |ss|
87 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
88 | ss.vendored_frameworks = "frameworks/boost_graph.xcframework"
89 | end
90 | s.subspec 'iostreams' do |ss|
91 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
92 | ss.vendored_frameworks = "frameworks/boost_iostreams.xcframework"
93 | end
94 | s.subspec 'json' do |ss|
95 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
96 | ss.vendored_frameworks = "frameworks/boost_json.xcframework"
97 | end
98 | s.subspec 'locale' do |ss|
99 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
100 | ss.vendored_frameworks = "frameworks/boost_locale.xcframework"
101 | end
102 | s.subspec 'log' do |ss|
103 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
104 | ss.vendored_frameworks = "frameworks/boost_log.xcframework", "frameworks/boost_log_setup.xcframework"
105 | end
106 | s.subspec 'math_c99' do |ss|
107 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
108 | ss.vendored_frameworks = "frameworks/boost_math_c99.xcframework"
109 | end
110 | s.subspec 'math_c99l' do |ss|
111 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
112 | ss.vendored_frameworks = "frameworks/boost_math_c99l.xcframework"
113 | end
114 | s.subspec 'math_c99f' do |ss|
115 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
116 | ss.vendored_frameworks = "frameworks/boost_math_c99f.xcframework"
117 | end
118 | s.subspec 'math_tr1' do |ss|
119 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
120 | ss.vendored_frameworks = "frameworks/boost_math_tr1.xcframework"
121 | end
122 | s.subspec 'math_tr1l' do |ss|
123 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
124 | ss.vendored_frameworks = "frameworks/boost_math_tr1l.xcframework"
125 | end
126 | s.subspec 'math_tr1f' do |ss|
127 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
128 | ss.vendored_frameworks = "frameworks/boost_math_tr1f.xcframework"
129 | end
130 | s.subspec 'nowide' do |ss|
131 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
132 | ss.vendored_frameworks = "frameworks/boost_nowide.xcframework"
133 | end
134 | s.subspec 'program_options' do |ss|
135 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
136 | ss.vendored_frameworks = "frameworks/boost_program_options.xcframework"
137 | end
138 | s.subspec 'random' do |ss|
139 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
140 | ss.vendored_frameworks = "frameworks/boost_random.xcframework"
141 | end
142 | s.subspec 'regex' do |ss|
143 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
144 | ss.vendored_frameworks = "frameworks/boost_regex.xcframework"
145 | end
146 | s.subspec 'serialization' do |ss|
147 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
148 | ss.vendored_frameworks = "frameworks/boost_serialization.xcframework"
149 | end
150 | s.subspec 'wserialization' do |ss|
151 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
152 | ss.vendored_frameworks = "frameworks/boost_wserialization.xcframework"
153 | end
154 | s.subspec 'stacktrace_basic' do |ss|
155 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
156 | ss.vendored_frameworks = "frameworks/boost_stacktrace_basic.xcframework"
157 | end
158 | s.subspec 'stacktrace_noop' do |ss|
159 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
160 | ss.vendored_frameworks = "frameworks/boost_stacktrace_noop.xcframework"
161 | end
162 | s.subspec 'test' do |ss|
163 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
164 | ss.vendored_frameworks = "frameworks/boost_prg_exec_monitor.xcframework", "frameworks/boost_test_exec_monitor.xcframework", "frameworks/boost_unit_test_framework.xcframework"
165 | end
166 | s.subspec 'thread' do |ss|
167 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
168 | ss.vendored_frameworks = "frameworks/boost_thread.xcframework"
169 | end
170 | s.subspec 'timer' do |ss|
171 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
172 | ss.vendored_frameworks = "frameworks/boost_timer.xcframework"
173 | end
174 | s.subspec 'type_erasure' do |ss|
175 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
176 | ss.vendored_frameworks = "frameworks/boost_type_erasure.xcframework"
177 | end
178 | s.subspec 'url' do |ss|
179 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
180 | ss.vendored_frameworks = "frameworks/boost_url.xcframework"
181 | end
182 | s.subspec 'wave' do |ss|
183 | ss.source_files = "frameworks/Headers/**/*.{h,hpp,ipp}"
184 | ss.vendored_frameworks = "frameworks/boost_wave.xcframework"
185 | end
186 | #s.preserve_paths = "frameworks/**/*"
187 | #s.dependency "icu4c-iosx"
188 | end
189 |
190 |
--------------------------------------------------------------------------------
/scripts/ICUdep.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | D924B7552597FDF000EF9805 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D924B7542597FDF000EF9805 /* main.cpp */; };
11 | /* End PBXBuildFile section */
12 |
13 | /* Begin PBXCopyFilesBuildPhase section */
14 | D924B74F2597FDF000EF9805 /* CopyFiles */ = {
15 | isa = PBXCopyFilesBuildPhase;
16 | buildActionMask = 2147483647;
17 | dstPath = /usr/share/man/man1/;
18 | dstSubfolderSpec = 0;
19 | files = (
20 | );
21 | runOnlyForDeploymentPostprocessing = 1;
22 | };
23 | /* End PBXCopyFilesBuildPhase section */
24 |
25 | /* Begin PBXFileReference section */
26 | D924B7512597FDF000EF9805 /* ICUdep */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ICUdep; sourceTree = BUILT_PRODUCTS_DIR; };
27 | D924B7542597FDF000EF9805 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
28 | /* End PBXFileReference section */
29 |
30 | /* Begin PBXFrameworksBuildPhase section */
31 | D924B74E2597FDF000EF9805 /* Frameworks */ = {
32 | isa = PBXFrameworksBuildPhase;
33 | buildActionMask = 2147483647;
34 | files = (
35 | );
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXFrameworksBuildPhase section */
39 |
40 | /* Begin PBXGroup section */
41 | D924B7482597FDF000EF9805 = {
42 | isa = PBXGroup;
43 | children = (
44 | D924B7532597FDF000EF9805 /* ICUdep */,
45 | D924B7522597FDF000EF9805 /* Products */,
46 | );
47 | sourceTree = "";
48 | };
49 | D924B7522597FDF000EF9805 /* Products */ = {
50 | isa = PBXGroup;
51 | children = (
52 | D924B7512597FDF000EF9805 /* ICUdep */,
53 | );
54 | name = Products;
55 | sourceTree = "";
56 | };
57 | D924B7532597FDF000EF9805 /* ICUdep */ = {
58 | isa = PBXGroup;
59 | children = (
60 | D924B7542597FDF000EF9805 /* main.cpp */,
61 | );
62 | path = ICUdep;
63 | sourceTree = "";
64 | };
65 | /* End PBXGroup section */
66 |
67 | /* Begin PBXNativeTarget section */
68 | D924B7502597FDF000EF9805 /* ICUdep */ = {
69 | isa = PBXNativeTarget;
70 | buildConfigurationList = D924B7582597FDF000EF9805 /* Build configuration list for PBXNativeTarget "ICUdep" */;
71 | buildPhases = (
72 | D924B74D2597FDF000EF9805 /* Sources */,
73 | D924B74E2597FDF000EF9805 /* Frameworks */,
74 | D924B74F2597FDF000EF9805 /* CopyFiles */,
75 | );
76 | buildRules = (
77 | );
78 | dependencies = (
79 | );
80 | name = ICUdep;
81 | productName = ICUdep;
82 | productReference = D924B7512597FDF000EF9805 /* ICUdep */;
83 | productType = "com.apple.product-type.tool";
84 | };
85 | /* End PBXNativeTarget section */
86 |
87 | /* Begin PBXProject section */
88 | D924B7492597FDF000EF9805 /* Project object */ = {
89 | isa = PBXProject;
90 | attributes = {
91 | LastUpgradeCheck = 1230;
92 | TargetAttributes = {
93 | D924B7502597FDF000EF9805 = {
94 | CreatedOnToolsVersion = 12.3;
95 | };
96 | };
97 | };
98 | buildConfigurationList = D924B74C2597FDF000EF9805 /* Build configuration list for PBXProject "ICUdep" */;
99 | compatibilityVersion = "Xcode 9.3";
100 | developmentRegion = en;
101 | hasScannedForEncodings = 0;
102 | knownRegions = (
103 | en,
104 | Base,
105 | );
106 | mainGroup = D924B7482597FDF000EF9805;
107 | productRefGroup = D924B7522597FDF000EF9805 /* Products */;
108 | projectDirPath = "";
109 | projectRoot = "";
110 | targets = (
111 | D924B7502597FDF000EF9805 /* ICUdep */,
112 | );
113 | };
114 | /* End PBXProject section */
115 |
116 | /* Begin PBXSourcesBuildPhase section */
117 | D924B74D2597FDF000EF9805 /* Sources */ = {
118 | isa = PBXSourcesBuildPhase;
119 | buildActionMask = 2147483647;
120 | files = (
121 | D924B7552597FDF000EF9805 /* main.cpp in Sources */,
122 | );
123 | runOnlyForDeploymentPostprocessing = 0;
124 | };
125 | /* End PBXSourcesBuildPhase section */
126 |
127 | /* Begin XCBuildConfiguration section */
128 | D924B7562597FDF000EF9805 /* Debug */ = {
129 | isa = XCBuildConfiguration;
130 | buildSettings = {
131 | ALWAYS_SEARCH_USER_PATHS = NO;
132 | CLANG_ANALYZER_NONNULL = YES;
133 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
134 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
135 | CLANG_CXX_LIBRARY = "libc++";
136 | CLANG_ENABLE_MODULES = YES;
137 | CLANG_ENABLE_OBJC_ARC = YES;
138 | CLANG_ENABLE_OBJC_WEAK = YES;
139 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
140 | CLANG_WARN_BOOL_CONVERSION = YES;
141 | CLANG_WARN_COMMA = YES;
142 | CLANG_WARN_CONSTANT_CONVERSION = YES;
143 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
144 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
145 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
146 | CLANG_WARN_EMPTY_BODY = YES;
147 | CLANG_WARN_ENUM_CONVERSION = YES;
148 | CLANG_WARN_INFINITE_RECURSION = YES;
149 | CLANG_WARN_INT_CONVERSION = YES;
150 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
151 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
152 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
153 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
154 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
155 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
156 | CLANG_WARN_STRICT_PROTOTYPES = YES;
157 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
158 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
159 | CLANG_WARN_UNREACHABLE_CODE = YES;
160 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
161 | COPY_PHASE_STRIP = NO;
162 | DEBUG_INFORMATION_FORMAT = dwarf;
163 | ENABLE_STRICT_OBJC_MSGSEND = YES;
164 | ENABLE_TESTABILITY = YES;
165 | GCC_C_LANGUAGE_STANDARD = gnu11;
166 | GCC_DYNAMIC_NO_PIC = NO;
167 | GCC_NO_COMMON_BLOCKS = YES;
168 | GCC_OPTIMIZATION_LEVEL = 0;
169 | GCC_PREPROCESSOR_DEFINITIONS = (
170 | "DEBUG=1",
171 | "$(inherited)",
172 | );
173 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
174 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
175 | GCC_WARN_UNDECLARED_SELECTOR = YES;
176 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
177 | GCC_WARN_UNUSED_FUNCTION = YES;
178 | GCC_WARN_UNUSED_VARIABLE = YES;
179 | MACOSX_DEPLOYMENT_TARGET = 11.0;
180 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
181 | MTL_FAST_MATH = YES;
182 | ONLY_ACTIVE_ARCH = YES;
183 | SDKROOT = macosx;
184 | };
185 | name = Debug;
186 | };
187 | D924B7572597FDF000EF9805 /* Release */ = {
188 | isa = XCBuildConfiguration;
189 | buildSettings = {
190 | ALWAYS_SEARCH_USER_PATHS = NO;
191 | CLANG_ANALYZER_NONNULL = YES;
192 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
193 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
194 | CLANG_CXX_LIBRARY = "libc++";
195 | CLANG_ENABLE_MODULES = YES;
196 | CLANG_ENABLE_OBJC_ARC = YES;
197 | CLANG_ENABLE_OBJC_WEAK = YES;
198 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
199 | CLANG_WARN_BOOL_CONVERSION = YES;
200 | CLANG_WARN_COMMA = YES;
201 | CLANG_WARN_CONSTANT_CONVERSION = YES;
202 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
203 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
204 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
205 | CLANG_WARN_EMPTY_BODY = YES;
206 | CLANG_WARN_ENUM_CONVERSION = YES;
207 | CLANG_WARN_INFINITE_RECURSION = YES;
208 | CLANG_WARN_INT_CONVERSION = YES;
209 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
210 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
211 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
212 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
213 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
214 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
215 | CLANG_WARN_STRICT_PROTOTYPES = YES;
216 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
217 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
218 | CLANG_WARN_UNREACHABLE_CODE = YES;
219 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
220 | COPY_PHASE_STRIP = NO;
221 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
222 | ENABLE_NS_ASSERTIONS = NO;
223 | ENABLE_STRICT_OBJC_MSGSEND = YES;
224 | GCC_C_LANGUAGE_STANDARD = gnu11;
225 | GCC_NO_COMMON_BLOCKS = YES;
226 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
227 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
228 | GCC_WARN_UNDECLARED_SELECTOR = YES;
229 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
230 | GCC_WARN_UNUSED_FUNCTION = YES;
231 | GCC_WARN_UNUSED_VARIABLE = YES;
232 | MACOSX_DEPLOYMENT_TARGET = 11.0;
233 | MTL_ENABLE_DEBUG_INFO = NO;
234 | MTL_FAST_MATH = YES;
235 | SDKROOT = macosx;
236 | };
237 | name = Release;
238 | };
239 | D924B7592597FDF000EF9805 /* Debug */ = {
240 | isa = XCBuildConfiguration;
241 | buildSettings = {
242 | CODE_SIGN_STYLE = Automatic;
243 | DEVELOPMENT_TEAM = 57T55QU8PK;
244 | ENABLE_HARDENED_RUNTIME = YES;
245 | PRODUCT_NAME = "$(TARGET_NAME)";
246 | };
247 | name = Debug;
248 | };
249 | D924B75A2597FDF000EF9805 /* Release */ = {
250 | isa = XCBuildConfiguration;
251 | buildSettings = {
252 | CODE_SIGN_STYLE = Automatic;
253 | DEVELOPMENT_TEAM = 57T55QU8PK;
254 | ENABLE_HARDENED_RUNTIME = YES;
255 | PRODUCT_NAME = "$(TARGET_NAME)";
256 | };
257 | name = Release;
258 | };
259 | /* End XCBuildConfiguration section */
260 |
261 | /* Begin XCConfigurationList section */
262 | D924B74C2597FDF000EF9805 /* Build configuration list for PBXProject "ICUdep" */ = {
263 | isa = XCConfigurationList;
264 | buildConfigurations = (
265 | D924B7562597FDF000EF9805 /* Debug */,
266 | D924B7572597FDF000EF9805 /* Release */,
267 | );
268 | defaultConfigurationIsVisible = 0;
269 | defaultConfigurationName = Release;
270 | };
271 | D924B7582597FDF000EF9805 /* Build configuration list for PBXNativeTarget "ICUdep" */ = {
272 | isa = XCConfigurationList;
273 | buildConfigurations = (
274 | D924B7592597FDF000EF9805 /* Debug */,
275 | D924B75A2597FDF000EF9805 /* Release */,
276 | );
277 | defaultConfigurationIsVisible = 0;
278 | defaultConfigurationName = Release;
279 | };
280 | /* End XCConfigurationList section */
281 | };
282 | rootObject = D924B7492597FDF000EF9805 /* Project object */;
283 | }
284 |
--------------------------------------------------------------------------------
/scripts/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | platform :osx, '12.0'
3 |
4 | target 'ICUdep' do
5 | use_frameworks!
6 | pod 'icu4c-iosx', :git => 'https://github.com/apotocki/icu4c-iosx'
7 | end
8 |
--------------------------------------------------------------------------------
/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -euo pipefail
3 | ################## SETUP BEGIN
4 | THREAD_COUNT=$(sysctl hw.ncpu | awk '{print $2}')
5 | HOST_ARC=$( uname -m )
6 | XCODE_ROOT=$( xcode-select -print-path )
7 | BOOST_VER=1.88.0
8 | EXPECTED_HASH="46d9d2c06637b219270877c9e16155cbd015b6dc84349af064c088e9b5b12f7b"
9 | MACOSX_VERSION_ARM=12.3
10 | MACOSX_VERSION_X86_64=10.13
11 | IOS_VERSION=13.4
12 | IOS_SIM_VERSION=13.4
13 | CATALYST_VERSION=13.4
14 | TVOS_VERSION=13.0
15 | TVOS_SIM_VERSION=13.0
16 | WATCHOS_VERSION=11.0
17 | WATCHOS_SIM_VERSION=11.0
18 | ################## SETUP END
19 | LOCATIONS_FILE_URL="https://github.com/apotocki/boost-iosx/raw/refs/heads/master/LOCATIONS"
20 | IOSSYSROOT=$XCODE_ROOT/Platforms/iPhoneOS.platform/Developer
21 | IOSSIMSYSROOT=$XCODE_ROOT/Platforms/iPhoneSimulator.platform/Developer
22 | MACSYSROOT=$XCODE_ROOT/Platforms/MacOSX.platform/Developer
23 | XROSSYSROOT=$XCODE_ROOT/Platforms/XROS.platform/Developer
24 | XROSSIMSYSROOT=$XCODE_ROOT/Platforms/XRSimulator.platform/Developer
25 | TVOSSYSROOT=$XCODE_ROOT/Platforms/AppleTVOS.platform/Developer
26 | TVOSSIMSYSROOT=$XCODE_ROOT/Platforms/AppleTVSimulator.platform/Developer
27 | WATCHOSSYSROOT=$XCODE_ROOT/Platforms/WatchOS.platform/Developer
28 | WATCHOSSIMSYSROOT=$XCODE_ROOT/Platforms/WatchSimulator.platform/Developer
29 |
30 | LIBS_TO_BUILD_ALL="atomic,chrono,container,context,contract,coroutine,date_time,exception,fiber,filesystem,graph,iostreams,json,locale,log,math,nowide,program_options,random,regex,serialization,stacktrace,system,test,thread,timer,type_erasure,wave,url,cobalt,charconv"
31 |
32 | BUILD_PLATFORMS_ALL="macosx,macosx-arm64,macosx-x86_64,macosx-both,ios,iossim,iossim-arm64,iossim-x86_64,iossim-both,catalyst,catalyst-arm64,catalyst-x86_64,catalyst-both,xros,xrossim,xrossim-arm64,xrossim-x86_64,xrossim-both,tvos,tvossim,tvossim-both,tvossim-arm64,tvossim-x86_64,watchos,watchossim,watchossim-both,watchossim-arm64,watchossim-x86_64"
33 |
34 | BOOST_NAME=boost_${BOOST_VER//./_}
35 | BUILD_DIR="$( cd "$( dirname "./" )" >/dev/null 2>&1 && pwd )"
36 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
37 |
38 | [[ $(clang++ --version | head -1 | sed -E 's/([a-zA-Z ]+)([0-9]+).*/\2/') -gt 14 ]] && CLANG15=true
39 |
40 | LIBS_TO_BUILD=$LIBS_TO_BUILD_ALL
41 | [[ ! $CLANG15 ]] && LIBS_TO_BUILD="${LIBS_TO_BUILD/,cobalt/}"
42 |
43 | BUILD_PLATFORMS="macosx,ios,iossim,catalyst"
44 | [[ -d $XROSSYSROOT/SDKs/XROS.sdk ]] && BUILD_PLATFORMS="$BUILD_PLATFORMS,xros"
45 | [[ -d $XROSSIMSYSROOT/SDKs/XRSimulator.sdk ]] && BUILD_PLATFORMS="$BUILD_PLATFORMS,xrossim"
46 | [[ -d $TVOSSYSROOT/SDKs/AppleTVOS.sdk ]] && BUILD_PLATFORMS="$BUILD_PLATFORMS,tvos"
47 | [[ -d $TVOSSIMSYSROOT/SDKs/AppleTVSimulator.sdk ]] && BUILD_PLATFORMS="$BUILD_PLATFORMS,tvossim"
48 | [[ -d $WATCHOSSYSROOT/SDKs/WatchOS.sdk ]] && BUILD_PLATFORMS="$BUILD_PLATFORMS,watchos"
49 | [[ -d $WATCHOSSIMSYSROOT/SDKs/WatchSimulator.sdk ]] && BUILD_PLATFORMS="$BUILD_PLATFORMS,watchossim-both"
50 |
51 | REBUILD=false
52 |
53 | # Function to determine architecture
54 | boost_arc() {
55 | case $1 in
56 | arm*) echo "arm" ;;
57 | x86*) echo "x86" ;;
58 | *) echo "unknown" ;;
59 | esac
60 | }
61 |
62 | # Function to determine ABI
63 | boost_abi() {
64 | case $1 in
65 | arm64) echo "aapcs" ;;
66 | x86_64) echo "sysv" ;;
67 | *) echo "unknown" ;;
68 | esac
69 | }
70 |
71 | is_subset() {
72 | local mainset=($(< $1))
73 | shift
74 | local subset=("$@")
75 |
76 | for element in "${subset[@]}"; do
77 | if [[ ! " ${mainset[@]} " =~ " ${element} " ]]; then
78 | echo "false"
79 | return
80 | fi
81 | done
82 | echo "true"
83 | }
84 |
85 | # Parse command line arguments
86 | for i in "$@"; do
87 | case $i in
88 | -l=*|--libs=*)
89 | LIBS_TO_BUILD="${i#*=}"
90 | shift
91 | ;;
92 | -p=*|--platforms=*)
93 | BUILD_PLATFORMS="${i#*=},"
94 | shift
95 | ;;
96 | --rebuild)
97 | REBUILD=true
98 | [[ -f "$BUILD_DIR/frameworks.built.platforms" ]] && rm "$BUILD_DIR/frameworks.built.platforms"
99 | [[ -f "$BUILD_DIR/frameworks.built.libs" ]] && rm "$BUILD_DIR/frameworks.built.libs"
100 | shift
101 | ;;
102 | --rebuildicu)
103 | [[ -d $SCRIPT_DIR/Pods/icu4c-iosx ]] && rm -rf $SCRIPT_DIR/Pods/icu4c-iosx
104 | shift
105 | ;;
106 | -*|--*)
107 | echo "Unknown option $i"
108 | exit 1
109 | ;;
110 | *)
111 | ;;
112 | esac
113 | done
114 |
115 | LIBS_TO_BUILD=${LIBS_TO_BUILD//,/ }
116 |
117 | #sort the library list
118 | LIBS_TO_BUILD_ARRAY=($LIBS_TO_BUILD)
119 | IFS=$'\n' LIBS_TO_BUILD_SORTED_ARRAY=($(sort <<<"${LIBS_TO_BUILD_ARRAY[*]}")); unset IFS
120 | LIBS_TO_BUILD_SORTED="${LIBS_TO_BUILD_SORTED_ARRAY[@]}"
121 | #LIBS_HASH=$( echo -n $LIBS_TO_BUILD_SORTED | shasum -a 256 | awk '{ print $1 }' )
122 |
123 | for i in $LIBS_TO_BUILD; do :;
124 | if [[ ! ",$LIBS_TO_BUILD_ALL," == *",$i,"* ]]; then
125 | echo "Unknown library '$i'"
126 | exit 1
127 | fi
128 | done
129 |
130 | [[ $BUILD_PLATFORMS == *macosx-both* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//macosx-both/},macosx-arm64,macosx-x86_64"
131 | [[ $BUILD_PLATFORMS == *iossim-both* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//iossim-both/},iossim-arm64,iossim-x86_64"
132 | [[ $BUILD_PLATFORMS == *catalyst-both* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//catalyst-both/},catalyst-arm64,catalyst-x86_64"
133 | [[ $BUILD_PLATFORMS == *xrossim-both* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//xrossim-both/},xrossim-arm64,xrossim-x86_64"
134 | [[ $BUILD_PLATFORMS == *tvossim-both* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//tvossim-both/},tvossim-arm64,tvossim-x86_64"
135 | [[ $BUILD_PLATFORMS == *watchossim-both* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//watchossim-both/},watchossim-arm64,watchossim-x86_64"
136 | BUILD_PLATFORMS="$BUILD_PLATFORMS,"
137 | [[ $BUILD_PLATFORMS == *"macosx,"* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//macosx,/,},macosx-$HOST_ARC"
138 | [[ $BUILD_PLATFORMS == *"iossim,"* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//iossim,/,},iossim-$HOST_ARC"
139 | [[ $BUILD_PLATFORMS == *"catalyst,"* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//catalyst,/,},catalyst-$HOST_ARC"
140 | [[ $BUILD_PLATFORMS == *"xrossim,"* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//xrossim,/,},xrossim-$HOST_ARC"
141 | [[ $BUILD_PLATFORMS == *"tvossim,"* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//tvossim,/,},tvossim-$HOST_ARC"
142 | [[ $BUILD_PLATFORMS == *"watchossim,"* ]] && BUILD_PLATFORMS="${BUILD_PLATFORMS//watchossim,/,},watchossim-$HOST_ARC"
143 |
144 | if [[ $BUILD_PLATFORMS == *"xros,"* ]] && [[ ! -d $XROSSYSROOT/SDKs/XROS.sdk ]]; then
145 | echo "The xros is specified as the build platform, but XROS.sdk is not found (the path $XROSSYSROOT/SDKs/XROS.sdk)."
146 | exit 1
147 | fi
148 |
149 | if [[ $BUILD_PLATFORMS == *"xrossim"* ]] && [[ ! -d $XROSSIMSYSROOT/SDKs/XRSimulator.sdk ]]; then
150 | echo "The xrossim is specified as the build platform, but XRSimulator.sdk is not found (the path $XROSSIMSYSROOT/SDKs/XRSimulator.sdk)."
151 | exit 1
152 | fi
153 |
154 | if [[ $BUILD_PLATFORMS == *"tvos,"* ]] && [[ ! -d $TVOSSYSROOT/SDKs/AppleTVOS.sdk ]]; then
155 | echo "The tvos is specified as the build platform, but AppleTVOS.sdk is not found (the path $TVOSSYSROOT/SDKs/AppleTVOS.sdk)."
156 | exit 1
157 | fi
158 |
159 | if [[ $BUILD_PLATFORMS == *"tvossim"* ]] && [[ ! -d $TVOSSIMSYSROOT/SDKs/AppleTVSimulator.sdk ]]; then
160 | echo "The tvossim is specified as the build platform, but AppleTVSimulator.sdk is not found (the path $TVOSSIMSYSROOT/SDKs/AppleTVSimulator.sdk)."
161 | exit 1
162 | fi
163 |
164 | if [[ $BUILD_PLATFORMS == *"watchos,"* ]] && [[ ! -d $WATCHOSSYSROOT/SDKs/WatchOS.sdk ]]; then
165 | echo "The tvos is specified as the build platform, but WatchOS.sdk is not found (the path $WATCHOSSYSROOT/SDKs/WatchOS.sdk)."
166 | exit 1
167 | fi
168 |
169 | if [[ $BUILD_PLATFORMS == *"watchossim"* ]] && [[ ! -d $WATCHOSSIMSYSROOT/SDKs/WatchSimulator.sdk ]]; then
170 | echo "The tvos is specified as the build platform, but WatchSimulator.sdk is not found (the path $WATCHOSSIMSYSROOT/SDKs/WatchSimulator.sdk)."
171 | exit 1
172 | fi
173 |
174 | BUILD_PLATFORMS_SPACED=" ${BUILD_PLATFORMS//,/ } "
175 | BUILD_PLATFORMS_ARRAY=($BUILD_PLATFORMS_SPACED)
176 |
177 | for i in $BUILD_PLATFORMS_SPACED; do :;
178 | if [[ ! ",$BUILD_PLATFORMS_ALL," == *",$i,"* ]]; then
179 | echo "Unknown platform '$i'"
180 | exit 1
181 | fi
182 | done
183 |
184 | [[ -f "$BUILD_DIR/frameworks.built.platforms" ]] && [[ -f "$BUILD_DIR/frameworks.built.libs" ]] && [[ $(< $BUILD_DIR/frameworks.built.platforms) == $BUILD_PLATFORMS ]] && [[ $(< $BUILD_DIR/frameworks.built.libs) == $LIBS_TO_BUILD ]] && exit 0
185 |
186 | [[ -f "$BUILD_DIR/frameworks.built.platforms" ]] && rm "$BUILD_DIR/frameworks.built.platforms"
187 | [[ -f "$BUILD_DIR/frameworks.built.libs" ]] && rm "$BUILD_DIR/frameworks.built.libs"
188 |
189 |
190 | BOOST_ARCHIVE_FILE=$BOOST_NAME.tar.bz2
191 |
192 | if [[ -f $BOOST_ARCHIVE_FILE ]]; then
193 | FILE_HASH=$(shasum -a 256 "$BOOST_ARCHIVE_FILE" | awk '{ print $1 }')
194 | if [[ ! "$FILE_HASH" == "$EXPECTED_HASH" ]]; then
195 | echo "Wrong archive hash, trying to reload the archive"
196 | rm "$BOOST_ARCHIVE_FILE"
197 | fi
198 | fi
199 |
200 | if [[ ! -f $BOOST_ARCHIVE_FILE ]]; then
201 | TEMP_LOCATIONS_FILE=$(mktemp)
202 | curl -s -o "$TEMP_LOCATIONS_FILE" -L "$LOCATIONS_FILE_URL"
203 | if [[ $? -ne 0 ]]; then
204 | echo "Failed to download the LOCATIONS file."
205 | exit 1
206 | fi
207 | while IFS= read -r linktemplate; do
208 | linktemplate=${linktemplate/DOTVERSION/"$BOOST_VER"}
209 | link=${linktemplate/FILENAME/"$BOOST_ARCHIVE_FILE"}
210 | echo "downloading from \"$link\" ..."
211 |
212 | curl -o "$BOOST_ARCHIVE_FILE" -L "$link"
213 |
214 | # Check if the download was successful
215 | if [ $? -eq 0 ]; then
216 | FILE_HASH=$(shasum -a 256 "$BOOST_ARCHIVE_FILE" | awk '{ print $1 }')
217 | if [[ "$FILE_HASH" == "$EXPECTED_HASH" ]]; then
218 | [[ -d boost ]] && rm -rf boost
219 | break
220 | else
221 | echo "Wrong archive hash $FILE_HASH, expected $EXPECTED_HASH. Trying next link to reload the archive."
222 | echo "File content: "
223 | head -c 1024 $BOOST_ARCHIVE_FILE
224 | echo ""
225 | rm $BOOST_ARCHIVE_FILE
226 | fi
227 | fi
228 | done < "$TEMP_LOCATIONS_FILE"
229 | rm "$TEMP_LOCATIONS_FILE"
230 | fi
231 |
232 | if [[ ! -f $BOOST_ARCHIVE_FILE ]]; then
233 | echo "Failed to download the Boost."
234 | exit 1
235 | fi
236 |
237 | if [[ ! -d boost ]]; then
238 | echo "extracting $BOOST_ARCHIVE_FILE ..."
239 | tar -xf $BOOST_ARCHIVE_FILE
240 | mv $BOOST_NAME boost
241 | fi
242 |
243 | if [[ ! -f boost/b2 ]]; then
244 | pushd boost
245 | ./bootstrap.sh
246 | popd
247 | fi
248 |
249 | ############### ICU
250 | if true; then
251 | #export ICU4C_RELEASE_LINK=https://github.com/apotocki/icu4c-iosx/releases/download/76.1.4
252 | if [[ ! -f $SCRIPT_DIR/Pods/icu4c-iosx/build.success ]] || [[ $(is_subset $SCRIPT_DIR/Pods/icu4c-iosx/build.success "${BUILD_PLATFORMS_ARRAY[@]}") == "false" ]]; then
253 | if [[ ! -z "${ICU4C_RELEASE_LINK:-}" ]]; then
254 | [[ -d $SCRIPT_DIR/Pods/icu4c-iosx ]] && rm -rf $SCRIPT_DIR/Pods/icu4c-iosx
255 | mkdir -p $SCRIPT_DIR/Pods/icu4c-iosx/product
256 | pushd $SCRIPT_DIR/Pods/icu4c-iosx/product
257 | curl -L ${ICU4C_RELEASE_LINK}/include.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/include.zip
258 | curl -L ${ICU4C_RELEASE_LINK}/icudata.xcframework.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/icudata.xcframework.zip
259 | curl -L ${ICU4C_RELEASE_LINK}/icui18n.xcframework.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/icui18n.xcframework.zip
260 | #curl -L ${ICU4C_RELEASE_LINK}/icuio.xcframework.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/icuio.xcframework.zip
261 | curl -L ${ICU4C_RELEASE_LINK}/icuuc.xcframework.zip -o $SCRIPT_DIR/Pods/icu4c-iosx/product/icuuc.xcframework.zip
262 | unzip -q include.zip
263 | unzip -q icudata.xcframework.zip
264 | unzip -q icui18n.xcframework.zip
265 | #unzip -q icuio.xcframework.zip
266 | unzip -q icuuc.xcframework.zip
267 | mkdir frameworks
268 | mv icudata.xcframework frameworks/
269 | mv icui18n.xcframework frameworks/
270 | #mv icuio.xcframework frameworks/
271 | mv icuuc.xcframework frameworks/
272 | popd
273 | printf "${BUILD_PLATFORMS_ALL//,/ }" > build.success
274 | else
275 | if [[ ! -f $SCRIPT_DIR/Pods/icu4c-iosx/everbuilt.success ]]; then
276 | [[ -d $SCRIPT_DIR/Pods/icu4c-iosx ]] && rm -rf $SCRIPT_DIR/Pods/icu4c-iosx
277 | [[ ! -d $SCRIPT_DIR/Pods ]] && mkdir $SCRIPT_DIR/Pods
278 | pushd $SCRIPT_DIR/Pods
279 | git clone https://github.com/apotocki/icu4c-iosx
280 | else
281 | pushd $SCRIPT_DIR/Pods/icu4c-iosx
282 | git pull
283 | fi
284 | popd
285 |
286 | pushd $SCRIPT_DIR/Pods/icu4c-iosx
287 | scripts/build.sh -p=$BUILD_PLATFORMS
288 | touch everbuilt.success
289 | printf "${BUILD_PLATFORMS//,/ }" > build.success
290 | popd
291 |
292 | #pushd $SCRIPT_DIR
293 | #pod repo update
294 | #pod install --verbose
295 | ##pod update --verbose
296 | #popd
297 | fi
298 | mkdir -p $SCRIPT_DIR/Pods/icu4c-iosx/product/lib
299 | fi
300 | ICU_PATH=$SCRIPT_DIR/Pods/icu4c-iosx/product
301 | fi
302 | ############### ICU
303 |
304 | pushd boost
305 |
306 | echo patching boost...
307 |
308 |
309 | #if [ ! -f boost/json/impl/array.ipp.orig ]; then
310 | # cp -f boost/json/impl/array.ipp boost/json/impl/array.ipp.orig
311 | #else
312 | # cp -f boost/json/impl/array.ipp.orig boost/json/impl/array.ipp
313 | #fi
314 | #if [ ! -f libs/json/test/array.cpp.orig ]; then
315 | # cp -f libs/json/test/array.cpp libs/json/test/array.cpp.orig
316 | #else
317 | # cp -f libs/json/test/array.cpp.orig libs/json/test/array.cpp
318 | #fi
319 | #patch -p0 <$SCRIPT_DIR/0001-json-array-erase-relocate.patch
320 |
321 | if [[ ! -f tools/build/src/tools/features/instruction-set-feature.jam.orig ]]; then
322 | cp -f tools/build/src/tools/features/instruction-set-feature.jam tools/build/src/tools/features/instruction-set-feature.jam.orig
323 | else
324 | cp -f tools/build/src/tools/features/instruction-set-feature.jam.orig tools/build/src/tools/features/instruction-set-feature.jam
325 | fi
326 | patch tools/build/src/tools/features/instruction-set-feature.jam $SCRIPT_DIR/instruction-set-feature.jam.patch
327 |
328 |
329 | B2_BUILD_OPTIONS="-j$THREAD_COUNT address-model=64 release link=static runtime-link=shared define=BOOST_SPIRIT_THREADSAFE cxxflags=\"-std=c++20\""
330 |
331 | [[ ! -z "${ICU_PATH:-}" ]] && B2_BUILD_OPTIONS="$B2_BUILD_OPTIONS -sICU_PATH=\"$ICU_PATH\""
332 |
333 | for i in $LIBS_TO_BUILD; do :;
334 | B2_BUILD_OPTIONS="$B2_BUILD_OPTIONS --with-$i"
335 | done
336 |
337 | [[ -d bin.v2 ]] && rm -rf bin.v2
338 |
339 |
340 | #(paltform=$1 architecture=$2 additional_flags=$3 root=$4 depfilter=$5 additional_config=$6 additional_b2flags=$7)
341 | build_generic_libs()
342 | {
343 | if [[ $REBUILD == true ]] || [[ ! -f $1-$2-build.success ]] || [[ $(is_subset $1-$2-build.success "${LIBS_TO_BUILD_ARRAY[@]}") == "false" ]]; then
344 |
345 | [[ -f $1-$2-build.success ]] && rm $1-$2-build.success
346 |
347 | [[ -f tools/build/src/user-config.jam ]] && rm -f tools/build/src/user-config.jam
348 |
349 | cat >> tools/build/src/user-config.jam < $4
352 | : $(boost_arc $2) ${6:-}
353 | ;
354 | EOF
355 | if [[ ! -z "${ICU_PATH:-}" ]]; then
356 | cp $ICU_PATH/frameworks/icudata.xcframework/$5/libicudata.a $ICU_PATH/lib/
357 | cp $ICU_PATH/frameworks/icui18n.xcframework/$5/libicui18n.a $ICU_PATH/lib/
358 | cp $ICU_PATH/frameworks/icuuc.xcframework/$5/libicuuc.a $ICU_PATH/lib/
359 | fi
360 | ./b2 -j8 --stagedir=stage/$1-$2 toolset=darwin-$1 architecture=$(boost_arc $2) abi=$(boost_abi $2) ${7:-} $B2_BUILD_OPTIONS
361 | rm -rf bin.v2
362 | printf "$LIBS_TO_BUILD_SORTED" > $1-$2-build.success
363 | fi
364 | }
365 |
366 | build_macos_libs()
367 | {
368 | build_generic_libs macosx $1 "$2 -isysroot $MACSYSROOT/SDKs/MacOSX.sdk" $MACSYSROOT "macos-*"
369 | }
370 |
371 | build_catalyst_libs()
372 | {
373 | build_generic_libs catalyst $1 "--target=$1-apple-ios$CATALYST_VERSION-macabi -isysroot $MACSYSROOT/SDKs/MacOSX.sdk -I$MACSYSROOT/SDKs/MacOSX.sdk/System/iOSSupport/usr/include/ -isystem $MACSYSROOT/SDKs/MacOSX.sdk/System/iOSSupport/usr/include -iframework $MACSYSROOT/SDKs/MacOSX.sdk/System/iOSSupport/System/Library/Frameworks" $MACSYSROOT "ios-*-maccatalyst"
374 | }
375 |
376 | build_ios_libs()
377 | {
378 | build_generic_libs ios arm64 "-fembed-bitcode -isysroot $IOSSYSROOT/SDKs/iPhoneOS.sdk -mios-version-min=$IOS_VERSION" $IOSSYSROOT "ios-arm64" "iphone" "instruction-set=arm64 binary-format=mach-o target-os=iphone define=_LITTLE_ENDIAN define=BOOST_TEST_NO_MAIN"
379 | }
380 |
381 | build_xros_libs()
382 | {
383 | build_generic_libs xros arm64 "-fembed-bitcode -isysroot $XROSSYSROOT/SDKs/XROS.sdk" $XROSSYSROOT "xros-arm64" "iphone" "instruction-set=arm64 binary-format=mach-o target-os=iphone define=_LITTLE_ENDIAN define=BOOST_TEST_NO_MAIN"
384 | }
385 |
386 | build_tvos_libs()
387 | {
388 | build_generic_libs tvos arm64 "-fembed-bitcode -isysroot $TVOSSYSROOT/SDKs/AppleTVOS.sdk" $TVOSSYSROOT "tvos-arm64" "iphone" "instruction-set=arm64 binary-format=mach-o target-os=iphone define=_LITTLE_ENDIAN define=BOOST_TEST_NO_MAIN define=BOOST_TEST_DISABLE_ALT_STACK"
389 | }
390 |
391 | build_watchos_libs()
392 | {
393 | build_generic_libs watchos arm64 "-fembed-bitcode -isysroot $WATCHOSSYSROOT/SDKs/WatchOS.sdk" $WATCHOSSYSROOT "watchos-arm64" "iphone" "instruction-set=arm64 binary-format=mach-o target-os=iphone define=_LITTLE_ENDIAN define=BOOST_TEST_NO_MAIN define=BOOST_TEST_DISABLE_ALT_STACK"
394 | }
395 |
396 | build_sim_libs()
397 | {
398 | build_generic_libs iossim $1 "-mios-simulator-version-min=$IOS_SIM_VERSION -isysroot $IOSSIMSYSROOT/SDKs/iPhoneSimulator.sdk" $IOSSIMSYSROOT "ios-*-simulator" "iphone" "target-os=iphone define=BOOST_TEST_NO_MAIN"
399 | }
400 |
401 | build_xrossim_libs()
402 | {
403 | build_generic_libs xrossim $1 "-isysroot $XROSSIMSYSROOT/SDKs/XRSimulator.sdk" $XROSSIMSYSROOT "xros-*-simulator" "iphone" "target-os=iphone define=BOOST_TEST_NO_MAIN"
404 | }
405 |
406 | build_tvossim_libs()
407 | {
408 | build_generic_libs tvossim $1 " --target=$1-apple-tvos$TVOS_SIM_VERSION-simulator -isysroot $TVOSSIMSYSROOT/SDKs/AppleTVSimulator.sdk" $TVOSSIMSYSROOT "tvos-*-simulator" "iphone" "target-os=iphone define=BOOST_TEST_NO_MAIN define=BOOST_TEST_DISABLE_ALT_STACK"
409 | }
410 |
411 | build_watchossim_libs()
412 | {
413 | build_generic_libs watchossim $1 "--target=$1-apple-watchos$WATCHOS_SIM_VERSION-simulator -isysroot $WATCHOSSIMSYSROOT/SDKs/WatchSimulator.sdk" $WATCHOSSIMSYSROOT "watchos-*-simulator" "iphone" "target-os=iphone define=BOOST_TEST_NO_MAIN define=BOOST_TEST_DISABLE_ALT_STACK"
414 | }
415 |
416 | [[ -d stage/macosx/lib ]] && rm -rf stage/macosx/lib
417 | [[ "$BUILD_PLATFORMS_SPACED" == *"macosx-arm64"* ]] && build_macos_libs arm64 -mmacosx-version-min=$MACOSX_VERSION_ARM
418 | [[ "$BUILD_PLATFORMS_SPACED" == *"macosx-x86_64"* ]] && build_macos_libs x86_64 -mmacosx-version-min=$MACOSX_VERSION_X86_64
419 | [[ "$BUILD_PLATFORMS_SPACED" == *"macosx"* ]] && mkdir -p stage/macosx/lib
420 |
421 | [ -d stage/catalyst/lib ] && rm -rf stage/catalyst/lib
422 | [[ "$BUILD_PLATFORMS_SPACED" == *"catalyst-arm64"* ]] && build_catalyst_libs arm64
423 | [[ "$BUILD_PLATFORMS_SPACED" == *"catalyst-x86_64"* ]] && build_catalyst_libs x86_64
424 | [[ "$BUILD_PLATFORMS_SPACED" == *"catalyst"* ]] && mkdir -p stage/catalyst/lib
425 |
426 | [ -d stage/iossim/lib ] && rm -rf stage/iossim/lib
427 | [[ "$BUILD_PLATFORMS_SPACED" == *"iossim-arm64"* ]] && build_sim_libs arm64
428 | [[ "$BUILD_PLATFORMS_SPACED" == *"iossim-x86_64"* ]] && build_sim_libs x86_64
429 | [[ "$BUILD_PLATFORMS_SPACED" == *"iossim"* ]] && mkdir -p stage/iossim/lib
430 |
431 | [ -d stage/xrossim/lib ] && rm -rf stage/xrossim/lib
432 | [[ "$BUILD_PLATFORMS_SPACED" == *"xrossim-arm64"* ]] && build_xrossim_libs arm64
433 | [[ "$BUILD_PLATFORMS_SPACED" == *"xrossim-x86_64"* ]] && build_xrossim_libs x86_64
434 | [[ "$BUILD_PLATFORMS_SPACED" == *"xrossim"* ]] && mkdir -p stage/xrossim/lib
435 |
436 | [ -d stage/tvossim/lib ] && rm -rf stage/tvossim/lib
437 | [[ "$BUILD_PLATFORMS_SPACED" == *"tvossim-arm64"* ]] && build_tvossim_libs arm64
438 | [[ "$BUILD_PLATFORMS_SPACED" == *"tvossim-x86_64"* ]] && build_tvossim_libs x86_64
439 | [[ "$BUILD_PLATFORMS_SPACED" == *"tvossim"* ]] && mkdir -p stage/tvossim/lib
440 |
441 | [ -d stage/watchossim/lib ] && rm -rf stage/watchossim/lib
442 | [[ "$BUILD_PLATFORMS_SPACED" == *"watchossim-arm64"* ]] && build_watchossim_libs arm64
443 | [[ "$BUILD_PLATFORMS_SPACED" == *"watchossim-x86_64"* ]] && build_watchossim_libs x86_64
444 | [[ "$BUILD_PLATFORMS_SPACED" == *"watchossim"* ]] && mkdir -p stage/watchossim/lib
445 |
446 | [[ "$BUILD_PLATFORMS_SPACED" == *"ios "* ]] && build_ios_libs
447 | [[ "$BUILD_PLATFORMS_SPACED" == *"xros "* ]] && build_xros_libs
448 | [[ "$BUILD_PLATFORMS_SPACED" == *"tvos "* ]] && build_tvos_libs
449 | [[ "$BUILD_PLATFORMS_SPACED" == *"watchos "* ]] && build_watchos_libs
450 |
451 | echo installing boost...
452 | [[ -d "$BUILD_DIR/frameworks" ]] && rm -rf "$BUILD_DIR/frameworks"
453 | mkdir "$BUILD_DIR/frameworks"
454 |
455 | build_lib()
456 | {
457 | if [[ "$BUILD_PLATFORMS_SPACED" == *"$2-arm64"* ]]; then
458 | if [[ "$BUILD_PLATFORMS_SPACED" == *"$2-x86_64"* ]]; then
459 | lipo -create stage/$2-arm64/lib/lib$1.a stage/$2-x86_64/lib/lib$1.a -output stage/$2/lib/lib$1.a
460 | LIBARGS="$LIBARGS -library stage/$2/lib/lib$1.a"
461 | else
462 | LIBARGS="$LIBARGS -library stage/$2-arm64/lib/lib$1.a"
463 | fi
464 | else
465 | [[ "$BUILD_PLATFORMS_SPACED" == *"$2-x86_64"* ]] && LIBARGS="$LIBARGS -library stage/$2-x86_64/lib/lib$1.a"
466 | fi
467 | }
468 |
469 | build_xcframework()
470 | {
471 | LIBARGS=
472 | [[ "$BUILD_PLATFORMS_SPACED" == *macosx* ]] && build_lib $1 macosx
473 | [[ "$BUILD_PLATFORMS_SPACED" == *catalyst* ]] && build_lib $1 catalyst
474 | [[ "$BUILD_PLATFORMS_SPACED" == *iossim* ]] && build_lib $1 iossim
475 | [[ "$BUILD_PLATFORMS_SPACED" == *xrossim* ]] && build_lib $1 xrossim
476 | [[ "$BUILD_PLATFORMS_SPACED" == *tvossim* ]] && build_lib $1 tvossim
477 | [[ "$BUILD_PLATFORMS_SPACED" == *watchossim* ]] && build_lib $1 watchossim
478 | [[ "$BUILD_PLATFORMS_SPACED" == *"ios "* ]] && LIBARGS="$LIBARGS -library stage/ios-arm64/lib/lib$1.a"
479 | [[ "$BUILD_PLATFORMS_SPACED" == *"xros "* ]] && LIBARGS="$LIBARGS -library stage/xros-arm64/lib/lib$1.a"
480 | [[ "$BUILD_PLATFORMS_SPACED" == *"tvos "* ]] && LIBARGS="$LIBARGS -library stage/tvos-arm64/lib/lib$1.a"
481 | [[ "$BUILD_PLATFORMS_SPACED" == *"watchos "* ]] && LIBARGS="$LIBARGS -library stage/watchos-arm64/lib/lib$1.a"
482 | xcodebuild -create-xcframework $LIBARGS -output "$BUILD_DIR/frameworks/$1.xcframework"
483 | }
484 |
485 | if true; then
486 | for i in $LIBS_TO_BUILD; do :;
487 | if [ $i == "math" ]; then
488 | build_xcframework boost_math_c99
489 | build_xcframework boost_math_c99l
490 | build_xcframework boost_math_c99f
491 | build_xcframework boost_math_tr1
492 | build_xcframework boost_math_tr1l
493 | build_xcframework boost_math_tr1f
494 | elif [ $i == "log" ]; then
495 | build_xcframework boost_log
496 | build_xcframework boost_log_setup
497 | elif [ $i == "stacktrace" ]; then
498 | build_xcframework boost_stacktrace_basic
499 | build_xcframework boost_stacktrace_noop
500 | #build_xcframework boost_stacktrace_addr2line
501 | elif [ $i == "serialization" ]; then
502 | build_xcframework boost_serialization
503 | build_xcframework boost_wserialization
504 | elif [ $i == "test" ]; then
505 | build_xcframework boost_prg_exec_monitor
506 | build_xcframework boost_test_exec_monitor
507 | build_xcframework boost_unit_test_framework
508 | else
509 | build_xcframework "boost_$i"
510 | fi
511 | done
512 |
513 |
514 | mkdir "$BUILD_DIR/frameworks/Headers"
515 | cp -R boost "$BUILD_DIR/frameworks/Headers/"
516 | #mv boost "$BUILD_DIR/frameworks/Headers/"
517 | #touch "$BUILD_DIR/frameworks.built"
518 | fi
519 |
520 | printf "$BUILD_PLATFORMS" > $BUILD_DIR/frameworks.built.platforms
521 | printf "$LIBS_TO_BUILD" > $BUILD_DIR/frameworks.built.libs
522 |
523 | #rm -rf "$BUILD_DIR/boost"
524 |
525 | popd
526 |
--------------------------------------------------------------------------------
/scripts/instruction-set-feature.jam.patch:
--------------------------------------------------------------------------------
1 | --- tools/build/src/tools/features/instruction-set-feature.jam 2020-08-11 16:57:21.000000000 +0200
2 | +++ tools/build/src/tools/features/instruction-set-feature.jam.new 2020-09-11 22:17:18.000000000 +0200
3 | @@ -57,7 +57,7 @@
4 |
5 | # Advanced RISC Machines
6 | armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t armv5te armv6 armv6j iwmmxt ep9312
7 | - armv7 armv7s
8 | + armv7 armv7s arm64
9 |
10 | # z Systems (aka s390x)
11 | z196 zEC12 z13 z14 z15
12 |
--------------------------------------------------------------------------------