Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
msieve wrapper for sage
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikv committed Aug 23, 2015
1 parent 6e11d0c commit 1d4525f
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 1 deletion.
21 changes: 21 additions & 0 deletions build/pkgs/msieve/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
= MSIEVE =

== Description ==

Msieve is a C library implementing a suite of algorithms to factor large
integers. It contains an implementation of the SIQS and GNFS algorithms; the
latter has helped complete some of the largest public factorizations known

== License ==

Public Domain

== Upstream Contact ==

Jason Papadopoulos
http://sourceforge.net/projects/msieve/

== Changelog ==

06/16/11 Version 1.49
01/08/11 Version 1.48
4 changes: 4 additions & 0 deletions build/pkgs/msieve/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tarball=msieve-VERSION.tar.gz
sha1=919d97b4f7e4136d9262e3b37c470db880add930
md5=1a2712f5712d35683637dfc3e62285d2
cksum=537247399
4 changes: 4 additions & 0 deletions build/pkgs/msieve/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
1 change: 1 addition & 0 deletions build/pkgs/msieve/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.49.p0
10 changes: 10 additions & 0 deletions build/pkgs/msieve/patches/msieve-1.49-makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- Makefile 2011-05-08 03:05:11.000000000 +0200
+++ Makefile 2011-11-01 18:09:54.000000000 +0100
@@ -32,6 +32,7 @@

ifeq ($(ECM),1)
CFLAGS += -DHAVE_GMP_ECM
+ CFLAGS += "-I$(SAGE_LOCAL)/include"
LIBS += -lecm
endif
ifeq ($(WIN32_3GB),1)
45 changes: 45 additions & 0 deletions build/pkgs/msieve/spkg-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env bash

if [ "$SAGE_LOCAL" = "" ]; then
echo "SAGE_LOCAL undefined ... exiting";
echo "Maybe run 'sage -sh'?"
exit 1
fi

cd src
patch -p0 < ../patches/msieve-1.49-makefile.patch

if [ "`uname -m`" = "Power Macintosh" ]; then
$MAKE generic ECM=1
fi

if [ "`uname -m`" = "SunOS" ]; then
$MAKE generic ECM=1
fi

if [ "`uname -m`" = "i386" ]; then
$MAKE x86 ECM=1
fi

if [ "`uname -m`" = "i686" ]; then
$MAKE x86_64 ECM=1
fi

if [ "`uname -m`" = "x86_64" ]; then
$MAKE x86_64 ECM=1
fi

if [ $? -ne 0 ]; then
echo "Error building Msieve"
exit 1
fi

if [ ! -f msieve ]; then
echo "Error building Msieve -- no file msieve was produced."
exit 1
fi

$CP msieve "$SAGE_LOCAL"/bin/

exit 0

1 change: 1 addition & 0 deletions build/pkgs/msieve/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
experimental
2 changes: 1 addition & 1 deletion src/sage/interfaces/msieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from sage.rings.integer import Integer
from sage.misc.all import tmp_dir
from sage.misc.misc import SAGE_LOCAL
from sage.env import SAGE_LOCAL

binary = os.path.join(SAGE_LOCAL,"bin","msieve")

Expand Down

0 comments on commit 1d4525f

Please sign in to comment.