Instead of shipping this patch... httrack-3.44.1+zlib-1.2.5.1.patch ...it should be patched to use system copy of the sys-libs/zlib[minizip] instead, that allows dropping the entire patch which is not suitable for upstream in any case
Created attachment 318184 [details, diff] Use minizip of system's zlib rather than a bundled copy httrack uses a function zipFlush that minizip no longer exposes. I would remove all but that function if it wasn't using zip_internal, which zlib current doesn't expose. Here's the code I refer to: ===================================================================== int ZEXPORT zipFlush (file) zipFile file; { zip_internal* zi; if (file == NULL) return ZIP_PARAMERROR; zi = (zip_internal*)file; if (zi->z_filefunc.zflush_file != NULL && zi->filestream != NULL) return ZFLUSH(zi->z_filefunc,zi->filestream); else return EOF; } ===================================================================== Any suggestions? Attached you find a patch that unbundles minizip completely (but goes to far, unfortunately).
I just contacted upstream about it. Here's a copy of my mail to Xavier Roche: SUBJECT: Function zipFlush of minizip/zlib in httrack 3.45.4 Hello Xavier, I found httrack 3.45.4 bundling minizip of zlib, meaning that i builds and uses its own copy of minizip rather than making use of the system-wide minizip/zlib installation. For security and other reasons (please see [1] for details) I tried to make httrack use the version of minizip that is installed system-wide, zlib 1.2.7 (the most recent one) to be concrete. So I I started making this patch [2] before I figured out that httrack uses a function zipFlush that is no longer exposed by recent versions of zlib. As function zipFlush requires access to minizip internals (e.g. type zip_internal), removing every minizip code but zipFlush does not work. There are two ways you could go with httrack, each of which would improve the situation to us: A) Resolve the use of function zipFlush one way or another or B) Upgrade the bundled code of minizip to the version from zlib 1.2.7 and make httrack work with that new version. If you are undecided, option B is recommended. For completeness and transparency, I would like to mention that this process is tracked as issue #425776 in Gentoo Linux [3]. Thanks for listening and for consideration! Best, Sebastian [1] https://wiki.gentoo.org/wiki/Why_not_bundle_dependencies [2] https://bugs.gentoo.org/attachment.cgi?id=318184&action=diff [3] https://bugs.gentoo.org/show_bug.cgi?id=425776
Closing, zlib not bundled with any version in Gentoo as of today.