Created attachment 402078 [details] entire log of this build It fails when tries to build examples and documentation
Created attachment 402080 [details] emerge --info that reproduced the bug
I was in IRC when vdevatman mentioned this bug. The exiv2 package fails to build if the doc and examples USE flags are set and exvi2 isn't already installed. In such cases, exiv2 tries (and fails) to use pkg-config to get the various flags needed to find exiv2 libraries and header files. I tried updating the ebuild to set the PKG_CONFIG_PATH variable as the msvc2005/ReadMe.txt suggests, but all that fixed was the 'cannot find exiv2.pc' errors. The build still couldn't find exiv2/exiv2.hpp (no surprise since it doesn't exit). I added a symlink to get around that, but then ran into errors about missing exiv2 libraries. At this point I gave up trying to fix exvi2 via the ebuild. A work-around is to install exiv2 with the doc and examples USE flags unset and then re-emerge it with the flags set.
Maybe this lines of code within this ebuild are what cause the break: 100 if multilib_is_native_abi; then ... 107 if use doc; then 108 emake samples 109 emake doc 110 fi 111 fi ... I'm not sure of what those emake lines do because I couldn't find any makefile but maybe creating (and overwriting existing ones, if any) needed paths/files before calling those commands would fix it.
doc needs examples, and examples needs already-installed exiv2. There is a CMake build system as well which appears to solve the issue, but it's marked as experimental by upstream.
Seems to work with exiv2-0.25.