/[gentoo-x86]/net-libs/cyassl/cyassl-2.0.8.ebuild
Gentoo

Contents of /net-libs/cyassl/cyassl-2.0.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue May 22 00:03:59 2012 UTC (2 years, 4 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Add USE=static-libs

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/cyassl/cyassl-2.0.8.ebuild,v 1.1 2012/04/11 01:58:09 blueness Exp $
4
5 EAPI="4"
6
7 inherit eutils
8
9 DESCRIPTION="Lightweight SSL/TLS library targeted at embedded and RTOS environments"
10 HOMEPAGE="http://www.yassl.com/yaSSL/Home.html"
11 SRC_URI="http://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16
17 #Add CRYPTO_OPTS=ecc when fixed
18 CACHE_SIZE="small big +huge"
19 CRYPTO_OPTS="aes-ni +hc128 +psk +ripemd sha512"
20 IUSE="-dtls ipv6 +httpd +sessioncerts +sniffer +testcert threads +zlib cyassl-hardening ${CACHE_SIZE} ${CRYPTO_OPTS}"
21
22 #You can only pick one cach size
23 #sha512 is broken on x86
24 #Testing freezes with dtls
25 REQUIRED_USE="^^ ( small big huge )
26 x86? ( !sha512 )
27 test? ( !dtls )"
28
29 DEPEND="sniffer? ( net-libs/libpcap )
30 zlib? ( sys-libs/zlib )"
31 RDEPEND="${DEPEND}"
32
33 src_prepare() {
34 epatch "${FILESDIR}"/${P}-disable-testsuit-ifnothreads.patch
35
36 #Apply unconditionally, but only triggered if USE="aes-ni"
37 epatch "${FILESDIR}"/${P}-fix-gnustack.patch
38 }
39
40 src_configure() {
41 local myconf=()
42
43 if use threads; then
44 myconf+=( --disable-singleThreaded )
45 else
46 myconf+=( --enable-singleThreaded )
47 fi
48
49 if use amd64; then
50 myconf+=( --enable-fastmath --enable-fasthugemath --enable-bump )
51 elif use x86; then
52 #not pie friendly, sorry x86, no fast math for you :(
53 myconf+=( --disable-fastmath --disable-fasthugemath --disable-bump )
54 fi
55
56 #There are lots of options, so we'll force a few reasonable
57 #We may change this in the future, in particular ecc needs to be fixed
58 econf \
59 --enable-opensslExtra \
60 --enable-fortress \
61 --enable-keygen \
62 --enable-certgen \
63 --disable-debug \
64 --disable-ecc \
65 --disable-small \
66 --disable-ntru \
67 --disable-noFilesystem \
68 --disable-noInline \
69 --disable-gcc-lots-o-warnings \
70 $(use_enable small smallcache) \
71 $(use_enable big bigcache) \
72 $(use_enable huge hugecache) \
73 $(use_enable aes-ni aesni) \
74 $(use_enable hc128) \
75 $(use_enable psk) \
76 $(use_enable ripemd) \
77 $(use_enable sha512) \
78 $(use_enable dtls) \
79 $(use_enable ipv6) \
80 $(use_enable httpd webServer) \
81 $(use_enable sessioncerts) \
82 $(use_enable sniffer) \
83 $(use_enable testcert) \
84 $(use_enable cyassl-hardening gcc-hardening) \
85 $(use_enable cyassl-hardening linker-hardening) \
86 $(use_with zlib libz) \
87 "${myconf[@]}"
88 }
89
90 src_test() {
91 "${S}"/tests/unit
92 "${S}"/ctaocrypt/benchmark/benchmark
93 }
94
95 src_install() {
96 default
97
98 mv "${D}"/usr/share/doc/"${PN}"/* \
99 "${D}"/usr/share/doc/"${P}"/
100 rmdir "${D}"/usr/share/doc/"${PN}"/
101 }

  ViewVC Help
Powered by ViewVC 1.1.20