*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / dev-libs / libressl / libressl-2.8.3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit multilib-minimal libtool
7
8 DESCRIPTION="Free version of the SSL/TLS protocol forked from OpenSSL"
9 HOMEPAGE="https://www.libressl.org/"
10 SRC_URI="https://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/46"
17 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18 IUSE="+asm static-libs test"
19 RESTRICT="!test? ( test )"
20 REQUIRED_USE="test? ( static-libs )"
21
22 RDEPEND="!dev-libs/openssl:0"
23 DEPEND="${RDEPEND}"
24 PDEPEND="app-misc/ca-certificates"
25
26 src_prepare() {
27         touch crypto/Makefile.in
28
29         sed -i \
30                 -e '/^[ \t]*CFLAGS=/s#-g ##' \
31                 -e '/^[ \t]*CFLAGS=/s#-g"#"#' \
32                 -e '/^[ \t]*CFLAGS=/s#-O2 ##' \
33                 -e '/^[ \t]*CFLAGS=/s#-O2"#"#' \
34                 -e '/^[ \t]*USER_CFLAGS=/s#-O2 ##' \
35                 -e '/^[ \t]*USER_CFLAGS=/s#-O2"#"#' \
36                 configure || die "fixing CFLAGS failed"
37
38         eapply "${FILESDIR}"/${P}-solaris10.patch
39         eapply_user
40
41         elibtoolize  # for Solaris
42 }
43
44 multilib_src_configure() {
45         ECONF_SOURCE="${S}" econf \
46                 $(use_enable asm) \
47                 $(use_enable static-libs static)
48 }
49
50 multilib_src_test() {
51         emake check
52 }
53
54 multilib_src_install_all() {
55         einstalldocs
56         find "${D}" -name '*.la' -exec rm -f {} + || die
57 }