This is more or less the same as bug 118815 (but not a duplicate of course ;)). Problem is that build-time specific data is used for the wrong ABI. If LIBDIR_$ABI is not lib or lib is not a symlink to LIBDIR_$ABI then that's probably the case. The fix is quite easy: Make pkg-config search the correct directory by setting PKG_CONFIG_PATH in src_compile() where configure is called.
Created attachment 82548 [details, diff] patch
should also add [ -z "${PKG_CONFIG_PATH}" ] in case user set it themselves ...
Created attachment 82683 [details, diff] patch indeed
r3083
Released in 2.1_pre7-r5.