diff options
author | Denis Strizhkin <strdenis02@gmail.com> | 2024-09-07 18:25:12 +0000 |
---|---|---|
committer | Denis Strizhkin <strdenis02@gmail.com> | 2024-09-07 18:25:12 +0000 |
commit | dff0bcdff5e7fd2b1485ada05725942ebfb0fbb0 (patch) | |
tree | e14b84071821c3ffddf18ecd59b21902345f4f9a /sys-libs | |
parent | app-containers/nvidia-container-toolkit: update SRC_URI (diff) | |
download | guru-dff0bcdff5e7fd2b1485ada05725942ebfb0fbb0.tar.gz guru-dff0bcdff5e7fd2b1485ada05725942ebfb0fbb0.tar.bz2 guru-dff0bcdff5e7fd2b1485ada05725942ebfb0fbb0.zip |
sys-libs/libnvidia-container: add 1.16.1
Signed-off-by: Denis Strizhkin <strdenis02@gmail.com>
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libnvidia-container/Manifest | 1 | ||||
-rw-r--r-- | sys-libs/libnvidia-container/libnvidia-container-1.16.1.ebuild | 105 |
2 files changed, 106 insertions, 0 deletions
diff --git a/sys-libs/libnvidia-container/Manifest b/sys-libs/libnvidia-container/Manifest index afca46314..16d3095e5 100644 --- a/sys-libs/libnvidia-container/Manifest +++ b/sys-libs/libnvidia-container/Manifest @@ -1,2 +1,3 @@ DIST libnvidia-container-1.14.6.tar.gz 1549174 BLAKE2B d3c526d7b04ac9cbc6b6bb63f25d4c5b17571169a6cb1a6ab9f7c1cc322a27e3a853373551682b535146914fd2eca809d02391acb458a874a7e9e5c0fc8bf459 SHA512 598f4b2752615bfe44782a60cd2afee769fde496c6bdff613f58c4a3f0b02f8b398b293659cb78a84ff5fbff50892f3cb4b9cd3c6a60d17897fa5e063905a0c5 +DIST libnvidia-container-1.16.1.tar.gz 1610619 BLAKE2B dc490c1bcd891119841bb5c1aa0c1977f0f326118f7bc86adbab6a0053f52950e4ced5a4b025d6b557c1526e3125aa69ac47c10c621993becc5c40b13d6990c5 SHA512 b304c284c5ab0c3544362307dc16ffcca8d34497e4356a520dc6da81a86a62b2a262b528cba559bb0d7a3addf018c3b50b6cb78669c82c1b4acae159e5922548 DIST libnvidia-container-nvidia-modprobe-550.54.14.tar.gz 47147 BLAKE2B 7b334877d98d0c75d5750192dea868436938852443ced14e74e59076ed4d8be9e361cdefbe48295d87bb91ac4565152ec3f3233479b3da19bb8baf8e7ef53cd6 SHA512 279228aa315ff5fd1a23df23527aff58b2319f11f9fc7d939fa285ea933b4cc6d223451e20ecf7f50baba9f6c9c100e57cb77675d0d17fa77f19d3fea2ccc193 diff --git a/sys-libs/libnvidia-container/libnvidia-container-1.16.1.ebuild b/sys-libs/libnvidia-container/libnvidia-container-1.16.1.ebuild new file mode 100644 index 000000000..7fe69c91c --- /dev/null +++ b/sys-libs/libnvidia-container/libnvidia-container-1.16.1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# check the VERSION in libnvidia-container/mk/nvidia-modprobe.mk +NVMODV="550.54.14" + +DESCRIPTION="NVIDIA container runtime library" +HOMEPAGE="https://github.com/NVIDIA/libnvidia-container" + +if [[ "${PV}" == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/NVIDIA/${PN}.git" +else + SRC_URI=" + https://github.com/NVIDIA/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz + " + S="${WORKDIR}/${PN}-${PV/_rc/-rc.}" + KEYWORDS="~amd64" +fi +NVMODS="${WORKDIR}/nvidia-modprobe-${NVMODV}" +SRC_URI+=" + https://github.com/NVIDIA/nvidia-modprobe/archive/${NVMODV}.tar.gz -> ${PN}-nvidia-modprobe-${NVMODV}.tar.gz +" + +LICENSE="Apache-2.0" +SLOT="0/${PV}" +IUSE="doc static-libs" + +RDEPEND=" + net-libs/libtirpc:= + sys-libs/libcap + sys-libs/libseccomp + virtual/libelf:= + x11-drivers/nvidia-drivers +" + +DEPEND="${RDEPEND}" + +BDEPEND=" + dev-build/bmake + dev-lang/go + net-libs/rpcsvc-proto + sys-apps/lsb-release + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.14.6-fix-makefile.patch +) + +DOCS=( COPYING COPYING.LESSER LICENSE NOTICE README.md) + +src_unpack() { + default_src_unpack + if [[ "${PV}" == "9999" ]] ; then + git-r3_src_unpack + fi +} + +src_prepare() { + # nvidia-modprobe patching based on libnvidia-container/mk/nvidia-modprobe.mk + mkdir -p "${S}"/deps/src/nvidia-modprobe-"${NVMODV}" || die + cp -r "${NVMODS}"/modprobe-utils/ "${S}"/deps/src/nvidia-modprobe-"${NVMODV}"/ || die + touch "${S}/deps/src/nvidia-modprobe-${NVMODV}/.download_stamp" || die + pushd "${S}/deps/src/nvidia-modprobe-${NVMODV}" || die + eapply -p1 "${S}"/mk/nvidia-modprobe.patch + popd || die + + default +} + +src_compile() { + export GOPATH="${S}" + export GOFLAGS="-mod=vendor" + IFS='_' read -r MY_LIB_VERSION MY_LIB_TAG <<< "${PV}" + emake \ + CGO_CFLAGS="${CFLAGS}" \ + CGO_LDFLAGS="${LDFLAGS}" \ + GO_LDFLAGS="-compressdwarf=false -linkmode=external" \ + REVISION="${PV}" \ + LIB_VERSION="${MY_LIB_VERSION}" \ + LIB_TAG="${MY_LIB_TAG}" +} + +src_install() { + emake \ + CGO_CFLAGS="${CFLAGS}" \ + CGO_LDFLAGS="${LDFLAGS}" \ + GO_LDFLAGS="-compressdwarf=false -linkmode=external" \ + REVISION="${PV}" \ + LIB_VERSION="${MY_LIB_VERSION}" \ + LIB_TAG="${MY_LIB_TAG}" \ + DESTDIR="${D}" \ + install + # Install docs + if use doc ; then + einstalldocs # Bug 831705 + fi + # Cleanup static libraries + if ! use static-libs ; then + find "${ED}" -name '*.a' -delete || die # Bug 783984 + fi +} |