commit:     881d2edff3db987df57489bb306fc19fc4ffba8b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 31 18:59:16 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov  4 07:05:55 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=881d2edf

virtual/zlib: New package, v1

A new virtual to cover sys-libs/zlib and sys-libs/zlib-ng[compat]
(+ sys-libs/minizip-ng[compat]).  The latter package is now used
by an increasing number of distributions, including Arch Linux [1]
and Fedora [2], and upstream seems to have started taking ABI
compatibility seriously.  While we aren't planning on switching
the default anytime soon, it makes sense to provide the option to switch
one's system.  There is also zlib-rs around the corner [3].

Given how widespread the dependency on sys-libs/zlib is, I think we're
only going to substitute it in place, without revbumping -- and whoever
decides to try out zlib-ng will be out for rebuilding everything.

[1] https://lists.archlinux.org/archives/list/arch-dev-public <AT> 
lists.archlinux.org/thread/UPJYWKUJRQDHNU4IXGFDU6GVEHPSTKDZ/#UPJYWKUJRQDHNU4IXGFDU6GVEHPSTKDZ
[2] https://fedoraproject.org/wiki/Changes/ZlibNGTransition
[3] https://github.com/trifectatechfoundation/zlib-rs/issues/419

Closes: https://bugs.gentoo.org/905376
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/44407
Closes: https://github.com/gentoo/gentoo/pull/44407
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 virtual/zlib/metadata.xml  | 11 +++++++++++
 virtual/zlib/zlib-1.ebuild | 23 +++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/virtual/zlib/metadata.xml b/virtual/zlib/metadata.xml
new file mode 100644
index 000000000000..e2171ff98398
--- /dev/null
+++ b/virtual/zlib/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo Base System</name>
+       </maintainer>
+       <use>
+               <flag name="minizip">include the minizip library for quick and 
dirty zip extraction</flag>
+       </use>
+</pkgmetadata>

diff --git a/virtual/zlib/zlib-1.ebuild b/virtual/zlib/zlib-1.ebuild
new file mode 100644
index 000000000000..2095b6ce181d
--- /dev/null
+++ b/virtual/zlib/zlib-1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-build
+
+DESCRIPTION="Virtual for libz.so providers"
+SLOT="0/1"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv 
~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos 
~x64-solaris"
+IUSE="minizip static-libs"
+
+RDEPEND="
+       || (
+               sys-libs/zlib[${MULTILIB_USEDEP},minizip?,static-libs?]
+               (
+                       
sys-libs/zlib-ng[${MULTILIB_USEDEP},compat,static-libs(-)?]
+                       minizip? (
+                               
sys-libs/minizip-ng[${MULTILIB_USEDEP},compat,static-libs(-)?]
+                       )
+               )
+       )
+"

Reply via email to