commit:     18b0451c9ae2db037d996b0a5156ba41bf9d1f5a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 18 00:01:36 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Mar 22 08:57:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18b0451c

sys-libs/zlib-ng: add blocker on sys-libs/zlib when using compat mode

Warn users if USE=compat is enabled and also include a link
to upstream's interpretation of what USE=compat provides.

Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild 
b/sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild
index c00074bbf78..29181862229 100644
--- a/sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild
+++ b/sys-libs/zlib-ng/zlib-ng-2.0.1-r1.ebuild
@@ -18,6 +18,8 @@ IUSE="compat ${CPU_USE[@]} test"
 
 RESTRICT="!test? ( test )"
 
+RDEPEND="compat? ( !sys-libs/zlib )"
+
 src_prepare() {
        cmake_src_prepare
 
@@ -67,3 +69,15 @@ src_configure() {
 
        cmake_src_configure
 }
+
+src_install() {
+       cmake_src_install
+
+       if use compat ; then
+               ewarn "zlib-ng is experimental and replacing the system zlib is 
dangerous"
+               ewarn "Please be careful!"
+               ewarn
+               ewarn "The following link explains the guarantees (and what is 
NOT guaranteed):"
+               ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md";
+       fi
+}

Reply via email to