git: 92a479b4b1dc - main - math/tomsfastmath: Miscellaneous refinements

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Sat, 29 Oct 2022 04:42:12 UTC
The branch main has been updated by yasu:

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

commit 92a479b4b1dc14be648e2071ca9d84d2334cd4c0
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2022-10-28 14:50:22 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2022-10-29 04:41:13 +0000

    math/tomsfastmath: Miscellaneous refinements
    
    * Use Clang on i386. Build succeeds with all supported FreeBSD
      versions.
    * Switch to use release archive as per section 5.4.3 of Porter's
      Handbook.
    * Remove post-patch target. It is no-op now as version 0.13.1 doesn't
      use "%cc" in inline assembly codes any more.
    * Add LICENSE_FILE.
    * Tidy up Makefile with portfmt.
---
 math/tomsfastmath/Makefile | 28 ++++++++--------------------
 math/tomsfastmath/distinfo |  6 +++---
 2 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/math/tomsfastmath/Makefile b/math/tomsfastmath/Makefile
index bb83b086b2d9..35c74ea974f4 100644
--- a/math/tomsfastmath/Makefile
+++ b/math/tomsfastmath/Makefile
@@ -1,8 +1,9 @@
 PORTNAME=	tomsfastmath
 PORTVERSION=	0.13.1
 PORTREVISION=	4
-DISTVERSIONPREFIX=	v
 CATEGORIES=	math
+MASTER_SITES=	https://github.com/libtom/${PORTNAME}/releases/download/v${DISTVERSION}/
+DISTNAME=	tfm-${DISTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Portable fixed precision math library for fast exponentiations
@@ -10,34 +11,21 @@ WWW=		https://libtom.net/
 
 LICENSE=	PD WTFPL
 LICENSE_COMB=	dual
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		compiler:features gmake tar:bzip2
-USE_GITHUB=	yes
-GH_ACCOUNT=	libtom
+USES=		gmake tar:xz
 
 MAKEFILE=	makefile
 ALL_TARGET=	default
 CFLAGS+=	-fPIC
 
-PLIST_FILES=	include/tfm.h lib/libtfm.a
+WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSION}
 
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == i386
-# on clang:
-# src/mul/fp_mul_comba.c:349:11: error: inline assembly requires more registers than available
-USE_GCC=	yes
-.endif
-
-# Unbreak against Clang ("cc" is not a register)
-post-patch:
-	@${REINPLACE_CMD} -e 's,"%cc","cc",' \
-		${WRKSRC}/src/mont/fp_montgomery_reduce.c \
-		${WRKSRC}/src/mul/fp_mul_comba.c \
-		${WRKSRC}/src/sqr/fp_sqr_comba.c
+PLIST_FILES=	include/tfm.h \
+		lib/libtfm.a
 
 do-install:
 	${INSTALL_DATA} ${WRKSRC}/src/headers/tfm.h ${STAGEDIR}${PREFIX}/include
 	${INSTALL_DATA} ${WRKSRC}/libtfm.a ${STAGEDIR}${PREFIX}/lib
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/math/tomsfastmath/distinfo b/math/tomsfastmath/distinfo
index 413043cfbd75..b04b956f4630 100644
--- a/math/tomsfastmath/distinfo
+++ b/math/tomsfastmath/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1506584765
-SHA256 (libtom-tomsfastmath-v0.13.1_GH0.tar.gz) = 207e8624382e815f58bc5c3d4aad725d94588a6cc465d34634e6533dcaae2e0d
-SIZE (libtom-tomsfastmath-v0.13.1_GH0.tar.gz) = 421999
+TIMESTAMP = 1667000946
+SHA256 (tfm-0.13.1.tar.xz) = 47c97a1ada3ccc9fcbd2a8a922d5859a84b4ba53778c84c1d509c1a955ac1738
+SIZE (tfm-0.13.1.tar.xz) = 322684