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.

110 lines
3.3 KiB

7 months ago
  1. # common-dependency-build-helpers-4-apple-hardware
  2. Contains one macOS build script for each dependency and an Xcode project with convenience build aggragates (using the build scripts).
  3. ## Prerequisites
  4. ### Package managers
  5. MacPorts for installing dependencies:
  6. Install [MacPorts]( for your
  7. [version of OS X/macOS](
  8. ### Dependencies of prerequisites
  9. You need a working python3 environment and all dependencies:
  10. ```
  11. sudo port install git
  12. sudo port install asn1c
  13. sudo port install python38
  14. sudo port install py38-lxml
  15. sudo port select --set python3 python38
  16. sudo port install gmake
  17. sudo port install autoconf
  18. sudo port install libtool
  19. sudo port install automake
  20. sudo port install wget
  21. sudo port install gsed
  22. sudo port install capnproto
  23. xcode-select --install
  24. ```
  25. #### Install Rust
  26. ```
  27. curl -sSf | sh
  28. ```
  29. add this to ~/.profile (create if it doesn't exist):
  30. ```
  31. source $HOME/.cargo/env
  32. export PATH="$HOME/.cargo/bin:$PATH"
  33. ```
  34. Restart your Console!
  35. ```
  36. sudo port install pkgconfig
  37. rustup toolchain install nightly
  38. rustup target add x86_64-apple-darwin
  39. rustup target add aarch64-apple-darwin
  40. rustup target add aarch64-apple-darwin --toolchain nightly
  41. rustup update
  42. ```
  43. ## Dependencies
  44. ```
  45. git clone
  46. ```
  47. ## Build
  48. 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).
  49. ### Using Xcode UI
  50. `open CommonPEPDependencies/CommonPEPDependencies.xcodeproj`.
  51. Build the scheme fitting your needs (e.g. "build-pEpMIME-dependencies_macOS" if you need the dependencies for building pEpMIME).
  52. ### Using terminal
  53. `xcodebuild -project "CommonPEPDependencies/CommonPEPDependencies.xcodeproj" -scheme "$NAME_OF_SCHEME_FITING_YOUR_NEEDS" -configuration [RELEASE|DEBUG]`
  54. ## Output Dir
  55. 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`.
  56. The default output dir is `CommonPEPDependencies/build`.
  57. See: #Configs section for details re configuring it
  58. ## Configs
  59. ### config.plist
  60. There is a `CommonPEPDependencies/config.plist` config file which you can configure the following in:
  61. #### CommonPEPDependencies_PREFIX
  62. Defines the PREFIX directory to save build arttefacts and headers in. It is relative to `CommonPEPDependencies/CommonPEPDependencies.xcodeproj`.
  63. ### pEp_versions.plist
  64. There is a `/_config/pEp_versions.plist` where you can configure the version used for pEp dependencies.
  65. 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 `.code`file but ping the maintainer to the version to `/_config/pEp_versions.plist` ).
  66. ## Known Issue
  67. Building sequoia this error is logged:
  68. `/Applications/ 'conftest.o': Invalid/Unsupported object file format`
  69. 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.