diff options
author | Brendan Fabeny <bf@FreeBSD.org> | 2013-03-03 02:09:06 +0000 |
---|---|---|
committer | Brendan Fabeny <bf@FreeBSD.org> | 2013-03-03 02:09:06 +0000 |
commit | 1a0966f6a07be723051ab659043ddd846126e180 (patch) | |
tree | 24485352c4f8ceddd44ac1730c16a68246b2ab3a /math/msieve | |
parent | 7ffc02da623de0304f693565c56da9f83f2130b7 (diff) | |
download | ports-1a0966f6a07be723051ab659043ddd846126e180.tar.gz ports-1a0966f6a07be723051ab659043ddd846126e180.zip |
Notes
Diffstat (limited to 'math/msieve')
-rw-r--r-- | math/msieve/Makefile | 71 | ||||
-rw-r--r-- | math/msieve/distinfo | 4 |
2 files changed, 42 insertions, 33 deletions
diff --git a/math/msieve/Makefile b/math/msieve/Makefile index 40c2f7426e4e..5cdeeea2c950 100644 --- a/math/msieve/Makefile +++ b/math/msieve/Makefile @@ -1,17 +1,13 @@ -# New ports collection makefile for: msieve -# Date created: 2007-01-02 -# Whom: Daniel Roethlisberger <daniel@roe.ch> -# +# Created by: Daniel Roethlisberger <daniel@roe.ch> # $FreeBSD$ -# PORTNAME= msieve -PORTVERSION= 1.50 +PORTVERSION= 1.51 CATEGORIES= math MASTER_SITES= SF MASTER_SITE_SUBDIR= \ - ${PORTNAME}/${PORTNAME}/${PORTNAME:C/^m/M/}%20v${PORTVERSION}/ -DISTNAME= ${PORTNAME}${PORTVERSION:S/.//}src + ${PORTNAME}/${PORTNAME}/${PORTNAME:C/^m/M/}%20v${PORTVERSION} +DISTNAME= ${PORTNAME}${PORTVERSION:S/.//} MAINTAINER= bf@FreeBSD.org COMMENT= Fast factorization of big integers using MPQS and GNFS @@ -20,50 +16,63 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/libecm.a:${PORTSDIR}/math/gmp-ecm WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} USE_GMAKE= yes -CFLAGS+= ${PTHREAD_CFLAGS} -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -MAKE_ENV= PTHREAD_LIBS="${PTHREAD_LIBS}" ECM=1 +MAKE_ENV= ECM=1 HEADERS= mp.h msieve.h util.h PLIST_FILES= bin/msieve lib/libmsieve.a ${HEADERS:S|^|include/msieve/|} PLIST_DIRS= include/msieve PORTDOCS= Changes Readme Readme.nfs Readme.qs -OPTIONS= OCFLAGS "Enable optimized CFLAGS" On +OPTIONS_DEFINE= OPTIMIZED_CFLAGS +OPTIONS_DEFAULT= OPTIMIZED_CFLAGS -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> -.if !defined(WITHOUT_OCFLAGS) -CFLAGS+= -O3 -ffast-math -fomit-frame-pointer -DNDEBUG +.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} +CFLAGS+= -O3 -ffast-math +.if defined(WITHOUT_DEBUG) || !defined(WITH_DEBUG) +CFLAGS+= -fomit-frame-pointer -DNDEBUG +.endif .endif -.if ${OSVERSION} >= 700042 && ${ARCH} == "sparc64" -BROKEN= Does not compile on sparc64 +.if ${MACHINE_CPU:Mathlon} +CFLAGS+= -DHAS_AMD_MMX +.endif + +.if ${MACHINE_CPU:Msse} +CFLAGS+= -DHAS_SSE .endif -.if ${ARCH} == "i386" -ALL_TARGET= x86 -.elif ${ARCH} == "amd64" -ALL_TARGET= x86_64 -.else -ALL_TARGET= generic +.if ${MACHINE_CPU:Msse2} +CFLAGS+= -DHAS_SSE2 +.endif + +.if ${OSVERSION} >= 700042 && ${ARCH} == "sparc64" +BROKEN= Does not compile on sparc64 .endif post-patch: - @${REINPLACE_CMD} -e "\|^CC =|d" -e "\|^OPT_FLAGS =|d" \ - -e "\|^CFLAGS =|s|=|+=|" ${WRKSRC}/Makefile + @${REINPLACE_CMD} -E \ + -e '/(^(CC|OPT_FLAGS) =|-DNDEBUG|svnversion|-ldl)/d' \ + -e '/^CFLAGS =/s/=/+=/' \ + -e 's@-Ignfs/poly/stage1@& -I${LOCALBASE}/include@' \ + -e 's@-lecm@-L${LOCALBASE}/lib &@' \ + -e 's/-lpthread/-pthread/' \ + -e 's/-DHAS_SSE2//' \ + ${WRKSRC}/Makefile do-install: @${INSTALL_PROGRAM} ${WRKSRC}/msieve ${PREFIX}/bin @${MKDIR} ${PREFIX}/include/msieve - @(cd ${WRKSRC}/include; ${INSTALL_DATA} ${HEADERS} ${PREFIX}/include/msieve) - @${INSTALL_DATA} ${WRKSRC}/libmsieve.a ${PREFIX}/lib -.if !defined(NOPORTDOCS) + @cd ${WRKSRC}/include; ${INSTALL_DATA} ${HEADERS} ${PREFIX}/include/msieve + @${INSTALL_LIB} ${WRKSRC}/libmsieve.a ${PREFIX}/lib +.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${DOCSDIR} - @(cd ${WRKSRC}; ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}) + @cd ${WRKSRC}; ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif regression-test test check: build - @(cd ${WRKSRC}; ./msieve -q -d 1 2385734365243128176756453434347656453122245767798) + @cd ${WRKSRC}; \ + ./msieve -q -d 1 2385734365243128176756453434347656453122245767798 -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/math/msieve/distinfo b/math/msieve/distinfo index 0484ed79e7d1..7e16c8d28f53 100644 --- a/math/msieve/distinfo +++ b/math/msieve/distinfo @@ -1,2 +1,2 @@ -SHA256 (msieve150src.tar.gz) = 42e58975fe03ba8d3ffae096962aa4d53d381aa0f9cfb5e6244da11eadcce676 -SIZE (msieve150src.tar.gz) = 547458 +SHA256 (msieve151.tar.gz) = 26bc1d0d89325986aacfbafb687451f3de5da1bd388e087ec3ac24813e9dc948 +SIZE (msieve151.tar.gz) = 623885 |