forked from mirrors/nixpkgs
Merge pull request #43563 from timokau/eclib-20180710
eclib: 20171219 -> 20180710
This commit is contained in:
commit
10ffc3c791
|
@ -0,0 +1,40 @@
|
|||
diff --git a/src/sage/interfaces/mwrank.py b/src/sage/interfaces/mwrank.py
|
||||
index 4417b59276..ae57ca2991 100644
|
||||
--- a/src/sage/interfaces/mwrank.py
|
||||
+++ b/src/sage/interfaces/mwrank.py
|
||||
@@ -54,8 +54,9 @@ def Mwrank(options="", server=None, server_tmpdir=None):
|
||||
sage: M = Mwrank('-v 0 -l')
|
||||
sage: print(M('0 0 1 -1 0'))
|
||||
Curve [0,0,1,-1,0] : Rank = 1
|
||||
- Generator 1 is [0:-1:1]; height 0.0511114082399688
|
||||
- Regulator = 0.0511114082399688
|
||||
+ Generator 1 is [0:-1:1]; height 0.051111408239969
|
||||
+ Regulator = 0.051111408239969
|
||||
+
|
||||
"""
|
||||
global instances
|
||||
try:
|
||||
diff --git a/src/sage/libs/eclib/wrap.cpp b/src/sage/libs/eclib/wrap.cpp
|
||||
index 5fd5693b53..d12468faa8 100644
|
||||
--- a/src/sage/libs/eclib/wrap.cpp
|
||||
+++ b/src/sage/libs/eclib/wrap.cpp
|
||||
@@ -133,8 +133,8 @@ char* Curvedata_isogeny_class(struct Curvedata* E, int verbose)
|
||||
|
||||
|
||||
int mw_process(struct Curvedata* curve, struct mw* m,
|
||||
- const struct bigint* x, const struct bigint* y,
|
||||
- const struct bigint* z, int sat)
|
||||
+ const bigint* x, const bigint* y,
|
||||
+ const bigint* z, int sat)
|
||||
{
|
||||
Point P(*curve, *x, *y, *z);
|
||||
if (!P.isvalid())
|
||||
@@ -188,7 +188,7 @@ int mw_rank(struct mw* m)
|
||||
}
|
||||
|
||||
/* Returns index and unsat long array, which user must deallocate */
|
||||
-int mw_saturate(struct mw* m, struct bigint* index, char** unsat,
|
||||
+int mw_saturate(struct mw* m, bigint* index, char** unsat,
|
||||
long sat_bd, int odd_primes_only)
|
||||
{
|
||||
vector<long> v;
|
|
@ -176,6 +176,9 @@ stdenv.mkDerivation rec {
|
|||
|
||||
# https://trac.sagemath.org/ticket/24838 rebased
|
||||
./patches/pynac-0.7.22.patch
|
||||
|
||||
# https://trac.sagemath.org/ticket/25862
|
||||
./patches/eclib-20180710.patch
|
||||
];
|
||||
|
||||
patches = nixPatches ++ packageUpgradePatches;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, autoreconfHook
|
||||
, libtool
|
||||
, gettext
|
||||
|
@ -17,13 +18,25 @@ assert withFlint -> flint != null;
|
|||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "eclib";
|
||||
version = "20171219";
|
||||
version = "20180710"; # upgrade might break the sage interface
|
||||
# sage tests to run:
|
||||
# src/sage/interfaces/mwrank.py
|
||||
# src/sage/libs/eclib
|
||||
# ping @timokau for more info
|
||||
src = fetchFromGitHub {
|
||||
owner = "JohnCremona";
|
||||
repo = "${pname}";
|
||||
rev = "v${version}";
|
||||
sha256 = "1yw488ng0labpxqqpxq0710qnndxl8plvcaqklpbwwd62a47knlr";
|
||||
sha256 = "1kmwpw971sipb4499c9b35q5pz6sms5qndqrvq7396d8hhwjg1i2";
|
||||
};
|
||||
patches = [
|
||||
# One of the headers doesn't get installed.
|
||||
# See https://github.com/NixOS/nixpkgs/pull/43476.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/JohnCremona/eclib/pull/42/commits/c9b96429815e31a6e3372c106e31eef2a96431f9.patch";
|
||||
sha256 = "0cw26h94m66rbh8jjsfnb1bvc6z7ybh8zcp8xl5nhxjxiawhcl73";
|
||||
})
|
||||
];
|
||||
buildInputs = [
|
||||
pari
|
||||
ntl
|
||||
|
@ -35,12 +48,12 @@ stdenv.mkDerivation rec {
|
|||
autoreconfHook
|
||||
];
|
||||
doCheck = true;
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
inherit version;
|
||||
description = ''Elliptic curve tools'';
|
||||
homepage = https://github.com/JohnCremona/eclib;
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ raskin timokau ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue