tce-load -i libgee-dev evolution-data-server-dev vala-dev gobject-introspection-dev intltool tracker-dev readline-dev libgee-gir evolution-data-server-gir

cd folks-0.9.6

patch -Np1 -i ../0001-core-Correctly-resolve-symlinks-when-loading-backend.patch

Edit configure for gcc readline detect bug

if test "x$ac_cv_lib_readline_main" = xyes; then :
  with_inspect_tool=yes
else
  with_inspect_tool=yes
fi

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var --enable-tracker-backend --disable-fatal-warnings

find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \;

make
sudo make install

Configure summary:

        Vala........................:  yes
        Vala Compiler...............:  /usr/local/bin/valac
        C Compiler Flags............:  -g -O2  -Wimplicit -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs -Wold-style-declaration 
        Linker Flags................:   
        Prefix......................:  /usr/local
        Bugreporting URL............:  https://bugzilla.gnome.org/browse.cgi?product=folks
        Documentation...............:  no
        Import tool.................:  yes
        Inspector tool..............:  yes
        Telepathy backend...........:  yes
        Tracker backend.............:  yes
        Libsocialweb backend........:  no
        E-D-S backend...............:  yes
        Ofono backend...............:  yes
        BlueZ backend...............:  yes
        Zeitgeist support...........:  no
        Build tests.................:  yes