summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavoz@gentoo.org>2007-07-25 21:05:26 +0000
committerGustavo Zacarias <gustavoz@gentoo.org>2007-07-25 21:05:26 +0000
commitf1ac2adac25c01e0990445f36dbacf516cd85da9 (patch)
treeb7c00b40cd803f62493ba37d43f1db6cef951a25 /app-crypt/mhash
parentStable on amd64 wrt bug #182190 (diff)
downloadgentoo-2-f1ac2adac25c01e0990445f36dbacf516cd85da9.tar.gz
gentoo-2-f1ac2adac25c01e0990445f36dbacf516cd85da9.tar.bz2
gentoo-2-f1ac2adac25c01e0990445f36dbacf516cd85da9.zip
New rev with alignment fixes and sparc stable wrt #181563
(Portage version: 2.1.2.9)
Diffstat (limited to 'app-crypt/mhash')
-rw-r--r--app-crypt/mhash/ChangeLog8
-rw-r--r--app-crypt/mhash/files/digest-mhash-0.9.9-r13
-rw-r--r--app-crypt/mhash/files/mhash-0.9.9-mutils-align.patch118
-rw-r--r--app-crypt/mhash/mhash-0.9.9-r1.ebuild40
4 files changed, 168 insertions, 1 deletions
diff --git a/app-crypt/mhash/ChangeLog b/app-crypt/mhash/ChangeLog
index f187ea928d27..81856d0ecbcf 100644
--- a/app-crypt/mhash/ChangeLog
+++ b/app-crypt/mhash/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-crypt/mhash
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/mhash/ChangeLog,v 1.46 2007/06/14 01:59:48 angelos Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/mhash/ChangeLog,v 1.47 2007/07/25 21:05:26 gustavoz Exp $
+
+*mhash-0.9.9-r1 (25 Jul 2007)
+
+ 25 Jul 2007; Gustavo Zacarias <gustavoz@gentoo.org>
+ +files/mhash-0.9.9-mutils-align.patch, +mhash-0.9.9-r1.ebuild:
+ New rev with alignment fixes and sparc stable wrt #181563
14 Jun 2007; Christoph Mende <angelos@gentoo.org> mhash-0.9.9.ebuild:
Stable on amd64 wrt bug 181563
diff --git a/app-crypt/mhash/files/digest-mhash-0.9.9-r1 b/app-crypt/mhash/files/digest-mhash-0.9.9-r1
new file mode 100644
index 000000000000..4a1e2860d87c
--- /dev/null
+++ b/app-crypt/mhash/files/digest-mhash-0.9.9-r1
@@ -0,0 +1,3 @@
+MD5 955667f04d89ad28ea0b5eecb9ce0b1e mhash-0.9.9.tar.gz 919622
+RMD160 8bca6a7bbfafb4098a829b60f7027c2de0fa0e10 mhash-0.9.9.tar.gz 919622
+SHA256 a61d4f30f3377afd41e316e53f1d6a9a829f34d20add0e4bb29752cb01435c77 mhash-0.9.9.tar.gz 919622
diff --git a/app-crypt/mhash/files/mhash-0.9.9-mutils-align.patch b/app-crypt/mhash/files/mhash-0.9.9-mutils-align.patch
new file mode 100644
index 000000000000..32d80805f5f7
--- /dev/null
+++ b/app-crypt/mhash/files/mhash-0.9.9-mutils-align.patch
@@ -0,0 +1,118 @@
+diff -ur mhash-0.9.9.orig/lib/stdfns.c mhash-0.9.9/lib/stdfns.c
+--- mhash-0.9.9.orig/lib/stdfns.c Wed Apr 4 21:18:42 2007
++++ mhash-0.9.9/lib/stdfns.c Mon May 28 16:08:38 2007
+@@ -152,12 +152,23 @@
+ }
+ }
+
++static void
++mutils_memset8(void *s, __const mutils_word8 c, __const mutils_word32 n)
++{
++ mutils_word8 *stmp = s;
++ mutils_word32 i;
++
++ for (i = 0; i < n; i++, stmp++)
++ {
++ *stmp = c;
++ }
++}
++
+ WIN32DLL_DEFINE
+ void
+ mutils_memset(void *s, __const mutils_word8 c, __const mutils_word32 n)
+ {
+- mutils_word8 *stmp;
+- mutils_word32 *ltmp = (mutils_word32 *) s;
++ mutils_word32 *ltmp;
+ mutils_word32 lump;
+ mutils_word32 i;
+ mutils_word32 words;
+@@ -168,10 +179,22 @@
+ return;
+ }
+
++ if (n < 16)
++ {
++ return mutils_memset8(s, c, n);
++ }
++
++ /* unaligned portion at beginning */
++ remainder = (-(mutils_word32)s) & 0x3;
++ mutils_memset8(s, c, remainder);
++
++ /* aligned words in the middle */
++ ltmp = (mutils_word32 *) (s + remainder);
++
+ lump = (c << 24) + (c << 16) + (c << 8) + c;
+
+- words = n >> 2;
+- remainder = n - (words << 2);
++ words = (n - remainder) >> 2;
++ remainder = n - remainder - (words << 2);
+
+ for (i = 0; i < words; i++, ltmp++)
+ {
+@@ -178,12 +201,8 @@
+ *ltmp = lump;
+ }
+
+- stmp = (mutils_word8 *) ltmp;
+-
+- for (i = 0; i < remainder; i++, stmp++)
+- {
+- *stmp = c;
+- }
++ /* unaligned portion at end */
++ return mutils_memset8(ltmp, c, remainder);
+ }
+
+ static void
+@@ -275,6 +294,9 @@
+ mutils_word32 *buffer;
+ mutils_word32 *ptrIn;
+ mutils_word32 *ptrOut;
++ mutils_word8 *ptr8In;
++ mutils_word8 *ptr8Out;
++ mutils_word8 tmp8;
+ mutils_word32 count = n * 4;
+
+ if (destructive == MUTILS_FALSE)
+@@ -295,10 +317,36 @@
+ * data on a little-endian machine.
+ */
+
+- for (loop = 0, ptrIn = x, ptrOut = buffer; loop < n; loop++, ptrOut++, ptrIn++)
++ if ((mutils_word32)x & 0x3)
+ {
+- *ptrOut = mutils_lend32(*ptrIn);
++ ptr8In = (mutils_word8 *) x;
++ ptr8Out = (mutils_word8 *) buffer;
++ for (loop = 0; loop < n; loop++)
++ {
++#ifdef WORDS_BIGENDIAN
++ tmp8 = ptr8In[0];
++ ptr8Out[0] = ptr8In[3];
++ ptr8Out[3] = tmp8;
++ tmp8 = ptr8In[1];
++ ptr8Out[1] = ptr8In[2];
++ ptr8Out[2] = tmp8;
++#else
++ ptr8Out[0] = ptr8In[0];
++ ptr8Out[1] = ptr8In[1];
++ ptr8Out[2] = ptr8In[2];
++ ptr8Out[3] = ptr8In[3];
++#endif
++ ptr8Out += 4;
++ ptr8In += 4;
++ }
+ }
++ else
++ {
++ for (loop = 0, ptrIn = x, ptrOut = buffer; loop < n; loop++, ptrOut++, ptrIn++)
++ {
++ *ptrOut = mutils_lend32(*ptrIn);
++ }
++ }
+
+ return(buffer);
+ }
diff --git a/app-crypt/mhash/mhash-0.9.9-r1.ebuild b/app-crypt/mhash/mhash-0.9.9-r1.ebuild
new file mode 100644
index 000000000000..0c346b9cd3a5
--- /dev/null
+++ b/app-crypt/mhash/mhash-0.9.9-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/mhash/mhash-0.9.9-r1.ebuild,v 1.1 2007/07/25 21:05:26 gustavoz Exp $
+
+inherit eutils
+
+DESCRIPTION="library providing a uniform interface to a large number of hash algorithms"
+HOMEPAGE="http://mhash.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mhash/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc ~sparc-fbsd ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack() {
+ # Fix for issues in bug #181563
+ unpack ${A} && cd "${S}"
+ epatch "${FILESDIR}/${P}-mutils-align.patch"
+}
+
+src_compile() {
+ econf \
+ --enable-static \
+ --enable-shared || die
+ emake || die "make failure"
+ cd doc && emake mhash.html || die "failed to build html"
+}
+
+src_install() {
+ dodir /usr/{bin,include,lib}
+ make install DESTDIR="${D}" || die "install failure"
+
+ dodoc AUTHORS INSTALL NEWS README TODO THANKS ChangeLog
+ dodoc doc/*.txt doc/skid* doc/*.c
+ dohtml doc/mhash.html || die "dohtml failed"
+}