aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2017-04-11 23:21:23 +0800
committermat <mat@FreeBSD.org>2017-04-11 23:21:23 +0800
commitaf9c60625bda3e97370cc91b90ea306f292c209d (patch)
tree5a5d971bd61fde66fbaa1b8da9469708d182ffc8 /Mk
parente0cd3420489573ca501c588fae760fa3739e168c (diff)
downloadfreebsd-ports-gnome-af9c60625bda3e97370cc91b90ea306f292c209d.tar.gz
freebsd-ports-gnome-af9c60625bda3e97370cc91b90ea306f292c209d.tar.zst
freebsd-ports-gnome-af9c60625bda3e97370cc91b90ea306f292c209d.zip
Make defining both PORTVERSION and DISTVERSION a DEV_ERROR.
There are two cases: - The upstream versionning is compatible with our versionning, or using DISTVERSION's magic leads to a compatible PORTVERSION, use DISTVERSION. If it is possible to use DISTVERSIONPREFIX and DISTVERSIONSUFFIX to make it compatible, use them. - The upstream versionning is not compatible with our versionning, and DISTVERSION's magic does not lead to a correct PORTVERSION, then set PORTVERSION to the equivalent of our versionning, and set DISTNAME. It is possible to use a third variable where you store upstream's version and use it to compute PORTVERSION and/or DISTNAME, like the dns/bind9* ports do. Sponsored by: Absolight
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 1b808c41c720..2f6d1f806bcb 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1296,9 +1296,9 @@ _PREMKINCLUDED= yes
IGNORE= PORTVERSION ${PORTVERSION} may not contain '-' '_' or ','
.endif
.if defined(DISTVERSION)
-DEV_WARNING+= "Defining both PORTVERSION and DISTVERSION is wrong, only set one and let the framework create the other one"
+DEV_ERROR+= "Defining both PORTVERSION and DISTVERSION is wrong, only set one, if necessary, set DISTNAME"
.endif
-DISTVERSION?= ${PORTVERSION:S/:/::/g}
+DISTVERSION= ${PORTVERSION:S/:/::/g}
.elif defined(DISTVERSION)
PORTVERSION= ${DISTVERSION:tl:C/([a-z])[a-z]+/\1/g:C/([0-9])([a-z])/\1.\2/g:C/:(.)/\1/g:C/[^a-z0-9+]+/./g}
.endif