commit:     491bf8bd3ef621da49b168736a04f23aa4c7719c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 19 04:31:19 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 19 04:31:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=491bf8bd

sys-libs/zlib: drop macro renaming hacks

Renaming zlib's `OF()` macro has caused problems for various packages; 
fortunately
C23 kills K&R prototypes so its use should be dying out anyway. If anyone is 
still
using it, we should just patch it out entirely rather than renaming it.

Other distros have been coping fine without the rename anyway. The most 
important
point being that this is against POLA and leads to problems when people try to 
build
things using zlib that haven't been fixed yet.

See also the legendary godot patch to workaround this:
https://github.com/godotengine/godot/blob/93409b8e64a9bc3c271ab4a7489b59a43bc0d048/thirdparty/minizip/patches/unbreak-gentoo.patch.

As of zlib-1.3, zlib doesn't even use it by itself.

Bug: https://bugs.gentoo.org/383179
Signed-off-by: Sam James <sam <AT> gentoo.org>

 profiles/package.mask                                 | 4 ++--
 sys-libs/zlib/{zlib-1.3.ebuild => zlib-1.3-r1.ebuild} | 6 ------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/profiles/package.mask b/profiles/package.mask
index 45d226c46a68..e9de29d6524b 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -34,8 +34,8 @@
 #--- END OF EXAMPLES ---
 
 # Sam James <[email protected]> (2023-08-18)
-# Masked for testing. Breaks pigz at least: 
https://github.com/madler/pigz/issues/111.
-=sys-libs/zlib-1.3
+# Masked for testing.
+=sys-libs/zlib-1.3-r1
 
 # Jonas Stein <[email protected]> (2023-08-17)
 # Upstream warns that it is broken and there is no fix since 2010

diff --git a/sys-libs/zlib/zlib-1.3.ebuild b/sys-libs/zlib/zlib-1.3-r1.ebuild
similarity index 96%
rename from sys-libs/zlib/zlib-1.3.ebuild
rename to sys-libs/zlib/zlib-1.3-r1.ebuild
index 6dbffd69d64f..22051ef75784 100644
--- a/sys-libs/zlib/zlib-1.3.ebuild
+++ b/sys-libs/zlib/zlib-1.3-r1.ebuild
@@ -130,12 +130,6 @@ multilib_src_compile() {
        use minizip && emake -C contrib/minizip
 }
 
-sed_macros() {
-       # Clean up namespace a little, bug #383179
-       # We do it here so we only have to tweak 2 files
-       sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
-}
-
 multilib_src_install() {
        case ${CHOST} in
                *-mingw*|mingw*)

Reply via email to