summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikle Kolyada <zlogene@gentoo.org>2020-08-07 13:51:09 +0300
committerMikle Kolyada <zlogene@gentoo.org>2020-08-08 15:18:13 +0300
commitd668026a4dbbb37b33a93a1972229a14760d23b7 (patch)
tree0457efb8e8f11aba77a6101dc17b5c4a07573867 /sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild
parentsys-kernel/kpatch: migrate to sys-apps/kmod (diff)
downloadgentoo-d668026a4dbbb37b33a93a1972229a14760d23b7.tar.gz
gentoo-d668026a4dbbb37b33a93a1972229a14760d23b7.tar.bz2
gentoo-d668026a4dbbb37b33a93a1972229a14760d23b7.zip
sys-kernel/cryptodev: migrate to sys-apps/kmod
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild')
-rw-r--r--sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild56
1 files changed, 56 insertions, 0 deletions
diff --git a/sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild b/sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild
new file mode 100644
index 00000000000..6041c66cd1d
--- /dev/null
+++ b/sys-kernel/cryptodev/cryptodev-1.9-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit linux-info linux-mod
+
+DESCRIPTION="device that allows access to Linux kernel cryptographic drivers"
+HOMEPAGE="http://cryptodev-linux.org/index.html"
+SRC_URI="http://nwl.cc/pub/cryptodev-linux/${PN}-linux-${PV}.tar.gz"
+KEYWORDS="~amd64 ~arm ~x86"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="examples"
+
+DEPEND="virtual/linux-sources"
+
+#test requires that the module is already loaded
+RESTRICT="test"
+
+S=${WORKDIR}/${PN}-linux-${PV}
+
+MODULE_NAMES="cryptodev(extra:${S})"
+BUILD_PARAMS="KERNEL_DIR=\"\${KV_OUT_DIR}\""
+
+PATCHES=(
+ "${FILESDIR}"/cryptodev-1.9-fix-build-with-4.14-629958.patch
+ "${FILESDIR}"/ioctl.c-Fix-build-with-linux-4.17.patch
+)
+
+pkg_pretend() {
+ if use kernel_linux ; then
+ CONFIG_CHECK="~CRYPTO ~CRYPTO_BLKCIPHER ~CRYPTO_AEAD"
+ check_extra_config
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux ; then
+ linux-mod_pkg_setup
+ else
+ die "cryptodev ebuild only support linux"
+ fi
+ BUILD_TARGETS="build"
+ export KERNEL_DIR
+}
+
+src_install() {
+ linux-mod_src_install
+ if use examples ; then
+ docinto examples
+ dodoc example/*
+ fi
+ insinto /usr/include/crypto
+ doins crypto/cryptodev.h
+}