From nobody Tue Dec 27 12:06:41 2022 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NhD0W5hftz1J8NV for ; Tue, 27 Dec 2022 12:06:51 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "fuz.su", Issuer "fuz.su" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NhD0W33D7z3xYM; Tue, 27 Dec 2022 12:06:51 +0000 (UTC) (envelope-from fuz@fuz.su) Authentication-Results: mx1.freebsd.org; none Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.16.1/8.16.1) with ESMTPS id 2BRC6f8a012733 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 27 Dec 2022 12:06:41 GMT (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.16.1/8.16.1/Submit) id 2BRC6fMF012732; Tue, 27 Dec 2022 13:06:41 +0100 (CET) (envelope-from fuz) Date: Tue, 27 Dec 2022 13:06:41 +0100 From: Robert Clausecker To: Nuno Teixeira Cc: ports@freebsd.org Subject: Re: MASTER_SITES with DISTVERSION substitution "S:/./-/" Message-ID: References: List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4NhD0W33D7z3xYM X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Hi Eduardo, Just like with sed(1), append a g modifier to substitute each occurrence: ${DISTVERSION:S/./-/g} Yours, Robert Clausecker Am Tue, Dec 27, 2022 at 12:03:04PM +0000 schrieb Nuno Teixeira: > Hello all, > > I'm working in a port (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) -- () ascii ribbon campaign - for an 8-bit clean world /\ - against html email - against proprietary attachments