summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/python-fchksum')
-rw-r--r--dev-python/python-fchksum/Manifest1
-rw-r--r--dev-python/python-fchksum/files/python-fchksum-1.7.1-md5-align.patch26
-rw-r--r--dev-python/python-fchksum/metadata.xml5
-rw-r--r--dev-python/python-fchksum/python-fchksum-1.7.1-r1.ebuild22
4 files changed, 54 insertions, 0 deletions
diff --git a/dev-python/python-fchksum/Manifest b/dev-python/python-fchksum/Manifest
new file mode 100644
index 000000000000..69e302b439aa
--- /dev/null
+++ b/dev-python/python-fchksum/Manifest
@@ -0,0 +1 @@
+DIST python-fchksum-1.7.1.tar.gz 26724 SHA256 407625d2bf38be6fcbe8b01007d1803b5c5bd97249114c076edef4fd061405a7 SHA512 59b561e2938c41bcda2b98eb3fa0670be3fd85f8cb67368132ce239cac21760a5e9a5a05be2429992fa480ccd2e2aa457df7b4a07e709acbe42be9b1559f3060 WHIRLPOOL 474c2045dbe776b162be5388eedaadea8f26f5f9620ffb4c8eb86bbdcb8a124137522f9b20f11596cf828cc965afcfde492802484dae484852ac27ed147d176a
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/metadata.xml b/dev-python/python-fchksum/metadata.xml
new file mode 100644
index 000000000000..de483c53568f
--- /dev/null
+++ b/dev-python/python-fchksum/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>python</herd>
+</pkgmetadata>
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..7c1e358e70bc
--- /dev/null
+++ b/dev-python/python-fchksum/python-fchksum-1.7.1-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 )