- Zig 98.5%
- Shell 1.5%
|
|
||
|---|---|---|
| .vscode | .vscode/settings.json | |
| module_maps | Put module maps _inside_ | |
| src | Build debuggable zig code | |
| .gitignore | Those ignores are on directories | |
| .submodules.json | Call this .submodules.json | |
| build.zig | Empty this to the bare minimum | |
| build.zig.zon | zig init | |
| LICENSE | Restore original content without history and submodules | |
| mix_sdk.sh | Xcode 16.4, iOS SDK 18.5 | |
| README.md | README | |
pEpForiOS.XCFrameworks
Dependencies for p≡p for iOS as easy-to-use XCFrameworks, e.g.:
Dependencies
The dependencies are encoded in .submodules.json. These subdirectories are all .gitignored, so you can clone them by hand into the right (usually default) path, check out the right version and everything should work, e.g.:
git clone https://github.com/randombit/botan.git
pushd botan
git checkout 3.11.1
popd
git clone ssh://git@codeberg.org/pEp/pEpEngine.git
...
Every submodule has a working commit noted, that is the commit with which everything built and tested fine.
You may find this tool helpful for automating this, and for keeping track of the submodules.
Building with Zig
You need a working zig compiler, e.g. from MacPorts (please see below).
The inital build can take quite some time, therefore caffeinate comes in handy.
caffeinate zig build run
For assuring a clean build from scratch, remove built artifacts:
rm -fr prefix Frameworks
Development
If you have changes in one of the projects contained, trigger a framework rebuild like so:
rm -fr prefix/<project_with_changes>
caffeinate zig build run
Xcode
This build has been tested for Xcode 26.2 with the older SDKs of Xcode 14.3.1 copied in (see this script).
Whatever Xcode/SDK combination you use, make sure you adapt the SDKs in the build project (struct Platform).
Dependencies
MacPorts
Install MacPorts for your version of macOS.
The following ports are needed. You can usually use a more current version, except for asn1c, which MUST be v0.9.28.
sudo port install git asn1c \
python313 py313-lxml \
gmake libtool autoconf automake \
wget gsed \
openjdk25 ninja \
zig
# python3 must refer to a python3 with lxml
# (the one that you just installed)
sudo port select --set python3 python313
Shells
Build scripts used by p≡p for iOS and dependencies often use
sh -l to execute commands. It is absolutely vital that the shell
that gets used by this command fully supports your installed
MacPorts environment
(e.g. the python3 that has lxml installed).
Please refer to man sh and MacPorts installation instructions for your specific shell
for fixing build problems.
Depending on the shells used, it may as easy as putting the following lines
into your $HOME/.profile:
. "$HOME/.cargo/env"
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
Rust
Install rust as indicated.
Install toolchains for iOS and macOS:
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-ios
rustup target add aarch64-apple-ios-sim
Install the cargo applet cargo-c:
MACOSX_DEPLOYMENT_TARGET=26.0 RUSTFLAGS="-L/usr/lib" cargo install cargo-c
YML2
Clone YML into your home directory:
pushd ~
git clone ssh://git@codeberg.org/fdik/yml2.git
popd
More about Xcode SDK mixing
Some Xcode install versions for experimenting:
- Xcode 16.4: iphoneos18.5
- Xcode 15.4: iphoneos17.5
- Xcode 14.3.1: iphoneos16.4
Useful commands:
sudo xcode-select --switch /Applications/Xcode_26.2.app
xcodebuild -showsdks