MASTER_SITES with DISTVERSION substitution "S:/./-/"

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Tue, 27 Dec 2022 12:03:04 UTC
Hello all,

I'm working in a port (267717
<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267717>) with a source
tarball hosted in github:

https://github.com/root-project/root/releases/download/v6-26-10/root_v6.26.10.source.tar.gz
---
PORTNAME=       root
DISTVERSION=    6.26.10
CATEGORIES=     devel science math parallel python
MASTER_SITES=
https://github.com/root-project/root/releases/download/v${DISTVERSION:S/./-/:S/./-/}/
DISTNAME=       ${PORTNAME}_v${DISTVERSION}.source
---

Is there a better way of replacing "." with "-" without using "S:///" 2
times:
${DISTVERSION:S/./-/:S/./-/}/
Using only one :S/./-/ will substitute the first match "6-26.10"

Thanks,


-- 
Nuno Teixeira
FreeBSD Committer (ports)