all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jake Leporte <jakeleporte@outlook.com>
To: 60827@debbugs.gnu.org
Cc: Jake Leporte <jleporte@nd.edu>
Subject: [bug#60827] [PATCH 4/4] gnu: Add dozenal.
Date: Sun, 15 Jan 2023 19:11:20 -0600	[thread overview]
Message-ID: <MN2PR20MB2605D5A5C59A1DDC7F50DA15ACC19@MN2PR20MB2605.namprd20.prod.outlook.com> (raw)
In-Reply-To: <20230116011120.528765-1-jakeleporte@outlook.com>

From: Jake Leporte <jleporte@nd.edu>

* gnu/packages/maths.scm (dozenal): New variable.
---
 gnu/packages/maths.scm | 103 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d9bc292..d9903f6 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -103,6 +103,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages calendar)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -124,6 +125,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
@@ -172,6 +174,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26))
@@ -455,6 +458,106 @@ (define-public dionysus
     (license license:gpl3+)
     (home-page "https://www.gnu.org/software/dionysus/")))
 
+(define-public dozenal
+  (package
+    (name "dozenal")
+    (version "12010904-3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/dgoodmaniii/dozenal")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1i3pkljbgacg8y3is664pwl9bj3s3qj27l5immn1c7vi8ad0zfaf"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+           ;; Some test scripts are included, but no makefile-driven
+           ;; tests, and they are all quite manual to run and check
+           #:tests? #f
+           ;; Running with `make -j' causes the build to fail.
+           ;; This is likely because this project uses the
+           ;; "recursive make" structure, where each
+           ;; subdirectory contains its own make file, which is
+           ;; called by the top-level makefile.
+           #:parallel-build? #f
+           #:make-flags #~(list (string-append "prefix="
+                                               #$output))
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'chdir
+                          (lambda _
+                            (chdir "dozenal")))
+                        (add-after 'chdir 'patch-lua-references
+                          (lambda _
+                            (substitute* '("dozcal/call_lua.c" "dozlua/main.c")
+                              (("#include<lua5.2/")
+                               "#include<"))
+                            (substitute* '("dozcal/Makefile" "dozlua/Makefile")
+                              (("-llua5.2")
+                               "-llua"))))
+                        (delete 'configure)
+                        (add-before 'install 'make-bin-dir
+                          (lambda _
+                            (mkdir-p (string-append #$output "/bin"))))
+                        (add-after 'install 'install-html-docs
+                          (lambda _
+                            (invoke "make"
+                                    (string-append "prefix="
+                                                   #$output) "installhtml")))
+                        (add-after 'install-html-docs 'post-install
+                          (lambda* (#:key inputs outputs #:allow-other-keys)
+                            (let ((out (assoc-ref outputs "out"))
+                                  (dozdc (assoc-ref outputs "dozdc"))
+                                  (perl-tk (assoc-ref inputs "perl-tk"))
+                                  (perl-par (assoc-ref inputs "perl-par")))
+                              (for-each (lambda (prog)
+                                          (let* ((orig (string-append out
+                                                                      "/bin/"
+                                                                      prog))
+                                                 (dst (string-append dozdc
+                                                                     "/bin/"
+                                                                     prog))
+                                                 (perl-dir
+                                                  "/lib/perl5/site-perl")
+                                                 (ptk (string-append perl-tk
+                                                                     perl-dir))
+                                                 (pp (string-append perl-par
+                                                                    perl-dir)))
+                                            (mkdir-p (dirname dst))
+                                            (copy-file orig dst)
+                                            (delete-file orig)
+                                            (wrap-program dst
+                                                          `("PERL5LIB" prefix
+                                                            (,ptk ,pp))
+                                                          `("PATH" prefix
+                                                            (,(string-append
+                                                               dozdc "/bin"))))))
+                                        '("dozdc" "gdozdc")) #t))))))
+    (outputs '("out" "dozdc"))
+    (native-inputs (list groff))
+    (inputs (list bash-minimal ;since wrap-program is used
+                  ncurses
+                  libhdate
+                  lua
+                  xforms))
+    (propagated-inputs (list perl perl-tk perl-par))
+    (synopsis
+     "Suite of dozenal programs, including converters, a calculator, and date
+program")
+    (description
+     "The dozenal suite is a set of programs designed to assist with
+working in the dozenal (also called \"duodecimal\" or \"base twelve\")
+system.  It includes number converters (dozenal-to-decimal and
+decimal-to-dozenal), an RPN calculator, a graphical calculator, a
+metric system converter (works with imperial, U.S. customary, SI
+metric, and the dozenal TGM), a pretty-printer for dozenal numbers, a
+date-and-time program, and a dozenal calendar programs, complete with
+events and to-dos.")
+    (home-page "https://dgoodmaniii.gitlab.io/dozenal/dozenal/index.html")
+    (license license:gpl3+)))
+
 (define-public dsfmt
   (package
     (name "dsfmt")
-- 
2.34.1





      parent reply	other threads:[~2023-01-16  1:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230116011120.528765-1-jakeleporte@outlook.com>
2023-01-16  1:11 ` [bug#60827] [PATCH 2/4] gnu: Add xforms Jake Leporte
2023-01-16  1:11 ` [bug#60827] [PATCH 3/4] gnu: Add xforms-gl Jake Leporte
2023-01-16  1:11 ` Jake Leporte [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR20MB2605D5A5C59A1DDC7F50DA15ACC19@MN2PR20MB2605.namprd20.prod.outlook.com \
    --to=jakeleporte@outlook.com \
    --cc=60827@debbugs.gnu.org \
    --cc=jleporte@nd.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.