freebsd-ports/x11/nvidia-driver/Makefile.common

39 lines
1.1 KiB
Text
Raw Normal View History

# $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
.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