Created attachment 474652 [details] zlib.pc with incorrect values as it currently stands mingw-w64 builds resolve the wrong values in multilib_src_compile when processing the zlib.pc.in file with sed, and end up with references to the build dir in the final file. Unsure how to resolve this atm, will be looking into it.
Created attachment 474654 [details] x86_64-w64-mingw32-emerge --info sys-libs/zlib
On a second look I am incorrect; the manual processing of zlib.pc.in with sed does work, but gets installed to /usr/share/pkgconfig/zlib.pc, along with /usr/lib/pkgconfig/zlib.pc created from win32/Makefile.gcc which contains the incorrect references to the build dir. I have made a pull request to https://github.com/gentoo/gentoo which makes overwrites the win32/Makefile.gcc zlib.pc with the manually processed, correct values zlib.pc.
Thank you for your contribution.
Fixed with https://github.com/gentoo/gentoo/pull/4803