summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-03-15 15:16:53 +0000
committerMike Frysinger <vapier@gentoo.org>2014-03-15 15:16:53 +0000
commit02a7f17c6b3ed0eafe0839b2596d4f6a1b8fde10 (patch)
treef3cb4193875506978c899639db7ea8b5e03aeac2 /dev-python/python-fchksum
parentversion bump (diff)
downloadgentoo-2-02a7f17c6b3ed0eafe0839b2596d4f6a1b8fde10.tar.gz
gentoo-2-02a7f17c6b3ed0eafe0839b2596d4f6a1b8fde10.tar.bz2
gentoo-2-02a7f17c6b3ed0eafe0839b2596d4f6a1b8fde10.zip
Update to distutils-r1 and fix unaligned accesses in md5 module.
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'dev-python/python-fchksum')
-rw-r--r--dev-python/python-fchksum/ChangeLog8
-rw-r--r--dev-python/python-fchksum/files/python-fchksum-1.7.1-md5-align.patch26
-rw-r--r--dev-python/python-fchksum/python-fchksum-1.7.1-r1.ebuild22
3 files changed, 55 insertions, 1 deletions
diff --git a/dev-python/python-fchksum/ChangeLog b/dev-python/python-fchksum/ChangeLog
index 7fb2a3d83dc4..8fd8617c41f0 100644
--- a/dev-python/python-fchksum/ChangeLog
+++ b/dev-python/python-fchksum/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/python-fchksum
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/python-fchksum/ChangeLog,v 1.39 2014/03/15 15:02:19 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/python-fchksum/ChangeLog,v 1.40 2014/03/15 15:16:53 vapier Exp $
+
+*python-fchksum-1.7.1-r1 (15 Mar 2014)
+
+ 15 Mar 2014; Mike Frysinger <vapier@gentoo.org>
+ +files/python-fchksum-1.7.1-md5-align.patch, +python-fchksum-1.7.1-r1.ebuild:
+ Update to distutils-r1 and fix unaligned accesses in md5 module.
15 Mar 2014; Mike Frysinger <vapier@gentoo.org> python-fchksum-1.7.1.ebuild:
Update HOMEPAGE/SRC_URI.
diff --git a/dev-python/python-fchksum/files/python-fchksum-1.7.1-md5-align.patch b/dev-python/python-fchksum/files/python-fchksum-1.7.1-md5-align.patch
new file mode 100644
index 000000000000..1adfa627fdd8
--- /dev/null
+++ b/dev-python/python-fchksum/files/python-fchksum-1.7.1-md5-align.patch
@@ -0,0 +1,26 @@
+the alignment of resbuf is not guaranteed, so use memcpy to move
+the bytes in/out. on arches which can do unaligned accesses, this
+will generate the same code.
+
+patch by Mike Frysinger
+
+--- a/md5.c
++++ b/md5.c
+@@ -74,10 +74,13 @@ md5_read_ctx (ctx, resbuf)
+ const struct md5_ctx *ctx;
+ void *resbuf;
+ {
+- ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
+- ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
+- ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C);
+- ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D);
++ md5_uint32 swap;
++#define set(i, c) { swap = SWAP (ctx->c); memcpy (resbuf + (i * 4), &swap, 4); }
++ set (0, A);
++ set (1, B);
++ set (2, C);
++ set (3, D);
++#undef set
+
+ return resbuf;
+ }
diff --git a/dev-python/python-fchksum/python-fchksum-1.7.1-r1.ebuild b/dev-python/python-fchksum/python-fchksum-1.7.1-r1.ebuild
new file mode 100644
index 000000000000..0b543b1afeb3
--- /dev/null
+++ b/dev-python/python-fchksum/python-fchksum-1.7.1-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/python-fchksum/python-fchksum-1.7.1-r1.ebuild,v 1.1 2014/03/15 15:16:53 vapier Exp $
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Python module to find the checksum of files"
+HOMEPAGE="http://code.fluffytapeworm.com/projects"
+SRC_URI="http://code.fluffytapeworm.com/projects/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND="sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-md5-align.patch )