From patchwork Mon Jan 16 05:13:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 46188 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 A5F4327BBEB; Mon, 16 Jan 2023 06:10:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 86A3D27BBE9 for ; Mon, 16 Jan 2023 06:10:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHIgj-0004jH-TX; Mon, 16 Jan 2023 01:09:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHIgi-0004iN-3V for guix-patches@gnu.org; Mon, 16 Jan 2023 01:09:44 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHIgh-0008WI-RK for guix-patches@gnu.org; Mon, 16 Jan 2023 01:09:43 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHHpm-0004gQ-6M for guix-patches@gnu.org; Mon, 16 Jan 2023 00:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60849] [PATCH core-updates 1/4] gnu: libtommath: Update to 1.2.0-0.03de03d. References: <20230116050942.26300-1-maxim.cournoyer@gmail.com> In-Reply-To: <20230116050942.26300-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Jan 2023 05:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60849 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60849@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 60849-submit@debbugs.gnu.org id=B60849.167384606617902 (code B ref 60849); Mon, 16 Jan 2023 05:15:02 +0000 Received: (at 60849) by debbugs.gnu.org; 16 Jan 2023 05:14:26 +0000 Received: from localhost ([127.0.0.1]:60164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHHpB-0004eY-If for submit@debbugs.gnu.org; Mon, 16 Jan 2023 00:14:26 -0500 Received: from mail-qt1-f172.google.com ([209.85.160.172]:42868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHHp9-0004eA-FW for 60849@debbugs.gnu.org; Mon, 16 Jan 2023 00:14:24 -0500 Received: by mail-qt1-f172.google.com with SMTP id fd15so13924865qtb.9 for <60849@debbugs.gnu.org>; Sun, 15 Jan 2023 21:14:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=p30WJ+AUsGGNrT8p61tmCLktKfFImWqPczcUNBfPNzI=; b=LtRhv5xxiv9RJHQWDwYZwZcRixo2mvFcfnxnJLCgu18W37VY8WlpYk4JtHhSjoD+NK bPQ5VOnrpE8NaYR+Sz2226fX3vI5scAEmpx4WKVLox8fsiI/6Xk6X7ayJUxKHwRBTSMF efV3kUEapUrhXJLtKebFn7bXzuCcLkM2FQQHVtXAnNHIc7PMtTOoZPTWvUmsBJ2PbEOb j1P+QZrM/lD3Jq7vi4MCn6V8+vov4mBan+AAPcy2ex1xznCzaoIjMyUaYHcK2a1HkQhs zkwTK5H9ZsSgMdDqAfN/S2aVoE4yyBVWaF3z9z4hA/IUnAkYZajTgWMWWFU+u2IUf2Ln gXpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p30WJ+AUsGGNrT8p61tmCLktKfFImWqPczcUNBfPNzI=; b=VYGX6G0fPOOaut8HllGnPs5g2u1ErBPODaVYILl/7HyHGJEQUfdjwke8QpNgxgc0CO sDJQKl402n320RPb84UXlDm5ufZJS1YMCgVUPQxA7wvvRup8GmaOoXMW/cE9ZQe9T2Tt B0fhy7E+XiyT2FAHmg4XJ9pfN12YLlEIf27BV8giJDwEbEAOYF5VqyjpibV/+2RRFZ6B nXwHYqr8yCTaXRFlyOjdJvn4ISuoLXui5a5tW7ycRKkOHgUBdwd7q0dm46aMM+8Yf6Jr ogMcZvKxW0rrOP4t0vEuCFa+0ZWzQEZv72o6mlyVYrC97vd+ps/+uI8h0ZN1AsubFLMd 0PlA== X-Gm-Message-State: AFqh2koNVifl23UDJVh05Xh6D1oRsXSm+IT8dMu6T/41Rr932W4Sh5o8 4fV4J+hg4xMsLM7CKCWCcfJNJyInFudHYY1w X-Google-Smtp-Source: AMrXdXv2bKpJoqJ712S14ohuO9ZyJytogNMjEW/RqRNrbEClAxRRo/Nyh1uTwAehm6RiVmEQqe7RGA== X-Received: by 2002:a05:622a:618b:b0:3ac:833b:e5b6 with SMTP id hh11-20020a05622a618b00b003ac833be5b6mr38506823qtb.21.1673846057766; Sun, 15 Jan 2023 21:14:17 -0800 (PST) Received: from localhost.localdomain (dsl-10-130-209.b2b2c.ca. [72.10.130.209]) by smtp.gmail.com with ESMTPSA id em8-20020a05622a438800b003a82ca4e81csm8084590qtb.80.2023.01.15.21.14.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 21:14:17 -0800 (PST) From: Maxim Cournoyer Date: Mon, 16 Jan 2023 00:13:36 -0500 Message-Id: <20230116051339.27113-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This change makes it possible to cross-compile libtommath. * gnu/packages/multiprecision.scm (libtommath): Update to 1.2.0-0.03de03d. [outputs]: Delete field. [source]: Fetch from git. [build-system]: Switch to cmake-build-system. [arguments]: Delete prepare-build, remove-static-library, check and install-static-library phases. Delete #:test-target and #:make-flags arguments. Add #:configure-flags argument. [native-inputs]: Delete field. --- gnu/packages/multiprecision.scm | 73 +++++++++++---------------------- 1 file changed, 25 insertions(+), 48 deletions(-) diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index b96efed843..c8b4639ed7 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2018 Eric Bavier ;;; Copyright © 2018, 2019, 2021 Efraim Flashner ;;; Copyright © 2021 Vinicius Monego -;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022, 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +39,7 @@ (define-module (gnu packages multiprecision) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu)) (define-public gmp @@ -439,56 +440,32 @@ (define-public libtomcrypt (license unlicense))) (define-public libtommath - (package - (name "libtommath") - (version "1.2.0") - (outputs '("out" "static")) - (source - (origin - (method url-fetch) - (uri (string-append "https://github.com/libtom/libtommath/releases/" - "download/v" version "/ltm-" version ".tar.xz")) - (sha256 - (base32 - "1c8q1qy88cjhdjlk3g24mra94h34c1ldvkjz0n2988c0yvn5xixp")))) - (build-system gnu-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (delete 'configure) ; no configure - (add-after 'unpack 'prepare-build - (lambda _ - ;; We want the shared library by default so force it to be the - ;; default makefile target. - (delete-file "makefile") - (symlink "makefile.shared" "makefile") - #t)) - (add-after 'install 'remove-static-library - (lambda* (#:key outputs #:allow-other-keys) - (delete-file (string-append (assoc-ref outputs "out") - "/lib/libtommath.a")) - #t)) - (replace 'check - (lambda* (#:key test-target make-flags #:allow-other-keys) - (apply invoke "make" test-target make-flags) - (invoke "sh" "test"))) - (add-after 'install 'install-static-library - (lambda* (#:key outputs #:allow-other-keys) - (invoke "make" "-f" "makefile.unix" "install" - (string-append "PREFIX=" (assoc-ref outputs "static")) - (string-append "CC=" (which "gcc")))))) - #:test-target "test" - #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - "CC=gcc"))) - (native-inputs - (list 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 + ;; Use the latest commit, as it contains a new CMake build system capable of + ;; cross-compilation. + (let ((revision "0") + (commit "03de03dee753442d4b23166982514639c4ccbc39")) + (package + (name "libtommath") + (version (git-version "1.2.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libtom/libtommath") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0maqzpc3f4l9b3bps8dj49b3schj3dfzvf2xcpilg8q3p1sxgrbl")))) + (build-system cmake-build-system) + (arguments (list #:configure-flags #~(list "-DBUILD_TESTING=ON" + "-DBUILD_SHARED_LIBS=ON"))) + (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. It's designed to provide an API that is simple to work with that provides fairly efficient routines that build out of the box without configuration.") - (license unlicense))) + (license unlicense)))) (define-public libtommath-1.1 (package