Skip to content

Commit

Permalink
sys-libs/libnvidia-container: fix 9999 ebuild
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Strizhkin <[email protected]>
  • Loading branch information
denisstrizhkin committed Sep 6, 2024
1 parent b9e11aa commit 010a72f
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions sys-libs/libnvidia-container/libnvidia-container-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ if [[ "${PV}" == "9999" ]] ; then
else
SRC_URI="
https://github.com/NVIDIA/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz
https://github.com/NVIDIA/nvidia-modprobe/archive/${NVMODV}.tar.gz -> ${PN}-nvidia-modprobe-${NVMODV}.tar.gz
"
S="${WORKDIR}/${PN}-${PV/_rc/-rc.}"
NVMODS="${WORKDIR}/nvidia-modprobe-${NVMODV}"
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}"
Expand Down Expand Up @@ -50,6 +52,13 @@ PATCHES=(

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
Expand All @@ -69,20 +78,14 @@ src_compile() {
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}"
GO_LDFLAGS="-compressdwarf=false -linkmode=external"
}

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
Expand Down

0 comments on commit 010a72f

Please sign in to comment.