diff options
author | Austin Shafer <ashafer@badland.io> | 2023-08-18 14:31:22 +0000 |
---|---|---|
committer | Gleb Popov <arrowd@FreeBSD.org> | 2023-08-20 17:54:07 +0000 |
commit | 4754e9fd33c4fae0359a272d72d9aa7fe75c7a82 (patch) | |
tree | b998e4670e75f71af0f9beb9ac9f54dae2a9d9c7 /graphics/nvidia-drm-kmod | |
parent | c078575487b62a1dd2b6c5874ccc37898b87a1d2 (diff) | |
download | ports-4754e9fd33c4fae0359a272d72d9aa7fe75c7a82.tar.gz ports-4754e9fd33c4fae0359a272d72d9aa7fe75c7a82.zip |
graphics/nvidia-drm-[510,515]-kmod: Add the port.
This port provides the nvidia-drm.ko kernel module, as ported here:
https://github.com/amshafer/nvidia-driver
This module implements the DRM API, which is commonly used for PRIME and
Wayland setups.
Differential Revision: https://reviews.freebsd.org/D41497
Reviewed by: arrowd
Diffstat (limited to 'graphics/nvidia-drm-kmod')
-rw-r--r-- | graphics/nvidia-drm-kmod/Makefile | 25 | ||||
-rw-r--r-- | graphics/nvidia-drm-kmod/Makefile.common | 32 | ||||
-rw-r--r-- | graphics/nvidia-drm-kmod/pkg-descr | 1 |
3 files changed, 58 insertions, 0 deletions
diff --git a/graphics/nvidia-drm-kmod/Makefile b/graphics/nvidia-drm-kmod/Makefile new file mode 100644 index 000000000000..cc226f22dbf2 --- /dev/null +++ b/graphics/nvidia-drm-kmod/Makefile @@ -0,0 +1,25 @@ +PORTNAME= nvidia-drm-kmod +PORTVERSION= ${NVIDIA_DISTVERSION} +CATEGORIES= graphics kld + +MAINTAINER= ashafer@badland.io +COMMENT= NVIDIA DRM Kernel Module +WWW= https://github.com/amshafer/nvidia-driver + +USES= metaport + +.include "${.CURDIR}/../../x11/nvidia-driver/Makefile.version" +.include <bsd.port.pre.mk> + +# Only supported on FreeBSD 13.1+ +.if ${OPSYS} != FreeBSD +IGNORE= not supported on anything but FreeBSD (missing linuxkpi functionality) +.else +. if ${OSVERSION} >= 1301000 +RUN_DEPENDS+= ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-510-kmod +. else +IGNORE= not supported for this FreeBSD version +. endif +.endif + +.include <bsd.port.post.mk> diff --git a/graphics/nvidia-drm-kmod/Makefile.common b/graphics/nvidia-drm-kmod/Makefile.common new file mode 100644 index 000000000000..f97266bc03e1 --- /dev/null +++ b/graphics/nvidia-drm-kmod/Makefile.common @@ -0,0 +1,32 @@ +# Common rules for nvidia-drm-*-kmod ports + +MAINTAINER= ashafer@badland.io +COMMENT= NVIDIA DRM Kernel Module +WWW= https://github.com/amshafer/nvidia-driver + +ONLY_FOR_ARCHS= amd64 +USES= kmod uidfix + +SUB_FILES= 20-nvidia-drm-outputclass.conf + +RUN_DEPENDS+= ${KMODDIR}/nvidia.ko:x11/nvidia-driver + +.include "${.CURDIR}/../../x11/nvidia-driver/Makefile.version" + +LICENSE_FILE= ${WRKSRC}/nvidia/doc/license.txt + +NVIDIA_GH_TAGNAME= ${PORTNAME}-${PORTVERSION} +USE_GITHUB= yes +GH_ACCOUNT= amshafer freebsd:drm +GH_PROJECT= nvidia-driver drm-kmod:drm +GH_TAGNAME:= ${NVIDIA_GH_TAGNAME} ${DRM_KMOD_GH_TAGNAME}:drm + +PLIST_FILES= ${KMODDIR}/nvidia-drm.ko \ + share/X11/xorg.conf.d/20-nvidia-drm-outputclass.conf + +MAKE_ENV+= DRMKMODDIR=${WRKDIR}/drm-kmod-${DRM_KMOD_GH_TAGNAME}/ +WRKSRC_SUBDIR= nvidia/src/nvidia-drm/ + +post-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d/ + ${INSTALL_DATA} ${WRKDIR}/20-nvidia-drm-outputclass.conf ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d/ diff --git a/graphics/nvidia-drm-kmod/pkg-descr b/graphics/nvidia-drm-kmod/pkg-descr new file mode 100644 index 000000000000..9fea5fd244d8 --- /dev/null +++ b/graphics/nvidia-drm-kmod/pkg-descr @@ -0,0 +1 @@ +FreeBSD port of Linux's nvidia-drm.ko Kernel module. |