summaryrefslogtreecommitdiff
path: root/dev-libs/nettle
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/nettle
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/nettle')
-rw-r--r--dev-libs/nettle/Manifest6
-rw-r--r--dev-libs/nettle/files/nettle-3.3-ecc-add-eh.patch32
-rw-r--r--dev-libs/nettle/metadata.xml8
-rw-r--r--dev-libs/nettle/nettle-3.3-r2.ebuild70
4 files changed, 116 insertions, 0 deletions
diff --git a/dev-libs/nettle/Manifest b/dev-libs/nettle/Manifest
new file mode 100644
index 000000000000..b882f05ff00f
--- /dev/null
+++ b/dev-libs/nettle/Manifest
@@ -0,0 +1,6 @@
+AUX nettle-3.3-ecc-add-eh.patch 977 SHA256 9fc1549038f1cb19d3fd8e06a1d6a9abea145cc8c06503e20924ab2b2874040a SHA512 8a5e991fa87c8e12ff812d570bc3ff6e397cc95cd2011a0dadda15371efc7215a8df067a427e62f707e1bb19078595230fe45f1ec85a2f8c8e09bf95ddc82dc8 WHIRLPOOL cd927c8edd9b16ad62533ca33d8dd8f2544abce093658e57d83af58093c0b1a67d43a63dd65487bf1088d614f246e39af2ae680a79a4fad31c2d762906ffed9f
+DIST nettle-3.3.tar.gz 1887927 SHA256 46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e SHA512 271981d89766f151af3cdc4e5fc43c438222f0f6f44475bad114f4209955b5235fced6526c7abca001cca223e8cfcd2a6bf389b160b305a499e7acf52425ec70 WHIRLPOOL 716df66adaa96019101916a351f1f87f82f0df12269aa0c8a1f3e762f9150ddf09752a817e3479a523f0e76a4d0fe074a3ca403d7df568b63c028d61ec395e80
+EBUILD nettle-3.3-r2.ebuild 1908 SHA256 ae29c7e4f4f8d789f7721cd473efb2587be5a1c4143171a2651b567fbd6c9ce5 SHA512 f220191ea33f04f8bc100d06f9c324dd6c051d17a6bfd8dabe25a3ed929441976f7911a3800f7eb3df33a8dcc4a3ee9446f5316a8c4c02e733f38171993dc5de WHIRLPOOL 3abe886a2edc69ecd2ef30c3e7c8af5b278017439da42f138a4be2c13bea36b1ddacb3ab0eec3bc78394a2cfe290f53f19b05d55ef6bedfcc9bf61f0f3c2678d
+MISC ChangeLog 8363 SHA256 4a5462e8cbe87b7c2fc19600f91da0997c60f72df599e194f80539ccf6679f59 SHA512 f1a499460dccddac883f115b2a76c99e34cd868b29a9fe7f8a24c6661fffbe95e31ffed6da9d616ea351dbe076b0c2f1d1367e6d8f22ab64c5f324cbe1276037 WHIRLPOOL 14f18bdd234c152b9b6e0149e57509bb65b8516920ab5ac16a67e7f342dabd0629bdc16b5baae7783a220af90360ffbeac173982ae9729c9ec44ae5f658299b7
+MISC ChangeLog-2015 17411 SHA256 98a5c73c4fe4b134e2df6a9d6bdecabbb805a5d476970a09f9e92ccda1ef931d SHA512 5e3292521158eac6b187e872f871766ee879c15175906292b3046b782eac946274cd4ea9535d7034537e543f5f2378cbf2a962977387f6f58e2548ddbb19483d WHIRLPOOL b2ab41fd625ddab61566368e4eaf4e8a152a3bf50a609cc9c58144b6d7649873a6652356ef6d58f8fe6303bf917a72f7a7d1c5b826bbcadddb19b47b9f3c6af1
+MISC metadata.xml 236 SHA256 dd25b46c95b0c63da84b7ff5778479e31449a385df066e9ee14bf0d7d176f42f SHA512 5f6cd6a85527534d5de7118de5af212ee3044c8c5530a7f7087a28074a2d4ab7be1728325bd985adc063dc795d3cf2b1c4e58a4c4c4ec02d739bd4bbc544ef08 WHIRLPOOL b15a2dfb001c41c8de2895842148b2531b74949e89e93ff8c366519c35792996e344918eaf9144fb081fc240796e47890be356d2339bea60b1e1d41830447d31
diff --git a/dev-libs/nettle/files/nettle-3.3-ecc-add-eh.patch b/dev-libs/nettle/files/nettle-3.3-ecc-add-eh.patch
new file mode 100644
index 000000000000..5492997f336e
--- /dev/null
+++ b/dev-libs/nettle/files/nettle-3.3-ecc-add-eh.patch
@@ -0,0 +1,32 @@
+From dcda81d796de2f4a16fd7e9e7a5d07baa288f147 Mon Sep 17 00:00:00 2001
+From: Niels Möller <nisse@lysator.liu.se>
+Date: Tue, 18 Jul 2017 20:52:30 +0200
+Subject: [PATCH] Fix for in-place ecc_add_eh.
+
+* ecc-add-eh.c (ecc_add_eh): Fix in-place operation by reordering
+two multiplies. Previously, in-place operation resulted in an
+invalid call to mpn_mul with overlapping operands. Reported by
+Sergei Trofimovich.
+---
+ ChangeLog | 7 +++++++
+ ecc-add-eh.c | 4 ++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/ecc-add-eh.c b/ecc-add-eh.c
+index a16be4c..c07ff49 100644
+--- a/ecc-add-eh.c
++++ b/ecc-add-eh.c
+@@ -98,8 +98,8 @@ ecc_add_eh (const struct ecc_curve *ecc,
+ ecc_modp_mul (ecc, x3, B, z1);
+
+ /* y3 */
+- ecc_modp_mul (ecc, B, F, C); /* ! */
+- ecc_modp_mul (ecc, y3, B, z1);
++ ecc_modp_mul (ecc, B, F, z1); /* ! */
++ ecc_modp_mul (ecc, y3, B, C); /* Clobbers z1 in case r == p. */
+
+ /* z3 */
+ ecc_modp_mul (ecc, B, F, G);
+--
+libgit2 0.25.0
+
diff --git a/dev-libs/nettle/metadata.xml b/dev-libs/nettle/metadata.xml
new file mode 100644
index 000000000000..f1c3d59fb213
--- /dev/null
+++ b/dev-libs/nettle/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-libs/nettle/nettle-3.3-r2.ebuild b/dev-libs/nettle/nettle-3.3-r2.ebuild
new file mode 100644
index 000000000000..b190104a963c
--- /dev/null
+++ b/dev-libs/nettle/nettle-3.3-r2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-build multilib-minimal multilib toolchain-funcs
+
+DESCRIPTION="Low-level cryptographic library"
+HOMEPAGE="http://www.lysator.liu.se/~nisse/nettle/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="|| ( LGPL-3 LGPL-2.1 )"
+SLOT="0/6.1" # subslot = libnettle soname version, .1 as broke ABI bug#601512
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc +gmp neon static-libs test cpu_flags_x86_aes"
+
+DEPEND="gmp? ( >=dev-libs/gmp-5.0:0=[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r17
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/nettle/nettle-stdint.h
+ /usr/include/nettle/version.h
+)
+
+DOCS=()
+HTML_DOCS=()
+
+PATCHES=(
+ "${FILESDIR}/${P}-ecc-add-eh.patch"
+)
+
+pkg_setup() {
+ use doc && DOCS+=(
+ nettle.pdf
+ )
+ use doc && HTML_DOCS+=(
+ nettle.html
+ )
+}
+
+src_prepare() {
+ default
+
+ sed -e '/CFLAGS=/s: -ggdb3::' \
+ -e 's/solaris\*)/sunldsolaris*)/' \
+ -i configure.ac || die
+
+ # conditionally build tests and examples required by tests
+ use test || sed -i '/SUBDIRS/s/testsuite examples//' Makefile.in || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # --disable-openssl bug #427526
+ ECONF_SOURCE="${S}" econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-openssl \
+ --disable-fat \
+ $(use_enable gmp public-key) \
+ $(use_enable static-libs static) \
+ $(tc-is-static-only && echo --disable-shared) \
+ $(use_enable doc documentation) \
+ $(use_enable neon arm-neon) \
+ $(use_enable cpu_flags_x86_aes x86-aesni)
+}