ports/122196: [maintainer] math/msieve - update to 1.34
Daniel Roethlisberger
daniel at roe.ch
Fri Mar 28 15:40:01 UTC 2008
>Number: 122196
>Category: ports
>Synopsis: [maintainer] math/msieve - update to 1.34
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 28 15:40:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Daniel Roethlisberger
>Release: FreeBSD 6.3-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD calvin.roe.ch 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #0: Wed Feb 13 02:56:56 UTC 2008 root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/SMP i386
>Description:
Update msieve to 1.34 which features much improved GNFS code.
Building in GNFS support is no longer optional in the upstream
build process, so this option was removed from the port.
>How-To-Repeat:
>Fix:
--- msieve-1.34.diff begins here ---
diff -ruN msieve.orig/Makefile msieve/Makefile
--- msieve.orig/Makefile 2008-02-01 13:15:17.000000000 +0100
+++ msieve/Makefile 2008-03-28 16:06:52.000000000 +0100
@@ -6,8 +6,7 @@
#
PORTNAME= msieve
-PORTVERSION= 1.23
-PORTREVISION= 1
+PORTVERSION= 1.34
CATEGORIES= math
MASTER_SITES= http://www.boo.net/~jasonp/ \
http://mirror.roe.ch/dist/msieve/
@@ -16,49 +15,44 @@
MAINTAINER= daniel at roe.ch
COMMENT= Fast factorization of big integers using MPQS and GNFS
+BUILD_DEPENDS= ${LOCALBASE}/lib/libecm.a:${PORTSDIR}/math/gmp-ecm
+
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_GMAKE= yes
MAKE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
- PTHREAD_LIBS="${PTHREAD_LIBS}"
+ PTHREAD_LIBS="${PTHREAD_LIBS}" \
+ ECM=1
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 \
- GNFS "General Number Field Sieve support" On
+OPTIONS= OCFLAGS "Enable optimized CFLAGS" On
.include <bsd.port.pre.mk>
+.if !defined(WITHOUT_OCFLAGS)
+CFLAGS+= -O3 -ffast-math -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
+.else
+CFLAGS+= -D_FILE_OFFSET_BITS=64
+.endif
+
# Does not build with GCC 4.2
.if ${OSVERSION} >= 700042
USE_GCC= 3.4
+.if ${ARCH} == "sparc64"
+BROKEN= Does not compile on sparc64-7
.endif
-
-.if !defined(WITHOUT_OCFLAGS)
-CFLAGS+= -O3 -ffast-math -fomit-frame-pointer
-.endif
-
-.if !defined(WITHOUT_GNFS)
-LIB_DEPENDS+= gsl.10:${PORTSDIR}/math/gsl
-ALLTGT_SUFX= _nfs
.endif
-ALLTGT= generic
+ALL_TARGET= generic
.if ${ARCH} == "i386"
-ALLTGT= x86
+ALL_TARGET= x86
.endif
.if ${ARCH} == "amd64"
-ALLTGT= x86_64
-.endif
-ALL_TARGET= ${ALLTGT}${ALLTGT_SUFX}
-
-.if ${OSVERSION} >= 700042
-.if ${ARCH} == "sparc64"
-BROKEN= Does not compile with GCC 4.2
-.endif
+ALL_TARGET= x86_64
.endif
do-install:
diff -ruN msieve.orig/distinfo msieve/distinfo
--- msieve.orig/distinfo 2007-06-09 23:37:22.000000000 +0200
+++ msieve/distinfo 2008-03-28 11:51:24.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (msieve123.tar.gz) = 18743917ef837decb8c6d20c903523a0
-SHA256 (msieve123.tar.gz) = 4b5cb2149420b16805badfdc54af1b74b3907d49885e6a0a1a3a04372e4f119c
-SIZE (msieve123.tar.gz) = 241693
+MD5 (msieve134.tar.gz) = 22ce5db1ddeb2c54978a074176eeee4f
+SHA256 (msieve134.tar.gz) = 570c131d4d1131129b3a68e0e2426f779f4581b9db29d61d891a70df32efba5c
+SIZE (msieve134.tar.gz) = 314962
diff -ruN msieve.orig/files/patch-Makefile msieve/files/patch-Makefile
--- msieve.orig/files/patch-Makefile 2007-06-09 23:37:22.000000000 +0200
+++ msieve/files/patch-Makefile 2008-03-28 13:16:00.000000000 +0100
@@ -1,78 +1,27 @@
---- Makefile.orig Sun May 27 07:36:20 2007
-+++ Makefile Wed May 30 21:57:37 2007
-@@ -24,19 +24,19 @@
-
- # gcc with basic optimization (-march flag could
- # get overridden by architecture-specific builds)
--CC = gcc
-+#CC = gcc
- WARN_FLAGS = -Wall -W -Wconversion
--OPT_FLAGS = -O3 -fomit-frame-pointer -DNDEBUG -march=athlon
-+#OPT_FLAGS = -O3 -fomit-frame-pointer -DNDEBUG -march=athlon
- # OPT_FLAGS = -O3 -fomit-frame-pointer -DNDEBUG -march=k8
-
- # 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
- # Note to MinGW users: comment out LIB_THREAD, you don't need it
-
--LIB_THREAD = -lpthread
--LIB_GSL = -lgsl
-+LIB_THREAD = $(PTHREAD_LIBS)
-+LIB_GSL = -lgsl -lgslcblas
-
--CFLAGS = $(OPT_FLAGS) $(MACHINE_FLAGS) $(WARN_FLAGS) -Iinclude
-+CFLAGS += $(WARN_FLAGS) -Iinclude $(CPPFLAGS)
-
- #---------------------------------- Generic file lists -------------------
-
-@@ -160,7 +160,7 @@
- ar r libmsieve.a $(COMMON_OBJS_NO_NFS) $(QS_OBJS) \
- $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86)
- 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)
-
- x86_64: $(COMMON_OBJS_NO_NFS) $(QS_OBJS) \
- $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86_64)
-@@ -168,13 +168,13 @@
- ar r libmsieve.a $(COMMON_OBJS_NO_NFS) $(QS_OBJS) \
- $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86_64)
- 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)
-
- generic: $(COMMON_OBJS_NO_NFS) $(QS_OBJS) $(QS_CORE_OBJS)
- rm -f libmsieve.a
- ar r libmsieve.a $(COMMON_OBJS_NO_NFS) $(QS_OBJS) $(QS_CORE_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)
-
- x86_nfs: $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) \
- $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86)
-@@ -182,7 +182,7 @@
- ar r libmsieve.a $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) \
- $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86)
- 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)
-
- x86_64_nfs: $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) \
-@@ -191,14 +191,14 @@
- ar r libmsieve.a $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) \
- $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86_64)
- 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)
-
- generic_nfs: $(COMMON_OBJS) $(QS_OBJS) $(QS_CORE_OBJS) $(NFS_OBJS)
- rm -f libmsieve.a
- ar r libmsieve.a $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) $(QS_CORE_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)
-
- clean:
+--- Makefile.orig 2008-03-23 05:32:08.000000000 +0100
++++ Makefile 2008-03-28 13:15:14.000000000 +0100
+@@ -26,12 +26,12 @@
+
+ # gcc with basic optimization (-march flag could
+ # get overridden by architecture-specific builds)
+-CC = gcc
++#CC = gcc
+ WARN_FLAGS = -Wall -W -Wconversion
+-OPT_FLAGS = -O3 -fomit-frame-pointer -march=athlon -D_FILE_OFFSET_BITS=64
++#OPT_FLAGS = -O3 -fomit-frame-pointer -march=athlon -D_FILE_OFFSET_BITS=64
+ #OPT_FLAGS = -O3 -fomit-frame-pointer -march=k8
+
+-CFLAGS = $(OPT_FLAGS) $(MACHINE_FLAGS) $(WARN_FLAGS) -Iinclude -Ignfs/poly
++CFLAGS += $(WARN_FLAGS) -Iinclude -Ignfs/poly $(CPPFLAGS)
+
+ LIBS = -lm
+
+@@ -50,7 +50,7 @@
+ endif
+
+ # Note to MinGW users: comment out the next line, you don't need it
+-LIBS += -lpthread
++LIBS += $(PTHREAD_LIBS)
+
+ #---------------------------------- Generic file lists -------------------
+
diff -ruN msieve.orig/pkg-descr msieve/pkg-descr
--- msieve.orig/pkg-descr 2007-01-09 22:31:56.000000000 +0100
+++ msieve/pkg-descr 2008-03-28 14:23:47.000000000 +0100
@@ -1,11 +1,11 @@
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 highly
-experimental and unfinished general number field sieve (GNFS) code.
+of a self-initializing multiple polynomial quadratic sieve (MPQS), plus a
+somewhat experimental general number field sieve (GNFS) code.
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.
+decimal digits, but can handle larger input as well.
Author: Jason Papadopoulos <jasonp at boo.net>
WWW: http://www.boo.net/~jasonp/qs.html
--- msieve-1.34.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list