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.
This commit is contained in:
parent
f7f5dc5917
commit
92a479b4b1
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue