You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Andreas Buff 48e01c3886 Merge branch 'IPS-105' 2 weeks ago
CommonPEPDependencies IPS-105 removes workaround and uses (now working) capnp.code 2 weeks ago
_config Adds first sketch for capnproto build 2 weeks ago
buildcode IPS-105 fixes: "Bad CPU type in executable" error cross building capnp libs 2 weeks ago
.gitignore initial commit 5 months ago
README.md adds Known Issue section 5 months ago
build-asn1executable.sh uses default shell everywhere now 5 months ago
build-fat-bins.sh uses default shell everywhere now 5 months ago
build-fat-libs.sh uses default shell everywhere now 5 months ago
build-ios_dependency.template IOS-2882 sequoia 4 iOS working 4 months ago
build-macOSAdapter.sh uses default shell everywhere now 5 months ago
build-macos_dependency.template uses default shell everywhere now 5 months ago
build-pEpEngine-macOS.sh IPS-67 Clone libpEpTransport 1 month ago
clean_all_iOS.sh seperates cleanup targets (iOS & macOS) 5 months ago
clean_all_macOS.sh seperates cleanup targets (iOS & macOS) 5 months ago
clean_pEp_macOS.sh IOS-2882 betters naming of clean targets to not whipe things which you do not want to 4 months ago
clean_repos_in_parent_dir.sh fixes: repos in parent dir not cleaned 5 months ago
generate_and_run_ios_dependency_build_script.sh IPS-105 nicer docs 2 weeks ago
generate_and_run_mac_dependency_build_script.sh IPS-105 nicer docs 2 weeks ago
get-config-ios-deployment-target.sh IOS-2882 gpm iOS working 4 months ago
get-config-macos-deployment-target-M1.sh initial commit 5 months ago
get-config-macos-deployment-target-x86_64.sh initial commit 5 months ago
get-config-prefix.sh initial commit 5 months ago
get-pEp-version.sh initial commit 5 months ago

README.md

common-dependency-build-helpers-4-apple-hardware

Contains one macOS build script for each dependency and an Xcode project with convenience build aggragates (using the build scripts).

Prerequisites

Package managers

MacPorts for installing dependencies:

Install MacPorts for your version of OS X/macOS.

Dependencies of prerequisites

You need a working python3 environment and all dependencies:

sudo port install git

sudo port install asn1c

sudo port install python38
sudo port install py38-lxml
sudo port select --set python3 python38

sudo port install gmake
sudo port install autoconf
sudo port install libtool
sudo port install automake

sudo port install wget

sudo port install gsed

sudo port install capnproto

xcode-select --install

Install Rust

curl https://sh.rustup.rs -sSf | sh

add this to ~/.profile (create if it doesn't exist):

source $HOME/.cargo/env
export PATH="$HOME/.cargo/bin:$PATH"

Restart your Console!

sudo port install pkgconfig
rustup toolchain install nightly
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
rustup target add aarch64-apple-darwin --toolchain nightly
rustup update

Dependencies

git clone https://gitea.pep.foundation/buff/mac-os-build-scripts-common-dependencies.git

Build

We recomend to not use the shell scripts directly but to use Xcode (because its a working, tested onliner and using the scripts directly is undocumented and untested).

Using Xcode UI

open CommonPEPDependencies/CommonPEPDependencies.xcodeproj.

Build the scheme fitting your needs (e.g. "build-pEpMIME-dependencies_macOS" if you need the dependencies for building pEpMIME).

Using terminal

xcodebuild -project "CommonPEPDependencies/CommonPEPDependencies.xcodeproj" -scheme "$NAME_OF_SCHEME_FITING_YOUR_NEEDS" -configuration [RELEASE|DEBUG]

Output Dir

You can configure the PREFIX to save build arttefacts and headers in CommonPEPDependencies/config.plist, setting the value for key "CommonPEPDependencies_PREFIX". It is relative to CommonPEPDependencies/CommonPEPDependencies.xcodeproj.

The default output dir is CommonPEPDependencies/build.

See: #Configs section for details re configuring it

Configs

config.plist

There is a CommonPEPDependencies/config.plist config file which you can configure the following in:

CommonPEPDependencies_PREFIX

Defines the PREFIX directory to save build arttefacts and headers in. It is relative to CommonPEPDependencies/CommonPEPDependencies.xcodeproj.

pEp_versions.plist

There is a /_config/pEp_versions.plist where you can configure the version used for pEp dependencies.

For 3rd party dependencies, the version used is hardcoded in the corresponding .code file (e.g. buildcode/iconv.code) as it is assumed to use the same 3rd party lib version for all pEp projects (if that assumtion is wrong, please do not chagne the .codefile but ping the maintainer to the version to /_config/pEp_versions.plist ).

Known Issue

Building sequoia this error is logged:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump:1:1: 'conftest.o': Invalid/Unsupported object file format

It i yet unknown why that is the case, it seems to not do any harm and it does not return an none zero exit code.