all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#64345] [PATCH] gnu: Add reduce-csl.
@ 2023-06-29  6:31 Nigko Yerden
  2023-09-23  5:45 ` [bug#64345] [PATCH v2] " Nigko Yerden
  2023-10-18 12:54 ` [bug#64345] [PATCH v3] " Nigko Yerden
  0 siblings, 2 replies; 3+ messages in thread
From: Nigko Yerden @ 2023-06-29  6:31 UTC (permalink / raw)
  To: 64345; +Cc: Nigko Yerden, Andreas Enge, Efraim Flashner, Eric Bavier

* gnu/packages/maths.scm (reduce-csl): New variable.
---
The package is built successfully on x86_64_linux (natively),
armhf-linux and aarch64-linux (via 'guix build --system=...' command)
architectures.

There is no reproducibility due to datestamp (printed each time the
program starts), rundom-number generator initialization in CSL 
(see csl/cslbase/csl.cpp), and maybe some other stuff.

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(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 653e76027a..db66301f3a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -60,6 +60,7 @@
 ;;; Copyright © 2022 Akira Kyle <akira@akirakyle.com>
 ;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com>
 ;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com>
+;;; Copyright © 2023 Nigko Yerden <nigko.yerden@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4488,6 +4489,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")

base-commit: b24a05830d11e3011eee4bc5f60a41e26188cde1
-- 
2.40.1





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#64345] [PATCH v2] gnu: Add reduce-csl.
  2023-06-29  6:31 [bug#64345] [PATCH] gnu: Add reduce-csl Nigko Yerden
@ 2023-09-23  5:45 ` Nigko Yerden
  2023-10-18 12:54 ` [bug#64345] [PATCH v3] " Nigko Yerden
  1 sibling, 0 replies; 3+ messages in thread
From: Nigko Yerden @ 2023-09-23  5:45 UTC (permalink / raw)
  To: 64345; +Cc: Nigko Yerden, Andreas Enge, Efraim Flashner, Eric Bavier

* 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(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6141c09886..7892291e0b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -61,6 +61,7 @@
 ;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com>
 ;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
+;;; Copyright © 2023 Nigko Yerden <nigko.yerden@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4490,6 +4491,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")

base-commit: ec130e1a1b7f3b87b1a6e626754f7e7a07f6b717
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#64345] [PATCH v3] gnu: Add reduce-csl.
  2023-06-29  6:31 [bug#64345] [PATCH] gnu: Add reduce-csl Nigko Yerden
  2023-09-23  5:45 ` [bug#64345] [PATCH v2] " Nigko Yerden
@ 2023-10-18 12:54 ` Nigko Yerden
  1 sibling, 0 replies; 3+ messages in thread
From: Nigko Yerden @ 2023-10-18 12:54 UTC (permalink / raw)
  To: 64345; +Cc: Nigko Yerden, Andreas Enge, Efraim Flashner, Eric Bavier

* 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(+)

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 <jakeleporte@outlook.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;; Copyright © 2023 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2023 Nigko Yerden <nigko.yerden@gmail.com>
 ;;;
 ;;; 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")

base-commit: 1076f32111e512ed437f135c9eb6ce2daaafd623
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-18 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29  6:31 [bug#64345] [PATCH] gnu: Add reduce-csl Nigko Yerden
2023-09-23  5:45 ` [bug#64345] [PATCH v2] " Nigko Yerden
2023-10-18 12:54 ` [bug#64345] [PATCH v3] " Nigko Yerden

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.