[PATCH 0/3] Add perl-par, xforms, and dozenal package definitions

  • Done
  • quality assurance status badge
Details
4 participants
  • Jake Leporte
  • Maxim Cournoyer
  • Bruno Victal
  • (
Owner
unassigned
Submitted by
Jake Leporte
Severity
normal
J
J
Jake Leporte wrote on 15 Jan 2023 05:44
(address . guix-patches@gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605F93C673208E695BF2160ACC09@MN2PR20MB2605.namprd20.prod.outlook.com
As a first try at packaging for Guix, I've packaged dozenal, a suite of
programs for working with the dozenal (base-12) counting system. There were
two dependencies that weren't already included in Guix, so I wrote package
definitions for those as well. They build reproducibly on my (x86_64)
machine, and though the dozenal package doesn't really include any automated
tests, all the programs (including the graphical ones depending on xforms and
perl-tk) run and seem to work on my machine.

Jake Leporte (3):
gnu: Add perl-par.
gnu: Add xforms.
gnu: Add dozenal.

gnu/packages/maths.scm | 69 ++++++++++++++++++++++++++++++++++++++++
gnu/packages/perl.scm | 20 ++++++++++++
gnu/packages/xdisorg.scm | 39 +++++++++++++++++++++++
3 files changed, 128 insertions(+)


base-commit: c94708a5b4820c9253ef5774a1022fc106e7ae9a
--
2.34.1
J
J
Jake Leporte wrote on 16 Jan 2023 02:09
[PATCH 0/4] Updated: Add dozenal plus dependencies
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605BD95D6A6AA96BF03E3E2ACC19@MN2PR20MB2605.namprd20.prod.outlook.com
I had originally packaged a basic xforms without OpenGL support. I realized it
might also be helpful to include a full xforms with OpenGL, in case other
packages want to use xforms with the OpenGL backend. This updated patch series
includes perl-par and xforms (dependencies of dozenal which weren't already
packaged), xforms-gl (since it was easy once xforms was packaged), and dozenal.

Jake Leporte (4):
gnu: Add perl-par.
gnu: Add xforms.
gnu: Add xforms-gl.
gnu: Add dozenal.

gnu/packages/maths.scm | 103 +++++++++++++++++++++++++++++++++++++++
gnu/packages/perl.scm | 20 ++++++++
gnu/packages/xdisorg.scm | 59 ++++++++++++++++++++++
3 files changed, 182 insertions(+)


base-commit: 5c921977179489caef4a9e54ada6696fc86d2f0b
--
2.34.1
J
J
Jake Leporte wrote on 16 Jan 2023 02:11
[PATCH 1/4] gnu: Add perl-par.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jleporte@nd.edu)
MN2PR20MB2605C7E66D389E127C2D112EACC19@MN2PR20MB2605.namprd20.prod.outlook.com
From: Jake Leporte <jleporte@nd.edu>

* gnu/packges/perl.scm (perl-par): New variable.
---
gnu/packages/perl.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 7cdc052..ddf1b9c 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -8574,6 +8574,26 @@ (define-public perl-par-dist
distributions.")
(license (package-license perl))))
+(define-public perl-par
+ (package
+ (name "perl-par")
+ (version "1.018")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/R/RS/RSCHUPP/PAR-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0ifyjd1pxbfp8wxa9l8b1irjwln4gwh4nz256mjacjv194mh99bc"))))
+ (build-system perl-build-system)
+ (propagated-inputs (list perl-archive-zip perl-par-dist))
+ (home-page "https://metacpan.org/release/PAR")
+ (synopsis "Perl Archive Toolkit")
+ (description
+ "Perl module for using special zip files (called Perl ARchives) as
+libraries from which Perl modules can be loaded.")
+ (license license:perl-license)))
+
(define-public perl-parent
(deprecated-package "perl-parent" perl))
--
2.34.1
J
J
Jake Leporte wrote on 16 Jan 2023 02:11
[PATCH 2/4] gnu: Add xforms.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jleporte@nd.edu)
MN2PR20MB2605C495F7664BC081F99E5BACC19@MN2PR20MB2605.namprd20.prod.outlook.com
From: Jake Leporte <jleporte@nd.edu>

* gnu/packages/xdisorg.scm (xforms): New variable.
---
gnu/packages/xdisorg.scm | 50 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)

Toggle diff (74 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 10edfc7..df82b7b 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -113,6 +113,7 @@ (define-module (gnu packages xdisorg)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
+ #:use-module (gnu packages imagemagick)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages libbsd)
#:use-module (gnu packages libevent)
@@ -127,6 +128,8 @@ (define-module (gnu packages xdisorg)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages sphinx)
+ #:use-module (gnu packages tex)
+ #:use-module (gnu packages texinfo)
#:use-module (gnu packages tcl)
#:use-module (gnu packages terminals)
#:use-module (gnu packages xml)
@@ -3319,3 +3322,50 @@ (define-public wvkbd
@end itemize")
(license (list license:expat ;3 files under Expat license (see 'LICENSE')
license:gpl3+)))) ;the rest is GPLv3+
+
+(define-public xforms
+ ;; The latest stable release fails with a linker error, so use an updated
+ ;; version
+ (let ((revision "1")
+ (commit "2c1a9f151baf50887a517280645ec23379fb96f8"))
+ (package
+ (name "xforms")
+ (version (git-version "1.2.4" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/xforms.git/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "12qc1j5g03n2zigvbwilx2zszr8sgv5wd259js7cwf8ffw4lzjf2"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-doc-makefile
+ (lambda _
+ (substitute* "doc/Makefile.am"
+ (("/bin/mkdir")
+ "mkdir")))))
+ #:configure-flags #~(list "--enable-docs")))
+ (native-inputs (list autoconf
+ automake
+ libtool
+ texinfo
+ texi2html
+ (texlive-updmap.cfg (list texlive-epsf
+ texlive-tex-texinfo))
+ imagemagick))
+ (propagated-inputs (list libx11 libxpm libjpeg-turbo))
+ (home-page "http://xforms-toolkit.org/")
+ (synopsis "GUI toolkit for X based on the X11 Xlib library")
+ (description
+ "XForms is a graphical user interface toolkit for X based on the X11 Xlib
+library. I.e., it allows you to create windows, containing all kinds of
+widgets (buttons, sliders, browsers, menus etc.) with a few lines of code and
+then attach actions to the widgets, i.e., have some function called when a
+button is pressed. To make this even easier XForms comes with a program
+called @code{fdesign} that allows you to design a GUI for a program directly
+on the screen and which then writes out the necessary C code for it.")
+ (license license:lgpl2.1+))))
--
2.34.1
J
J
Jake Leporte wrote on 16 Jan 2023 02:11
[PATCH 3/4] gnu: Add xforms-gl.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605B244006AC31BE52CE479ACC19@MN2PR20MB2605.namprd20.prod.outlook.com
---
gnu/packages/xdisorg.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (19 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index df82b7b..dedc191 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -3369,3 +3369,12 @@ (define-public xforms
called @code{fdesign} that allows you to design a GUI for a program directly
on the screen and which then writes out the necessary C code for it.")
(license license:lgpl2.1+))))
+
+(define-public xforms-gl
+ (package
+ (inherit xforms)
+ (name "xforms-gl")
+ (propagated-inputs (modify-inputs (package-propagated-inputs xforms)
+ (append mesa)))
+ (synopsis
+ "GUI toolkit for X based on the X11 Xlib library, with OpenGL support")))
--
2.34.1
J
J
Jake Leporte wrote on 16 Jan 2023 02:11
[PATCH 4/4] gnu: Add dozenal.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jleporte@nd.edu)
MN2PR20MB2605D5A5C59A1DDC7F50DA15ACC19@MN2PR20MB2605.namprd20.prod.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(+)

