msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.21k stars 1.19k forks source link

Add zlib-ng #20815

Open esator opened 1 month ago

esator commented 1 month ago

Package name

zlib-ng

Brief description of package

Zlib replacement with optimizations for "next generation" systems

URL for package's homepage

https://github.com/zlib-ng/zlib-ng

Provide a basic test case to validate the package's functionality.

No response

MINGW environments where you need the package

Are you willing to submit a PR?

No response

ognevny commented 1 month ago

I've created #20844 which adds zlib-ng. can you download it from artifacts and test, please? FYI I disabled almost all cpu optimizations to meet Windows 10 minimum hardware requirements

Andarwinux commented 1 month ago

zlib-ng without intrinsic function optimization is useless.

ognevny commented 1 month ago

zlib-ng without intrinsic function optimization is useless.

they shouldn't broke the support of all machines, right?

Andarwinux commented 1 month ago

Didn't you know they implemented runtime detection?

ognevny commented 1 month ago

Didn't you know they implemented runtime detection?

no, I didn't know. thanks for clarification

esator commented 1 month ago

Thanks, maybe for compat mode completely mimic zlib including lib names? So it would be the similar zlib1.dll for shared etc, (like in zlib-ng-win-x86-64-compat.zip) for better compatibility/replaceability and because zlib-ng completely replaces zlib Also for packages, when installing zlib-ng (with compat), zlib should be removed and vice versa But not sure if that is the best way, maybe @Andarwinux or someone else will suggest a better solution

ognevny commented 1 month ago

Thanks, maybe for compat mode completely mimic zlib including lib names? So it would be the similar zlib1.dll for shared etc, (like in zlib-ng-win-x86-64-compat.zip) for better compatibility/replaceability and because zlib-ng completely replaces zlib Also for packages, when installing zlib-ng (with compat), zlib should be removed and vice versa But not sure if that is the best way, maybe @Andarwinux or someone else will suggest a better solution

lib prefix is added by build system. in arch only zlib-ng-compat conflicts with common zlib

Andarwinux commented 1 month ago

The goal of zlib-ng-compat is to be as compatible as possible with the original zlib, but it is not possible to achieve 100% compatibility. Therefore I prefer to replace the original zlib with zlib-ng completely, in order to find all the problems at once and fix them once and for all. This would benefit all packages. Otherwise we have to wait for a random user to accidentally find a compatibility problem.

https://github.com/zlib-ng/zlib-ng/blob/develop/PORTING.md https://github.com/zlib-ng/zlib-ng/issues/1708 https://discussion.fedoraproject.org/t/f40-change-proposal-transitioning-to-zlib-ng-as-a-compatible-replacement-for-zlib-system-wide/95807

ognevny commented 1 month ago

I know 0 distributions which completely replaced zlib with zlib-ng. let me know if there is some

Andarwinux commented 1 month ago

I know 0 distributions which completely replaced zlib with zlib-ng. let me know if there is some

Fedora 40 has replaced zlib globally with zlib-ng-compat system-wide, so all RH family distributions will do the same.

esator commented 1 month ago

lib prefix is added by build system. in arch only zlib-ng-compat conflicts with common zlib

Yeah I mean just zlib-ng-compat, it will be much easier as a drop-in replacement https://cmake.cmake.narkive.com/xllUSUaG/remove-lib-prefix-when-generating-shared-lib-under-windows

ognevny commented 1 month ago

I know 0 distributions which completely replaced zlib with zlib-ng. let me know if there is some

Fedora 40 has replaced zlib globally with zlib-ng-compat system-wide, so all RH family distributions will do the same.

ok, sounds interesting

@lazka @Biswa96 what do you think?