diff options
author | Chris Reffett <creffett@gentoo.org> | 2012-05-09 15:57:47 +0000 |
---|---|---|
committer | Chris Reffett <creffett@gentoo.org> | 2012-05-09 15:57:47 +0000 |
commit | 5996f066626b8be3c39be7aa6c4908ab0679abf2 (patch) | |
tree | 65a7743e27b246fc3e64cbb53f15ef27c8743eda /dev-libs/libzip | |
parent | keyword ~amd64-fbsd (diff) | |
download | gentoo-2-5996f066626b8be3c39be7aa6c4908ab0679abf2.tar.gz gentoo-2-5996f066626b8be3c39be7aa6c4908ab0679abf2.tar.bz2 gentoo-2-5996f066626b8be3c39be7aa6c4908ab0679abf2.zip |
Revision bump, added patch to fix CRC calls
(Portage version: 2.2.0_alpha101/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/libzip')
-rw-r--r-- | dev-libs/libzip/ChangeLog | 26 | ||||
-rw-r--r-- | dev-libs/libzip/files/libzip-0.10.1-fix_decrypt.patch | 37 | ||||
-rw-r--r-- | dev-libs/libzip/libzip-0.10.1-r1.ebuild | 51 |
3 files changed, 104 insertions, 10 deletions
diff --git a/dev-libs/libzip/ChangeLog b/dev-libs/libzip/ChangeLog index b97a7dc8fac9..a7fc2092e16e 100644 --- a/dev-libs/libzip/ChangeLog +++ b/dev-libs/libzip/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-libs/libzip # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libzip/ChangeLog,v 1.44 2012/03/28 20:18:48 johu Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libzip/ChangeLog,v 1.45 2012/05/09 15:57:47 creffett Exp $ + +*libzip-0.10.1-r1 (09 May 2012) + + 09 May 2012; Chris Reffett <creffett@gentoo.org> +libzip-0.10.1-r1.ebuild, + +files/libzip-0.10.1-fix_decrypt.patch: + Revision bump, added patch to fix CRC calls 28 Mar 2012; Johannes Huber <johu@gentoo.org> -libzip-0.10-r1.ebuild: Remove old wrt bug #409117. @@ -56,7 +62,7 @@ *libzip-0.10-r1 (29 Apr 2011) - 29 Apr 2011; Tomáš Chvátal <scarabeus@gentoo.org> -libzip-0.9.ebuild, + 29 Apr 2011; Tomáš Chvátal <scarabeus@gentoo.org> -libzip-0.9.ebuild, +libzip-0.10-r1.ebuild, +files/libzip-0.10-fix_pkgconfig.patch: Drop older. Revision bump to fix pkgconfig file that had wrong include defined. @@ -76,35 +82,35 @@ 20 Apr 2011; Thomas Kahle <tomka@gentoo.org> libzip-0.10.ebuild: x86 stable per bug 359899 - 19 Apr 2011; Tomáš Chvátal <scarabeus@gentoo.org> libzip-0.10.ebuild: + 19 Apr 2011; Tomáš Chvátal <scarabeus@gentoo.org> libzip-0.10.ebuild: Fix test that was using wrong return state. *libzip-0.10 (22 Mar 2011) - 22 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> -libzip-0.9.3.ebuild, + 22 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> -libzip-0.9.3.ebuild, -libzip-0.10_rc1-r2.ebuild, +libzip-0.10.ebuild: Version bump to latest. Drop older. *libzip-0.10_rc1-r2 (05 Mar 2011) - 05 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> + 05 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> -libzip-0.10_rc1-r1.ebuild, +libzip-0.10_rc1-r2.ebuild, files/libzip-0.10_rc1-fix_headers.patch: Fix typo in the patch... Revbump again... *libzip-0.10_rc1-r1 (05 Mar 2011) - 05 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> -libzip-0.10_rc1.ebuild, + 05 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> -libzip-0.10_rc1.ebuild, +libzip-0.10_rc1-r1.ebuild, +files/libzip-0.10_rc1-fix_headers.patch: Fix headers placement. Per bug #357359. *libzip-0.10_rc1 (04 Mar 2011) - 04 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> libzip-0.9.3.ebuild, + 04 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> libzip-0.9.3.ebuild, +libzip-0.10_rc1.ebuild: Add new RC. Fix tests. - 04 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> libzip-0.9.3.ebuild: + 04 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org> libzip-0.9.3.ebuild: Cleanup ebuild a bit. 21 Dec 2010; Hans de Graaff <graaff@gentoo.org> libzip-0.9.3.ebuild: @@ -124,7 +130,7 @@ 30 Nov 2009; Joseph Jezak <josejx@gentoo.org> libzip-0.9.ebuild: Marked ppc/ppc64 stable. - 29 Nov 2009; Raúl Porcel <armin76@gentoo.org> libzip-0.9.ebuild: + 29 Nov 2009; Raúl Porcel <armin76@gentoo.org> libzip-0.9.ebuild: Add ~sparc 17 Oct 2009; Markus Meier <maekke@gentoo.org> libzip-0.9.ebuild: @@ -136,7 +142,7 @@ 01 Jul 2009; Alexis Ballier <aballier@gentoo.org> libzip-0.9.ebuild: elibtoolize it and keyword ~x86-fbsd - 11 Apr 2009; Raúl Porcel <armin76@gentoo.org> libzip-0.9.ebuild: + 11 Apr 2009; Raúl Porcel <armin76@gentoo.org> libzip-0.9.ebuild: Add ~alpha/~ia64 06 Mar 2009; Jeroen Roovers <jer@gentoo.org> libzip-0.9.ebuild: diff --git a/dev-libs/libzip/files/libzip-0.10.1-fix_decrypt.patch b/dev-libs/libzip/files/libzip-0.10.1-fix_decrypt.patch new file mode 100644 index 000000000000..ae3777889e00 --- /dev/null +++ b/dev-libs/libzip/files/libzip-0.10.1-fix_decrypt.patch @@ -0,0 +1,37 @@ +Modify the calls to the CRC table because original calls did not behave correctly on 64-bit systems. Patch from libzip upstream commit 0e67d378b271, modified so that it applies correctly. +--- libzip-0.10.1/lib/zip_source_pkware.c ++++ libzip-0.10.1/lib/zip_source_pkware.c +@@ -49,10 +49,6 @@ + #define KEY1 591751049 + #define KEY2 878082192 + +-static const uLongf *crc = NULL; +- +-#define CRC32(c, b) (crc[((c) ^ (b)) & 0xff] ^ ((c) >> 8)) +- + + + static void decrypt(struct trad_pkware *, zip_uint8_t *, +@@ -80,9 +76,6 @@ + return NULL; + } + +- if (crc == NULL) +- crc = get_crc_table(); +- + if ((ctx=(struct trad_pkware *)malloc(sizeof(*ctx))) == NULL) { + _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); + return NULL; +@@ -128,10 +121,10 @@ + out[i] = b; + + /* update keys */ +- ctx->key[0] = CRC32(ctx->key[0], b); ++ ctx->key[0] = crc32(ctx->key[0] ^ 0xffffffffUL, &b, 1) ^ 0xffffffffUL; + ctx->key[1] = (ctx->key[1] + (ctx->key[0] & 0xff)) * 134775813 + 1; + b = ctx->key[1] >> 24; +- ctx->key[2] = CRC32(ctx->key[2], b); ++ ctx->key[2] = crc32(ctx->key[2] ^ 0xffffffffUL, &b, 1) ^ 0xffffffffUL; + } + } + diff --git a/dev-libs/libzip/libzip-0.10.1-r1.ebuild b/dev-libs/libzip/libzip-0.10.1-r1.ebuild new file mode 100644 index 000000000000..0d1f563609ba --- /dev/null +++ b/dev-libs/libzip/libzip-0.10.1-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libzip/libzip-0.10.1-r1.ebuild,v 1.1 2012/05/09 15:57:47 creffett Exp $ + +EAPI=4 + +MY_P=${P/_} + +AUTOTOOLS_AUTORECONF=1 +inherit autotools-utils + +DESCRIPTION="Library for manipulating zip archives" +HOMEPAGE="http://www.nih.at/libzip/" +SRC_URI="http://www.nih.at/libzip/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos" +IUSE="static-libs" + +DEPEND="sys-libs/zlib" +RDEPEND="${DEPEND}" + +DOCS=( NEWS README THANKS AUTHORS ) + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}/${PN}-0.10_rc1-fix_headers.patch" + "${FILESDIR}/${PN}-0.10-fix_pkgconfig.patch" + "${FILESDIR}/${PN}-0.10.1-fix_decrypt.patch" +) + +AUTOTOOLS_IN_SOURCE_BUILD=1 + +src_prepare() { + autotools-utils_src_prepare + # run due to fix_headers patch + AT_NOELIBTOOLIZE=yes eautoreconf + #elibtoolize # FreeBSD .so version + + # fix test return state + sed -i \ + -e 's:19/2:19/0:' \ + regress/open_nonarchive.test || die +} + +src_install() { + autotools-utils_src_install + remove_libtool_files all +} |