Toggle diff (137 lines)
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
J
J
Jake Leporte wrote on 23 Jan 2023 22:02
[PATCH v2] gnu: Add dozenal.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605E6A084293471FEDF251CACC89@MN2PR20MB2605.namprd20.prod.outlook.com
I worked with the upstream developer to incorporate a small change which made it
easier to split the dozenal package into GUI and non-GUI outputs, which I think
is a more logical split than what I had before, so I'm submitting a revised
version of the patch which adds `dozenal'.

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

Toggle diff (149 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d9bc292..7cb40c4 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,113 @@ (define-public dionysus
(license license:gpl3+)
(home-page "https://www.gnu.org/software/dionysus/")))
+(define-public dozenal
+ (let ((revision "1")
+ (commit "328bc03ad544179f2cccda36763358c4216f188e"))
+ (package
+ (name "dozenal")
+ (version (git-version "12010904-3" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://codeberg.org/dgoodmaniii/dozenal")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0knwfwjqdv854l5ny7csdpvp7r0md6a2k43a1l2lkyw9k3cglpph"))))
+ (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 _
+ (let ((lua-name (strip-store-file-name #$lua)))
+ (substitute* '("dozcal/Makefile"
+ "dozlua/Makefile")
+ (("lua52")
+ (string-take lua-name
+ (string-rindex lua-name #\.)))))))
+ (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 'split-outputs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (gui (assoc-ref outputs "gui"))
+ (perl-tk (assoc-ref inputs "perl-tk"))
+ (perl-par (assoc-ref inputs "perl-par"))
+ (perl-dir "/lib/perl5/site-perl")
+ (ptk (string-append perl-tk perl-dir))
+ (pp (string-append perl-par perl-dir)))
+ (for-each (lambda (prog)
+ (let ((orig (string-append out
+ "/bin/" prog))
+ (dst (string-append gui
+ "/bin/"
+ prog))
+ (man-orig (string-append out
+ "/share/man/man1/"
+ prog ".1"))
+ (man-dst (string-append gui
+ "/share/man/man1/"
+ prog ".1")))
+ (mkdir-p (dirname dst))
+ (copy-file orig dst)
+ (delete-file orig)
+ (mkdir-p (dirname man-dst))
+ (copy-file man-orig man-dst)
+ (delete-file man-orig)))
+ '("xdozdc" "gdozdc"))
+ (wrap-program (string-append gui "/bin/"
+ "gdozdc")
+ `("PERL5LIB" prefix
+ (,ptk ,pp))
+ `("PATH" prefix
+ (,(string-append out "/bin"))))))))))
+ (outputs '("out" "gui"))
+ (native-inputs (list groff pkg-config))
+ (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://codeberg.org/dgoodmaniii/dozenal")
+ (license license:gpl3+))))
+
(define-public dsfmt
(package
(name "dsfmt")

base-commit: 2b1e5cb6a82e60298b620ef8d2dbf90cfb925015
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: 12b9437ce6c6849e83e52cabad56672a5c73e2a7
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
--
2.34.1
B
B
Bruno Victal wrote on 23 Jan 2023 22:38
(name . Jake Leporte)(address . jakeleporte@outlook.com)(address . 60827@debbugs.gnu.org)
7414ea31-d13d-7798-d30a-696c889fbbe2@makinata.eu
Hi,

On 2023-01-23 21:02, Jake Leporte wrote:
Toggle quote (10 lines)
> + (add-after 'install-html-docs 'split-outputs
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (gui (assoc-ref outputs "gui"))
> + (perl-tk (assoc-ref inputs "perl-tk"))
> + (perl-par (assoc-ref inputs "perl-par"))
> + (perl-dir "/lib/perl5/site-perl")
> + (ptk (string-append perl-tk perl-dir))
> + (pp (string-append perl-par perl-dir)))

This part can be written with G-Expressions too, they would correspond to:
out -> #$output (no change)
gui -> #$output:gui

See the G-Expressions section from the manual and the libavif package definition for an example.


Cheers,
Bruno
J
J
Jake Leporte wrote on 23 Jan 2023 23:43
[PATCH v3] gnu: Add dozenal.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605C37DBE956CB9A6D6886CACC89@MN2PR20MB2605.namprd20.prod.outlook.com
Got it- thanks for the correction! I've re-written the patch to use G-Exps.

The `guix style`-reccomended changes involved writing #$output:gui as (ungexp
output "gui"), and various indentation changes that made some of the
'split-output code tough to read, in my opinion, so this patch deviates from
those recommendations a bit. Let me know if you'd rather I take the `guix
style` output directly.

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

Toggle diff (144 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d9bc292..2b2bf10 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,108 @@ (define-public dionysus
(license license:gpl3+)
(home-page "https://www.gnu.org/software/dionysus/")))
+(define-public dozenal
+ (let ((revision "1")
+ (commit "328bc03ad544179f2cccda36763358c4216f188e"))
+ (package
+ (name "dozenal")
+ (version (git-version "12010904-3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://codeberg.org/dgoodmaniii/dozenal")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0knwfwjqdv854l5ny7csdpvp7r0md6a2k43a1l2lkyw9k3cglpph"))))
+ (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 _
+ (let ((lua-name (strip-store-file-name #$lua)))
+ (substitute* '("dozcal/Makefile"
+ "dozlua/Makefile")
+ (("lua52")
+ (string-take lua-name
+ (string-rindex lua-name #\.)))))))
+ (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 'split-outputs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (for-each
+ (lambda (prog)
+ (let ((orig (string-append #$output "/bin/" prog))
+ (dst (string-append #$output:gui "/bin/" prog))
+ (man-orig (string-append #$output
+ "/share/man/man1/"
+ prog ".1"))
+ (man-dst (string-append #$output:gui
+ "/share/man/man1/"
+ prog ".1")))
+ (mkdir-p (dirname dst))
+ (copy-file orig dst)
+ (delete-file orig)
+ (mkdir-p (dirname man-dst))
+ (copy-file man-orig man-dst)
+ (delete-file man-orig)))
+ '("xdozdc" "gdozdc"))
+ (let ((perl-dir "/lib/perl5/site-perl"))
+ (wrap-program
+ (string-append #$output:gui "/bin/" "gdozdc")
+ `("PERL5LIB" prefix
+ (,(string-append #$perl-tk perl-dir)
+ ,(string-append #$perl-par perl-dir)))
+ `("PATH" prefix
+ (,(string-append #$output "/bin"))))))))))
+ (outputs '("out" "gui"))
+ (native-inputs (list groff pkg-config))
+ (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://codeberg.org/dgoodmaniii/dozenal")
+ (license license:gpl3+))))
+
(define-public dsfmt
(package
(name "dsfmt")

base-commit: 2b1e5cb6a82e60298b620ef8d2dbf90cfb925015
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: 12b9437ce6c6849e83e52cabad56672a5c73e2a7
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
--
2.34.1
B
B
Bruno Victal wrote on 24 Jan 2023 00:24
(name . Jake Leporte)(address . jakeleporte@outlook.com)(address . 60827@debbugs.gnu.org)
d5ea307a-3d48-3c83-cf65-9e327ee5d09e@makinata.eu
On 2023-01-23 22:43, Jake Leporte wrote:
Toggle quote (8 lines)
> Got it- thanks for the correction! I've re-written the patch to use G-Exps.
>
> The `guix style`-reccomended changes involved writing #$output:gui as (ungexp
> output "gui"), and various indentation changes that made some of the
> 'split-output code tough to read, in my opinion, so this patch deviates from
> those recommendations a bit. Let me know if you'd rather I take the `guix
> style` output directly.

Sometimes guix style can make things worse, there's no problem in deviating from it
as long it doesn't result in a worse formatting.


Cheers,
Bruno
(
CQ087NDYX3LL.1J8YXCCSKY6VU@guix-framework
On Mon Jan 23, 2023 at 10:43 PM GMT, Jake Leporte wrote:
Toggle quote (4 lines)
> + `("PERL5LIB" prefix
> + (,(string-append #$perl-tk perl-dir)
> + ,(string-append #$perl-par perl-dir)))

Don't refer to dependencies like this; use

#$(this-package-input "perl-tk")

instead.

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmPPgnYACgkQ7ImHg/nq
I23AAQwAu7EVFM6hRSAqgsYL1qZ9MPO4TTVNq2dlo7irQn8hokTezvV+p/RbqWIP
MUZ+M/9gSbVuzYczx54eZS3A1NOGHZ/z8D+5Q2r+9E+KoLVL5hqqLnxxVSuYXztc
d+fvo7y4yTvJuP1JH26y9h7SGbbYIie4vw5RE8PKWUgtvyYoDp8yIbszh/skGY/X
L1501TUDYaRdUAMZPnjbwOLcqVCQkr71hIyJi0dtbt1dE+6ikUc6vlYMSF9eQVjr
HsCJhNg3autjqNSVrCb4TPAvnt1azkQRfoJJmIn5gmwkOtyM02lMXtoPOhIkhCLG
mP4o9XJIr3WGNNyCeL/VVWx625by4qAKTYzooU2L8hWivBlpTar2IzCTGuMhW493
zuSP1U2aNTQSO8nNDIpCumz/9BogFaIKyMMcpSSRkCdrREG7KwnTP2qKene1hVmU
/K2Dxc3p8GMf3h2CanDob5HyGkoQ4/djwyjKsMc62YzJVTZYqbcsSG08Iz7uoUy4
T+xlvczE
=TauE
-----END PGP SIGNATURE-----


J
J
Jake Leporte wrote on 27 Jan 2023 03:16
[PATCH v4] gnu: Add dozenal.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB26056EF3CB7E9785698FDB16ACCC9@MN2PR20MB2605.namprd20.prod.outlook.com
Ok, got it. I also misunderstood wrap-program before, and I've now updated the
patch to properly wrap the perl script and avoid unnessecarily propagating
inputs.

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

Toggle diff (144 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d9bc292..4b4c195 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,108 @@ (define-public dionysus
(license license:gpl3+)
(home-page "https://www.gnu.org/software/dionysus/")))
+(define-public dozenal
+ (let ((revision "1")
+ (commit "328bc03ad544179f2cccda36763358c4216f188e"))
+ (package
+ (name "dozenal")
+ (version (git-version "12010904-3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://codeberg.org/dgoodmaniii/dozenal")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0knwfwjqdv854l5ny7csdpvp7r0md6a2k43a1l2lkyw9k3cglpph"))))
+ (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 _
+ (let ((lua-name (strip-store-file-name #$lua)))
+ (substitute* '("dozcal/Makefile"
+ "dozlua/Makefile")
+ (("lua52")
+ (string-take lua-name
+ (string-rindex lua-name #\.)))))))
+ (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 'split-outputs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (for-each
+ (lambda (prog)
+ (let ((orig (string-append #$output "/bin/" prog))
+ (dst (string-append #$output:gui "/bin/" prog))
+ (man-orig (string-append #$output
+ "/share/man/man1/"
+ prog ".1"))
+ (man-dst (string-append #$output:gui
+ "/share/man/man1/"
+ prog ".1")))
+ (mkdir-p (dirname dst))
+ (copy-file orig dst)
+ (delete-file orig)
+ (mkdir-p (dirname man-dst))
+ (copy-file man-orig man-dst)
+ (delete-file man-orig)))
+ '("xdozdc" "gdozdc"))
+ (wrap-program
+ (string-append #$output:gui "/bin/" "gdozdc")
+ `("PATH" =
+ (,(string-append #$output "/bin")))
+ `("PERL5LIB" =
+ (,(getenv "PERL5LIB")))))))))
+ (outputs '("out" "gui"))
+ (native-inputs (list groff pkg-config))
+ (inputs (list bash-minimal ;since wrap-program is used
+ ncurses
+ libhdate
+ lua
+ perl
+ perl-tk
+ perl-par
+ xforms))
+ (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://codeberg.org/dgoodmaniii/dozenal")
+ (license license:gpl3+))))
+
(define-public dsfmt
(package
(name "dsfmt")

base-commit: 2b1e5cb6a82e60298b620ef8d2dbf90cfb925015
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: 12b9437ce6c6849e83e52cabad56672a5c73e2a7
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
--
2.34.1
J
J
Jake Leporte wrote on 18 Feb 2023 01:31
[PATCH v5 1/4] gnu: Add perl-par.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605C4A481B98ACD692E8CDEACA69@MN2PR20MB2605.namprd20.prod.outlook.com
Re-submitting all the patches in this series, with a bumped version
number, to try to get QA in the green- I misunderstood how it worked
before, hopefully this works!

* gnu/packges/perl.scm (perl-par): New variable.
---
gnu/packages/perl.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 295f8dd..62f19ed 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -8600,6 +8600,26 @@ (define-public perl-par-dist
distributions.")
(license (package-license perl))))
+(define-public perl-par
+ (package
+ (name "perl-par")
+ (version "1.018")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/R/RS/RSCHUPP/PAR-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0ifyjd1pxbfp8wxa9l8b1irjwln4gwh4nz256mjacjv194mh99bc"))))
+ (build-system perl-build-system)
+ (propagated-inputs (list perl-archive-zip perl-par-dist))
+ (home-page "https://metacpan.org/release/PAR")
+ (synopsis "Perl Archive Toolkit")
+ (description
+ "Perl module for using special zip files (called Perl ARchives) as
+libraries from which Perl modules can be loaded.")
+ (license license:perl-license)))
+
(define-public perl-parent
(deprecated-package "perl-parent" perl))

base-commit: 6dce27abbba01cb4e249c9bdb3c132cecc0a5c51
--
2.39.1
J
J
Jake Leporte wrote on 18 Feb 2023 01:31
[PATCH v5 2/4] gnu: Add xforms.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605F272332E8E7C2F8BCD2EACA69@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packages/xdisorg.scm (xforms): New variable.
---
gnu/packages/xdisorg.scm | 49 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index a92456f..ffeb8db 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -131,6 +131,8 @@ (define-module (gnu packages xdisorg)
#:use-module (gnu packages qt)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages syncthing)
+ #:use-module (gnu packages tex)
+ #:use-module (gnu packages texinfo)
#:use-module (gnu packages tcl)
#:use-module (gnu packages terminals)
#:use-module (gnu packages xml)
@@ -3393,3 +3395,50 @@ (define-public wvkbd
@end itemize")
(license (list license:expat ;3 files under Expat license (see 'LICENSE')
license:gpl3+)))) ;the rest is GPLv3+
+
+(define-public xforms
+ ;; The latest stable release fails with a linker error, so use an updated
+ ;; version
+ (let ((revision "1")
+ (commit "2c1a9f151baf50887a517280645ec23379fb96f8"))
+ (package
+ (name "xforms")
+ (version (git-version "1.2.4" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/xforms.git/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "12qc1j5g03n2zigvbwilx2zszr8sgv5wd259js7cwf8ffw4lzjf2"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-doc-makefile
+ (lambda _
+ (substitute* "doc/Makefile.am"
+ (("/bin/mkdir")
+ "mkdir")))))
+ #:configure-flags #~(list "--enable-docs")))
+ (native-inputs (list autoconf
+ automake
+ libtool
+ texinfo
+ texi2html
+ (texlive-updmap.cfg (list texlive-epsf
+ texlive-tex-texinfo))
+ imagemagick))
+ (propagated-inputs (list libx11 libxpm libjpeg-turbo))
+ (home-page "http://xforms-toolkit.org/")
+ (synopsis "GUI toolkit for X based on the X11 Xlib library")
+ (description
+ "XForms is a graphical user interface toolkit for X based on the X11 Xlib
+library. I.e., it allows you to create windows, containing all kinds of
+widgets (buttons, sliders, browsers, menus etc.) with a few lines of code and
+then attach actions to the widgets, i.e., have some function called when a
+button is pressed. To make this even easier XForms comes with a program
+called @code{fdesign} that allows you to design a GUI for a program directly
+on the screen and which then writes out the necessary C code for it.")
+ (license license:lgpl2.1+))))
--
2.39.1
J
J
Jake Leporte wrote on 18 Feb 2023 01:31
[PATCH v5 3/4] gnu: Add xforms-gl.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB26057A3D8EB9164519CB0D74ACA69@MN2PR20MB2605.namprd20.prod.outlook.com
---
gnu/packages/xdisorg.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (19 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index ffeb8db..7efe65c 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -3442,3 +3442,12 @@ (define-public xforms
called @code{fdesign} that allows you to design a GUI for a program directly
on the screen and which then writes out the necessary C code for it.")
(license license:lgpl2.1+))))
+
+(define-public xforms-gl
+ (package
+ (inherit xforms)
+ (name "xforms-gl")
+ (propagated-inputs (modify-inputs (package-propagated-inputs xforms)
+ (append mesa)))
+ (synopsis
+ "GUI toolkit for X based on the X11 Xlib library, with OpenGL support")))
--
2.39.1
J
J
Jake Leporte wrote on 18 Feb 2023 01:31
[PATCH v5 4/4] gnu: Add dozenal.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB26050CB2586F8DF41D176135ACA69@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packages/maths.scm (dozenal): New variable.
---
gnu/packages/maths.scm | 105 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 105 insertions(+)

Toggle diff (139 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ceb2f14..dcab621 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,108 @@ (define-public dionysus
(license license:gpl3+)
(home-page "https://www.gnu.org/software/dionysus/")))
+(define-public dozenal
+ (let ((revision "1")
+ (commit "328bc03ad544179f2cccda36763358c4216f188e"))
+ (package
+ (name "dozenal")
+ (version (git-version "12010904-3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://codeberg.org/dgoodmaniii/dozenal")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0knwfwjqdv854l5ny7csdpvp7r0md6a2k43a1l2lkyw9k3cglpph"))))
+ (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 _
+ (let ((lua-name (strip-store-file-name #$lua)))
+ (substitute* '("dozcal/Makefile"
+ "dozlua/Makefile")
+ (("lua52")
+ (string-take lua-name
+ (string-rindex lua-name #\.)))))))
+ (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 'split-outputs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (for-each
+ (lambda (prog)
+ (let ((orig (string-append #$output "/bin/" prog))
+ (dst (string-append #$output:gui "/bin/" prog))
+ (man-orig (string-append #$output
+ "/share/man/man1/"
+ prog ".1"))
+ (man-dst (string-append #$output:gui
+ "/share/man/man1/"
+ prog ".1")))
+ (mkdir-p (dirname dst))
+ (copy-file orig dst)
+ (delete-file orig)
+ (mkdir-p (dirname man-dst))
+ (copy-file man-orig man-dst)
+ (delete-file man-orig)))
+ '("xdozdc" "gdozdc"))
+ (wrap-program
+ (string-append #$output:gui "/bin/" "gdozdc")
+ `("PATH" =
+ (,(string-append #$output "/bin")))
+ `("PERL5LIB" =
+ (,(getenv "PERL5LIB")))))))))
+ (outputs '("out" "gui"))
+ (native-inputs (list groff pkg-config))
+ (inputs (list bash-minimal ;since wrap-program is used
+ ncurses
+ libhdate
+ lua
+ perl
+ perl-tk
+ perl-par
+ xforms))
+ (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://codeberg.org/dgoodmaniii/dozenal")
+ (license license:gpl3+))))
+
(define-public dsfmt
(package
(name "dsfmt")
--
2.39.1
J
J
Jake Leporte wrote on 27 Feb 2023 01:39
[PATCH v6 0/4] Add dozenal and dependencies.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605707680E65C3662AC32DDACAF9@MN2PR20MB2605.namprd20.prod.outlook.com
Another try, which should correct the commit messages. I hope this also
allows QA to properly create the branch and test my changes. I'm not sure
exactly what I need to do to make sure revisions are picked up :)

Jake Leporte (4):
gnu: Add perl-par.
gnu: Add xforms.
gnu: Add xforms-gl.
gnu: Add dozenal.

gnu/packages/maths.scm | 105 +++++++++++++++++++++++++++++++++++++++
gnu/packages/perl.scm | 20 ++++++++
gnu/packages/xdisorg.scm | 58 +++++++++++++++++++++
3 files changed, 183 insertions(+)


base-commit: 81fbf5d71fb95367a0a93e45a86de5e930589a05
--
2.39.1
J
J
Jake Leporte wrote on 27 Feb 2023 01:39
[PATCH v6 1/4] gnu: Add perl-par.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605674F5CE78CC5CADBEBD7ACAF9@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packges/perl.scm (perl-par): New variable.
---
gnu/packages/perl.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 41b68ba..b6fb81e 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -8598,6 +8598,26 @@ (define-public perl-par-dist
distributions.")
(license (package-license perl))))
+(define-public perl-par
+ (package
+ (name "perl-par")
+ (version "1.018")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/R/RS/RSCHUPP/PAR-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0ifyjd1pxbfp8wxa9l8b1irjwln4gwh4nz256mjacjv194mh99bc"))))
+ (build-system perl-build-system)
+ (propagated-inputs (list perl-archive-zip perl-par-dist))
+ (home-page "https://metacpan.org/release/PAR")
+ (synopsis "Perl Archive Toolkit")
+ (description
+ "Perl module for using special zip files (called Perl ARchives) as
+libraries from which Perl modules can be loaded.")
+ (license license:perl-license)))
+
(define-public perl-parent
(deprecated-package "perl-parent" perl))
--
2.39.1
J
J
Jake Leporte wrote on 27 Feb 2023 01:39
[PATCH v6 2/4] gnu: Add xforms.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605A69DE24594C0B11A0F35ACAF9@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packages/xdisorg.scm (xforms): New variable.
---
gnu/packages/xdisorg.scm | 49 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index ec5cdbd..ede84ab 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -132,6 +132,8 @@ (define-module (gnu packages xdisorg)
#:use-module (gnu packages qt)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages syncthing)
+ #:use-module (gnu packages tex)
+ #:use-module (gnu packages texinfo)
#:use-module (gnu packages tcl)
#:use-module (gnu packages terminals)
#:use-module (gnu packages xml)
@@ -3447,3 +3449,50 @@ (define-public wvkbd
@end itemize")
(license (list license:expat ;3 files under Expat license (see 'LICENSE')
license:gpl3+)))) ;the rest is GPLv3+
+
+(define-public xforms
+ ;; The latest stable release fails with a linker error, so use an updated
+ ;; version
+ (let ((revision "1")
+ (commit "2c1a9f151baf50887a517280645ec23379fb96f8"))
+ (package
+ (name "xforms")
+ (version (git-version "1.2.4" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/xforms.git/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "12qc1j5g03n2zigvbwilx2zszr8sgv5wd259js7cwf8ffw4lzjf2"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-doc-makefile
+ (lambda _
+ (substitute* "doc/Makefile.am"
+ (("/bin/mkdir")
+ "mkdir")))))
+ #:configure-flags #~(list "--enable-docs")))
+ (native-inputs (list autoconf
+ automake
+ libtool
+ texinfo
+ texi2html
+ (texlive-updmap.cfg (list texlive-epsf
+ texlive-tex-texinfo))
+ imagemagick))
+ (propagated-inputs (list libx11 libxpm libjpeg-turbo))
+ (home-page "http://xforms-toolkit.org/")
+ (synopsis "GUI toolkit for X based on the X11 Xlib library")
+ (description
+ "XForms is a graphical user interface toolkit for X based on the X11 Xlib
+library. I.e., it allows you to create windows, containing all kinds of
+widgets (buttons, sliders, browsers, menus etc.) with a few lines of code and
+then attach actions to the widgets, i.e., have some function called when a
+button is pressed. To make this even easier XForms comes with a program
+called @code{fdesign} that allows you to design a GUI for a program directly
+on the screen and which then writes out the necessary C code for it.")
+ (license license:lgpl2.1+))))
--
2.39.1
J
J
Jake Leporte wrote on 27 Feb 2023 01:39
[PATCH v6 3/4] gnu: Add xforms-gl.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605D2109A893C2A53358A58ACAF9@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packages/xdisorg.scm (xforms-gl): New variable.
---
gnu/packages/xdisorg.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (19 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index ede84ab..50ca156 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -3496,3 +3496,12 @@ (define-public xforms
called @code{fdesign} that allows you to design a GUI for a program directly
on the screen and which then writes out the necessary C code for it.")
(license license:lgpl2.1+))))
+
+(define-public xforms-gl
+ (package
+ (inherit xforms)
+ (name "xforms-gl")
+ (propagated-inputs (modify-inputs (package-propagated-inputs xforms)
+ (append mesa)))
+ (synopsis
+ "GUI toolkit for X based on the X11 Xlib library, with OpenGL support")))
--
2.39.1
J
J
Jake Leporte wrote on 27 Feb 2023 01:39
[PATCH v6 4/4] gnu: Add dozenal.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605F1D8924F21CA979842E3ACAF9@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packages/maths.scm (dozenal): New variable.
---
gnu/packages/maths.scm | 105 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 105 insertions(+)

Toggle diff (139 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 280465e..86beb33 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,108 @@ (define-public dionysus
(license license:gpl3+)
(home-page "https://www.gnu.org/software/dionysus/")))
+(define-public dozenal
+ (let ((revision "1")
+ (commit "328bc03ad544179f2cccda36763358c4216f188e"))
+ (package
+ (name "dozenal")
+ (version (git-version "12010904-3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://codeberg.org/dgoodmaniii/dozenal")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0knwfwjqdv854l5ny7csdpvp7r0md6a2k43a1l2lkyw9k3cglpph"))))
+ (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 _
+ (let ((lua-name (strip-store-file-name #$lua)))
+ (substitute* '("dozcal/Makefile"
+ "dozlua/Makefile")
+ (("lua52")
+ (string-take lua-name
+ (string-rindex lua-name #\.)))))))
+ (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 'split-outputs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (for-each
+ (lambda (prog)
+ (let ((orig (string-append #$output "/bin/" prog))
+ (dst (string-append #$output:gui "/bin/" prog))
+ (man-orig (string-append #$output
+ "/share/man/man1/"
+ prog ".1"))
+ (man-dst (string-append #$output:gui
+ "/share/man/man1/"
+ prog ".1")))
+ (mkdir-p (dirname dst))
+ (copy-file orig dst)
+ (delete-file orig)
+ (mkdir-p (dirname man-dst))
+ (copy-file man-orig man-dst)
+ (delete-file man-orig)))
+ '("xdozdc" "gdozdc"))
+ (wrap-program
+ (string-append #$output:gui "/bin/" "gdozdc")
+ `("PATH" =
+ (,(string-append #$output "/bin")))
+ `("PERL5LIB" =
+ (,(getenv "PERL5LIB")))))))))
+ (outputs '("out" "gui"))
+ (native-inputs (list groff pkg-config))
+ (inputs (list bash-minimal ;since wrap-program is used
+ ncurses
+ libhdate
+ lua
+ perl
+ perl-tk
+ perl-par
+ xforms))
+ (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://codeberg.org/dgoodmaniii/dozenal")
+ (license license:gpl3+))))
+
(define-public dsfmt
(package
(name "dsfmt")
--
2.39.1
J
J
Jake Leporte wrote on 6 Mar 2023 13:47
[PATCH v7 1/4] gnu: Add perl-par.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605361640975BE16143123FACB69@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packges/perl.scm (perl-par): New variable.
---
gnu/packages/perl.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 41b68ba..b6fb81e 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -8598,6 +8598,26 @@ (define-public perl-par-dist
distributions.")
(license (package-license perl))))
+(define-public perl-par
+ (package
+ (name "perl-par")
+ (version "1.018")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/R/RS/RSCHUPP/PAR-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0ifyjd1pxbfp8wxa9l8b1irjwln4gwh4nz256mjacjv194mh99bc"))))
+ (build-system perl-build-system)
+ (propagated-inputs (list perl-archive-zip perl-par-dist))
+ (home-page "https://metacpan.org/release/PAR")
+ (synopsis "Perl Archive Toolkit")
+ (description
+ "Perl module for using special zip files (called Perl ARchives) as
+libraries from which Perl modules can be loaded.")
+ (license license:perl-license)))
+
(define-public perl-parent
(deprecated-package "perl-parent" perl))

base-commit: 461577f0fce1b69a88a752857eeee2e9e1116d6c
--
2.39.1
J
J
Jake Leporte wrote on 6 Mar 2023 13:47
[PATCH v7 2/4] gnu: Add xforms.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB26054A61EE46F14618D04B23ACB69@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packages/xdisorg.scm (xforms): New variable.
---
gnu/packages/xdisorg.scm | 49 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index ec5cdbd..ede84ab 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -132,6 +132,8 @@ (define-module (gnu packages xdisorg)
#:use-module (gnu packages qt)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages syncthing)
+ #:use-module (gnu packages tex)
+ #:use-module (gnu packages texinfo)
#:use-module (gnu packages tcl)
#:use-module (gnu packages terminals)
#:use-module (gnu packages xml)
@@ -3447,3 +3449,50 @@ (define-public wvkbd
@end itemize")
(license (list license:expat ;3 files under Expat license (see 'LICENSE')
license:gpl3+)))) ;the rest is GPLv3+
+
+(define-public xforms
+ ;; The latest stable release fails with a linker error, so use an updated
+ ;; version
+ (let ((revision "1")
+ (commit "2c1a9f151baf50887a517280645ec23379fb96f8"))
+ (package
+ (name "xforms")
+ (version (git-version "1.2.4" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/xforms.git/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "12qc1j5g03n2zigvbwilx2zszr8sgv5wd259js7cwf8ffw4lzjf2"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-doc-makefile
+ (lambda _
+ (substitute* "doc/Makefile.am"
+ (("/bin/mkdir")
+ "mkdir")))))
+ #:configure-flags #~(list "--enable-docs")))
+ (native-inputs (list autoconf
+ automake
+ libtool
+ texinfo
+ texi2html
+ (texlive-updmap.cfg (list texlive-epsf
+ texlive-tex-texinfo))
+ imagemagick))
+ (propagated-inputs (list libx11 libxpm libjpeg-turbo))
+ (home-page "http://xforms-toolkit.org/")
+ (synopsis "GUI toolkit for X based on the X11 Xlib library")
+ (description
+ "XForms is a graphical user interface toolkit for X based on the X11 Xlib
+library. I.e., it allows you to create windows, containing all kinds of
+widgets (buttons, sliders, browsers, menus etc.) with a few lines of code and
+then attach actions to the widgets, i.e., have some function called when a
+button is pressed. To make this even easier XForms comes with a program
+called @code{fdesign} that allows you to design a GUI for a program directly
+on the screen and which then writes out the necessary C code for it.")
+ (license license:lgpl2.1+))))
--
2.39.1
J
J
Jake Leporte wrote on 6 Mar 2023 13:47
[PATCH v7 3/4] gnu: Add xforms-gl.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605E03B3870337494529423ACB69@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packages/xdisorg.scm (xforms-gl): New variable.
---
gnu/packages/xdisorg.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (19 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index ede84ab..50ca156 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -3496,3 +3496,12 @@ (define-public xforms
called @code{fdesign} that allows you to design a GUI for a program directly
on the screen and which then writes out the necessary C code for it.")
(license license:lgpl2.1+))))
+
+(define-public xforms-gl
+ (package
+ (inherit xforms)
+ (name "xforms-gl")
+ (propagated-inputs (modify-inputs (package-propagated-inputs xforms)
+ (append mesa)))
+ (synopsis
+ "GUI toolkit for X based on the X11 Xlib library, with OpenGL support")))
--
2.39.1
J
J
Jake Leporte wrote on 6 Mar 2023 13:47
[PATCH v7 4/4] gnu: Add dozenal.
(address . 60827@debbugs.gnu.org)(name . Jake Leporte)(address . jakeleporte@outlook.com)
MN2PR20MB2605F69C9E3E4556748DE0F2ACB69@MN2PR20MB2605.namprd20.prod.outlook.com
* gnu/packages/maths.scm (dozenal): New variable.
---
gnu/packages/maths.scm | 105 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 105 insertions(+)

Toggle diff (139 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a7497f1..0e622c0 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -104,6 +104,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)
@@ -126,6 +127,7 @@ (define-module (gnu packages maths)
#:use-module (gnu packages glib)
#:use-module (gnu packages gperf)
#: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)
@@ -174,6 +176,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))
@@ -457,6 +460,108 @@ (define-public dionysus
(license license:gpl3+)
(home-page "https://www.gnu.org/software/dionysus/")))
+(define-public dozenal
+ (let ((revision "1")
+ (commit "328bc03ad544179f2cccda36763358c4216f188e"))
+ (package
+ (name "dozenal")
+ (version (git-version "12010904-3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://codeberg.org/dgoodmaniii/dozenal")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0knwfwjqdv854l5ny7csdpvp7r0md6a2k43a1l2lkyw9k3cglpph"))))
+ (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 _
+ (let ((lua-name (strip-store-file-name #$lua)))
+ (substitute* '("dozcal/Makefile"
+ "dozlua/Makefile")
+ (("lua52")
+ (string-take lua-name
+ (string-rindex lua-name #\.)))))))
+ (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 'split-outputs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (for-each
+ (lambda (prog)
+ (let ((orig (string-append #$output "/bin/" prog))
+ (dst (string-append #$output:gui "/bin/" prog))
+ (man-orig (string-append #$output
+ "/share/man/man1/"
+ prog ".1"))
+ (man-dst (string-append #$output:gui
+ "/share/man/man1/"
+ prog ".1")))
+ (mkdir-p (dirname dst))
+ (copy-file orig dst)
+ (delete-file orig)
+ (mkdir-p (dirname man-dst))
+ (copy-file man-orig man-dst)
+ (delete-file man-orig)))
+ '("xdozdc" "gdozdc"))
+ (wrap-program
+ (string-append #$output:gui "/bin/" "gdozdc")
+ `("PATH" =
+ (,(string-append #$output "/bin")))
+ `("PERL5LIB" =
+ (,(getenv "PERL5LIB")))))))))
+ (outputs '("out" "gui"))
+ (native-inputs (list groff pkg-config))
+ (inputs (list bash-minimal ;since wrap-program is used
+ ncurses
+ libhdate
+ lua
+ perl
+ perl-tk
+ perl-par
+ xforms))
+ (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://codeberg.org/dgoodmaniii/dozenal")
+ (license license:gpl3+))))
+
(define-public dsfmt
(package
(name "dsfmt")
--
2.39.1
M
M
Maxim Cournoyer wrote on 22 Mar 2023 02:44
Re: bug#60827: [PATCH 0/3] Add perl-par, xforms, and dozenal package definitions
(name . Jake Leporte)(address . jakeleporte@outlook.com)(address . 60827@debbugs.gnu.org)
87fs9xk1ai.fsf_-_@gmail.com
Hi,

Jake Leporte <jakeleporte@outlook.com> writes:

Toggle quote (5 lines)
> * gnu/packges/perl.scm (perl-par): New variable.
> ---
> gnu/packages/perl.scm | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)

Thank you for your contribution!

I've now installed the four changes, with the modifications below:

for perl-par, I've added your copyright:

Toggle snippet (11 lines)
modified gnu/packages/perl.scm
@@ -36,6 +36,7 @@
;;; Copyright © 2022 gemmaro <gemmaro.dev@gmail.com>
;;; Copyright © 2023 M?d?lin Ionel Patra?cu <madalinionel.patrascu@mdc-berlin.de>
;;; Copyright © 2023 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;

for xforms, I've added a trailing period to the comment, corrected the
version to "1.3.0" which was the latest release, and reworded the
description a bit.

Toggle snippet (39 lines)
modified gnu/packages/xdisorg.scm
@@ -58,6 +58,7 @@
;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
+;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3451,13 +3452,13 @@ (define-public wvkbd
license:gpl3+)))) ;the rest is GPLv3+
(define-public xforms
- ;; The latest stable release fails with a linker error, so use an updated
- ;; version
+ ;; The latest stable release is ancient (2014) and fails with a linker
+ ;; error, so use the last commit.
(let ((revision "1")
(commit "2c1a9f151baf50887a517280645ec23379fb96f8"))
(package
(name "xforms")
- (version (git-version "1.2.4" revision commit))
+ (version (git-version "1.3.0" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
@@ -3488,8 +3489,8 @@ (define-public xforms
(home-page "http://xforms-toolkit.org/")
(synopsis "GUI toolkit for X based on the X11 Xlib library")
(description
- "XForms is a graphical user interface toolkit for X based on the X11 Xlib
-library. I.e., it allows you to create windows, containing all kinds of
+ "XForms is a graphical user interface toolkit for X based on the X11
+Xlib library. It allows you to create windows, containing all kinds of
widgets (buttons, sliders, browsers, menus etc.) with a few lines of code and
then attach actions to the widgets, i.e., have some function called when a
button is pressed. To make this even easier XForms comes with a program

for xforms-gl, I've used package/inherit, which on top of inheritance
confers the same replacement properties when there are grafts. This is
to be used for variant packages that build from the same source code.

Toggle snippet (13 lines)
modified gnu/packages/xdisorg.scm
@@ -3499,8 +3499,7 @@ (define-public xforms
(license license:lgpl2.1+))))
(define-public xforms-gl
- (package
- (inherit xforms)
+ (package/inherit xforms
(name "xforms-gl")
(propagated-inputs (modify-inputs (package-propagated-inputs xforms)
(append mesa)))

and for dozenal, I've used the 'this-package-input' procedure
recommended by another reviewer, re-flowed the paragraphs to use a width
of 80 characters, used rename-file instead of copy-file + delete-file
and sorted the inputs.

Toggle snippet (111 lines)
1 file changed, 24 insertions(+), 30 deletions(-)
gnu/packages/maths.scm | 54 ++++++++++++++++++++++++------------------------------

modified gnu/packages/maths.scm
@@ -59,6 +59,7 @@
;;; Copyright © 2022 Maximilian Heisinger <mail@maxheisinger.at>
;;; Copyright © 2022 Akira Kyle <akira@akirakyle.com>
;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com>
+;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -463,6 +464,7 @@ (define-public dionysus
(home-page "https://www.gnu.org/software/dionysus/")))
(define-public dozenal
+ ;; There is no recent release, so use the latest commit.
(let ((revision "1")
(commit "328bc03ad544179f2cccda36763358c4216f188e"))
(package
@@ -482,13 +484,12 @@ (define-public dozenal
(arguments
(list
;; Some test scripts are included, but no makefile-driven
- ;; tests, and they are all quite manual to run and check
+ ;; 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.
+ ;; 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))
@@ -499,7 +500,8 @@ (define-public dozenal
(chdir "dozenal")))
(add-after 'chdir 'patch-lua-references
(lambda _
- (let ((lua-name (strip-store-file-name #$lua)))
+ (let ((lua-name (strip-store-file-name
+ #$(this-package-input "lua"))))
(substitute* '("dozcal/Makefile"
"dozlua/Makefile")
(("lua52")
@@ -527,40 +529,32 @@ (define-public dozenal
"/share/man/man1/"
prog ".1")))
(mkdir-p (dirname dst))
- (copy-file orig dst)
- (delete-file orig)
+ (rename-file orig dst)
(mkdir-p (dirname man-dst))
- (copy-file man-orig man-dst)
- (delete-file man-orig)))
+ (rename-file man-orig man-dst)))
'("xdozdc" "gdozdc"))
- (wrap-program
- (string-append #$output:gui "/bin/" "gdozdc")
- `("PATH" =
- (,(string-append #$output "/bin")))
- `("PERL5LIB" =
- (,(getenv "PERL5LIB")))))))))
+ (wrap-program (string-append #$output:gui "/bin/" "gdozdc")
+ `("PATH" = (,(string-append #$output "/bin")))
+ `("PERL5LIB" = (,(getenv "PERL5LIB")))))))))
(outputs '("out" "gui"))
(native-inputs (list groff pkg-config))
- (inputs (list bash-minimal ;since wrap-program is used
- ncurses
+ (inputs (list bash-minimal ;for wrap-program
libhdate
lua
+ ncurses
perl
perl-tk
perl-par
xforms))
- (synopsis
- "Suite of dozenal programs, including converters, a calculator, and date
-program")
+ (synopsis "Suite of dozenal programs")
(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.")
+ "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://codeberg.org/dgoodmaniii/dozenal")
(license license:gpl3+))))
--8<---------------cut here---------------end--------------->8---

Thanks again,

--
Maxim
M
M
Maxim Cournoyer wrote on 22 Mar 2023 02:50
control message for bug #60827
(address . control@debbugs.gnu.org)
87cz51k104.fsf@gmail.com
close 60827
quit
?