diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-10 02:01:16 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-10 02:01:16 +0000 |
commit | 59437d191de3ff33f9bfa37f8656d849184fcaf0 (patch) | |
tree | 7d5e645c0aac6d8b71229a0e53d7a93136f83781 /sys-libs | |
parent | 1a95f960273f276a4fdefb824336b073d83bcb5e (diff) |
gentoo auto-resync : 10:12:2024 - 02:01:16
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/Manifest.gz | bin | 14745 -> 14921 bytes | |||
-rw-r--r-- | sys-libs/libnvidia-container/Manifest | 6 | ||||
-rw-r--r-- | sys-libs/libnvidia-container/files/libnvidia-container-1.17.0-fix-makefile-r1.patch | 220 | ||||
-rw-r--r-- | sys-libs/libnvidia-container/libnvidia-container-1.17.2.ebuild | 129 | ||||
-rw-r--r-- | sys-libs/libnvidia-container/libnvidia-container-9999.ebuild | 129 | ||||
-rw-r--r-- | sys-libs/libnvidia-container/metadata.xml | 31 | ||||
-rw-r--r-- | sys-libs/pkgcraft/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/pkgcraft/pkgcraft-0.0.16-r1.ebuild | 5 | ||||
-rw-r--r-- | sys-libs/pkgcraft/pkgcraft-9999.ebuild | 8 |
9 files changed, 528 insertions, 4 deletions
diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz Binary files differindex 6051b7ef84b6..baf9463a8c51 100644 --- a/sys-libs/Manifest.gz +++ b/sys-libs/Manifest.gz diff --git a/sys-libs/libnvidia-container/Manifest b/sys-libs/libnvidia-container/Manifest new file mode 100644 index 000000000000..669b13e91ef2 --- /dev/null +++ b/sys-libs/libnvidia-container/Manifest @@ -0,0 +1,6 @@ +AUX libnvidia-container-1.17.0-fix-makefile-r1.patch 8040 BLAKE2B d7f3c6723d9ab25628eb40fd29749e2c3277330149ba21100a94f517b952b76992479c467c6338370e359007cb63e778db7242c9ece01c2c428ff37fbba3dab0 SHA512 478297e2874dd4fc0ac261430659375b11b68dbc8fb21e5f98d6a7d685cb2fa57140fbff402f742556e3a571d160b0b374514111b37e2efa60eb7708c3395ae7 +DIST libnvidia-container-1.17.2.tar.gz 1611920 BLAKE2B 571ddc5fda854999cd7d1b2bbc40d34728827bf2e9c26afe6784166db7202d2baa55b0ca0eba50be61b029645735aaf91655bfec55113996eaf8c5278b835cd8 SHA512 a791998012f681805b3cc0a3bd38abc958a523c3eaa13cab36be4e0242cfba095719d5f6fa59423453a81c3fc76c96a4bbfd2eea27d20e2ef2f9a03d3a447fd8 +DIST libnvidia-container-nvidia-modprobe-550.54.14.tar.gz 47147 BLAKE2B 7b334877d98d0c75d5750192dea868436938852443ced14e74e59076ed4d8be9e361cdefbe48295d87bb91ac4565152ec3f3233479b3da19bb8baf8e7ef53cd6 SHA512 279228aa315ff5fd1a23df23527aff58b2319f11f9fc7d939fa285ea933b4cc6d223451e20ecf7f50baba9f6c9c100e57cb77675d0d17fa77f19d3fea2ccc193 +EBUILD libnvidia-container-1.17.2.ebuild 3261 BLAKE2B 644e4b61d00ce083d60f4d13601f85756feccac334b4876cffc9ca65e36e230c15dd88df1a1354bfef25e9d542cd0a4b5b53ea5ead76f2b922415b4961a2c3a4 SHA512 2063f0a9ac90e5ae3cc90dadee4edb5bcc0eb0e7fcd62bcdc9306d21bb80680542998e57336831c28150e6c1343ac7f2bf41da139aa3d27573e6129bbfdf34c2 +EBUILD libnvidia-container-9999.ebuild 3261 BLAKE2B 644e4b61d00ce083d60f4d13601f85756feccac334b4876cffc9ca65e36e230c15dd88df1a1354bfef25e9d542cd0a4b5b53ea5ead76f2b922415b4961a2c3a4 SHA512 2063f0a9ac90e5ae3cc90dadee4edb5bcc0eb0e7fcd62bcdc9306d21bb80680542998e57336831c28150e6c1343ac7f2bf41da139aa3d27573e6129bbfdf34c2 +MISC metadata.xml 1210 BLAKE2B 7a1af79b86dbe5a09eb4769a4a758db0f69cf93f8233dfe317822f1e9110bed783455abba7585bb2c67ef5386249dcf0c8ea07a42726674b87f86fd134a9fdb5 SHA512 48cd3f0a7170a0d6a5677da24e90bff0e9b6ed308a0cbec9e0e47e04d5a8f5d381eec7f992acdd3c8b1de4f144e2ba27c57b7d50d71ba3747ccb5f2bc44d860d diff --git a/sys-libs/libnvidia-container/files/libnvidia-container-1.17.0-fix-makefile-r1.patch b/sys-libs/libnvidia-container/files/libnvidia-container-1.17.0-fix-makefile-r1.patch new file mode 100644 index 000000000000..d68aa9e84e60 --- /dev/null +++ b/sys-libs/libnvidia-container/files/libnvidia-container-1.17.0-fix-makefile-r1.patch @@ -0,0 +1,220 @@ +Base on The patch from Arch[1] but better suited to Gentoo needs. + +[1]: https://gitlab.archlinux.org/archlinux/packaging/packages/libnvidia-container/-/raw/a642a3cc488862a8483075ee63f8a8c470860149/fix-makefile.patch +diff --git a/Makefile b/Makefile +index 6fb6976..c6f26d3 100644 +--- a/Makefile ++++ b/Makefile +@@ -18,18 +18,16 @@ + ##### Global variables ##### + + WITH_NVCGO ?= yes +-WITH_LIBELF ?= no +-WITH_TIRPC ?= no ++WITH_TIRPC ?= yes + WITH_SECCOMP ?= yes + + ##### Global definitions ##### + +-export prefix = /usr/local ++export prefix ?= /usr + export exec_prefix = $(prefix) + export bindir = $(exec_prefix)/bin +-export libdir = $(exec_prefix)/lib ++export libdir ?= $(exec_prefix)/lib64 + export docdir = $(prefix)/share/doc +-export libdbgdir = $(prefix)/lib/debug$(libdir) + export includedir = $(prefix)/include + export pkgconfdir = $(libdir)/pkgconfig + +@@ -158,20 +156,17 @@ ifeq ($(WITH_NVCGO), yes) + LIB_CPPFLAGS += -DWITH_NVCGO + LIB_LDLIBS_SHARED += -lpthread + endif +-ifeq ($(WITH_LIBELF), yes) ++# Build with system libelf unconditionally + LIB_CPPFLAGS += -DWITH_LIBELF + LIB_LDLIBS_SHARED += -lelf +-else +-LIB_LDLIBS_STATIC += -l:libelf.a +-endif + ifeq ($(WITH_TIRPC), yes) +-LIB_CPPFLAGS += -isystem $(DEPS_DIR)$(includedir)/tirpc -DWITH_TIRPC +-LIB_LDLIBS_STATIC += -l:libtirpc.a +-LIB_LDLIBS_SHARED += -lpthread ++LIB_CPPFLAGS += -isystem $(includedir)/tirpc -DWITH_TIRPC ++# dynamically link with system tirpc ++LIB_LDLIBS_SHARED += -lpthread -ltirpc + endif + ifeq ($(WITH_SECCOMP), yes) +-LIB_CPPFLAGS += -DWITH_SECCOMP $(shell pkg-config --cflags libseccomp) +-LIB_LDLIBS_SHARED += $(shell pkg-config --libs libseccomp) ++LIB_CPPFLAGS += -DWITH_SECCOMP $(shell $(PKG_CONFIG) --cflags libseccomp) ++LIB_LDLIBS_SHARED += $(shell $(PKG_CONFIG) --libs libseccomp) + endif + LIB_CPPFLAGS += $(CPPFLAGS) + LIB_CFLAGS += $(CFLAGS) +@@ -222,22 +217,14 @@ $(BIN_OBJS): %.o: %.c | shared + -include $(DEPENDENCIES) + + $(LIB_SHARED): $(LIB_OBJS) +- $(MKDIR) -p $(DEBUG_DIR) + $(CC) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(LIB_LDFLAGS) $(OUTPUT_OPTION) $^ $(LIB_SCRIPT) $(LIB_LDLIBS) +- $(OBJCPY) --only-keep-debug $@ $(LIB_SONAME) +- $(OBJCPY) --add-gnu-debuglink=$(LIB_SONAME) $@ +- $(MV) $(LIB_SONAME) $(DEBUG_DIR) +- $(STRIP) --strip-unneeded -R .comment $@ + + $(LIB_STATIC_OBJ): $(LIB_OBJS) + # FIXME Handle user-defined LDFLAGS and LDLIBS + $(LD) -d -r --exclude-libs ALL -L$(DEPS_DIR)$(libdir) $(OUTPUT_OPTION) $^ $(LIB_LDLIBS_STATIC) +- $(OBJCPY) --localize-hidden $@ +- $(STRIP) --strip-unneeded -R .comment $@ + + $(BIN_NAME): $(BIN_OBJS) + $(CC) $(BIN_CFLAGS) $(BIN_CPPFLAGS) $(BIN_LDFLAGS) $(OUTPUT_OPTION) $^ $(BIN_SCRIPT) $(BIN_LDLIBS) +- $(STRIP) --strip-unneeded -R .comment $@ + + ##### Public rules ##### + +@@ -262,15 +249,9 @@ deps: $(LIB_RPC_SRCS) $(BUILD_DEFS) + ifeq ($(WITH_NVCGO), yes) + $(MAKE) -f $(MAKE_DIR)/nvcgo.mk DESTDIR=$(DEPS_DIR) MAJOR=$(MAJOR) VERSION=$(VERSION) LIB_NAME=$(LIBGO_NAME) install + endif +-ifeq ($(WITH_LIBELF), no) +- $(MAKE) -f $(MAKE_DIR)/elftoolchain.mk DESTDIR=$(DEPS_DIR) install +-endif +-ifeq ($(WITH_TIRPC), yes) +- $(MAKE) -f $(MAKE_DIR)/libtirpc.mk DESTDIR=$(DEPS_DIR) install +-endif + + install: all +- $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(includedir) $(bindir) $(libdir) $(docdir) $(libdbgdir) $(pkgconfdir)) ++ $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(includedir) $(bindir) $(libdir) $(pkgconfdir)) + # Install header files + $(INSTALL) -m 644 $(LIB_INCS) $(DESTDIR)$(includedir) + # Install library files +@@ -279,18 +260,18 @@ install: all + $(LN) -sf $(LIB_SONAME) $(DESTDIR)$(libdir)/$(LIB_SYMLINK) + ifeq ($(WITH_NVCGO), yes) + $(INSTALL) -m 755 $(DEPS_DIR)$(libdir)/$(LIBGO_SHARED) $(DESTDIR)$(libdir) ++ # FIXME: for some reason ldconfig stopped creating this symlink after applying Arch Linux LDFLAGS ++ $(LN) -sf $(LIBGO_SHARED) $(DESTDIR)$(libdir)/$(LIBGO_SONAME) + $(LN) -sf $(LIBGO_SONAME) $(DESTDIR)$(libdir)/$(LIBGO_SYMLINK) + endif + $(LDCONFIG) -n $(DESTDIR)$(libdir) +- # Install debugging symbols +- $(INSTALL) -m 644 $(DEBUG_DIR)/$(LIB_SONAME) $(DESTDIR)$(libdbgdir) + # Install configuration files + $(MAKE_DIR)/$(LIB_PKGCFG).in "$(strip $(VERSION))" "$(strip $(LIB_LDLIBS_SHARED))" > $(DESTDIR)$(pkgconfdir)/$(LIB_PKGCFG) + # Install binary files + $(INSTALL) -m 755 $(BIN_NAME) $(DESTDIR)$(bindir) + # Install documentation files +- $(INSTALL) -d -m 755 $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION) +- $(INSTALL) -m 644 $(DOC_FILES) $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION) ++ # $(INSTALL) -d -m 755 $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION) ++ # $(INSTALL) -m 644 $(DOC_FILES) $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION) + + uninstall: + # Uninstall header files +@@ -300,14 +281,12 @@ uninstall: + ifeq ($(WITH_NVCGO), yes) + $(RM) $(addprefix $(DESTDIR)$(libdir)/,$(LIBGO_SHARED) $(LIBGO_SONAME) $(LIBGO_SYMLINK)) + endif +- # Uninstall debugging symbols +- $(RM) $(DESTDIR)$(libdbgdir)/$(LIB_SONAME) + # Uninstall configuration files + $(RM) $(DESTDIR)$(pkgconfdir)/$(LIB_PKGCFG) + # Uninstall binary files + $(RM) $(DESTDIR)$(bindir)/$(BIN_NAME) + # Uninstall documentation files +- $(RM) -r $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION) ++ # $(RM) -r $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION) + + dist: DESTDIR:=$(DIST_DIR)/$(LIB_NAME)_$(VERSION)$(addprefix -,$(TAG)) + dist: install +@@ -320,12 +299,6 @@ depsclean: + ifeq ($(WITH_NVCGO), yes) + -$(MAKE) -f $(MAKE_DIR)/nvcgo.mk clean + endif +-ifeq ($(WITH_LIBELF), no) +- -$(MAKE) -f $(MAKE_DIR)/elftoolchain.mk clean +-endif +-ifeq ($(WITH_TIRPC), yes) +- -$(MAKE) -f $(MAKE_DIR)/libtirpc.mk clean +-endif + + mostlyclean: + $(RM) $(LIB_OBJS) $(LIB_STATIC_OBJ) $(BIN_OBJS) $(DEPENDENCIES) +diff --git a/mk/common.mk b/mk/common.mk +index f6d5fbf..594ec08 100644 +--- a/mk/common.mk ++++ b/mk/common.mk +@@ -19,6 +19,7 @@ RPCGEN ?= rpcgen + BMAKE ?= MAKEFLAGS= bmake + DOCKER ?= docker + PATCH ?= patch ++PKG_CONFIG ?= pkg-config + + UID := $(shell id -u) + GID := $(shell id -g) +diff --git a/mk/nvcgo.mk b/mk/nvcgo.mk +index 0060f0e..877a72b 100644 +--- a/mk/nvcgo.mk ++++ b/mk/nvcgo.mk +@@ -17,7 +17,7 @@ include $(MAKE_DIR)/common.mk + ##### Source definitions ##### + + PREFIX := nvcgo +-SRCS_DIR := $(DEPS_DIR)/src/$(PREFIX) ++SRCS_DIR := $(CURDIR)/src/$(PREFIX) + VERSION := $(VERSION) + + ##### Public rules ##### +@@ -25,9 +25,6 @@ VERSION := $(VERSION) + .PHONY: all install clean + + build: +- $(RM) -rf $(SRCS_DIR) +- $(CP) -R $(CURDIR)/src/$(PREFIX) $(SRCS_DIR) +- $(MAKE) -C $(SRCS_DIR) VERSION=$(VERSION) clean + $(MAKE) -C $(SRCS_DIR) VERSION=$(VERSION) build + + install: build +diff --git a/mk/nvidia-modprobe.mk b/mk/nvidia-modprobe.mk +index 3406222..339275f 100644 +--- a/mk/nvidia-modprobe.mk ++++ b/mk/nvidia-modprobe.mk +@@ -25,7 +25,7 @@ PATCH_FILE := $(MAKE_DIR)/nvidia-modprobe.patch + + ARFLAGS := -rU + CPPFLAGS := -D_FORTIFY_SOURCE=2 -DNV_LINUX +-CFLAGS := -O2 -g -fdata-sections -ffunction-sections -fstack-protector -fno-strict-aliasing -fPIC ++CFLAGS := -fdata-sections -ffunction-sections -fstack-protector -fno-strict-aliasing -fPIC $(CFLAGS) + + ##### Private rules ##### + +diff --git a/src/nvcgo/Makefile b/src/nvcgo/Makefile +index eaee95a..7d5bd74 100644 +--- a/src/nvcgo/Makefile ++++ b/src/nvcgo/Makefile +@@ -31,15 +31,15 @@ OBJ_NAME := $(LIB_NAME).so + HDR_NAME := $(LIB_NAME).h + CTYPES_H := ctypes.h + +-CGO_CFLAGS := -std=gnu11 -O2 +-CGO_LDFLAGS := -Wl,--gc-sections -Wl,-s -Wl,-soname,$(LIB_SONAME) ++CGO_CFLAGS := -std=gnu11 $(CGO_CFLAGS) ++CGO_LDFLAGS := -Wl,--gc-sections -Wl,-soname,$(LIB_SONAME) $(CGO_LDFLAGS) + + build: $(OBJ_NAME) + + $(OBJ_NAME): $(wildcard $(CURDIR)/*.go) $(wildcard */*.go) + export CGO_CFLAGS="$(CGO_CFLAGS)"; \ +- export CGO_LDFLAGS="$(CGO_LDFLAGS)"; \ +- $(GO) build -o $(@) -ldflags "-s -w" -buildmode=c-shared . ++ export CGO_LDFLAGS="-Wl,--gc-sections -Wl,-soname,$(LIB_SONAME) $(CGO_LDFLAGS)"; \ ++ $(GO) build -o $(@) -ldflags "$(GO_LDFLAGS)" -buildmode=c-shared . + + install: $(OBJ_NAME) + $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(libdir) $(includedir)/$(PKG_NAME)) diff --git a/sys-libs/libnvidia-container/libnvidia-container-1.17.2.ebuild b/sys-libs/libnvidia-container/libnvidia-container-1.17.2.ebuild new file mode 100644 index 000000000000..02a66df0cfc1 --- /dev/null +++ b/sys-libs/libnvidia-container/libnvidia-container-1.17.2.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +# 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="+seccomp static-libs" + +# libtirpc +# NOTE It seams that library also has optional support for net-libs/libtirpc, but I didn't +# manage to build without it, probably the support for that build-roted away. +DEPEND=" + net-libs/libtirpc:= + sys-libs/libcap + virtual/libelf:= + seccomp? ( sys-libs/libseccomp ) +" + +RDEPEND="${DEPEND} + elibc_glibc? ( x11-drivers/nvidia-drivers ) +" + +BDEPEND=" + dev-lang/go + net-libs/rpcsvc-proto + sys-apps/lsb-release + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-1.17.0-fix-makefile-r1.patch" +) + +DOCS=( 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_configure() { + export GOPATH="${S}" + export GOFLAGS="-mod=vendor" + export CFLAGS="${CFLAGS}" + export LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}" + export CGO_LDFLAGS="${CGO_LDFLAGS:-$LDFLAGS}" + + tc-export CC LD OBJCOPY PKG_CONFIG + + if ! tc-is-gcc; then + eerror "Building ${PN} with clang is not supported because of option \"-fplan9-extensions\"!" + die "$(tc-getCC) is not a supported compiler. Please use sys-devel/gcc" + fi + + # we could also set GO compiller, but it currently defaults to gccgo, but as for now I believe + # most users will prefer dev-lang/go and they usually don't define GO="go" their make.conf either. + # tc-export GO + + my_makeopts=( + prefix="${EPREFIX}/usr" + libdir="${EPREFIX}/usr/$(get_libdir)" + GO_LDFLAGS="-compressdwarf=false -linkmode=external" + WITH_SECCOMP="$(usex seccomp)" + ) + # WITH_TIRPC="$(usex libtirpc)" + + if [[ "${PV}" != "9999" ]] ; then + IFS='_' read -r MY_LIB_VERSION MY_LIB_TAG <<< "${PV}" + + my_makeopts=( "${my_makeopts[@]}" + REVISION="${PV}" + LIB_VERSION="${MY_LIB_VERSION}" + LIB_TAG="${MY_LIB_TAG}" + ) + fi +} + +src_compile() { + emake "${my_makeopts[@]}" +} + +src_install() { + emake "${my_makeopts[@]}" DESTDIR="${D}" install + # Install docs + einstalldocs # Bug 831705 + # Cleanup static libraries + if ! use static-libs ; then + find "${ED}" -name '*.a' -delete || die # Bug 783984 + fi +} diff --git a/sys-libs/libnvidia-container/libnvidia-container-9999.ebuild b/sys-libs/libnvidia-container/libnvidia-container-9999.ebuild new file mode 100644 index 000000000000..02a66df0cfc1 --- /dev/null +++ b/sys-libs/libnvidia-container/libnvidia-container-9999.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +# 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="+seccomp static-libs" + +# libtirpc +# NOTE It seams that library also has optional support for net-libs/libtirpc, but I didn't +# manage to build without it, probably the support for that build-roted away. +DEPEND=" + net-libs/libtirpc:= + sys-libs/libcap + virtual/libelf:= + seccomp? ( sys-libs/libseccomp ) +" + +RDEPEND="${DEPEND} + elibc_glibc? ( x11-drivers/nvidia-drivers ) +" + +BDEPEND=" + dev-lang/go + net-libs/rpcsvc-proto + sys-apps/lsb-release + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-1.17.0-fix-makefile-r1.patch" +) + +DOCS=( 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_configure() { + export GOPATH="${S}" + export GOFLAGS="-mod=vendor" + export CFLAGS="${CFLAGS}" + export LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}" + export CGO_LDFLAGS="${CGO_LDFLAGS:-$LDFLAGS}" + + tc-export CC LD OBJCOPY PKG_CONFIG + + if ! tc-is-gcc; then + eerror "Building ${PN} with clang is not supported because of option \"-fplan9-extensions\"!" + die "$(tc-getCC) is not a supported compiler. Please use sys-devel/gcc" + fi + + # we could also set GO compiller, but it currently defaults to gccgo, but as for now I believe + # most users will prefer dev-lang/go and they usually don't define GO="go" their make.conf either. + # tc-export GO + + my_makeopts=( + prefix="${EPREFIX}/usr" + libdir="${EPREFIX}/usr/$(get_libdir)" + GO_LDFLAGS="-compressdwarf=false -linkmode=external" + WITH_SECCOMP="$(usex seccomp)" + ) + # WITH_TIRPC="$(usex libtirpc)" + + if [[ "${PV}" != "9999" ]] ; then + IFS='_' read -r MY_LIB_VERSION MY_LIB_TAG <<< "${PV}" + + my_makeopts=( "${my_makeopts[@]}" + REVISION="${PV}" + LIB_VERSION="${MY_LIB_VERSION}" + LIB_TAG="${MY_LIB_TAG}" + ) + fi +} + +src_compile() { + emake "${my_makeopts[@]}" +} + +src_install() { + emake "${my_makeopts[@]}" DESTDIR="${D}" install + # Install docs + einstalldocs # Bug 831705 + # Cleanup static libraries + if ! use static-libs ; then + find "${ED}" -name '*.a' -delete || die # Bug 783984 + fi +} diff --git a/sys-libs/libnvidia-container/metadata.xml b/sys-libs/libnvidia-container/metadata.xml new file mode 100644 index 000000000000..006fc2ab915a --- /dev/null +++ b/sys-libs/libnvidia-container/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>vowstar@gmail.com</email> + <name>Huang Rui</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>zhixu.liu@gmail.com</email> + <name>Z. Liu</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">NVIDIA/libnvidia-container</remote-id> + </upstream> + <longdescription lang="en"> + NVIDIA container runtime library, this repository provides a library and + a simple CLI utility to automatically configure GNU/Linux containers + leveraging NVIDIA hardware. + The implementation relies on kernel primitives and is designed to be + agnostic of the container runtime. + </longdescription> + <longdescription lang="zh"> + NVIDIA容器运行时库,这个仓库提供了一个库和一个简单的命令行工具,用于自动 + 配置利用NVIDIA硬件的GNU/Linux容器。这个实现依赖于内核原语,并旨在与容器 + 运行时无关。 + </longdescription> +</pkgmetadata> diff --git a/sys-libs/pkgcraft/Manifest b/sys-libs/pkgcraft/Manifest index 296aae791ba9..0f122658b362 100644 --- a/sys-libs/pkgcraft/Manifest +++ b/sys-libs/pkgcraft/Manifest @@ -1,4 +1,4 @@ DIST pkgcraft-c-0.0.16.tar.xz 20787816 BLAKE2B 085ee23fce8e03fa82fcec210e31f032cbe51354a14de2f2261329f432c0f6460363898d735dc7ed1c4115a184d6b7a3ff9a7c4d1697b12e34729cda54f6c234 SHA512 a805919375c8791b73a803a61c10df9ba0db87381f7fdec976428cf07b287bd10f02a6c97d1b7bb4d483b37a4ec6e027ae397067b658e4a4b422102e42d814e3 -EBUILD pkgcraft-0.0.16-r1.ebuild 1993 BLAKE2B 6aade5dbcffa45216f7e27f02118f0c8ea432bce2b98ef5e474cab4c145e74468fc804020d1a1ee5abbe1397156b5cef755d0903c63d350c249d1b0d1e1b8d79 SHA512 c3d143d69bb598c5b2ed62754090756d4a886021db8b808e8e1699a76e97cbebecd697d31f0ce8b561bfa5ed6fa651cbb9f558cf4f252efdba04eb5fbdaa9f01 -EBUILD pkgcraft-9999.ebuild 1969 BLAKE2B 22650287eddaa2ed9a48f9c106a685e39f217f3754a0a2ba3f92ae8d1f3ba7300f29c28009d9bef9dc9b9d6d3849ba30d92966ebffc91f7a3000eb00d20934e9 SHA512 dc5891eeb9718d6148efe33439f6257f9930c41cda6fe49392259c5dfa25ecbd2b5a42e1fcd80bd1e96199840f3bd98299450ff6d13ae421d2ffc5506544834b +EBUILD pkgcraft-0.0.16-r1.ebuild 2105 BLAKE2B c88b897eb6d47e4ab311d5793ebb10ba4d5c5df9f1f0b9182021d7d8f2b166e158261ad0e6106e4b8fc606ab8b5a37e0cf9fa8c4899b9bc810a2f0a6a88ca3e2 SHA512 27a53e36195c714491b3acf63defab0e1ff39fc5679cd18de1c9e398eacc071bf2934f775360c6ac34d9d72ef1c7ce8ac1bf868674f34b279052165d3ea5e0cf +EBUILD pkgcraft-9999.ebuild 2105 BLAKE2B c88b897eb6d47e4ab311d5793ebb10ba4d5c5df9f1f0b9182021d7d8f2b166e158261ad0e6106e4b8fc606ab8b5a37e0cf9fa8c4899b9bc810a2f0a6a88ca3e2 SHA512 27a53e36195c714491b3acf63defab0e1ff39fc5679cd18de1c9e398eacc071bf2934f775360c6ac34d9d72ef1c7ce8ac1bf868674f34b279052165d3ea5e0cf MISC metadata.xml 322 BLAKE2B b0ee0fc53eb8b4b485f74806a78b5560aaf53f1772d7bd3e5af4e03385b3f3aed18fc52462c2d49de6c0d735db0cae3fab175b8adc0e5f7c4baa89e28973776f SHA512 9343cd5028750182fe9325c44f4c4c7df0976b79e0422b66e0fd16f94be76eaa203e8ecad5ec2cbed3535f455f038e51968850ced9afb27af9a98b6b968df88a diff --git a/sys-libs/pkgcraft/pkgcraft-0.0.16-r1.ebuild b/sys-libs/pkgcraft/pkgcraft-0.0.16-r1.ebuild index 0fe19eb425da..4f268ebdc188 100644 --- a/sys-libs/pkgcraft/pkgcraft-0.0.16-r1.ebuild +++ b/sys-libs/pkgcraft/pkgcraft-0.0.16-r1.ebuild @@ -7,7 +7,7 @@ CRATES=" " RUST_MIN_VER="1.77.1" -inherit edo cargo toolchain-funcs +inherit edo cargo flag-o-matic toolchain-funcs DESCRIPTION="C library for pkgcraft" HOMEPAGE="https://pkgcraft.github.io/" @@ -62,6 +62,9 @@ src_compile() { # For scallop building bash tc-export AR CC + # scallop uses modified bash-5.2 which relies on unprotoyped functions + append-cflags -std=gnu17 + # Can pass -vv if need more output from e.g. scallop configure edo cargo cbuild "${cargoargs[@]}" } diff --git a/sys-libs/pkgcraft/pkgcraft-9999.ebuild b/sys-libs/pkgcraft/pkgcraft-9999.ebuild index 024776672574..4f268ebdc188 100644 --- a/sys-libs/pkgcraft/pkgcraft-9999.ebuild +++ b/sys-libs/pkgcraft/pkgcraft-9999.ebuild @@ -4,7 +4,10 @@ EAPI=8 CRATES=" " -inherit edo cargo toolchain-funcs + +RUST_MIN_VER="1.77.1" + +inherit edo cargo flag-o-matic toolchain-funcs DESCRIPTION="C library for pkgcraft" HOMEPAGE="https://pkgcraft.github.io/" @@ -59,6 +62,9 @@ src_compile() { # For scallop building bash tc-export AR CC + # scallop uses modified bash-5.2 which relies on unprotoyped functions + append-cflags -std=gnu17 + # Can pass -vv if need more output from e.g. scallop configure edo cargo cbuild "${cargoargs[@]}" } |