commit:     7f07faec40be083164bf9df8021defd7bd72541b
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Aug 24 06:01:42 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Aug 24 06:15:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7f07faec

sys-kernel/ummunotify: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sys-kernel/ummunotify/Manifest            |  1 +
 sys-kernel/ummunotify/metadata.xml        | 19 +++++++++++++
 sys-kernel/ummunotify/ummunotify-2.ebuild | 44 +++++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+)

diff --git a/sys-kernel/ummunotify/Manifest b/sys-kernel/ummunotify/Manifest
new file mode 100644
index 000000000..d7f5a2d25
--- /dev/null
+++ b/sys-kernel/ummunotify/Manifest
@@ -0,0 +1 @@
+DIST ummunotify-2.tar.gz 326619 BLAKE2B 
4ac329368b688eebb5ab9d064703de90e47112b169cd9448b3f6e0daa7717bdd4d1e957c75f5f87f1d30c08564c929ef50d7fe83f633b95f2abbd13014c1c48c
 SHA512 
0650ec6dd01de97822121a720bff8cb65deaf2ec67de03a52507f47d0cfb169000dd40172f73aef7fbb83735eb8e35aed4da9c20ce5ee4ee6607a12baae7ca0f

diff --git a/sys-kernel/ummunotify/metadata.xml 
b/sys-kernel/ummunotify/metadata.xml
new file mode 100644
index 000000000..f0e49c1ab
--- /dev/null
+++ b/sys-kernel/ummunotify/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <longdescription lang="en">
+Ummunotify relays MMU notifier events to userspace.  This is useful
+for libraries that need to track the memory mapping of applications;
+for example, MPI implementations using RDMA want to cache memory
+registrations for performance, but tracking all possible crazy cases
+such as when, say, the FORTRAN runtime frees memory is impossible
+without kernel help.
+       </longdescription>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Alessandro Barbieri</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">Portals4/ummunotify</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/sys-kernel/ummunotify/ummunotify-2.ebuild 
b/sys-kernel/ummunotify/ummunotify-2.ebuild
new file mode 100644
index 000000000..3b5fc4b6e
--- /dev/null
+++ b/sys-kernel/ummunotify/ummunotify-2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MAX_KV_MAJ="4"
+MAX_KV_MIN="13"
+MYP="${PN}-v${PV}"
+
+inherit linux-info linux-mod
+
+DESCRIPTION="Userspace support for MMU notifications"
+HOMEPAGE="
+       https://lkml.org/lkml/2010/4/22/172
+       https://github.com/Portals4/ummunotify
+"
+SRC_URI="https://github.com/Portals4/ummunotify/raw/master/${MYP}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${MYP}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DOCS=( Documentation/ummunotify.txt README )
+
+MODULE_NAMES="ummunot(misc:${S}/driver:${S}/driver)"
+BUILD_TARGETS="all"
+
+pkg_pretend() {
+       # https://github.com/Portals4/ummunotify/issues/1
+       if kernel_is -ge ${MAX_KV_MAJ} ${MAX_KV_MIN}; then
+               eerror "Unsupported kernel version"
+               die
+       fi
+}
+
+src_compile() {
+       linux-mod_src_compile || die
+}
+
+src_install() {
+       einstalldocs
+       linux-mod_src_install || die
+}

Reply via email to