sys-libs/zlib-ng has a "compat" USE flag so that it can be a drop-in replacement to the standard zlib library. However, most packages that depend on zlib, depends on sys-libs/zlib, which of course is blocked by the now installed zlib-ng library. It would be good if we could have an option to choose the zlib-ng library in a better way. For example with app-alternatives/zlib, eselect zlib or virtusl/zlib to overcome this problem. I am aware that replacing zlib with zlib-ng system-wide is not recommended, however upstream do say that bug reports are welcome if there are issues with this. To this end, having this option could help finding issues for that project. https://github.com/zlib-ng/zlib-ng
Almost all packages that require zlib as BDEPEND are fail to built with zlib-ng USE=compat, so it's too early for your request.
I think it might be time to take another look at this in light of Fedora transitioning to zlib-ng with Fedora 40: https://bugzilla.redhat.com/show_bug.cgi?id=2252767 Most packages do not fail to compile anymore (at least as far as I can tell) and the few that do like Perl have patches available (I submitted a pull request for that here: https://github.com/gentoo/gentoo/pull/36291) We can add USE="minizip" to zlib-ng (https://github.com/gentoo/gentoo/pull/36290) and then make a virtual/zlib with: IUSE="minizip" RDEPEND="|| ( sys-libs/zlib[minizip?] sys-libs/zlib-ng[compat,minizip?] )" Packages can switch to the virtual slowly over time (keep zlib-ng[compat] masked). There's no need to change everything in one go.
*** Bug 950765 has been marked as a duplicate of this bug. ***