You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.2 KiB
59 lines
1.2 KiB
1 year ago
|
# Copyright 1999-2023 Gentoo Authors
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
11 months ago
|
EAPI=8
|
||
1 year ago
|
|
||
11 months ago
|
inherit linux-info linux-mod-r1
|
||
1 year ago
|
|
||
|
DESCRIPTION="device that allows access to Linux kernel cryptographic drivers"
|
||
|
HOMEPAGE="http://cryptodev-linux.org/"
|
||
|
|
||
|
if [[ ${PV} == 9999 ]]; then
|
||
|
inherit git-r3
|
||
|
EGIT_REPO_URI="https://github.com/cryptodev-linux/cryptodev-linux.git"
|
||
|
else
|
||
|
SRC_URI="https://github.com/cryptodev-linux/cryptodev-linux/archive/${PN}-linux-${PV}.tar.gz"
|
||
|
KEYWORDS="~amd64 ~arm ~x86"
|
||
|
S=${WORKDIR}/${PN}-linux-${PN}-linux-${PV}
|
||
|
fi
|
||
|
|
||
|
LICENSE="GPL-2+"
|
||
|
SLOT="0"
|
||
|
IUSE="examples"
|
||
|
|
||
|
DEPEND="virtual/linux-sources"
|
||
|
|
||
|
#test requires that the module is already loaded
|
||
|
RESTRICT="test"
|
||
|
|
||
|
pkg_pretend() {
|
||
|
use kernel_linux || die "cryptodev ebuild only support linux"
|
||
|
|
||
|
CONFIG_CHECK="~CRYPTO ~CRYPTO_AEAD"
|
||
|
if kernel_is -lt 4 8 0; then
|
||
|
CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_BLKCIPHER"
|
||
|
else
|
||
|
CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_SKCIPHER"
|
||
|
fi
|
||
|
check_extra_config
|
||
|
}
|
||
|
|
||
11 months ago
|
src_compile() {
|
||
|
local modlist=( cryptodev=extra:${S} )
|
||
|
local modargs=( KERNEL_DIR="${KV_OUT_DIR}" )
|
||
|
|
||
|
linux-mod-r1_src_compile
|
||
|
}
|
||
|
|
||
1 year ago
|
src_install() {
|
||
11 months ago
|
linux-mod-r1_src_install
|
||
1 year ago
|
|
||
|
insinto /usr/include/crypto
|
||
|
doins crypto/cryptodev.h
|
||
|
|
||
|
if use examples ; then
|
||
|
docinto examples
|
||
|
dodoc example/*
|
||
|
fi
|
||
|
}
|