From patchwork Fri Feb 22 12:20:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 1218 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D327216C44; Fri, 22 Feb 2019 12:22:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 6AB5516BC6 for ; Fri, 22 Feb 2019 12:22:15 +0000 (GMT) Received: from localhost ([127.0.0.1]:49463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gx9qI-00053o-Qh for patchwork@mira.cbaines.net; Fri, 22 Feb 2019 07:22:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gx9qC-00052e-U1 for guix-patches@gnu.org; Fri, 22 Feb 2019 07:22:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gx9qA-0001Kz-RF for guix-patches@gnu.org; Fri, 22 Feb 2019 07:22:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34084) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gx9q6-0001Fi-RG for guix-patches@gnu.org; Fri, 22 Feb 2019 07:22:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gx9q6-0000NI-Hw for guix-patches@gnu.org; Fri, 22 Feb 2019 07:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34615] [PATCH] gnu: Add libtommath. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Feb 2019 12:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34615 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34615@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15508380661359 (code B ref -1); Fri, 22 Feb 2019 12:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Feb 2019 12:21:06 +0000 Received: from localhost ([127.0.0.1]:47625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gx9p5-0000LA-S1 for submit@debbugs.gnu.org; Fri, 22 Feb 2019 07:21:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gx9p1-0000Ku-0F for submit@debbugs.gnu.org; Fri, 22 Feb 2019 07:20:59 -0500 Received: from lists.gnu.org ([209.51.188.17]:58262) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gx9ou-0008Ry-Rb for submit@debbugs.gnu.org; Fri, 22 Feb 2019 07:20:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gx9ot-0004vw-BO for guix-patches@gnu.org; Fri, 22 Feb 2019 07:20:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gx9or-0008MM-NA for guix-patches@gnu.org; Fri, 22 Feb 2019 07:20:47 -0500 Received: from flashner.co.il ([178.62.234.194]:53928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gx9or-0007ve-2A for guix-patches@gnu.org; Fri, 22 Feb 2019 07:20:45 -0500 Received: from localhost (unknown [188.120.128.87]) by flashner.co.il (Postfix) with ESMTPSA id 642D5401D0; Fri, 22 Feb 2019 12:20:22 +0000 (UTC) From: Efraim Flashner Date: Fri, 22 Feb 2019 14:20:14 +0200 Message-Id: <20190222122014.21600-1-efraim@flashner.co.il> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/algebra.scm (libtommath): New variable. --- gnu/packages/algebra.scm | 47 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index f9ae22b3f3..98dc414ac5 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019 Nicolas Goaziou ;;; Copyright © 2014, 2018 Mark H Weaver ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus -;;; Copyright © 2017 Efraim Flashner +;;; Copyright © 2017, 2019 Efraim Flashner ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017, 2019 Eric Bavier @@ -1000,3 +1000,48 @@ objects.") ;; means that the gpl2+ licence of GAP itself applies, but to be on the ;; safe side, we drop them for now. (license license:gpl2+))) + +(define-public libtommath + (package + (name "libtommath") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/libtom/libtommath/releases/" + "download/v" version "/ltm-" version ".tar.xz")) + (sha256 + (base32 + "1bbyagqzfdbg37k1n08nsqzdf44z8zsnjjinqbsyj7rxg246qilh")) + (patches (search-patches "libtommath-fix-linkage.patch")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure + (add-after 'unpack 'prepare-build + (lambda _ + ;; Don't pull in coreutils. + (substitute* "makefile_include.mk" + (("arch") "uname -m")) + (delete-file "makefile") + (symlink "makefile.shared" "makefile") + #t)) + (replace 'check + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "test_standalone" make-flags) + (invoke "sh" "test"))) + (add-after 'check 'make-static + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "-f" "makefile.unix" "install" make-flags)))) + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "CC=gcc"))) + (native-inputs + `(("libtool" ,libtool))) + (home-page "https://www.libtom.net/LibTomMath/") + (synopsis "portable number theoretic multiple-precision integer library") + (description "LibTomMath is a portable number theoretic multiple-precision +integer library written entirely in C. The library is designed to provide a +simple to work with API that provides fairly efficient routines that build out +of the box without configuration.") + (license license:unlicense)))