git: a3f8fb1bb4e3 - main - biology/linux-foldingathome: Fix fetch on amd64

From: Mateusz Piotrowski <0mp_at_FreeBSD.org>
Date: Thu, 21 Aug 2025 15:41:57 UTC
The branch main has been updated by 0mp:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a3f8fb1bb4e3242a51151c819ef9aabcc3b138c6

commit a3f8fb1bb4e3242a51151c819ef9aabcc3b138c6
Author:     Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2025-08-21 15:20:52 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2025-08-21 15:41:39 +0000

    biology/linux-foldingathome: Fix fetch on amd64
    
    I forgot to group MASTER_SITES into the right groups. During the fix,
    however, I realized that we can simplify the whole mechanism by keeping
    not only the base name but also some part of the directory path in
    DISTNAME. This way names of DISTFILES are unique across architectures.
    
    Reported by:    pkg-fallout
    Fixes:  6086ff0b3283 biology/linux-foldingathome: Add support for aarch64
---
 biology/linux-foldingathome/Makefile | 17 +++++++----------
 biology/linux-foldingathome/distinfo | 14 +++++---------
 2 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/biology/linux-foldingathome/Makefile b/biology/linux-foldingathome/Makefile
index db870ea430ca..7df5db1a03c8 100644
--- a/biology/linux-foldingathome/Makefile
+++ b/biology/linux-foldingathome/Makefile
@@ -1,10 +1,9 @@
 PORTNAME=	foldingathome
 DISTVERSION=	8.4.9
 CATEGORIES=	biology linux
-MASTER_SITES=	${_MASTER_SITES}
+MASTER_SITES=	https://download.foldingathome.org/releases/public/fah-client/
 PKGNAMEPREFIX=	linux-
-DISTNAME=	fah-client_${DISTVERSION}-64bit-release
-DISTFILES=	${_DISTFILES}
+DISTNAME=	${_DISTNAME_${ARCH}}
 
 MAINTAINER=	0mp@FreeBSD.org
 COMMENT=	Folding@home Client
@@ -47,14 +46,12 @@ _FAHCLIENT_CONFIG_XML=	${ETCDIR}/config.xml
 _FAHCLIENT_WORK_DIR=	/var/db/fahclient
 _FAHCLIENT_PROGRAM=	${PREFIX}/bin/fah-client
 
-_MASTER_SITES_amd64=	https://download.foldingathome.org/releases/public/fah-client/debian-10-64bit/release/
-_MASTER_SITES_aarch64=	https://download.foldingathome.org/releases/public/fah-client/debian-stable-arm64/release/
+# The base name of the distribution file is the same for all supported
+# architectures, so we need to work around that in a creative way.
+_DISTNAME_amd64=	debian-10-64bit/release/fah-client_${DISTVERSION}-64bit-release
+_DISTNAME_aarch64=	debian-stable-arm64/release/fah-client_${DISTVERSION}-64bit-release
 .if make(makesum)
-_MASTER_SITES=		${ONLY_FOR_ARCHS:@.ARCH.@${_MASTER_SITES_${.ARCH.}}@}
-_DISTFILES=		${ONLY_FOR_ARCHS:@.ARCH.@${DISTNAME}${EXTRACT_SUFX}?a=${.ARCH.}@}
-.else
-_MASTER_SITES=		${_MASTER_SITES_${ARCH}}
-_DISTFILES=		${DISTNAME}${EXTRACT_SUFX}?a=${ARCH}
+DISTFILES=		${ONLY_FOR_ARCHS:@.ARCH.@${_DISTNAME_${.ARCH.}}${EXTRACT_SUFX}@}
 .endif
 
 do-install:
diff --git a/biology/linux-foldingathome/distinfo b/biology/linux-foldingathome/distinfo
index a66f1eafad98..8db90e6fd74a 100644
--- a/biology/linux-foldingathome/distinfo
+++ b/biology/linux-foldingathome/distinfo
@@ -1,9 +1,5 @@
-TIMESTAMP = 1755706532
-SHA256 (fah-client_8.4.9-64bit-release.tar.bz2?a=aarch64) = 14ea352a42be0d34a1a0e2a4b46139e03d619a56bdd4908faaa56dc2665fcf3b
-SIZE (fah-client_8.4.9-64bit-release.tar.bz2?a=aarch64) = 3667080
-SHA256 (fah-client_8.4.9-64bit-release.tar.bz2?a=amd64) = 14ea352a42be0d34a1a0e2a4b46139e03d619a56bdd4908faaa56dc2665fcf3b
-SIZE (fah-client_8.4.9-64bit-release.tar.bz2?a=amd64) = 3667080
-SHA256 (fah-client_8.4.9-64bit-release.tar.bz2?a=aarch64) = 14ea352a42be0d34a1a0e2a4b46139e03d619a56bdd4908faaa56dc2665fcf3b
-SIZE (fah-client_8.4.9-64bit-release.tar.bz2?a=aarch64) = 3667080
-SHA256 (fah-client_8.4.9-64bit-release.tar.bz2?a=amd64) = 14ea352a42be0d34a1a0e2a4b46139e03d619a56bdd4908faaa56dc2665fcf3b
-SIZE (fah-client_8.4.9-64bit-release.tar.bz2?a=amd64) = 3667080
+TIMESTAMP = 1755790886
+SHA256 (debian-stable-arm64/release/fah-client_8.4.9-64bit-release.tar.bz2) = 14ea352a42be0d34a1a0e2a4b46139e03d619a56bdd4908faaa56dc2665fcf3b
+SIZE (debian-stable-arm64/release/fah-client_8.4.9-64bit-release.tar.bz2) = 3667080
+SHA256 (debian-10-64bit/release/fah-client_8.4.9-64bit-release.tar.bz2) = 2acccbeda05649f6f913d29f91a22308e88ec3e117499f636a18dc56244d6cf1
+SIZE (debian-10-64bit/release/fah-client_8.4.9-64bit-release.tar.bz2) = 3649371