diff options
author | miwi <miwi@FreeBSD.org> | 2007-01-05 15:58:52 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-01-05 15:58:52 +0800 |
commit | 0c52f5367e3ed4670ff8a8f2ee48ea68f6c4ba8b (patch) | |
tree | 24167de50d59ec34d8d033c40d649e5fb615509a /math/msieve | |
parent | 70f3720119e693604cc210e7090288c69f8e5583 (diff) | |
download | freebsd-ports-gnome-0c52f5367e3ed4670ff8a8f2ee48ea68f6c4ba8b.tar.gz freebsd-ports-gnome-0c52f5367e3ed4670ff8a8f2ee48ea68f6c4ba8b.tar.zst freebsd-ports-gnome-0c52f5367e3ed4670ff8a8f2ee48ea68f6c4ba8b.zip |
Msieve is a library and utility for factoring large integers using the most
powerful modern algorithms. It features a stable and very fast implementation
of a self-initializing multiple polynomial quadratic sieve (MPQS), plus a
highly experimental and unfinished number field sieve (NFS) implementation.
Primary design goals are speed, portability and ease of use. Msieve claims to
be the fastest implementation for factoring general inputs between 40 and 100
decimal digits.
Author: Jason Papadopoulos <jasonp@boo.net>
WWW: http://www.boo.net/~jasonp/qs.html
PR: ports/107477
Submitted by: Daniel Roethlisberger <daniel at roe.ch>
Diffstat (limited to 'math/msieve')
-rw-r--r-- | math/msieve/Makefile | 55 | ||||
-rw-r--r-- | math/msieve/distinfo | 3 | ||||
-rw-r--r-- | math/msieve/files/patch-Makefile | 46 | ||||
-rw-r--r-- | math/msieve/files/patch-include-util.h | 14 | ||||
-rw-r--r-- | math/msieve/pkg-descr | 10 |
5 files changed, 128 insertions, 0 deletions
diff --git a/math/msieve/Makefile b/math/msieve/Makefile new file mode 100644 index 000000000000..56924276b29f --- /dev/null +++ b/math/msieve/Makefile @@ -0,0 +1,55 @@ +# New ports collection makefile for: msieve +# Date created: 2007-01-02 +# Whom: Daniel Roethlisberger <daniel@roe.ch> +# +# $FreeBSD$ +# + +PORTNAME= msieve +PORTVERSION= 1.13 +CATEGORIES= math +MASTER_SITES= http://www.boo.net/~jasonp/ \ + http://mirror.roe.ch/dist/msieve/ +DISTNAME= ${PORTNAME}${PORTVERSION:S/.//} + +MAINTAINER= daniel@roe.ch +COMMENT= Fast factorization of big integers using MPQS and NFS + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +USE_GMAKE= yes +MAKE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ + LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \ + PTHREAD_LIBS="${PTHREAD_LIBS}" + +PLIST_FILES= bin/msieve lib/libmsieve.a include/msieve/msieve.h \ + include/msieve/mp.h include/msieve/util.h +PLIST_DIRS= include/msieve +PORTDOCS= Changes Readme Readme.nfs Readme.qs + +OPTIONS= OCFLAGS "Enable optimized CFLAGS" On \ + NFS "Enable Number Field Sieve (EXPERIMENTAL)" Off + +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_OCFLAGS) +CFLAGS+= -O3 -ffast-math -fomit-frame-pointer +.endif + +.if defined(WITH_NFS) +LIB_DEPENDS+= gsl.9:${PORTSDIR}/math/gsl +ALL_TARGET= nfs +.endif + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/msieve ${PREFIX}/bin + ${MKDIR} ${PREFIX}/include/msieve + ${INSTALL_DATA} ${WRKSRC}/include/msieve.h ${PREFIX}/include/msieve + ${INSTALL_DATA} ${WRKSRC}/include/mp.h ${PREFIX}/include/msieve + ${INSTALL_DATA} ${WRKSRC}/include/util.h ${PREFIX}/include/msieve + ${INSTALL_DATA} ${WRKSRC}/libmsieve.a ${PREFIX}/lib +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} +.endif + +.include <bsd.port.post.mk> diff --git a/math/msieve/distinfo b/math/msieve/distinfo new file mode 100644 index 000000000000..b5cc8f72e65e --- /dev/null +++ b/math/msieve/distinfo @@ -0,0 +1,3 @@ +MD5 (msieve113.tar.gz) = 88a2b7ac1cf5a67dc1d3b5861d1b03e1 +SHA256 (msieve113.tar.gz) = a9f76cdeab4c95a5facc5c9b21063ff58e5b598ddc9c480c72631cdaee13a5b9 +SIZE (msieve113.tar.gz) = 188723 diff --git a/math/msieve/files/patch-Makefile b/math/msieve/files/patch-Makefile new file mode 100644 index 000000000000..1f5c7646c2e9 --- /dev/null +++ b/math/msieve/files/patch-Makefile @@ -0,0 +1,46 @@ +--- Makefile.orig Sun Dec 31 21:10:39 2006 ++++ Makefile Wed Jan 3 01:34:16 2007 +@@ -22,21 +22,21 @@ + # WARN_FLAGS = -Wall -W -Wconversion + + # gcc for x86 and x86-64 +-CC = gcc +-OPT_FLAGS = -O3 -fomit-frame-pointer ++#CC = gcc ++#OPT_FLAGS = -O3 -fomit-frame-pointer + # MACHINE_FLAGS = -march=pentium4 -DHAVE_CMOV + # MACHINE_FLAGS = -march=k8 -DHAVE_CMOV +-MACHINE_FLAGS = -march=athlon -DHAVE_CMOV ++#MACHINE_FLAGS = -march=athlon -DHAVE_CMOV + # MACHINE_FLAGS = -march=pentium-m -DHAVE_CMOV + WARN_FLAGS = -Wall -W -Wconversion + + # note that if GSL was built as a shared library you may need + # to append -lgslcblas to LIB_GSL, or even build a static version + +-LIB_THREAD = -lpthread +-LIB_GSL = -lgsl ++LIB_THREAD = $(PTHREAD_LIBS) ++LIB_GSL = -lgsl -lgslcblas + +-CFLAGS = $(OPT_FLAGS) $(MACHINE_FLAGS) $(WARN_FLAGS) -Iinclude ++CFLAGS += $(OPT_FLAGS) $(WARN_FLAGS) -DHAVE_CMOV -Iinclude $(CPPFLAGS) + + COMMON_HDR = \ + include/ap.h \ +@@ -100,13 +100,13 @@ + rm -f libmsieve.a + ar r libmsieve.a $(OBJS) + ranlib libmsieve.a +- $(CC) $(CFLAGS) demo.c -o msieve -lm libmsieve.a $(LIB_THREAD) ++ $(CC) $(CFLAGS) $(LDFLAGS) demo.c -o msieve -lm libmsieve.a $(LIB_THREAD) + + nfs: $(NFS_OBJS) + rm -f libmsieve.a + ar r libmsieve.a $(NFS_OBJS) + ranlib libmsieve.a +- $(CC) $(CFLAGS) demo.c -o msieve -lm libmsieve.a \ ++ $(CC) $(CFLAGS) $(LDFLAGS) demo.c -o msieve -lm libmsieve.a \ + $(LIB_THREAD) $(LIB_GSL) + + %.o: %.c $(COMMON_HDR) diff --git a/math/msieve/files/patch-include-util.h b/math/msieve/files/patch-include-util.h new file mode 100644 index 000000000000..35d8f0a6342e --- /dev/null +++ b/math/msieve/files/patch-include-util.h @@ -0,0 +1,14 @@ +--- include/util.h.orig Sun Dec 31 16:30:03 2006 ++++ include/util.h Wed Jan 3 18:00:10 2007 +@@ -43,7 +43,10 @@ + #include <math.h> + #include <stdarg.h> + #include <time.h> +-#ifndef _MSC_VER ++#include <osreldate.h> ++#if defined(FREEBSD) && (__FreeBSD_version < 500000) ++#include <inttypes.h> ++#elsif !defined(_MSC_VER) + #include <stdint.h> + #endif + diff --git a/math/msieve/pkg-descr b/math/msieve/pkg-descr new file mode 100644 index 000000000000..15797b445ec6 --- /dev/null +++ b/math/msieve/pkg-descr @@ -0,0 +1,10 @@ +Msieve is a library and utility for factoring large integers using the most +powerful modern algorithms. It features a stable and very fast implementation +of a self-initializing multiple polynomial quadratic sieve (MPQS), plus a +highly experimental and unfinished number field sieve (NFS) implementation. +Primary design goals are speed, portability and ease of use. Msieve claims to +be the fastest implementation for factoring general inputs between 40 and 100 +decimal digits. + +Author: Jason Papadopoulos <jasonp@boo.net> +WWW: http://www.boo.net/~jasonp/qs.html |