2 İşlemeler 89388c90fa ... b3effc3e90

Yazar SHA1 Mesaj Tarih
  Eric Bavier b3effc3e90 Add rminimax. 5 ay önce
  Eric Bavier 81821498ec Remove edbrowse. 6 ay önce

+ 3 - 1
README.md

@@ -35,15 +35,17 @@ section in [Guix's manual](http://guix.gnu.org/manual/).
 - [bic@1.0.0](https://github.com/hexagonal-sun/bic) - C interpreter and API explorer
 - [birch@0.0.1-2.27691aa](https://github.com/dylanaraps/birch.git) - Internet Relay Chat client
 - [cdrdao@1.2.4](http://cdrdao.sourceforge.net/) - Write audio/data CD-Rs in disk-at-once mode
-- [edbrowse@3.8.0](https://www.edbrowse.org) - Command line editor browser
 - [emma_02@1.36](https://www.emma02.hobby-site.com) - RCA CDP1802 Multi-system Emulator
 - [gneuralnetwork@0.9.1](https://www.gnu.org/software/gneuralnetwork/) - Programmable neural network
 - [gpsim@0.31.0](http://gpsim.sourceforge.net/) - Software emulator for PIC microcontrollers
 - [gputils@1.5.0](https://gputils.sourceforge.io/) - Utilities for PIC microcontrollers
 - [joy-in-the-morning@1.0.0](https://notabug.org/bavier/joy-in-the-morning) - Joy programming language
 - [ltunify@0.3-0.b68dc9a](https://lekensteyn.nl/logitech-unifying.html) - Pair and unpair Logitech Unifying devices
+- [mpreal@3.7.1](https://github.com/advanpix/mpreal) - Multi-precision floating point number class for C++
 - [openspades@0.1.3-0.cb89824](http://openspades.yvt.jp/) - Voxel first-person shooter game
 - [properties-cpp@0.0.1](https://launchpad.net/properties-cpp) - Properties and signals library for C++
+- [qsopt-exact@2.5.10.3-0.e5d498f](https://github.com/jonls/qsopt-ex) - Exact linear programming solver
+- [rminimax@0-0.46e1123](https://gitlab.inria.fr/sfilip/rminimax) - Polynomial and rational approximations to math functions
 - [sdcc@3.9.0](http://sdcc.sourceforge.net/) - Small Device C Compiler
 - [systemd@246](https://systemd.io) - System and Service Manager
 - [treedec@0.9.0-0.aceed46](https://github.com/freetdi/tdlib) - Library of tree decomposition algorithms

+ 128 - 0
bavier/packages/algebra.scm

@@ -0,0 +1,128 @@
+;;; This file is part of guix-bavier.git
+;;; Copyright © 2024 Eric Bavier <bavier@posteo.net>
+;;; License: GPLv3+
+
+(define-module (bavier packages algebra)
+  #:use-module (guix packages)
+  #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix git-download)
+  #:use-module (guix gexp)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages maths)
+  #:use-module (gnu packages multiprecision)
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define-public qsopt-exact
+  (let ((commit "e5d498fde468e4669a3fbc4736e5d3b878e8c148")
+        (revision "0"))
+    (package
+     (name "qsopt-exact")
+     (version (git-version "2.5.10.3" revision commit))
+     (home-page "https://github.com/jonls/qsopt-ex")
+     (source
+      (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit commit)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "050ia659vxpdf69kp3qy0cxrvl97zmdj66d8das92ixb77qfz25p"))))
+     (build-system gnu-build-system)
+     (native-inputs (list autoconf automake libtool))
+     (inputs (list gmp zlib bzip2))
+     (synopsis "Exact linear programming solver")
+     (description
+      "The QSopt code is based on floating-point arithmetic and the results are
+subject to rounding errors, as is the case with other commerical and academic
+linear-programming solvers. For the exact solution of LP problems, we have
+created the QSopt_ex rational solver and callable library. This package makes
+use of the GNU MP Bignum Library to deliver the exact rational solution to LP
+instances having rational input.
+
+This is a fork of QSopt_ex by Daniel Espinoza et al. version 2.5.10.")
+     (license (list license:gpl3+ license:lgpl2.1+)))))
+
+(define-public mpreal
+  (package
+    (name "mpreal")
+    (version "3.7.1")
+    (home-page "https://github.com/advanpix/mpreal")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "mpfrc++-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0xk8i6cyfkjml0h4ylbd7v8y3w1brhhwfvskz2cjkv4r70vfp2pi"))))
+    (build-system copy-build-system)
+    (arguments
+     `(#:install-plan
+       '(("mpreal.h" "include/"))))
+    (synopsis "Multi-precision floating point number class for C++")
+    (description
+     "MPFR C++ (MPREAL) is a high-performance C++ interface for the MPFR
+library. MPFR allows user to conduct floating-point calculations with
+virtually any (restricted by available memory only) precision with correct
+rounding.  Besides simple arithmetic operations like “+” and “/” the whole set
+of mathematical functions is supported: @code{sin}, @code{sqrt}, @code{pow},
+@code{log}, etc.")
+    (license license:gpl3+)))
+
+(define-public rminimax
+  (let ((commit "46e1123cd9b842f39c7f1ec5ae7c08938ce70961")
+        (revision "0"))
+    (package
+     (name "rminimax")
+     (version (git-version "0" revision commit)) ; No official release yet
+     (home-page "https://gitlab.inria.fr/sfilip/rminimax")
+     (source
+      (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit commit)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0wdviy75jbdvs4g95mw1ap33bq5w14daibwxglm06ckl95gmnxxs"))
+       (patches (search-patches
+                 "bavier/patches/rminimax-install-bin.patch"))))
+     (build-system cmake-build-system)
+     (outputs '("out" "debug"))
+     (inputs
+      (list gnuplot
+            eigen
+            gmp
+            mpfr
+            mpreal
+            fplll
+            flint
+            qsopt-exact))
+     (arguments
+      (list
+       #:build-type "Debug"
+       #:tests? #f                      ; `./test_atan` takes a long time
+       #:phases
+       #~(modify-phases %standard-phases
+           (add-after 'unpack 'fix-gnuplot
+             (lambda _
+               (substitute* "src/plotting.cpp"
+                 (("\"gnuplot ")
+                  (string-append "\"" (which "gnuplot") " "))))))))
+     (synopsis "Polynomial and rational approximations to math functions")
+     (description
+      "The @code{rminimax} project provides tools for designing flexible polynomial
+and rational approximations to mathematical functions.  It can be used as a
+library, but also provides an executable that parses command line arguments to
+compute generalized rational approximations.")
+     (license license:gpl3+))))

+ 0 - 98
bavier/packages/ed.scm

@@ -1,98 +0,0 @@
-;;; This file is part of guix-bavier.git
-;;; Copyright © 2021 Eric Bavier <bavier@posteo.net>
-;;; License: GPLv3+
-
-(define-module (bavier packages ed)
-  #:use-module (guix build-system gnu)
-  #:use-module (guix git-download)
-  #:use-module (guix packages)
-  #:use-module (gnu packages)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages javascript)
-  #:use-module (gnu packages pcre)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages web)
-  #:use-module ((guix licenses) #:prefix license:))
-
-(define-public edbrowse
-  (package
-    (name "edbrowse")
-    (version "3.8.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/CMB/edbrowse")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "15a12la56z3m552m9c5wqfwws59cqgx87sn8vq6bkfr621076z35"))))
-    (build-system gnu-build-system)
-    (native-inputs
-     `(("perl" ,perl)
-       ("pkg-config" ,pkg-config)))
-    (inputs
-     `(("curl" ,curl)
-       ("pcre" ,pcre)
-       ("quickjs" ,quickjs)
-       ("readline" ,readline)
-       ("tidy" ,tidy-html)))
-    (arguments
-     `(#:make-flags
-       (list "-C" "src"
-             (string-append "PREFIX=" %output)
-             "CC=gcc")
-       #:modules ((ice-9 popen)
-                  (guix build gnu-build-system)
-                  (guix build utils))
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "src/makefile"
-               (("^QUICKJS_LDFLAGS = -L/usr/local/lib")
-                (string-append "QUICKJS_LDFLAGS = -L"
-                               (assoc-ref inputs "quickjs")
-                               "/lib"))
-               (("^PERL !=.*")
-                (string-append "PERL = " (which "perl") "\n"))
-               (("!=[[:blank:]]*([^\n]*)" _ cmd)
-                ;; This transformation is easier than getting the build-system
-                ;; to use BSD's make.
-                (string-append ":= $(shell " cmd ")")))))
-         (replace 'check
-           (lambda _
-             (with-directory-excursion "src"
-               (setenv "HOME" "/tmp")
-               ;; First invocation creates config, exits with 99
-               (system* "./edbrowse")
-               ;; Second runs javascript regression test
-               (let ((pipe (open-pipe* OPEN_WRITE
-                                       "./edbrowse" "-d" "./jsrt")))
-                 (display "q\n" pipe)
-                 (let ((code (close-pipe pipe)))
-                   (unless (zero? code)
-                     (error "test failed"))
-                   #t)))))
-         (replace 'install
-           (lambda* (#:key make-flags outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (mandir (string-append out "/share/man/man1"))
-                    (docdir (string-append out "/share/doc/edbrowse-" ,version)))
-               (mkdir-p mandir)
-               (mkdir-p docdir)
-               (copy-file "doc/man-edbrowse-debian.1"
-                          (string-append mandir "/edbrowse.1"))
-               (for-each (lambda (f) (install-file f docdir))
-                         (find-files "doc" ".*\\.(ebrc|html)"))
-               (apply invoke "make" "install" make-flags)))))))
-    (home-page "https://www.edbrowse.org")
-    (synopsis "Command line editor browser")
-    (description "Edbrowse is a combination editor, browser, and mail client
-that is 100% text based.  The interface is similar to ed, though there are
-many more features, such as editing multiple files simultaneously, rendering
-html, and taping into databases through odbc.")
-    (license license:gpl3+)))

+ 10 - 0
bavier/patches/rminimax-install-bin.patch

@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -74,6 +74,7 @@ include_directories(${DEP_INCLUDE_DIRS} ${COMMON_INCLUDES})
+ # constuct the main tool executable
+ add_executable(ratapprox ratapprox.cpp)
+ target_link_libraries(ratapprox ${LIB_DEPS} rminimax)
++install(TARGETS ratapprox RUNTIME DESTINATION bin)
+ 
+ # generate test executables
+ add_executable(test_atan tests/test_atan.cpp)