git: 16ca40f1cf0f - 2023Q2 - graphics/drm-51*-kmod: Add Makefile.version

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Wed, 10 May 2023 07:25:11 UTC
The branch 2023Q2 has been updated by manu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=16ca40f1cf0feb5d36b36efa84e384c772ccd373

commit 16ca40f1cf0feb5d36b36efa84e384c772ccd373
Author:     Austin Shafer <ashafer@badland.io>
AuthorDate: 2023-05-03 07:40:25 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-05-10 07:24:40 +0000

    graphics/drm-51*-kmod: Add Makefile.version
    
    Projects that live outside of drm-kmod (such as nvidia-drm) will need
    to query the version of drm-kmod built against in order to grab the
    correct sources. This adds a Makefile.version they can include to do
    so.
    
    Differential Revision:  https://reviews.freebsd.org/D39885
    
    (cherry picked from commit 4eef420a2503f1e573d4925797f9118b9decd1ed)
---
 graphics/drm-510-kmod/Makefile         | 6 ++++--
 graphics/drm-510-kmod/Makefile.version | 5 +++++
 graphics/drm-515-kmod/Makefile         | 6 ++++--
 graphics/drm-515-kmod/Makefile.version | 5 +++++
 4 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/graphics/drm-510-kmod/Makefile b/graphics/drm-510-kmod/Makefile
index 95c6f5e8c87e..006e94e8aef2 100644
--- a/graphics/drm-510-kmod/Makefile
+++ b/graphics/drm-510-kmod/Makefile
@@ -1,8 +1,10 @@
 PORTNAME=	drm-510-kmod
-PORTVERSION=	5.10.163
+PORTVERSION=	${DRM_KMOD_DISTVERSION}
 PORTREVISION=	5
 CATEGORIES=	graphics kld
 
+.include "Makefile.version"
+
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	DRM drivers modules
 WWW=		https://github.com/freebsd/drm-kmod/
@@ -20,7 +22,7 @@ USES=		kmod uidfix compiler:c++11-lang
 USE_GITHUB=	yes
 GH_ACCOUNT=	freebsd
 GH_PROJECT=	drm-kmod
-GH_TAGNAME=	drm_v5.10.163_4
+GH_TAGNAME=	${DRM_KMOD_GH_TAGNAME}
 
 .include <bsd.port.options.mk>
 
diff --git a/graphics/drm-510-kmod/Makefile.version b/graphics/drm-510-kmod/Makefile.version
new file mode 100644
index 000000000000..508c74f0f80d
--- /dev/null
+++ b/graphics/drm-510-kmod/Makefile.version
@@ -0,0 +1,5 @@
+# drm-kmod common version definition
+#
+# This will be included from consumers such as nvidia-drm
+DRM_KMOD_DISTVERSION=	5.10.163
+DRM_KMOD_GH_TAGNAME=	drm_v5.10.163_4
diff --git a/graphics/drm-515-kmod/Makefile b/graphics/drm-515-kmod/Makefile
index ffe174967aa7..8df22ba5655d 100644
--- a/graphics/drm-515-kmod/Makefile
+++ b/graphics/drm-515-kmod/Makefile
@@ -1,8 +1,10 @@
 PORTNAME=	drm-515-kmod
-PORTVERSION=	5.15.25
+PORTVERSION=	${DRM_KMOD_DISTVERSION}
 PORTREVISION=	2
 CATEGORIES=	graphics kld
 
+.include "Makefile.version"
+
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	DRM drivers modules
 WWW=		https://github.com/freebsd/drm-kmod/
@@ -20,7 +22,7 @@ USES=		kmod uidfix compiler:c++11-lang
 USE_GITHUB=	yes
 GH_ACCOUNT=	freebsd
 GH_PROJECT=	drm-kmod
-GH_TAGNAME=	drm_v5.15.25_4
+GH_TAGNAME=	${DRM_KMOD_GH_TAGNAME}
 
 .include <bsd.port.options.mk>
 
diff --git a/graphics/drm-515-kmod/Makefile.version b/graphics/drm-515-kmod/Makefile.version
new file mode 100644
index 000000000000..54c49ac53b70
--- /dev/null
+++ b/graphics/drm-515-kmod/Makefile.version
@@ -0,0 +1,5 @@
+# drm-kmod common version definition
+#
+# This will be included from consumers such as nvidia-drm
+DRM_KMOD_DISTVERSION=	5.15.25
+DRM_KMOD_GH_TAGNAME=	drm_v5.15.25_4