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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sun Jul 15 18:37:04 2012 UTC (2 years, 5 months ago) by blueness
Branch: MAIN
Changes since 1.1: +3 -2 lines
Add DEPEND on app-arch/unzip

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 blueness 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 blueness 1.2 # $Header: /var/cvsroot/gentoo-x86/net-libs/cyassl/cyassl-2.2.0.ebuild,v 1.1 2012/05/21 23:35:35 blueness Exp $
4 blueness 1.1
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}.zip"
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     CERT_OPTS="ocsp crl +sessioncerts +testcert"
21     IUSE="-dtls ipv6 +httpd +sniffer static-libs threads +zlib cyassl-hardening ${CACHE_SIZE} ${CRYPTO_OPTS} ${CERT_OPTS}"
22    
23     #You can only pick one cach size
24     #sha512 is broken on x86
25     #Testing freezes with dtls
26     REQUIRED_USE="^^ ( small big huge )
27     x86? ( !sha512 )
28     test? ( !dtls )"
29    
30 blueness 1.2 DEPEND="app-arch/unzip
31     sniffer? ( net-libs/libpcap )
32 blueness 1.1 zlib? ( sys-libs/zlib )"
33     RDEPEND="${DEPEND}"
34    
35     src_prepare() {
36     epatch "${FILESDIR}"/${PN}-2.0.8-disable-testsuit-ifnothreads.patch
37    
38     #Apply unconditionally, but only triggered if USE="aes-ni"
39     epatch "${FILESDIR}"/${PN}-2.0.8-fix-gnustack.patch
40     }
41    
42     src_configure() {
43     local myconf=()
44    
45     if use threads; then
46     myconf+=( --disable-singleThreaded )
47     else
48     myconf+=( --enable-singleThreaded )
49     fi
50    
51     if use amd64; then
52     myconf+=( --enable-fastmath --enable-fasthugemath --enable-bump )
53     elif use x86; then
54     #not pie friendly, sorry x86, no fast math for you :(
55     myconf+=( --disable-fastmath --disable-fasthugemath --disable-bump )
56     fi
57    
58     #There are lots of options, so we'll force a few reasonable
59     #We may change this in the future, in particular ecc needs to be fixed
60     econf \
61     --enable-opensslExtra \
62     --enable-fortress \
63     --enable-keygen \
64     --enable-certgen \
65     --disable-debug \
66     --disable-ecc \
67     --disable-small \
68     --disable-ntru \
69     --disable-noFilesystem \
70     --disable-noInline \
71     --disable-gcc-lots-o-warnings \
72     $(use_enable small smallcache) \
73     $(use_enable big bigcache) \
74     $(use_enable huge hugecache) \
75     $(use_enable aes-ni aesni) \
76     $(use_enable hc128) \
77     $(use_enable psk) \
78     $(use_enable ripemd) \
79     $(use_enable sha512) \
80     $(use_enable dtls) \
81     $(use_enable ipv6) \
82     $(use_enable httpd webServer) \
83     $(use_enable ocsp) \
84     $(use_enable crl) \
85     $(use_enable sessioncerts) \
86     $(use_enable sniffer) \
87     $(use_enable testcert) \
88     $(use_enable static-libs static) \
89     $(use_enable cyassl-hardening gcc-hardening) \
90     $(use_enable cyassl-hardening linker-hardening) \
91     $(use_with zlib libz) \
92     "${myconf[@]}"
93     }
94    
95     src_test() {
96     "${S}"/tests/unit
97     "${S}"/ctaocrypt/benchmark/benchmark
98     }
99    
100     src_install() {
101     default
102    
103     mv "${D}"/usr/share/doc/"${PN}"/* \
104     "${D}"/usr/share/doc/"${P}"/
105     rmdir "${D}"/usr/share/doc/"${PN}"/
106     }

  ViewVC Help
Powered by ViewVC 1.1.20