From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-crypt/nistp224/Manifest | 8 +++ .../nistp224/files/nistp224-0.75-asmfix.patch | 39 +++++++++++ .../files/nistp224-0.75-declare-exit.patch | 18 +++++ .../nistp224/files/nistp224-0.75-honour-CC.patch | 79 ++++++++++++++++++++++ app-crypt/nistp224/metadata.xml | 11 +++ app-crypt/nistp224/nistp224-0.75-r1.ebuild | 56 +++++++++++++++ 6 files changed, 211 insertions(+) create mode 100644 app-crypt/nistp224/Manifest create mode 100644 app-crypt/nistp224/files/nistp224-0.75-asmfix.patch create mode 100644 app-crypt/nistp224/files/nistp224-0.75-declare-exit.patch create mode 100644 app-crypt/nistp224/files/nistp224-0.75-honour-CC.patch create mode 100644 app-crypt/nistp224/metadata.xml create mode 100644 app-crypt/nistp224/nistp224-0.75-r1.ebuild (limited to 'app-crypt/nistp224') diff --git a/app-crypt/nistp224/Manifest b/app-crypt/nistp224/Manifest new file mode 100644 index 000000000000..2e3243fb281c --- /dev/null +++ b/app-crypt/nistp224/Manifest @@ -0,0 +1,8 @@ +AUX nistp224-0.75-asmfix.patch 1360 SHA256 8fa379e289034ac2b0d33aa1b1c77da8a53f23348a311d3ec67c3e0e742b5504 SHA512 36f7cd43b1b2dbeaa166c9cd9c47e8b9043642ac22ad47c1766dbd8b69b5e56a4d5abe9eb1bcafe19b2a75641e010e003d569d2f8bc0538a7d859a8d1962ca3a WHIRLPOOL dc4e5aa1fcba303fbfb041c31a65b6cfa9e6cafcd720653154b4c82ac407216746c4d0631699d7b9122d8707511cec5b7281f0123bf49fc1ab9ab2e2f87c49fa +AUX nistp224-0.75-declare-exit.patch 658 SHA256 dc69eaf6f8c3d5d145910dbc96785ded8d65838ab002582df563f1541e71add7 SHA512 9dacc2b7335002b2b755da4f693ac5d2660d29847773640f126fd1d33cf83af2abb18163351392ab87cbee8ddba119f706c0b3d7763b0fef1c20b379c9610117 WHIRLPOOL 667fbec61020ef2ae9fc40e81c29d6385ba0f26813815491929de3fbea3e4b715ac16aadb35bb8846c028dcdb94e910fd604ef96797ea6b1be6e9ec49face3eb +AUX nistp224-0.75-honour-CC.patch 1909 SHA256 d39678ef56d6268ed91c4b1104dd90473eeaf13d1c39a35742a27a09b92ec1de SHA512 3e37154c522432ef68bf5531bc31a4c7bc772f23af34d3b8cb60dfc7fcddbb1cc9770b5d15f9c06bd46b952edb96036f8e8b0222d33f51afde43c0bdcbd2bbde WHIRLPOOL 5fae8a0712fa0341a284811fa876dfeeb3cacfb417e1c0ff713dbd012e5df9740cc85a66f670752581f0f745d29999cb7e7336b751e4724d2d02e7a51e95ba14 +DIST nistp224-0.75.tar.gz 204747 SHA256 4e033b1bd0bb906229ed8c42cf87aa03cdc54ad40593ca262c7178fe3425351d SHA512 1f15000e2d62b4a550599632949728b8c81cae61a91c28685c808263d363ef6985fda343ba982ea6ce48314bc4c245b3f099c5e05d2ebac81a0410f4960ffb88 WHIRLPOOL 6ff0b608d33e9c46c017e66346b1bc67ec011a316ee7620a497a8962b2466d3799d0fdcfbf255713395f692ce45497a6e208206154e224792a743df977953c3b +EBUILD nistp224-0.75-r1.ebuild 1220 SHA256 02d97e39cef6edb6c8817f6ed9b51591ef8dc76476b1eb8f27c3880a9c265dee SHA512 eeeefa2b7d3ddc29ef1d08de94f86d2246c50cb25a0a5b5fc95a02e8cbe0f1a65c43e9288e7b468c5e06b0a7e2144b83af7b2ed16cee443d8552de09aeed7754 WHIRLPOOL 9e4cab97a357834a78bb4c5a8ee70ed26bc45d9e86e5fd2d461c0b1e43201b5c439ceec3ad2168ae76f08e1eb00dac086462bfedf750a8afcc74792e80d95047 +MISC ChangeLog 2648 SHA256 114c6ea4a36cf41fd465a21551b4b376fe2eca4758c42714039e596ef3c868c7 SHA512 7662d2cbe33990ed02f1d07fe84604deb0b29e4e9131c7c93ba5ac2b975e99c4e39a7a13cd412d07b718c6c6c6a53abc7e76848d379be9d1ee6ee44716ad2dac WHIRLPOOL a22ecb605de249f1ea33030ea67e775b9a75e56e15feafc26c1823e36fec96df109c27f9c3330e56112162aa04a246c44a162cd33c3ad7526670314ce3610dd6 +MISC ChangeLog-2015 1496 SHA256 3fea91707e8e433d59224a9449f37926d8702bcd6aa8b93e9a0dcb98787afca3 SHA512 ddb88ad0c157be6335aa1f6066325eef61cbd8d3f9ac4e3a8e301bf66cc1dbd7b9647d57fc239d547c8a59fc4a526acd304a0f396a4c307e3e3772a16cb1a6fb WHIRLPOOL c9f0c5e3e57a099ac10213ec81ce73747603742e9a32b6f843cb22d1439e63b82e9ca270d4c39a73ad31e8daf8aef90def87e48e6702aa8811d71da62a47d25e +MISC metadata.xml 528 SHA256 1ff8c867addfd5c797dd64ef6337640c576b2a4dfc51b35525cb7647abe5c6cc SHA512 b14e8bc33cc4cf4806dfd37b39d4c80166b9fc533b780b87f17a64d191a38be12404a0c722c72a8c211864d065d6fbf7547fe02bb28467311c08fe90f8c594f0 WHIRLPOOL 278b94b54941b3058d6574a4ce593deab8bba7dea64dcd6b87ad44d349a6bb2e4686605934db8c2be2948a12a12b8a906e0f8c405c8cc2c0f06c997a53397d07 diff --git a/app-crypt/nistp224/files/nistp224-0.75-asmfix.patch b/app-crypt/nistp224/files/nistp224-0.75-asmfix.patch new file mode 100644 index 000000000000..fd6bfa17109a --- /dev/null +++ b/app-crypt/nistp224/files/nistp224-0.75-asmfix.patch @@ -0,0 +1,39 @@ +diff -ru math.orig/nistp224-0.75/src/opt-idea64.c math/nistp224-0.75/src/opt-idea64.c +--- math.orig/nistp224-0.75/src/opt-idea64.c 2001-10-19 06:39:19.000000000 +1000 ++++ math/nistp224-0.75/src/opt-idea64.c 2007-01-30 11:30:08.000000000 +1100 +@@ -2,7 +2,8 @@ + + static void fpmode(void) + { +- asm volatile("fldcw %0"::"m"(0x137f)); ++ static short int x=0x137f; ++ asm volatile("fldcw %0"::"m"(*&x)); + } + + #define T0 1.0 +diff -ru math.orig/nistp224-0.75/src/opt-pentium.c math/nistp224-0.75/src/opt-pentium.c +--- math.orig/nistp224-0.75/src/opt-pentium.c 2001-10-19 06:39:19.000000000 +1000 ++++ math/nistp224-0.75/src/opt-pentium.c 2007-01-30 11:30:44.000000000 +1100 +@@ -129,7 +129,8 @@ + + static inline void fpmode(void) + { +- asm volatile("fldcw %0"::"m"(0x137f)); ++ static short int x=0x137f; ++ asm volatile("fldcw %0"::"m"(*&x)); + } + + static void p_sqrt(double out[8],const double in[8]) +diff -ru math.orig/nistp224-0.75/src/opt-ppro.c math/nistp224-0.75/src/opt-ppro.c +--- math.orig/nistp224-0.75/src/opt-ppro.c 2001-10-19 06:39:19.000000000 +1000 ++++ math/nistp224-0.75/src/opt-ppro.c 2007-01-30 11:30:27.000000000 +1100 +@@ -120,7 +120,8 @@ + + static inline void fpmode(void) + { +- asm volatile("fldcw %0"::"m"(0x137f)); ++ static short int x=0x137f; ++ asm volatile("fldcw %0"::"m"(*&x)); + } + + static void p_sqrt(double out[8],const double in[8]) diff --git a/app-crypt/nistp224/files/nistp224-0.75-declare-exit.patch b/app-crypt/nistp224/files/nistp224-0.75-declare-exit.patch new file mode 100644 index 000000000000..a1ecb432a022 --- /dev/null +++ b/app-crypt/nistp224/files/nistp224-0.75-declare-exit.patch @@ -0,0 +1,18 @@ +diff -Naur nistp224-0.75.orig/src/main.c nistp224-0.75/src/main.c +--- math.orig/nistp224-0.75/src/main.c 2008-01-26 21:56:34.000000000 +0100 ++++ math/nistp224-0.75/src/main.c 2008-01-26 22:05:17.000000000 +0100 +@@ -1,4 +1,5 @@ + #include ++#include + #include "nistp224.h" + + unsigned char e[28]; +diff -Naur nistp224-0.75.orig/src/nistp224-56.c nistp224-0.75/src/nistp224-56.c +--- math.orig/nistp224-0.75/src/nistp224-56.c 2008-01-26 21:56:34.000000000 +0100 ++++ math/nistp224-0.75/src/nistp224-56.c 2008-01-26 21:57:10.000000000 +0100 +@@ -1,4 +1,5 @@ + #include ++#include + #include "nistp224.h" + + unsigned char e[28]; diff --git a/app-crypt/nistp224/files/nistp224-0.75-honour-CC.patch b/app-crypt/nistp224/files/nistp224-0.75-honour-CC.patch new file mode 100644 index 000000000000..1f5a938c2cc3 --- /dev/null +++ b/app-crypt/nistp224/files/nistp224-0.75-honour-CC.patch @@ -0,0 +1,79 @@ +--- Makefile.orig 2008-11-04 22:36:26.000000000 +0100 ++++ Makefile 2008-11-04 22:40:08.000000000 +0100 +@@ -1,3 +1,5 @@ ++CC=`head -n 1 conf-cc` ++ + default: it + + clean: +@@ -108,7 +110,7 @@ + hasrpcc.h load rts rts.exp speed systype + rm -f sysdeps + echo nistp224 0.75 >> sysdeps +- gcc --version >> sysdeps ++ ${CC} --version >> sysdeps + cat systype compile load >> sysdeps + grep sysdep hasgethr.h >> sysdeps + grep sysdep hasrdtsc.h >> sysdeps +--- find-systype.sh.orig 2008-11-04 22:35:18.000000000 +0100 ++++ find-systype.sh 2008-11-04 22:36:51.000000000 +0100 +@@ -79,8 +79,8 @@ + ;; + esac + else +- gcc -c trycpp.c +- gcc -o trycpp trycpp.o ++ ${CC} -c trycpp.c ++ ${CC} -o trycpp trycpp.o + case `./trycpp` in + nextstep) + oper="nextstep-`hostinfo | sed -n 's/^[ ]*NeXT Mach \([^:]*\):.*$/\1/p'`" +--- print-cc.sh.orig 2008-11-04 22:34:51.000000000 +0100 ++++ print-cc.sh 2008-11-04 22:35:04.000000000 +0100 +@@ -1,46 +1,5 @@ + cc="`head -n 1 conf-cc`" + systype="`cat systype`" + +- +-gcc -c trycpp.c -malign-double >/dev/null 2>&1 \ +-&& gccad="-malign-double" +- +-gcc -c trycpp.c -mcpu=ultrasparc >/dev/null 2>&1 \ +-&& gccus="-mcpu=ultrasparc" +- +-gcc -c trycpp.c -mcpu=powerpc >/dev/null 2>&1 \ +-&& gccpp="-mcpu=powerpc" +- +-gcc -c trycpp.c -mcpu=21164 >/dev/null 2>&1 \ +-&& gcc21="-mcpu=21164" +- +-rm -f trycpp.o +- +- +-gccbase="gcc -fomit-frame-pointer -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings" +- +- +-case "$cc:$systype" in +- auto:*:i386-*:*) +- cc="$gccbase -O1 $gccad" +- ;; +- auto:*:sparc-*:*:*:*) +- cc="$gccbase -O1 $gccus" +- ;; +- auto:*:ppc-*:*:*:*) +- cc="$gccbase -O2 $gccpp" +- ;; +- auto:*:alpha-*:*:*:*) +- cc="$gccbase -O2 $gcc21" +- ;; +- auto:aix-*:-:-:*:-) +- cc="$gccbase -O2 $gccpp" +- ;; +- auto:*) +- cc="$gccbase -O2" +- ;; +-esac +- +- + cat warn-auto.sh + echo exec "$cc" '-c ${1+"$@"}' diff --git a/app-crypt/nistp224/metadata.xml b/app-crypt/nistp224/metadata.xml new file mode 100644 index 000000000000..a97d5c6c924c --- /dev/null +++ b/app-crypt/nistp224/metadata.xml @@ -0,0 +1,11 @@ + + + + + +nistp224 performs compressed Diffie-Hellman key exchange on the NIST P-224 +elliptic curve at record-setting speeds. It includes an easy-to-use C library +and a command-line tool. nistp224 also supports uncompressed Diffie-Hellman key +exchange on the same curve, with 56-byte public keys, at slightly higher speeds. + + diff --git a/app-crypt/nistp224/nistp224-0.75-r1.ebuild b/app-crypt/nistp224/nistp224-0.75-r1.ebuild new file mode 100644 index 000000000000..d89daaef2d32 --- /dev/null +++ b/app-crypt/nistp224/nistp224-0.75-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="2" + +inherit eutils toolchain-funcs flag-o-matic fixheadtails + +DESCRIPTION="Performs compressed Diffie-Hellman key exchange on the NIST P-224 elliptic curve" +HOMEPAGE="http://cr.yp.to/nistp224.html" +SRC_URI="http://cr.yp.to/${PN}/${P}.tar.gz" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="~x86" +IUSE="" +RESTRICT="mirror bindist" + +DEPEND="" +RDEPEND=${DEPEND} +S="${WORKDIR}/math/${P}/src" + +src_prepare() { + epatch "${FILESDIR}"/${P}-asmfix.patch + epatch "${FILESDIR}"/${P}-declare-exit.patch + cd "${S}" + epatch "${FILESDIR}"/${P}-honour-CC.patch + ht_fix_file Makefile print*.sh +} + +src_configure() { + append-flags -fPIC + echo -n "$(tc-getCC) ${CFLAGS}" > conf-cc + echo -n "$(tc-getCC) ${LDFLAGS}" > conf-ld + if use ppc; then + # untested + echo -n "powerpc" > conf-opt + elif use sparc; then + # untested + echo -n "sparc" > conf-opt + else + # optiminations for ppro and pentium fail + echo -n "idea64" > conf-opt + fi +} + +src_compile() { + emake || die "emake failed" +} + +src_install() { + dobin nistp224 nistp224-56 + mv nistp224.a libnistp224.a + dolib.a libnistp224.a + insinto /usr/include + doins nistp224.h +} -- cgit v1.2.3