This is similar to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847206
Since we happen to be building in deep directory, I have prepared a patch which allows me to change the GNUPGHOME make variable.
https://github.com/oracle/solaris-userland/blob/master/components/gpgme/patches/GNUPGHOME.patch
I considered making gpgme a directory in /tmp and having GNUPGHOME point there, but I thought that this is less intrusive change which has higher chance of getting into your official source tree.
Different solutions to the problem welcome :)
Cheers
__
Vlad