Hi,

it seems that many tools started to use the core of minizip as part of their 
source code. This is quite problematic for distributions since they have to 
manually fix those files in case of an (security) bug. Therefore, it seems to 
be better to provide a library which can be linked by all programs which need 
it.

There are distributions like Gentoo and Fedora which already started to 
provide such a library called libminizip [1]. Other distributions like Debian 
are currently waiting for actions by upstream before starting to use 
libminizip[2]. Gentoo also changed some macros which conflict with other 
programs [3] in zconf.h. This made nearly everything fail which included files 
from minizip and made it necessary to fix everything by hand.

Some known programs which are known to have minizip included (there are more, 
but it is impossible to make a complete list and so I just mention some 
prominent ones):

 * cegui
 * chromium
 * gdal
 * googleearth (ok, it will not happen that they use the distribution version)
 * kicad
 * mupen64plus
 * R
 * psi
 * virtuoso
 * vlc

Would it be possible to include the patch from Gentoo or a similar one with 
the next distribution of zlib?

Thanks

[1] https://bugs.gentoo.org/383351
[2] http://bugs.debian.org/574798
[3] https://bugs.gentoo.org/383179
sniped & improved from Fedora

--- zlib-1.2.4/contrib/minizip/configure.ac
+++ zlib-1.2.4/contrib/minizip/configure.ac
@@ -0,0 +1,12 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_INIT([minizip], [@ZLIB_VER@], [bugzilla.redhat.com])
+AC_CONFIG_SRCDIR([minigzip.c])
+AM_INIT_AUTOMAKE([foreign])
+LT_INIT
+
+AC_SUBST([HAVE_UNISTD_H], [0])
+AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], [])
+AC_CONFIG_FILES([Makefile minizip.pc])
+AC_OUTPUT
--- zlib-1.2.4/contrib/minizip/Makefile.am
+++ zlib-1.2.4/contrib/minizip/Makefile.am
@@ -0,0 +1,28 @@
+lib_LTLIBRARIES = libminizip.la
+
+libminizip_la_SOURCES = \
+	ioapi.c \
+	mztools.c \
+	unzip.c \
+	zip.c
+
+libminizip_la_CFLAGS = -I../.. -L../..
+libminizip_la_LDFLAGS = -version-info 1:0:0 -lz
+
+minizip_includedir = $(includedir)/minizip
+minizip_include_HEADERS = \
+	crypt.h \
+	ioapi.h \
+	mztools.h \
+	unzip.h \
+	zip.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = minizip.pc
+
+EXTRA_PROGRAMS = miniunzip minizip
+
+miniunzip_SOURCES = miniunz.c
+miniunzip_LDADD = libminizip.la
+
+minizip_SOURCES = minizip.c
+minizip_LDADD = libminizip.la
--- zlib-1.2.4/contrib/minizip/minizip.pc.in
+++ zlib-1.2.4/contrib/minizip/minizip.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/minizip
+
+Name: minizip
+Description: Minizip zip file manipulation library
+Requires:
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lminizip
+Libs.private: -lz
+Cflags: -I${includedir}

Reply via email to