dev-python/pytest: arm64 stable (bug #723996)
[gentoo.git] / sys-kernel / cryptodev / cryptodev-1.9.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit linux-info linux-mod
6
7 DESCRIPTION="device that allows access to Linux kernel cryptographic drivers"
8 HOMEPAGE="http://cryptodev-linux.org/index.html"
9 SRC_URI="http://nwl.cc/pub/cryptodev-linux/${PN}-linux-${PV}.tar.gz"
10 KEYWORDS="~amd64 ~arm ~x86"
11
12 LICENSE="GPL-2+"
13 SLOT="0"
14 IUSE="examples"
15
16 DEPEND="virtual/linux-sources"
17
18 #test requires that the module is already loaded
19 RESTRICT="test"
20
21 S=${WORKDIR}/${PN}-linux-${PV}
22
23 MODULE_NAMES="cryptodev(extra:${S})"
24 BUILD_PARAMS="KERNEL_DIR=\"\${KV_OUT_DIR}\""
25
26 PATCHES=(
27         "${FILESDIR}"/cryptodev-1.9-fix-build-with-4.14-629958.patch
28         "${FILESDIR}"/ioctl.c-Fix-build-with-linux-4.17.patch
29 )
30
31 pkg_pretend() {
32         if use kernel_linux ; then
33                 CONFIG_CHECK="~CRYPTO ~CRYPTO_BLKCIPHER ~CRYPTO_AEAD"
34                 check_extra_config
35         fi
36 }
37
38 pkg_setup() {
39         if use kernel_linux ; then
40                 linux-mod_pkg_setup
41         else
42                 die "cryptodev ebuild only support linux"
43         fi
44         BUILD_TARGETS="build"
45         export KERNEL_DIR
46 }
47
48 src_install() {
49         linux-mod_src_install
50         if use examples ; then
51                 docinto examples
52                 dodoc example/*
53         fi
54         insinto /usr/include/crypto
55         doins crypto/cryptodev.h
56 }