freebsd-ports/x11/nvidia-driver/Makefile.common
Alexey Dokuchaev 6b8afacae7 Move the comment inside the patch file, as it now only applies to one
particular hunk, and there are several unrelated changes in that file.
While here, explain why LICENSE_FILE is set in the consumer ports.
2021-02-04 10:11:36 +00:00

39 lines
1.2 KiB
Text

# $FreeBSD$
# LICENSE_FILE is set in the consumer ports because its location varies
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
.if ${DISTVERSION:R} > 390
ONLY_FOR_ARCHS= amd64
.else
ONLY_FOR_ARCHS= i386 amd64
.endif
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