summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-04-11 01:58:09 +0000
committerAnthony G. Basile <blueness@gentoo.org>2012-04-11 01:58:09 +0000
commit66f23474baeaa28c35754783eaa164bdab624767 (patch)
tree20a5c6774a6e17e0d1892fc92a318205707b4202 /net-libs/cyassl
parentStable for HPPA (bug #411059). (diff)
downloadgentoo-2-66f23474baeaa28c35754783eaa164bdab624767.tar.gz
gentoo-2-66f23474baeaa28c35754783eaa164bdab624767.tar.bz2
gentoo-2-66f23474baeaa28c35754783eaa164bdab624767.zip
Initial commit
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'net-libs/cyassl')
-rw-r--r--net-libs/cyassl/ChangeLog11
-rw-r--r--net-libs/cyassl/cyassl-2.0.8.ebuild101
-rw-r--r--net-libs/cyassl/files/cyassl-2.0.8-disable-testsuit-ifnothreads.patch24
-rw-r--r--net-libs/cyassl/files/cyassl-2.0.8-fix-gnustack.patch10
-rw-r--r--net-libs/cyassl/metadata.xml28
5 files changed, 174 insertions, 0 deletions
diff --git a/net-libs/cyassl/ChangeLog b/net-libs/cyassl/ChangeLog
new file mode 100644
index 000000000000..6b70be59a463
--- /dev/null
+++ b/net-libs/cyassl/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for net-libs/cyassl
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/cyassl/ChangeLog,v 1.1 2012/04/11 01:58:09 blueness Exp $
+
+*cyassl-2.0.8 (11 Apr 2012)
+
+ 11 Apr 2012; Anthony G. Basile <blueness@gentoo.org> +cyassl-2.0.8.ebuild,
+ +files/cyassl-2.0.8-disable-testsuit-ifnothreads.patch,
+ +files/cyassl-2.0.8-fix-gnustack.patch, +metadata.xml:
+ Initial commit
+
diff --git a/net-libs/cyassl/cyassl-2.0.8.ebuild b/net-libs/cyassl/cyassl-2.0.8.ebuild
new file mode 100644
index 000000000000..ea1a0eab0863
--- /dev/null
+++ b/net-libs/cyassl/cyassl-2.0.8.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/cyassl/cyassl-2.0.8.ebuild,v 1.1 2012/04/11 01:58:09 blueness Exp $
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="Lightweight SSL/TLS library targeted at embedded and RTOS environments"
+HOMEPAGE="http://www.yassl.com/yaSSL/Home.html"
+SRC_URI="http://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+#Add CRYPTO_OPTS=ecc when fixed
+CACHE_SIZE="small big +huge"
+CRYPTO_OPTS="aes-ni +hc128 +psk +ripemd sha512"
+IUSE="-dtls ipv6 +httpd +sessioncerts +sniffer +testcert threads +zlib cyassl-hardening ${CACHE_SIZE} ${CRYPTO_OPTS}"
+
+#You can only pick one cach size
+#sha512 is broken on x86
+#Testing freezes with dtls
+REQUIRED_USE="^^ ( small big huge )
+ x86? ( !sha512 )
+ test? ( !dtls )"
+
+DEPEND="sniffer? ( net-libs/libpcap )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-disable-testsuit-ifnothreads.patch
+
+ #Apply unconditionally, but only triggered if USE="aes-ni"
+ epatch "${FILESDIR}"/${P}-fix-gnustack.patch
+}
+
+src_configure() {
+ local myconf=()
+
+ if use threads; then
+ myconf+=( --disable-singleThreaded )
+ else
+ myconf+=( --enable-singleThreaded )
+ fi
+
+ if use amd64; then
+ myconf+=( --enable-fastmath --enable-fasthugemath --enable-bump )
+ elif use x86; then
+ #not pie friendly, sorry x86, no fast math for you :(
+ myconf+=( --disable-fastmath --disable-fasthugemath --disable-bump )
+ fi
+
+ #There are lots of options, so we'll force a few reasonable
+ #We may change this in the future, in particular ecc needs to be fixed
+ econf \
+ --enable-opensslExtra \
+ --enable-fortress \
+ --enable-keygen \
+ --enable-certgen \
+ --disable-debug \
+ --disable-ecc \
+ --disable-small \
+ --disable-ntru \
+ --disable-noFilesystem \
+ --disable-noInline \
+ --disable-gcc-lots-o-warnings \
+ $(use_enable small smallcache) \
+ $(use_enable big bigcache) \
+ $(use_enable huge hugecache) \
+ $(use_enable aes-ni aesni) \
+ $(use_enable hc128) \
+ $(use_enable psk) \
+ $(use_enable ripemd) \
+ $(use_enable sha512) \
+ $(use_enable dtls) \
+ $(use_enable ipv6) \
+ $(use_enable httpd webServer) \
+ $(use_enable sessioncerts) \
+ $(use_enable sniffer) \
+ $(use_enable testcert) \
+ $(use_enable cyassl-hardening gcc-hardening) \
+ $(use_enable cyassl-hardening linker-hardening) \
+ $(use_with zlib libz) \
+ "${myconf[@]}"
+}
+
+src_test() {
+ "${S}"/tests/unit
+ "${S}"/ctaocrypt/benchmark/benchmark
+}
+
+src_install() {
+ default
+
+ mv "${D}"/usr/share/doc/"${PN}"/* \
+ "${D}"/usr/share/doc/"${P}"/
+ rmdir "${D}"/usr/share/doc/"${PN}"/
+}
diff --git a/net-libs/cyassl/files/cyassl-2.0.8-disable-testsuit-ifnothreads.patch b/net-libs/cyassl/files/cyassl-2.0.8-disable-testsuit-ifnothreads.patch
new file mode 100644
index 000000000000..b1c2cbe2494a
--- /dev/null
+++ b/net-libs/cyassl/files/cyassl-2.0.8-disable-testsuit-ifnothreads.patch
@@ -0,0 +1,24 @@
+diff -Naur cyassl-2.0.8.orig//testsuite/testsuite.c cyassl-2.0.8/testsuite/testsuite.c
+--- cyassl-2.0.8.orig//testsuite/testsuite.c 2012-02-13 14:51:39.000000000 -0500
++++ cyassl-2.0.8/testsuite/testsuite.c 2012-04-10 10:26:40.000000000 -0400
+@@ -27,10 +27,11 @@
+ #include <cyassl/test.h>
+ #include <cyassl/ctaocrypt/md5.h>
+
++/* Create a stub rather than #error out */
++/* We can run the tests manually */
+ #ifdef SINGLE_THREADED
+- #error testsuite needs threads to run, please run ctaocrypt/test, \
+- and the examples/ individually
+-#endif
++int main() { return 0; }
++#else
+
+ void wait_tcp_ready(func_args*);
+ void ctaocrypt_test(void*);
+@@ -230,4 +231,4 @@
+ fclose(f);
+ }
+
+-
++#endif /* SINGLE_THREADED */
diff --git a/net-libs/cyassl/files/cyassl-2.0.8-fix-gnustack.patch b/net-libs/cyassl/files/cyassl-2.0.8-fix-gnustack.patch
new file mode 100644
index 000000000000..69067088d3b9
--- /dev/null
+++ b/net-libs/cyassl/files/cyassl-2.0.8-fix-gnustack.patch
@@ -0,0 +1,10 @@
+diff -Naur cyassl-2.0.8.orig//ctaocrypt/src/aes_asm.s cyassl-2.0.8/ctaocrypt/src/aes_asm.s
+--- cyassl-2.0.8.orig//ctaocrypt/src/aes_asm.s 2011-09-26 18:22:08.000000000 -0400
++++ cyassl-2.0.8/ctaocrypt/src/aes_asm.s 2012-04-10 12:20:21.000000000 -0400
+@@ -482,3 +482,6 @@
+ pxor %xmm2, %xmm3
+ ret
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/net-libs/cyassl/metadata.xml b/net-libs/cyassl/metadata.xml
new file mode 100644
index 000000000000..01a71453e8c8
--- /dev/null
+++ b/net-libs/cyassl/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name="aes-ni">Enable Intel AES instruction support</flag>
+ <!-- add this when ecc is fixed
+ <flag name="ecc">Enable Elliptic Curve support</flag>
+ -->
+ <flag name="hc128">Enable HC-128 support</flag>
+ <flag name="psk">Enable Pre-Shared Key support</flag>
+ <flag name="ripemd">Enable RIPEMD-160 support</flag>
+ <flag name="sha512">Enable SHA-160 support</flag>
+ <flag name="small">Choose small cache size (excludes big or huge)</flag>
+ <flag name="big">Choose big cache size (excludes small or huge)</flag>
+ <flag name="huge">Choose big cache size (excludes small or big)</flag>
+ <flag name="dtls">Enable datagram TLS</flag>
+ <flag name="httpd">Enable features for yaSSL web server</flag>
+ <flag name="sessioncerts">Store session certificates</flag>
+ <flag name="sniffer">Allow collection/decryption of SSL traffic</flag>
+ <flag name="sniffer">Allow collection/decryption of SSL traffic</flag>
+ <flag name="testcert">Enable certificate testing</flag>
+ <flag name="cyassl-hardening">Add hardening flags to CFLAGS/LDFLAGS</flag>
+ </use>
+</pkgmetadata>