diff options
author | Jens Pranaitis (jensp) <jens@chaox.net> | 2010-05-10 19:44:48 +0000 |
---|---|---|
committer | Jens Pranaitis (jensp) <jens@chaox.net> | 2010-05-10 19:44:48 +0000 |
commit | 4bfaf978c4645358dd17aeeba39f8a581ace6718 (patch) | |
tree | ab5f445dcb1811825a424eabf3486073c4f6d119 /app-crypt | |
parent | Automatic update to use.local.desc (diff) | |
download | sunrise-4bfaf978c4645358dd17aeeba39f8a581ace6718.tar.gz sunrise-4bfaf978c4645358dd17aeeba39f8a581ace6718.tar.bz2 sunrise-4bfaf978c4645358dd17aeeba39f8a581ace6718.zip |
app-crypt/miracl: New ebuild for bug 193175, thanks Tommy[D], sedzimir and xmw
svn path=/sunrise/; revision=10541
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/miracl/ChangeLog | 9 | ||||
-rw-r--r-- | app-crypt/miracl/Manifest | 6 | ||||
-rw-r--r-- | app-crypt/miracl/files/miracl-fix-buildsystem.patch | 112 | ||||
-rw-r--r-- | app-crypt/miracl/files/miracl-noexecstack.patch | 326 | ||||
-rw-r--r-- | app-crypt/miracl/metadata.xml | 6 | ||||
-rw-r--r-- | app-crypt/miracl/miracl-5.4.1.ebuild | 35 |
6 files changed, 494 insertions, 0 deletions
diff --git a/app-crypt/miracl/ChangeLog b/app-crypt/miracl/ChangeLog new file mode 100644 index 000000000..d1bc42955 --- /dev/null +++ b/app-crypt/miracl/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for app-crypt/miracl +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 10 May 2010; Jens Pranaitis (jensp) <jens@chaox.net> +miracl-5.4.1.ebuild, + +files/miracl-fix-buildsystem.patch, +files/miracl-noexecstack.patch, + +metadata.xml: + New ebuild for bug 193175, thanks Tommy[D], sedzimir and xmw + diff --git a/app-crypt/miracl/Manifest b/app-crypt/miracl/Manifest new file mode 100644 index 000000000..b1ec69e9a --- /dev/null +++ b/app-crypt/miracl/Manifest @@ -0,0 +1,6 @@ +AUX miracl-fix-buildsystem.patch 4343 RMD160 5d05a557773bd72fb3a020bb9560e2b4b06dcae3 SHA1 52e1c682e01da8fdda7a5570cff990234ae12a6a SHA256 79b88436bd3573603eece993c77873b342eacf6fa005c36d0d2eaeabc8334860 +AUX miracl-noexecstack.patch 6544 RMD160 b626fdcc71a2a8fcb2121740415d0755288c7dc7 SHA1 eb4074f98ca85dfcfa27f06c496d3a71186005f5 SHA256 3dadaa7730d77b229074d608c2f1e356f26d6b71769c9abbba3062764a99feb8 +DIST miracl-5.4.1.tar.bz2 1333376 RMD160 dc480fd8a878bde5dbef0419a78a0648170d94c4 SHA1 174078320814ac7e10e8a0638402dc6d56f5f765 SHA256 6fb91171459b5f6873bdf25bb7b146459522b75006736a802e8d3ef189625cb7 +EBUILD miracl-5.4.1.ebuild 826 RMD160 c3ddc0dc907d749b8dde879d156060a4fadee468 SHA1 530cfa1fb52d16b4758b21e5d6348baec30e4e99 SHA256 d94490e6a0871a8a72afd505b703bf3a3804c7f28cfa4505c7a469c1aace5e38 +MISC ChangeLog 347 RMD160 3433aa12606a6f867e3aea8c45b44910e91869b5 SHA1 e32f51043c9e057e3dbebef6bf597d3e8b0d8c44 SHA256 ad90eab1c237880b52c9bcfde468e5a06bf1ae99ff62bcb44630e9bebf0fb72f +MISC metadata.xml 229 RMD160 f0f6417bec31ce8baba6d476664f7210c8c84c98 SHA1 e5f94f5caadc6f843fc90bb7959570cd503676fd SHA256 3b08fca3c878bdfc4e7639f477dd542d55a4ab5dce39a475e82633071d13eb3f diff --git a/app-crypt/miracl/files/miracl-fix-buildsystem.patch b/app-crypt/miracl/files/miracl-fix-buildsystem.patch new file mode 100644 index 000000000..983338155 --- /dev/null +++ b/app-crypt/miracl/files/miracl-fix-buildsystem.patch @@ -0,0 +1,112 @@ +--- a/linux 2010-05-10 19:39:17.017142574 +0200 ++++ b/linux 2010-05-10 19:47:36.568169457 +0200 +@@ -1,77 +1,37 @@ ++#!/bin/bash + rm *.exe + rm *.lib + rm miracl.a + cp mirdef.lnx mirdef.h +-gcc -c -m32 -O2 mrcore.c +-gcc -c -m32 -O2 mrarth0.c +-gcc -c -m32 -O2 mrarth1.c +-gcc -c -m32 -O2 mrarth2.c +-gcc -c -m32 -O2 mralloc.c +-gcc -c -m32 -O2 mrsmall.c +-gcc -c -m32 -O2 mrio1.c +-gcc -c -m32 -O2 mrio2.c +-gcc -c -m32 -O2 mrgcd.c +-gcc -c -m32 -O2 mrjack.c +-gcc -c -m32 -O2 mrxgcd.c +-gcc -c -m32 -O2 mrarth3.c +-gcc -c -m32 -O2 mrbits.c +-gcc -c -m32 -O2 mrrand.c +-gcc -c -m32 -O2 mrprime.c +-gcc -c -m32 -O2 mrcrt.c +-gcc -c -m32 -O2 mrscrt.c +-gcc -c -m32 -O2 mrmonty.c +-gcc -c -m32 -O2 mrpower.c +-gcc -c -m32 -O2 mrsroot.c +-gcc -c -m32 -O2 mrcurve.c +-gcc -c -m32 -O2 mrfast.c +-gcc -c -m32 -O2 mrshs.c +-gcc -c -m32 -O2 mrshs256.c +-gcc -c -m32 -O2 mrshs512.c +-gcc -c -m32 -O2 mraes.c +-gcc -c -m32 -O2 mrlucas.c +-gcc -c -m32 -O2 mrzzn2.c +-gcc -c -m32 -O2 mrzzn2b.c +-gcc -c -m32 -O2 mrzzn3.c +-gcc -c -m32 -O2 mrecn2.c +-gcc -c -m32 -O2 mrstrong.c +-gcc -c -m32 -O2 mrbrick.c +-gcc -c -m32 -O2 mrebrick.c +-gcc -c -m32 -O2 mrec2m.c +-gcc -c -m32 -O2 mrgf2m.c +-gcc -c -m32 -O2 mrflash.c +-gcc -c -m32 -O2 mrfrnd.c +-gcc -c -m32 -O2 mrdouble.c +-gcc -c -m32 -O2 mrround.c +-gcc -c -m32 -O2 mrbuild.c +-gcc -c -m32 -O2 mrflsh1.c +-gcc -c -m32 -O2 mrpi.c +-gcc -c -m32 -O2 mrflsh2.c +-gcc -c -m32 -O2 mrflsh3.c +-gcc -c -m32 -O2 mrflsh4.c +-as mrmuldv.s -o mrmuldv.o +-ar rc miracl.a mrcore.o mrarth0.o mrarth1.o mrarth2.o mralloc.o mrsmall.o mrzzn2.o mrzzn3.o +-ar r miracl.a mrio1.o mrio2.o mrjack.o mrgcd.o mrxgcd.o mrarth3.o mrbits.o mrecn2.o +-ar r miracl.a mrrand.o mrprime.o mrcrt.o mrscrt.o mrmonty.o mrcurve.o mrsroot.o mrzzn2b.o +-ar r miracl.a mrpower.o mrfast.o mrshs.o mrshs256.o mraes.o mrlucas.o mrstrong.o +-ar r miracl.a mrflash.o mrfrnd.o mrdouble.o mrround.o mrbuild.o +-ar r miracl.a mrflsh1.o mrpi.o mrflsh2.o mrflsh3.o mrflsh4.o +-ar r miracl.a mrbrick.o mrebrick.o mrec2m.o mrgf2m.o mrmuldv.o mrshs512.o ++MRFILES="mrcore mrarth0 mrarth1 mrarth2 mralloc mrsmall mrio1 mrio2 mrgcd mrjack mrxgcd mrarth3 mrbits mrrand mrprime mrcrt mrscrt mrmonty mrpower mrsroot mrcurve mrfast mrshs mrshs256 mrshs512 mraes mrlucas mrzzn2 mrzzn2b mrzzn3 mrecn2 mrstrong mrbrick mrebrick mrec2m mrgf2m mrflash mrfrnd mrdouble mrround mrbuild mrflsh1 mrpi mrflsh2 mrflsh3 mrflsh4" ++for mrfile in $MRFILES ++do ++ $CC -c $CFLAGS -fPIC ${mrfile}.c ++done ++_asm="" ++if file *.o|grep -q x86-64 ++then ++ _asm="64" ++fi ++$AS mrmuldv.S${_asm} -o mrmuldv.o ++$AR rc libmiracl.a $(for mrfile in $MRFILES;do echo ${mrfile}.o||tr '\n' ' ';done) mrmuldv.o ++$CC -shared -Wl,-soname,libmiracl.so.0 $LDFLAGS -o libmiracl.so.0.0.0 $(for mrfile in $MRFILES;do echo ${mrfile}.o||tr '\n' ' ';done) mrmuldv.o + rm mr*.o +-gcc -m32 -O2 bmark.c miracl.a -o bmark +-gcc -m32 -O2 fact.c miracl.a -o fact +-g++ -c -m32 -O2 big.cpp +-g++ -c -m32 -O2 crt.cpp +-g++ -c -m32 -O2 zzn.cpp +-g++ -c -m32 -O2 ecn.cpp +-g++ -c -m32 -O2 ec2.cpp +-g++ -m32 -O2 mersenne.cpp big.o miracl.a -o mersenne +-g++ -m32 -O2 brent.cpp big.o zzn.o miracl.a -o brent +-g++ -c -m32 -O2 flash.cpp +-g++ -m32 -O2 sample.cpp flash.o miracl.a -o sample +-g++ -m32 -O2 ecsgen.cpp ecn.o big.o miracl.a -o ecsgen +-g++ -m32 -O2 ecsign.cpp ecn.o big.o miracl.a -o ecsign +-g++ -m32 -O2 ecsver.cpp ecn.o big.o miracl.a -o ecsver +-g++ -m32 -O2 pk-demo.cpp ecn.o crt.o big.o miracl.a -o pk-demo +-g++ -c -m32 -O2 polymod.cpp +-g++ -c -m32 -O2 poly.cpp +-g++ -m32 -O2 schoof.cpp polymod.o poly.o ecn.o crt.o zzn.o big.o miracl.a -o schoof ++$CC $CFLAGS bmark.c libmiracl.a -o bmark ++$CC $CFLAGS fact.c libmiracl.a -o fact ++$CXX -c $CXXFLAGS big.cpp ++$CXX -c $CXXFLAGS crt.cpp ++$CXX -c $CXXFLAGS zzn.cpp ++$CXX -c $CXXFLAGS ecn.cpp ++$CXX -c $CXXFLAGS ec2.cpp ++$CXX $CXXFLAGS mersenne.cpp big.o libmiracl.a -o mersenne ++$CXX $CXXFLAGS brent.cpp big.o zzn.o libmiracl.a -o brent ++$CXX -c $CXXFLAGS flash.cpp ++$CXX $CXXFLAGS sample.cpp flash.o libmiracl.a -o sample ++$CXX $CXXFLAGS ecsgen.cpp ecn.o big.o libmiracl.a -o ecsgen ++$CXX $CXXFLAGS ecsign.cpp ecn.o big.o libmiracl.a -o ecsign ++$CXX $CXXFLAGS ecsver.cpp ecn.o big.o libmiracl.a -o ecsver ++$CXX $CXXFLAGS pk-demo.cpp ecn.o crt.o big.o libmiracl.a -o pk-demo ++$CXX -c $CXXFLAGS polymod.cpp ++$CXX -c $CXXFLAGS poly.cpp ++$CXX $CXXFLAGS schoof.cpp polymod.o poly.o ecn.o crt.o zzn.o big.o libmiracl.a -o schoof diff --git a/app-crypt/miracl/files/miracl-noexecstack.patch b/app-crypt/miracl/files/miracl-noexecstack.patch new file mode 100644 index 000000000..bd26b2011 --- /dev/null +++ b/app-crypt/miracl/files/miracl-noexecstack.patch @@ -0,0 +1,326 @@ +diff -Nru a/mrmuldv.s b/mrmuldv.s +--- a/mrmuldv.s 2010-05-07 19:22:22.192852677 +0200 ++++ b/mrmuldv.s 1970-01-01 01:00:00.000000000 +0100 +@@ -1,82 +0,0 @@ +- +- .file "mrmuldv.s" +- .text +- .globl muldiv +-muldiv: +- pushl %ebp +- movl %esp,%ebp +- pushl %ebx +- +- +- movl 8(%ebp),%eax +- mull 12(%ebp) +- addl 16(%ebp),%eax +- adcl $0,%edx +- +- divl 20(%ebp) +- movl 24(%ebp),%ebx +- movl %edx,(%ebx) +- +- popl %ebx +- popl %ebp +- ret +- +- .globl muldvm +-muldvm: +- pushl %ebp +- movl %esp,%ebp +- pushl %ebx +- +- movl 8(%ebp),%edx +- movl 12(%ebp),%eax +- divl 16(%ebp) +- +- movl 20(%ebp),%ebx +- movl %edx,(%ebx) +- +- popl %ebx +- popl %ebp +- ret +- +- .globl muldvd +-muldvd: +- pushl %ebp +- movl %esp,%ebp +- pushl %ebx +- +- movl 8(%ebp),%eax +- mull 12(%ebp) +- addl 16(%ebp),%eax +- adcl $0,%edx +- movl 20(%ebp),%ebx +- movl %eax,(%ebx) +- movl %edx,%eax +- +- popl %ebx +- popl %ebp +- ret +- +- .globl muldvd2 +-muldvd2: +- pushl %ebp +- movl %esp,%ebp +- pushl %ebx +- pushl %esi +- +- movl 8(%ebp),%eax +- mull 12(%ebp) +- movl 16(%ebp),%ebx +- addl (%ebx),%eax +- adcl $0,%edx +- movl 20(%ebp),%esi +- addl (%esi),%eax +- adcl $0,%edx +- +- movl %eax,(%esi) +- movl %edx,(%ebx) +- +- popl %esi +- popl %ebx +- popl %ebp +- ret +- +diff -Nru a/mrmuldv.S b/mrmuldv.S +--- a/mrmuldv.S 1970-01-01 01:00:00.000000000 +0100 ++++ b/mrmuldv.S 2010-05-07 19:25:10.278612394 +0200 +@@ -0,0 +1,85 @@ ++ ++ .file "mrmuldv.S" ++ .text ++ .globl muldiv ++muldiv: ++ pushl %ebp ++ movl %esp,%ebp ++ pushl %ebx ++ ++ ++ movl 8(%ebp),%eax ++ mull 12(%ebp) ++ addl 16(%ebp),%eax ++ adcl $0,%edx ++ ++ divl 20(%ebp) ++ movl 24(%ebp),%ebx ++ movl %edx,(%ebx) ++ ++ popl %ebx ++ popl %ebp ++ ret ++ ++ .globl muldvm ++muldvm: ++ pushl %ebp ++ movl %esp,%ebp ++ pushl %ebx ++ ++ movl 8(%ebp),%edx ++ movl 12(%ebp),%eax ++ divl 16(%ebp) ++ ++ movl 20(%ebp),%ebx ++ movl %edx,(%ebx) ++ ++ popl %ebx ++ popl %ebp ++ ret ++ ++ .globl muldvd ++muldvd: ++ pushl %ebp ++ movl %esp,%ebp ++ pushl %ebx ++ ++ movl 8(%ebp),%eax ++ mull 12(%ebp) ++ addl 16(%ebp),%eax ++ adcl $0,%edx ++ movl 20(%ebp),%ebx ++ movl %eax,(%ebx) ++ movl %edx,%eax ++ ++ popl %ebx ++ popl %ebp ++ ret ++ ++ .globl muldvd2 ++muldvd2: ++ pushl %ebp ++ movl %esp,%ebp ++ pushl %ebx ++ pushl %esi ++ ++ movl 8(%ebp),%eax ++ mull 12(%ebp) ++ movl 16(%ebp),%ebx ++ addl (%ebx),%eax ++ adcl $0,%edx ++ movl 20(%ebp),%esi ++ addl (%esi),%eax ++ adcl $0,%edx ++ ++ movl %eax,(%esi) ++ movl %edx,(%ebx) ++ ++ popl %esi ++ popl %ebx ++ popl %ebp ++ ret ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif +diff -Nru a/mrmuldv.s64 b/mrmuldv.s64 +--- a/mrmuldv.s64 2008-12-10 14:29:12.000000000 +0100 ++++ b/mrmuldv.s64 1970-01-01 01:00:00.000000000 +0100 +@@ -1,70 +0,0 @@ +- +- .file "mrmuldv.s" +-.text +-.globl muldiv +-muldiv: +- +- pushq %rbx +- movq %rdi,%rax +- movq %rdx,%rbx +- mulq %rsi +- addq %rbx,%rax +- adcq $0,%rdx +- +- divq %rcx +- movq %r8,%rbx +- movq %rdx,(%rbx) +- popq %rbx +- +- ret +- +- .global muldvm +-muldvm: +- +- pushq %rbx +- movq %rdx,%rbx +- movq %rdi,%rdx +- movq %rsi,%rax +- divq %rbx +- +- movq %rcx,%rbx +- movq %rdx,(%rbx) +- popq %rbx +- +- ret +- +- .globl muldvd +-muldvd: +- +- pushq %rbx +- movq %rdi,%rax +- movq %rdx,%rbx +- mulq %rsi +- addq %rbx,%rax +- adcq $0,%rdx +- +- movq %rcx,%rbx +- movq %rax,(%rbx) +- movq %rdx,%rax +- popq %rbx +- +- ret +- +- .global muldvd2 +-muldvd2: +- +- pushq %rbx +- movq %rdi,%rax +- movq %rdx,%rbx +- mulq %rsi +- addq (%rbx),%rax +- adcq $0,%rdx +- addq (%rcx),%rax +- adcq $0,%rdx +- +- movq %rax,(%rcx) +- movq %rdx,(%rbx) +- popq %rbx +- +- ret +- +diff -Nru a/mrmuldv.S64 b/mrmuldv.S64 +--- a/mrmuldv.S64 1970-01-01 01:00:00.000000000 +0100 ++++ b/mrmuldv.S64 2010-05-07 19:25:23.356604942 +0200 +@@ -0,0 +1,73 @@ ++ ++ .file "mrmuldv.S" ++.text ++.globl muldiv ++muldiv: ++ ++ pushq %rbx ++ movq %rdi,%rax ++ movq %rdx,%rbx ++ mulq %rsi ++ addq %rbx,%rax ++ adcq $0,%rdx ++ ++ divq %rcx ++ movq %r8,%rbx ++ movq %rdx,(%rbx) ++ popq %rbx ++ ++ ret ++ ++ .global muldvm ++muldvm: ++ ++ pushq %rbx ++ movq %rdx,%rbx ++ movq %rdi,%rdx ++ movq %rsi,%rax ++ divq %rbx ++ ++ movq %rcx,%rbx ++ movq %rdx,(%rbx) ++ popq %rbx ++ ++ ret ++ ++ .globl muldvd ++muldvd: ++ ++ pushq %rbx ++ movq %rdi,%rax ++ movq %rdx,%rbx ++ mulq %rsi ++ addq %rbx,%rax ++ adcq $0,%rdx ++ ++ movq %rcx,%rbx ++ movq %rax,(%rbx) ++ movq %rdx,%rax ++ popq %rbx ++ ++ ret ++ ++ .global muldvd2 ++muldvd2: ++ ++ pushq %rbx ++ movq %rdi,%rax ++ movq %rdx,%rbx ++ mulq %rsi ++ addq (%rbx),%rax ++ adcq $0,%rdx ++ addq (%rcx),%rax ++ adcq $0,%rdx ++ ++ movq %rax,(%rcx) ++ movq %rdx,(%rbx) ++ popq %rbx ++ ++ ret ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif diff --git a/app-crypt/miracl/metadata.xml b/app-crypt/miracl/metadata.xml new file mode 100644 index 000000000..e6233b5dc --- /dev/null +++ b/app-crypt/miracl/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer><email>maintainer-wanted@gentoo.org</email></maintainer> +</pkgmetadata> diff --git a/app-crypt/miracl/miracl-5.4.1.ebuild b/app-crypt/miracl/miracl-5.4.1.ebuild new file mode 100644 index 000000000..fdac8202c --- /dev/null +++ b/app-crypt/miracl/miracl-5.4.1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Big number cryptography library" +HOMEPAGE="http://www.shamus.ie" +SRC_URI="http://chaox.net/~jens/${P}.tar.bz2" + +LICENSE="free-noncomm" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-fix-buildsystem.patch + epatch "${FILESDIR}"/${PN}-noexecstack.patch +} + +src_compile() { + chmod +x ./linux || die + CC="$(tc-getCC)" CXX="$(tc-getCXX)" AS="$(tc-getAS)" AR="$(tc-getAR)" ./linux || die +} + +src_install() { + dolib.a lib${PN}.a || die + dolib.so lib${PN}.so.0.0.0 || die + dosym lib${PN}.so.0.0.0 /usr/$(get_libdir)/lib${PN}.so || die + insinto /usr/include/${PN} + doins ${PN}.h mirdef.h || die + dodoc *.txt || die +} |