You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3.1 KiB

This file is under Creative Commons License 3.0 cc-by-sa

Building for OS X/macOS

See also README.txt for general information.

For compiling pEp Engine and its dependencies, make sure you have the LANG variable set. Some source files contain unicode characters, and python (assuming files are ascii) will fail.

export LANG=en_US.UTF-8



Install MacPorts for your version of OS X/macOS.

If MacPorts is already installed on your machine, but was installed by a different user, make sure your PATH variable is set as follows in ~/.profile:

export PATH="/opt/local/bin:/opt/local/sbin:$PATH"

Install dependencies packaged with MacPorts as follows.

sudo port install mercurial py27-lxml gpgme autoconf automake libtool asn1c zlib openssl libiconv cyrus-sasl2

Make sure that python is a version 2 one:

sudo port select python python27

NetPGP (if not GPGME)

Prepare :

Get OpenSSL and build/install it as shared library.

tar xvfz openssl-1.0.1u.tar.gz
cd openssl-1.0.1u
./Configure darwin64-x86_64-cc --prefix=$HOME shared
make install

Get and autoconf NetPGP

cd $SRC
hg clone
cd netpgp-et
autoreconf -i


Important : LDFLAGS is set to help finding OpenSSL shared lib. If not set, system's default libcrypto may silently be used instead, causing memory corruption or crash at runtime.

mkdir netpgp_debug
cd netpgp_debug
$SRC/netpgp-et/configure --with-openssl=$HOME --prefix=$HOME CPPFLAGS=-DDEBUG CXXFLAGS="-g -O0" LDFLAGS="-L${HOME}/lib"
make install

Other Dependecies


Install into your home directory:

pushd ~
hg clone


Note: libetpan needs libz and libiconv, but the libiconv from MacPorts is not compatible, some functions seem to have been renamed there. Therefore the dynlib from OS X is used.

git clone
cd libetpan
./ --prefix "$HOME"
make install

Building pEp Engine


You can change some defaults by editing Makefile.conf. The following variable needs to be set appropriately:



make clean
make all
make db


make install
sudo make -C db install

Since the system.db rarely changes, the last step is not needed for every build. If you would like to be able to install the engine without sudo, ensure that your user can write the file /usr/local/share/pEp/system.db. This is not recommended for production machines.

Run tests

If you installed the test keys in your keyring (see: README.txt), this should just work:

cd test
make test

Building for iOS

This is done with Xcode. Simply add pEpEngine.xcodeproj to your project and add a dependency to the target pEpEngine (in Target Dependencies in your Build Phases.

Usually you just integrate pEpiOSAdapter.xcodeproj.