1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00
freebsd-ports/math/msieve/Makefile
Mathieu Arnold 60d1a83c2a MASTER_SITES cleanup.
- Replace ${MASTER_SITE_FOO} with FOO.
- Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9%
  of the time.)
- Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and
  no hint of what it should be was present.
- Fix some logic.
- And generally, make things more simple and easy to understand.

While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and
SAMBA macros.

Also, replace some EXTRACT_SUFX occurences with USES=tar:*.

Checked by:	make fetch-urlall-list
With hat:	portmgr
Sponsored by:	Absolight
2015-05-14 10:15:04 +00:00

77 lines
1.9 KiB
Makefile

# Created by: Daniel Roethlisberger <daniel@roe.ch>
# $FreeBSD$
PORTNAME= msieve
PORTVERSION= 1.51
PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= SF/${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
BUILD_DEPENDS= ${LOCALBASE}/lib/libecm.a:${PORTSDIR}/math/gmp-ecm
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USES= gmake
MAKE_ENV= ECM=1
HEADERS= mp.h msieve.h util.h
PLIST_FILES= bin/msieve lib/libmsieve.a ${HEADERS:S|^|include/msieve/|}
PORTDOCS= Changes Readme Readme.nfs Readme.qs
OPTIONS_DEFINE= OPTIMIZED_CFLAGS DOCS
OPTIONS_DEFAULT= OPTIMIZED_CFLAGS
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
CFLAGS+= -O3 -ffast-math
.if defined(WITHOUT_DEBUG) || !defined(WITH_DEBUG)
CFLAGS+= -fomit-frame-pointer -DNDEBUG
.endif
.endif
.if ${MACHINE_CPU:Mathlon}
CFLAGS+= -DHAS_AMD_MMX
.endif
.if ${MACHINE_CPU:Msse}
CFLAGS+= -DHAS_SSE
.endif
.if ${MACHINE_CPU:Msse2}
CFLAGS+= -DHAS_SSE2
.endif
.if ${ARCH} == "sparc64"
BROKEN= Does not compile on sparc64
.endif
post-patch:
@${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 ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${PREFIX}/include/msieve
@cd ${WRKSRC}/include; ${INSTALL_DATA} ${HEADERS} ${STAGEDIR}${PREFIX}/include/msieve
@${INSTALL_DATA} ${WRKSRC}/libmsieve.a ${STAGEDIR}${PREFIX}/lib
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@cd ${WRKSRC}; ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.endif
regression-test test check: build
@cd ${WRKSRC}; \
./msieve -q -d 1 2385734365243128176756453434347656453122245767798
.include <bsd.port.mk>