all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: 34942@debbugs.gnu.org
Subject: [bug#34942] [PATCH] gnu: Add mlucas.
Date: Fri, 22 Mar 2019 09:17:29 +0530	[thread overview]
Message-ID: <20190322034729.17348-1-arunisaac@systemreboot.net> (raw)

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

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ddb4672ff9..c10267432a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4818,3 +4818,54 @@ implemented as callable objects, and bases of finite element spaces.")
 built on top of DUNE, the Distributed and Unified Numerics Environment.")
     ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
     (license (list license:lgpl3+ license:gpl2))))
+
+(define-public mlucas
+  (package
+    (name "mlucas")
+    (version "18")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://mersenneforum.org/mayer/src/C/mlucas_v" version ".txz"))
+       (sha256
+        (base32
+         "1ax12qj9lyvnx4vs3gx7l8r3wx5gjbsdswp5f00ik9z0wz7xf297"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("python2" ,python-2)))
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (chdir "src")
+             (call-with-output-file "Makefile"
+               (lambda (port)
+                 (format port "CC = gcc
+CFLAGS = -O3 ~a -DUSE_THREADS
+LDLIBS = -lm -lpthread -lrt
+Mlucas: $(addsuffix .o,$(basename $(wildcard *.c)))
+"
+                         ,(let ((system (or (%current-target-system)
+                                            (%current-system))))
+                            (cond
+                             ((string-prefix? "x86_64" system) "-DUSE_SSE2")
+                             (else ""))))))
+             #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+               (install-file "Mlucas" bin)
+               (install-file "primenet.py" bin))
+             #t)))))
+    (home-page "https://www.mersenne.org")
+    (synopsis "Great Internet Mersenne Prime Search (GIMPS) distributed computing client")
+    (description "Mlucas performs Lucas-Lehmer primality testing of Mersenne
+numbers in search of a world-record 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).  Mlucas also includes a simple Python script for assignment
+management via the GIMPS project's Primenet server.")
+    (license license:gpl2+)))
-- 
2.21.0

             reply	other threads:[~2019-03-22  3:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22  3:47 Arun Isaac [this message]
2019-03-30 10:41 ` [bug#34942] [PATCH] gnu: Add mlucas Ludovic Courtès
2019-04-01 14:46   ` bug#34942: " Arun Isaac

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

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

  git send-email \
    --in-reply-to=20190322034729.17348-1-arunisaac@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=34942@debbugs.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.