From patchwork Wed Oct 18 12:26:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nigko Yerden X-Patchwork-Id: 54972 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 D827527BBE9; Wed, 18 Oct 2023 13:32:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, 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 7390127BBE2 for ; Wed, 18 Oct 2023 13:32:06 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt5iC-00023x-2h; Wed, 18 Oct 2023 08:31:44 -0400 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 1qt5i6-00021s-2z for guix-patches@gnu.org; Wed, 18 Oct 2023 08:31:39 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qt5i5-0000Vp-RM for guix-patches@gnu.org; Wed, 18 Oct 2023 08:31:37 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qt5iU-0006XF-F6; Wed, 18 Oct 2023 08:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66606] [PATCH] gnu: Add reduce-csl. Resent-From: Nigko Yerden Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net, guix-patches@gnu.org Resent-Date: Wed, 18 Oct 2023 12:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66606 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66606@debbugs.gnu.org Cc: Nigko Yerden , Andreas Enge , Efraim Flashner , Eric Bavier X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Andreas Enge , Efraim Flashner , Eric Bavier Received: via spool by submit@debbugs.gnu.org id=B.169763229025072 (code B ref -1); Wed, 18 Oct 2023 12:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Oct 2023 12:31:30 +0000 Received: from localhost ([127.0.0.1]:33416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt5hx-0006WI-63 for submit@debbugs.gnu.org; Wed, 18 Oct 2023 08:31:30 -0400 Received: from lists.gnu.org ([2001:470:142::17]:44814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt5hs-0006Vy-5J for submit@debbugs.gnu.org; Wed, 18 Oct 2023 08:31:28 -0400 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 1qt5hC-0001ro-T0 for guix-patches@gnu.org; Wed, 18 Oct 2023 08:30:46 -0400 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qt5h8-0000MA-TE for guix-patches@gnu.org; Wed, 18 Oct 2023 08:30:41 -0400 Received: by mail-lj1-x244.google.com with SMTP id 38308e7fff4ca-2c503da4fd6so75247541fa.1 for ; Wed, 18 Oct 2023 05:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697632233; x=1698237033; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=qb1zxa/QVY/gMxUguP/8bSOCuXUHEaHiJJmsJ3UjhS0=; b=CF8VflQYziCXw6mbY1zOyTwbcstKnsGkdmMdVvSvgdIfzmnUpaSZeddFt/k//hUFfR 01OdeOkA05fKexhPL0dYL8qH9FXz4w3Bb1Kku8X1ieIuvm3w/3lma974274ipoGIkJW8 f5bRUoAAZEQ9OXBX5BPWrKvuqbiFS9VEyRe/xHTK3LDJ/ghIpJhTDDuzlgee7Z2rpuwB +K+TOJsZjpJdTOIJs+3uo4Hsqrm8aCkL6xEUakWLbmmAp+mZBur484DbqBkuhytrk+lD tPt5Y/nHQT29EHJBGPhSSidVBTT9b1aa2WdJ8pPW1vSShrdms6XdsJ0WHGzfqy5kU/m0 Y6Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697632233; x=1698237033; 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=qb1zxa/QVY/gMxUguP/8bSOCuXUHEaHiJJmsJ3UjhS0=; b=cYOJLH2DcOOHbsEbpnssJl0CovGzOL+GgPDiiZlRjEP2UIQLJQnEPZ67kFW1z9g+F5 Q5egdWRu+P3P2n4VbfsvLer/PTC1bSttld0PkCnCBdBrUob7IRkkKnUVEgnpTSM6nzYc TZW9ZHmN1qL2UHRJNn09y0wk0xU8fPEIb362W9aBW+eiZz8ch4koiROI8zuTwVIZiCcT rSg6AI8hWPu5K1NPFN4Bu5TtKYamuJ2nfFMRr+8Pg5ngtqkJxN7BbK82YOUxkfax36X/ sFt2Q1LvmZrJ2aSGDHqjIN+6YU/ezpcIylRnlnMmBw+5S+SFkU+ojw1owEcjlPPMIKt9 rRJA== X-Gm-Message-State: AOJu0YxQ50RuHcQOi0gqzJFadwpIpOCaJaokNA4S5ZhZPpeivQxJ6HIV 1owKO1u7aVKxVaDqoRlM1L1rFBslJRPl1A== X-Google-Smtp-Source: AGHT+IHM4j7B7zrGkVfzq5Cq5WxPfuf8fQWKxoIrhE5G2sC6ui18sZeOyNzEth/9SOKezdCAX+0gnA== X-Received: by 2002:ac2:4ec7:0:b0:500:8fcd:c3b5 with SMTP id p7-20020ac24ec7000000b005008fcdc3b5mr3191203lfr.12.1697632232507; Wed, 18 Oct 2023 05:30:32 -0700 (PDT) Received: from localhost.localdomain ([188.68.131.75]) by smtp.gmail.com with ESMTPSA id x30-20020a19e01e000000b005032ebf8a00sm690011lfg.197.2023.10.18.05.30.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:30:32 -0700 (PDT) From: Nigko Yerden Date: Wed, 18 Oct 2023 17:26:27 +0500 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::244; envelope-from=nigko.yerden@gmail.com; helo=mail-lj1-x244.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 * gnu/packages/maths.scm (reduce-csl): New variable. --- This patch introduces Reduce, a general purpose computer algebra system similar to Maxima. The package is built successfully on x86_64_linux (natively), armhf-linux and aarch64-linux (via 'guix build --system=...' command) architectures. Reduce became build-reproducible since the upstream revision 6601, but the current "stable" snapshot 6547 is not reproducible. The source code contains bundled fox and editline libraries as well as their adjustments, which are difficult to remove. Also it contains libffi (can be replaced by libffi from guix repo), crlibm and softfloat (currently are not present in guix repo) libraries. gnu/packages/maths.scm | 107 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) base-commit: 1076f32111e512ed437f135c9eb6ce2daaafd623 diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 683acd96e1..89127c9e0e 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -62,6 +62,7 @@ ;;; Copyright © 2023 Jake Leporte ;;; Copyright © 2023 Camilo Q.S. (Distopico) ;;; Copyright © 2023 David Elsing +;;; Copyright © 2023 Nigko Yerden ;;; ;;; This file is part of GNU Guix. ;;; @@ -4761,6 +4762,112 @@ (define-public wxmaxima full text searching.") (license license:gpl2+))) +(define-public reduce-csl + (package + (name "reduce-csl") + (version "6547") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/reduce-algebra/snapshot_" + "2023-03-08" "/Reduce-svn" version "-src.tar.gz")) + (sha256 + (base32 + "1a559s4ff5askifyha6fi8qvxjkya1n3ziypig2rgi6q62nbx418")) + (modules '((guix build utils))) + ;; remove binaries and unnecessary parts + ;; to ensure we build from source files only + (snippet '(map delete-file-recursively + (append (find-files "csl/generated-c" "\\.img$") + '("psl" "vsl" + "jlisp" + "jslisp" + "libedit" + "macbuild" + "MacPorts" + "mac-universal" + "reduce2" + "winbuild64" + "common-lisp" + "contrib" + "generic/qreduce" + "web/htdocs/images/Thumbs.db") + (find-files "csl" + "^(embedded|new-embedded|winbuild|support-packages)$" + #:directories? #t) + (find-files "libraries" + "^(original|wineditline|libffi-for-mac)$" + #:directories? #t)))))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f + #:configure-flags + #~(list "--without-autogen" + ;; fix conflict with internal build name determination + "--build=" "--with-csl" + (string-append "CXXFLAGS=-I" + #$freetype + "/include/freetype2")) + #:make-flags #~(list "csl") + #:phases #~(modify-phases %standard-phases + (add-before 'patch-source-shebangs 'autogen + (lambda _ + (invoke "sh" "autogen.sh"))) + (add-after 'install 'fix-install + (lambda _ + (delete-file-recursively (string-append #$output + "/man")) + (delete-file (string-append #$output "/share/man")) + (copy-file "bin/rfcsl" + (string-append #$output "/bin/rfcsl")) + (let ((.desktop-file + "debianbuild/reduce/debian/redcsl.desktop") + (icon "debianbuild/reduce/debian/reduce.png")) + (substitute* .desktop-file + (("Exec=/.*/(redcsl[ \t]+.*)" _ exec) + (string-append "Exec=" exec))) + (install-file .desktop-file + (string-append #$output + "/share/applications")) + (install-file icon + (string-append #$output + "/share/icons/hicolor/32x32/apps"))) + (rename-file "generic/newfront/redfront.1" + "generic/newfront/rfcsl.1") + (map (lambda (file) + (invoke "gzip" file) + (install-file (string-append file ".gz") + (string-append #$output + "/share/man/man1"))) + '("csl/cslbase/redcsl.1" + "generic/newfront/rfcsl.1")) + (with-directory-excursion #$output + (map (lambda (dir) + (map (lambda (file) + (chmod file #o444)) + (find-files dir))) + '("share/man/man1" "share/doc/reduce" + "share/reduce/fonts")))))))) + (native-inputs (list which autoconf automake libtool)) + (inputs + ;; bundled libraries: fox (adjusted) editline (adjusted) + ;; libffi crlibm softfloat + (list ncurses freetype libxft libx11 libxext)) + (synopsis "Portable general-purpose computer algebra system") + (description + "REDUCE is a portable general-purpose computer algebra system. It is a +system for doing scalar, vector and matrix algebra by computer, which also +supports arbitrary precision numerical approximation and interfaces to gnuplot +to provide graphics. It can be used interactively for simple calculations but +also provides a full programming language, with a syntax similar to other +modern programming languages. REDUCE supports alternative user interfaces +including Run-REDUCE, TeXmacs and GNU Emacs. This package provides Codemist +Standard Lisp (CSL) version of REDUCE. It uses gnuplot program, if installed, +to make figures.") + (home-page "https://reduce-algebra.sourceforge.io/") + (license (license:non-copyleft "file://README" + "See README in the deistribution.")))) + (define-public armadillo (package (name "armadillo")