aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2019-10-23 17:46:15 +0800
committerdanfe <danfe@FreeBSD.org>2019-10-23 17:46:15 +0800
commit7afd9b7e6b9ab30de400719ba15c28b855820765 (patch)
tree3bb852fa6e0362c5b84c5c30af8bb3b1d182954a /x11
parentde0b1f74a121486ab567367d5726c0dabde2d653 (diff)
downloadfreebsd-ports-gnome-7afd9b7e6b9ab30de400719ba15c28b855820765.tar.gz
freebsd-ports-gnome-7afd9b7e6b9ab30de400719ba15c28b855820765.tar.zst
freebsd-ports-gnome-7afd9b7e6b9ab30de400719ba15c28b855820765.zip
In sight of upcoming updates, move some common code and knobs to separate
file, to allow inclusion from different ports. No functional changes.
Diffstat (limited to 'x11')
-rw-r--r--x11/nvidia-driver/Makefile32
-rw-r--r--x11/nvidia-driver/Makefile.common34
2 files changed, 35 insertions, 31 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index a043e86d0de7..edf4d09accaf 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -22,14 +22,9 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= danfe@FreeBSD.org
COMMENT= NVidia graphics card binary drivers for hardware OpenGL rendering
-LICENSE= NVIDIA
-LICENSE_NAME= License For Customer Use of NVIDIA Software
LICENSE_FILE= ${WRKSRC}/doc/license.txt
-LICENSE_PERMS= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept
+.include "${.CURDIR}/../nvidia-driver/Makefile.common"
-ONLY_FOR_ARCHS= i386 amd64
-
-ARCH_SUFX= x86${ARCH:S/i386//:S/amd/_/}
USES= kmod uidfix
USE_XORG= x11 xorg-server xext
USE_GL= gl
@@ -55,18 +50,6 @@ DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0
MODULESDIR= lib/xorg/modules
PORTDOCS= *
-# NVVERSION is float since r372065 (integer values become less readable
-# after minor version could occupy three digits)
-.if ${DISTVERSION:C/[0-9]+//g} == ".." # major.minor.update
-NVVERSION= ${DISTVERSION:S/./.0/:R}${DISTVERSION:E}
-.else # major.minor
-. if ${DISTVERSION:E} < 100
-NVVERSION= ${DISTVERSION:S/./.0/} # allow minor > 99
-. else
-NVVERSION= ${DISTVERSION}
-. endif
-.endif
-
.if ${NVVERSION} >= 331.013
SUB_LIST+= NVGL=""
.else
@@ -630,17 +613,4 @@ post-install-LINUX-on:
.endfor
.endif
-# Target below can be used instead of standard `makesum' to correctly
-# update distinfo (i.e., keeping other driver version entries intact)
-.if ${.TARGETS:Mupdate-distinfo}
-DISTINFO_FILE= ${MASTERDIR}/distinfo.new
-.endif
-
-update-distinfo: makesum .SILENT
- ${REINPLACE_CMD} -e '/${ARCH_SUFX}-${NVVERSION:R}/s/^/~/' \
- ${MASTERDIR}/distinfo
- ${REINPLACE_CMD} -e '/^~SHA256/r ${DISTINFO_FILE}' -e '/^~/d' \
- ${MASTERDIR}/distinfo
- ${RM} ${DISTINFO_FILE} ${MASTERDIR}/distinfo.bak
-
.include <bsd.port.post.mk>
diff --git a/x11/nvidia-driver/Makefile.common b/x11/nvidia-driver/Makefile.common
new file mode 100644
index 000000000000..004efc90f8cc
--- /dev/null
+++ b/x11/nvidia-driver/Makefile.common
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+LICENSE= NVIDIA
+LICENSE_NAME= License For Customer Use of NVIDIA Software
+LICENSE_PERMS= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept
+
+ONLY_FOR_ARCHS= i386 amd64
+
+ARCH_SUFX= x86${ARCH:S/i386//:S/amd/_/}
+
+# NVVERSION is float since r372065 (integer values become less readable
+# after minor version could occupy three digits)
+.if ${DISTVERSION:C/[0-9]+//g} == ".." # major.minor.update
+NVVERSION= ${DISTVERSION:S/./.0/:R}${DISTVERSION:E}
+.else # major.minor
+. if ${DISTVERSION:E} < 100
+NVVERSION= ${DISTVERSION:S/./.0/} # allow minor > 99
+. else
+NVVERSION= ${DISTVERSION}
+. endif
+.endif
+
+# Target below can be used instead of standard `makesum' to correctly
+# update distinfo (i.e., keeping other driver version entries intact)
+.if ${.TARGETS:Mupdate-distinfo}
+DISTINFO_FILE= ${MASTERDIR}/distinfo.new
+.endif
+
+update-distinfo: makesum .SILENT
+ ${REINPLACE_CMD} -e '/${ARCH_SUFX}-${NVVERSION:R}/s/^/~/' \
+ ${MASTERDIR}/distinfo
+ ${REINPLACE_CMD} -e '/^~SHA256/r ${DISTINFO_FILE}' -e '/^~/d' \
+ ${MASTERDIR}/distinfo
+ ${RM} ${DISTINFO_FILE} ${MASTERDIR}/distinfo.bak