With app-crypt/heimdal-1.2.1-r4 installed: # USE=kerberos emerge evolution-data-server [...] CC libcamel_provider_1_2_la-camel-sasl-gssapi.lo camel-sasl-gssapi.c:34:23: error: krb5/krb5.h: No such file or directory camel-sasl-gssapi.c: In function ‘gssapi_challenge’: camel-sasl-gssapi.c:340: error: ‘KRB5KRB_AP_ERR_TKT_EXPIRED’ undeclared (first use in this function) camel-sasl-gssapi.c:340: error: (Each undeclared identifier is reported only once camel-sasl-gssapi.c:340: error: for each function it appears in.) camel-sasl-gssapi.c:341: error: ‘KRB5KDC_ERR_NEVER_VALID’ undeclared (first use in this function) make[4]: *** [libcamel_provider_1_2_la-camel-sasl-gssapi.lo] Error 1 The bug occurs because camel-sasl-gssapi.c includes /usr/include/krb5/krb5.h (the header file installed by app-crypt/mit-krb5), while heimdal installs only /usr/include/krb5.h Note that previous versions of evolution-data-server (e.g. 2.28) also included krb5/krb5.h but nevertheless compiled successfully since they apparently didn't actually use any of the macros defined in that file. The solution is to include krb5.h instead of krb5/krb5.h when building against heimdal.
Created attachment 227131 [details, diff] patch to fix the bug
Reported the bug upstream at https://bugzilla.gnome.org/show_bug.cgi?id=615290
I added patched ebuild to overlay. Thank You for the bug report and patch :)
Fixed per previous comment