unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Vong <alexvong1995@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH 2/2] gnu: Add Mlucas.
Date: Sat, 31 Oct 2015 21:56:56 +0800	[thread overview]
Message-ID: <20151031215656.4fa557f2@debian> (raw)

From 00c6dce0002c07a1fecbe5d53bbbb724d0e6379b Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sat, 31 Oct 2015 19:50:50 +0800
Subject: [PATCH 2/2] gnu: Add Mlucas.

* gnu/packages/maths.scm (mlucas): New variable.
---
 gnu/packages/maths.scm | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b4b930d..8076f51 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -32,10 +32,14 @@
   #:use-module (guix download)
   #:use-module (guix svn-download)
   #:use-module (guix utils)
+  #:use-module (guix build build-flags)
   #:use-module (guix build utils)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages autogen)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
@@ -1975,3 +1979,67 @@ algorithm and optimum parameters depending on the dataset.
 FLANN is written in C++ and contains bindings for C, Octave and Python.")
     (license (license:non-copyleft "file://COPYING"
                                 "See COPYING in the distribution."))))
+
+(define-public mlucas
+  (let ( ; some dpkg-buildflags and custom build flags presented as flag-list
+        (custom-flag-list
+         (flag-list-
+          (flag-list+ all-flag-list
+                      (flag-list
+                       #:CFLAGS '("-Ofast"
+                                  "-pipe"
+                                  "-flto"
+                                  "-fno-aggressive-loop-optimizations")
+                       #:LDFLAGS '("-Wl,--as-needed")))
+          default-flag-list)))
+    ;; start package definition
+    (package
+     (name "mlucas")
+     (version "14.1")
+     (source (origin
+              (method url-fetch)
+              (uri (string-append "http://hogranch.com/mayer/src/C/mlucas-"
+                                  version
+                                  ".tar.xz"))
+              (sha256
+               (base32
+                "1i6j1479icxfwp3ixs6dk65qilv9hn7213q3iibndlgwjfmh0gb4"))))
+     (build-system gnu-build-system)
+     (arguments
+      `(#:phases
+        (modify-phases %standard-phases
+                       (add-before 'configure
+                                   'bootstrap
+                                   (lambda _
+                                     (zero? (system "./bootstrap")))))
+        #:configure-flags
+        '("--disable-NORMAL-CFLAGS"
+          "--disable-TRICKY-CFLAGS"
+          "--enable-MLUCAS-DEFAULT-PATH"
+          "--enable-verbose-compiler"
+          ,@(flag-list->string-list custom-flag-list))))
+     ;; run-time dependencies
+     (propagated-inputs `(("coreutils" ,coreutils)
+                          ("sed" ,sed)))
+     ;; build-time dependencies
+     (native-inputs `(("autogen" ,autogen)
+                      ("autoconf" ,autoconf)
+                      ("automake" ,automake)
+                      ("perl" ,perl)))
+     ;; descriptions of the package
+     (synopsis "Program to perform Lucas-Lehmer test on a Mersenne number")
+     (description "mlucas performs Lucas-Lehmer test
+on prime-exponent Mersenne numbers,
+that is, integers of the form 2 ^ p - 1, with prime exponent p.
+In short, everything you need to search for world-record Mersenne primes!
+It has been used in the verification of various Mersenne primes,
+including the 45th, 46th and 48th found Mersenne prime.
+
+You may use it to test any suitable number as you wish,
+but it is preferable that you do so in a coordinated fashion,
+as part of the Great Internet Mersenne Prime Search (GIMPS).
+For more information on GIMPS,
+see <http://www.mersenne.org/prime.html> for details.
+")
+     (home-page "http://hogranch.com/mayer/README.html")
+     (license license:gpl2+))))
-- 
2.1.4

             reply	other threads:[~2015-10-31 13:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-31 13:56 Alex Vong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-10-25  6:12 [PATCH 2/2] gnu: Add Mlucas Alex Vong
2015-10-26 11:34 ` Paul van der Walt
2015-10-26 11:49   ` Alex Vong
2015-10-26 11:56     ` Paul van der Walt
2015-11-05 21:57       ` Ludovic Courtès
2015-11-07  4:27   ` Andreas Enge
2015-11-07 12:47     ` Alex Vong
2015-11-05 22:08 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151031215656.4fa557f2@debian \
    --to=alexvong1995@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).