d87e79cad652c73abccb0e965bf372d94f550f8d
[gentoo.git] / dev-libs / libressl / libressl-2.5.5.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit eutils multilib-minimal
7
8 DESCRIPTION="Free version of the SSL/TLS protocol forked from OpenSSL"
9 HOMEPAGE="http://www.libressl.org/"
10 SRC_URI="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${P}.tar.gz"
11
12 LICENSE="ISC openssl"
13 # Reflects ABI of libcrypto.so and libssl.so.  Since these can differ,
14 # we'll try to use the max of either.  However, if either change between
15 # versions, we have to change the subslot to trigger rebuild of consumers.
16 SLOT="0/43"
17 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86"
18 IUSE="+asm static-libs"
19
20 RDEPEND="!dev-libs/openssl:0"
21 DEPEND="${RDEPEND}"
22 PDEPEND="app-misc/ca-certificates"
23
24 src_prepare() {
25         touch crypto/Makefile.in
26
27         sed -i \
28                 -e '/^[ \t]*CFLAGS=/s#-g ##' \
29                 -e '/^[ \t]*CFLAGS=/s#-g"#"#' \
30                 -e '/^[ \t]*CFLAGS=/s#-O2 ##' \
31                 -e '/^[ \t]*CFLAGS=/s#-O2"#"#' \
32                 -e '/^[ \t]*USER_CFLAGS=/s#-O2 ##' \
33                 -e '/^[ \t]*USER_CFLAGS=/s#-O2"#"#' \
34                 configure || die "fixing CFLAGS failed"
35
36         eapply_user
37 }
38
39 multilib_src_configure() {
40         ECONF_SOURCE="${S}" econf \
41                 $(use_enable asm) \
42                 $(use_enable static-libs static)
43 }
44
45 multilib_src_test() {
46         emake check
47 }
48
49 multilib_src_install_all() {
50         einstalldocs
51         prune_libtool_files
52 }