2007-01-05 07:58:52 +00:00
|
|
|
# New ports collection makefile for: msieve
|
|
|
|
# Date created: 2007-01-02
|
|
|
|
# Whom: Daniel Roethlisberger <daniel@roe.ch>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= msieve
|
2011-06-24 09:21:54 +00:00
|
|
|
PORTVERSION= 1.49
|
2007-01-05 07:58:52 +00:00
|
|
|
CATEGORIES= math
|
2010-08-28 12:55:19 +00:00
|
|
|
MASTER_SITES= SF
|
|
|
|
MASTER_SITE_SUBDIR= \
|
|
|
|
${PORTNAME}/${PORTNAME}/${PORTNAME:C/^m/M/}%20v${PORTVERSION}/
|
2007-01-05 07:58:52 +00:00
|
|
|
DISTNAME= ${PORTNAME}${PORTVERSION:S/.//}
|
|
|
|
|
2010-08-10 05:50:52 +00:00
|
|
|
MAINTAINER= bf@FreeBSD.org
|
2007-01-09 21:31:56 +00:00
|
|
|
COMMENT= Fast factorization of big integers using MPQS and GNFS
|
2007-01-05 07:58:52 +00:00
|
|
|
|
2008-03-30 00:09:07 +00:00
|
|
|
BUILD_DEPENDS= ${LOCALBASE}/lib/libecm.a:${PORTSDIR}/math/gmp-ecm
|
|
|
|
|
2007-01-05 07:58:52 +00:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
|
|
|
USE_GMAKE= yes
|
2011-06-24 09:21:54 +00:00
|
|
|
CFLAGS+= ${PTHREAD_CFLAGS} -I${LOCALBASE}/include
|
2010-08-29 08:52:36 +00:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
|
|
MAKE_ENV= LDFLAGS="${LDFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}" ECM=1
|
2007-01-05 07:58:52 +00:00
|
|
|
|
2011-06-24 09:21:54 +00:00
|
|
|
HEADERS= mp.h msieve.h util.h
|
|
|
|
PLIST_FILES= bin/msieve lib/libmsieve.a ${HEADERS:S|^|include/msieve/|}
|
2007-01-05 07:58:52 +00:00
|
|
|
PLIST_DIRS= include/msieve
|
|
|
|
PORTDOCS= Changes Readme Readme.nfs Readme.qs
|
|
|
|
|
2008-03-30 00:09:07 +00:00
|
|
|
OPTIONS= OCFLAGS "Enable optimized CFLAGS" On
|
2007-01-05 07:58:52 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2008-03-30 00:09:07 +00:00
|
|
|
.if !defined(WITHOUT_OCFLAGS)
|
2010-08-29 08:52:36 +00:00
|
|
|
CFLAGS+= -O3 -ffast-math -fomit-frame-pointer -DNDEBUG
|
2008-03-30 00:09:07 +00:00
|
|
|
.endif
|
|
|
|
|
2008-11-09 16:54:01 +00:00
|
|
|
.if ${OSVERSION} >= 700042 && ${ARCH} == "sparc64"
|
2011-06-24 09:21:54 +00:00
|
|
|
BROKEN= Does not compile on sparc64
|
2007-06-09 21:37:22 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${ARCH} == "i386"
|
2008-03-30 00:09:07 +00:00
|
|
|
ALL_TARGET= x86
|
2011-06-24 09:21:54 +00:00
|
|
|
.elif ${ARCH} == "amd64"
|
2008-03-30 00:09:07 +00:00
|
|
|
ALL_TARGET= x86_64
|
2011-06-24 09:21:54 +00:00
|
|
|
.else
|
|
|
|
ALL_TARGET= generic
|
2008-02-01 12:15:17 +00:00
|
|
|
.endif
|
|
|
|
|
2011-06-24 09:21:54 +00:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e "\|^CC =|d" -e "\|^OPT_FLAGS =|d" \
|
|
|
|
-e "\|^CFLAGS =|s|=|+=|" ${WRKSRC}/Makefile
|
|
|
|
|
2007-01-05 07:58:52 +00:00
|
|
|
do-install:
|
2011-06-24 09:21:54 +00:00
|
|
|
@${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
|
2007-01-05 07:58:52 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2011-06-24 09:21:54 +00:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
@(cd ${WRKSRC}; ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR})
|
2007-01-05 07:58:52 +00:00
|
|
|
.endif
|
|
|
|
|
2011-02-07 07:41:28 +00:00
|
|
|
regression-test test check: build
|
2011-06-24 09:21:54 +00:00
|
|
|
@(cd ${WRKSRC}; ./msieve -q -d 1 2385734365243128176756453434347656453122245767798)
|
2011-02-07 07:41:28 +00:00
|
|
|
|
2007-01-05 07:58:52 +00:00
|
|
|
.include <bsd.port.post.mk>
|