1 # Building for OS X/macOS
3 See also README.txt for general information.
9 Install [MacPorts](https://www.macports.org/) for your
10 [version of OS X/macOS](https://www.macports.org/install.php).
12 Note that you need [Xcode installed](https://www.macports.org/install.php)
13 for MacPorts, and for building the engine. You also need to accept Xcode's EULA.
15 *Note*: Use the script `macports_env.sh` (or a similar one) to set up a clean build environment
16 before building the engine:
22 If you don't use that environment, please make sure you've set up all search paths correctly.
24 #### MacPorts dependencies
27 sudo port install mercurial
28 sudo port install py27-lxml
29 sudo port install gpgme
30 sudo port install autoconf
31 sudo port install asn1c
32 sudo port install zlib
37 #### [yml2](https://fdik.org/yml/toolchain)
39 Install into your home directory:
43 curl -LO http://fdik.org/yml2.tar.bz2
51 Note: libetpan needs libz and libiconv, but the libiconv from MacPorts is not compatible, some
52 functions seem to have been renamed there. Therefore the dynlib from OS X is used.
55 git clone https://github.com/fdik/libetpan libetpan-osx
59 cp ./src/.libs/libetpan.a ~/lib/
62 ##### libetpan with xcodebuild
64 The build with autoconf (see previous section) is preferred. This is just for completeness.
65 *Don't actually build libetpan with xcodebuild.*
68 git clone https://github.com/fdik/libetpan libetpan-osx
69 cd libetpan-osx/build-mac
70 xcodebuild -project libetpan.xcodeproj/ -target "static libetpan"
72 cp build/Release/libetpan.a ~/lib/
77 You can change some defaults by editing `Makefile.conf`. But this readme assumes you don't.
87 Done! The result should be (among others):
91 ./src/libpEpEngine.dylib
96 Install (you might need sudo for some commands, depending on how your system is set up):
103 Since the `system.db` rarely changes, `make -C db install` is not needed for every build.
107 Make sure that you add `/opt/local/lib` to each definition of `LD_LIBRARY_PATH`
108 in `test/Makefile`. This ensures that libgpgme will be found:
112 LD_LIBRARY_PATH=/opt/local/lib:~/lib:../src ./pEpEngineTest
121 This is done with Xcode. Simply add `pEpEngine.xcodeproj` to
122 your project and add a dependency to the target `pEpEngine`
123 (in `Target Dependencies` in your `Build Phases`.
125 Usually you just integrate `pEpiOSAdapter.xcodeproj`.