GNU bug report logs - #67549
[PATCH 0/2] gnu: Add latexml.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Thu, 30 Nov 2023 17:20:02 UTC

Owned by: Steve George <steve <at> futurile.net>

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67549 in the body.
You can then email your comments to 67549 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#67549; Package guix-patches. (Thu, 30 Nov 2023 17:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 30 Nov 2023 17:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 0/2] gnu: Add latexml. 
Date: Thu, 30 Nov 2023 18:17:05 +0100
This patch series adds the latexml package and its perl-image-size dependency. 

Nicolas Graves (2):
  gnu: Add perl-image-size.
  gnu: Add latexml.

 gnu/packages/markup.scm | 87 ++++++++++++++++++++++++++++++++++++++++-
 gnu/packages/perl.scm   | 20 ++++++++++
 2 files changed, 106 insertions(+), 1 deletion(-)

-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#67549; Package guix-patches. (Sat, 02 Dec 2023 11:10:01 GMT) Full text and rfc822 format available.

Message #8 received at 67549 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 67549 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 1/2] gnu: Add perl-image-size.
Date: Sat,  2 Dec 2023 12:08:45 +0100
* gnu/packages/perl.scm (perl-image-size): New variable.

Change-Id: Ib2b11b74451b156c4380b91334ae37032e6bb6fd
---
 gnu/packages/perl.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 8b82c272fc..47df9d1cf5 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -37,6 +37,7 @@
 ;;; Copyright © 2023 Mădălin Ionel Patrașcu <madalinionel.patrascu <at> mdc-berlin.de>
 ;;; Copyright © 2023 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com>
+;;; Copyright © 2023 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5555,6 +5556,25 @@ (define-public perl-hook-lexwrap
 caller function works correctly within the wrapped subroutine.")
     (license license:perl-license)))
 
+(define-public perl-image-size
+  (package
+    (name "perl-image-size")
+    (version "3.300")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/R/RJ/RJRAY/Image-Size-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0sq2kwdph55h4adx50fmy86brjkkv8grsw33xrhf1k9icpwb3jak"))))
+    (build-system perl-build-system)
+    (native-inputs (list perl-module-build))
+    (home-page "https://metacpan.org/release/Image-Size")
+    (synopsis "Extract height/width from images")
+    (description "This package provides a simple Perl library to extract
+height/width from images.")
+    (license license:perl-license)))
+
 (define-public perl-importer
   (package
     (name "perl-importer")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#67549; Package guix-patches. (Sat, 02 Dec 2023 11:10:02 GMT) Full text and rfc822 format available.

Message #11 received at 67549 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 67549 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 2/2] gnu: Add latexml.
Date: Sat,  2 Dec 2023 12:08:46 +0100
* gnu/packages/markup.scm (latexml): New variable.

Change-Id: If7199a8b74b990ad29718adcb905a5ed31882cf5
---
 gnu/packages/markup.scm | 87 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 86 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm
index 4a9a382104..67c39686d0 100644
--- a/gnu/packages/markup.scm
+++ b/gnu/packages/markup.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2022 jgart <jgart <at> dismail.de>
 ;;; Copyright © 2022 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,13 +46,18 @@ (define-module (gnu packages markup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages libffi)
+  #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-check)
+  #:use-module (gnu packages perl-compression)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages web))
+  #:use-module (gnu packages tex)
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages xml))
 
 (define-public hoedown
   (package
@@ -125,6 +131,85 @@ (define-public markdown
     (license (license:non-copyleft "file://License.text"
                                    "See License.text in the distribution."))))
 
+(define-public latexml
+  (package
+    (name "latexml")
+    (version "0.8.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        "https://math.nist.gov/~BMiller/LaTeXML/releases/LaTeXML-0.8.7.tar.gz")
+       (sha256
+        (base32 "0yfclh3bkksd4xvrhwf06xsbisp84x12vk6lml6yr7bp82a9vni5"))))
+    (build-system perl-build-system)
+    (arguments
+     (let ((input-names (map (compose package-name cadr)
+                             (package-propagated-inputs this-package))))
+       (list
+        #:tests? #f  ; Some file tests are missing.
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'install 'find-itself
+              ;; Fix run-time 'Can't locate [].pm in @INC' failure.
+              (lambda _
+                (with-directory-excursion (string-append #$output "/bin")
+                  (for-each
+                   (lambda (program)
+                     (wrap-program program
+                       `("PERL5LIB" ":" prefix
+                         (,(string-append #$output "/lib/perl5/site_perl")
+                          ,#$@(map (lambda (in)
+                                     (file-append
+                                      (this-package-input in) "/lib/perl5/site_perl"))
+                                   input-names)))))
+                   (find-files "." ".*")))))))))
+    (inputs
+     (list perl libxml2 libxslt))
+    (propagated-inputs
+     (list perl-archive-zip
+           perl-common-sense
+           perl-db-file
+           perl-file-which
+           perl-encode-locale
+           perl-getopt-long
+           perl-http-date
+           perl-http-message
+           perl-image-magick
+           perl-image-size
+           perl-io-string
+           perl-json-xs
+           perl-libwww
+           perl-mime-base64
+           perl-parse-recdescent
+           perl-pod-parser
+           perl-text-unidecode
+           perl-time-hires
+           perl-try-tiny
+           perl-types-serialiser
+           perl-uri
+           perl-xml-libxml
+           perl-xml-libxslt
+           perl-xml-sax-base))
+    (native-inputs
+     (list texlive-bin
+           perl-test-more-utf8
+           perl-extutils-manifest
+           perl-data-dumper
+           perl-ipc-run3
+           perl-file-temp))
+    (home-page "https://math.nist.gov/~BMiller/LaTeXML")
+    (synopsis "A LaTeX to XML/HTML/MathML converter")
+    (description "This package provides a LaTeX converter, with the following goals:
+@itemize
+@item Faithful emulation of TEX’s behaviour;
+@item Easily extensible;
+@item Lossless, preserving both semantic and presentation cues;
+@item Use an abstract LATEX-like, extensible, document type;
+@item Infer the semantics of mathematical content
+@end itemize")
+    (license license:cc0)))
+
 (define-public lowdown
   (package
     (name "lowdown")
-- 
2.41.0





Owner recorded as Steve George <steve <at> futurile.net>. Request was from Steve George <steve <at> futurile.net> to control <at> debbugs.gnu.org. (Thu, 22 Feb 2024 11:37:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#67549; Package guix-patches. (Thu, 11 Apr 2024 22:12:04 GMT) Full text and rfc822 format available.

Message #16 received at 67549 <at> debbugs.gnu.org (full text, mbox):

From: Steve George <steve <at> futurile.net>
To: 67549 <at> debbugs.gnu.org
Cc: Steve George <steve <at> futurile.net>
Subject: [PATCH v2 0/2] Re: Add latexml
Date: Thu, 11 Apr 2024 23:10:38 +0100
Hi Nicolas,

You sent this back in November. As I reviewed I noticed that there were a lot of propagated-inputs, so I extended your wrap phase and moved everything into inputs. Some of the magic of gexps is at the edge of my current understanding, so perhaps there's a better way to do this? 

Review:
  * Move PERL5LIB propagated-inputs to wrap-program
  * Update to new minor version
  * Change to Git / enable tests
  * functionality: tested with example
  * checked with guix lint
  * reroll to trigger QA build

Nicolas Graves via Guix-patches via (2):
  gnu: Add perl-image-size.
  gnu: Add latexml.

 gnu/packages/markup.scm | 117 +++++++++++++++++++++++++++++++++++++++-
 gnu/packages/perl.scm   |  20 +++++++
 2 files changed, 136 insertions(+), 1 deletion(-)


base-commit: c1c9d6b3cdf5955f1bf5fded2a0c496ce2e631f1
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#67549; Package guix-patches. (Thu, 11 Apr 2024 22:13:04 GMT) Full text and rfc822 format available.

Message #19 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Steve George <steve <at> futurile.net>
To: 67549 <at> debbugs.gnu.org
Cc: Steve George <steve <at> futurile.net>,
 Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org>
Subject: [PATCH v2 2/2] gnu: Add latexml.
Date: Thu, 11 Apr 2024 23:10:40 +0100
From: Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org>

* gnu/packages/markup.scm (latexml): New variable.

Reviewed-by: Steve George <steve <at> futurile.net>

Change-Id: If7199a8b74b990ad29718adcb905a5ed31882cf5
---
 gnu/packages/markup.scm | 117 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 116 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm
index 6d891ee313..2cc3d0415d 100644
--- a/gnu/packages/markup.scm
+++ b/gnu/packages/markup.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2022 jgart <jgart <at> dismail.de>
 ;;; Copyright © 2022, 2024 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,15 +45,21 @@ (define-module (gnu packages markup)
   #:use-module (guix gexp)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages libffi)
+  #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-check)
+  #:use-module (gnu packages perl-compression)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages web))
+  #:use-module (gnu packages tex)
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages xml))
 
 (define-public hoedown
   (package
@@ -126,6 +133,114 @@ (define-public markdown
     (license (license:non-copyleft "file://License.text"
                                    "See License.text in the distribution."))))
 
+(define-public latexml
+  (package
+    (name "latexml")
+    (version "0.8.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/brucemiller/LaTeXML")
+              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+         (base32
+           "0lppm66fxadsbn73xh0nfqdi4y6d9j6xph1slvlp6ynrfbnn5p6s"))))
+    (build-system perl-build-system)
+    (arguments
+     (let ((wraplibs
+             (list "perl-archive-zip"
+                   "perl-common-sense"
+                   "perl-db-file"
+                   "perl-encode-locale"
+                   "perl-file-which"
+                   "perl-getopt-long"
+                   "perl-http-date"
+                   "perl-http-message"
+                   "perl-image-magick"
+                   "perl-image-size"
+                   "perl-io-string"
+                   "perl-json-xs"
+                   "perl-libwww"
+                   "perl-mime-base64"
+                   "perl-parse-recdescent"
+                   "perl-pod-parser"
+                   "perl-text-unidecode"
+                   "perl-time-hires"
+                   "perl-try-tiny"
+                   "perl-types-serialiser"
+                   "perl-uri"
+                   "perl-xml-libxml"
+                   "perl-xml-libxslt"
+                   "perl-xml-sax-base")))
+       (list
+        ;; some tests skip due to missing dependencies
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'install 'find-itself
+              ;; Fix run-time 'Can't locate [].pm in @INC' failure and remove
+              ;; need for extensive set of propagated inputs
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (with-directory-excursion (string-append #$output "/bin")
+                    (for-each
+                     (lambda* (program)
+                       (wrap-program program
+                         `("PERL5LIB" ":" prefix
+                           (,(string-append #$output "/lib/perl5/site_perl")
+                            ,#$@(map (lambda (in)
+                                       (file-append
+                                        (this-package-input in) "/lib/perl5/site_perl"))
+                                     wraplibs)))))
+                     (find-files "." ".*")))))))))
+    (inputs
+     (list bash-minimal
+           libxml2
+           libxslt
+           perl
+           perl-archive-zip
+           perl-common-sense
+           perl-db-file
+           perl-encode-locale
+           perl-file-which
+           perl-getopt-long
+           perl-http-date
+           perl-http-message
+           perl-image-magick
+           perl-image-size
+           perl-io-string
+           perl-json-xs
+           perl-libwww
+           perl-mime-base64
+           perl-parse-recdescent
+           perl-pod-parser
+           perl-text-unidecode
+           perl-time-hires
+           perl-try-tiny
+           perl-types-serialiser
+           perl-uri
+           perl-xml-libxml
+           perl-xml-libxslt
+           perl-xml-sax-base))
+    (native-inputs
+     (list texlive-bin
+           perl-test-more-utf8
+           perl-extutils-manifest
+           perl-data-dumper
+           perl-ipc-run3
+           perl-file-temp))
+    (home-page "https://math.nist.gov/~BMiller/LaTeXML/")
+    (synopsis "LaTeX to XML, HTML, MathML, epub and Jats converter")
+    (description "This package provides a LaTeX converter, with the following goals:
+@itemize
+@item Faithful emulation of TEX’s behaviour;
+@item Easily extensible;
+@item Lossless, preserving both semantic and presentation cues;
+@item Use an abstract LATEX-like, extensible, document type;
+@item Infer the semantics of mathematical content
+@end itemize")
+    (license license:cc0)))
+
 (define-public lowdown
   (package
     (name "lowdown")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#67549; Package guix-patches. (Thu, 11 Apr 2024 22:13:06 GMT) Full text and rfc822 format available.

Message #22 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Steve George <steve <at> futurile.net>
To: 67549 <at> debbugs.gnu.org
Cc: Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org>
Subject: [PATCH v2 1/2] gnu: Add perl-image-size.
Date: Thu, 11 Apr 2024 23:10:39 +0100
From: Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org>

* gnu/packages/perl.scm (perl-image-size): New variable.

Change-Id: Ib2b11b74451b156c4380b91334ae37032e6bb6fd
---
 gnu/packages/perl.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 80b17098c7..57a06f836b 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -37,6 +37,7 @@
 ;;; Copyright © 2023 Mădălin Ionel Patrașcu <madalinionel.patrascu <at> mdc-berlin.de>
 ;;; Copyright © 2023 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com>
+;;; Copyright © 2023 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5554,6 +5555,25 @@ (define-public perl-hook-lexwrap
 caller function works correctly within the wrapped subroutine.")
     (license license:perl-license)))
 
+(define-public perl-image-size
+  (package
+    (name "perl-image-size")
+    (version "3.300")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/R/RJ/RJRAY/Image-Size-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0sq2kwdph55h4adx50fmy86brjkkv8grsw33xrhf1k9icpwb3jak"))))
+    (build-system perl-build-system)
+    (native-inputs (list perl-module-build))
+    (home-page "https://metacpan.org/release/Image-Size")
+    (synopsis "Extract height/width from images")
+    (description "This package provides a simple Perl library to extract
+height/width from images.")
+    (license license:perl-license)))
+
 (define-public perl-importer
   (package
     (name "perl-importer")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#67549; Package guix-patches. (Thu, 11 Apr 2024 22:13:06 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#67549; Package guix-patches. (Thu, 11 Apr 2024 22:13:06 GMT) Full text and rfc822 format available.

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Tue, 16 Apr 2024 22:04:04 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graves <ngraves <at> ngraves.fr>:
bug acknowledged by developer. (Tue, 16 Apr 2024 22:04:04 GMT) Full text and rfc822 format available.

Message #33 received at 67549-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Steve George <steve <at> futurile.net>, ngraves <at> ngraves.fr
Cc: 67549-done <at> debbugs.gnu.org
Subject: Re: [bug#67549] [PATCH v2 0/2] Re: Add latexml
Date: Tue, 16 Apr 2024 23:03:07 +0100
[Message part 1 (text/plain, inline)]
Steve George <steve <at> futurile.net> writes:

> Hi Nicolas,
>
> You sent this back in November. As I reviewed I noticed that there
> were a lot of propagated-inputs, so I extended your wrap phase and
> moved everything into inputs. Some of the magic of gexps is at the
> edge of my current understanding, so perhaps there's a better way to
> do this?
>
> Review:
>   * Move PERL5LIB propagated-inputs to wrap-program
>   * Update to new minor version
>   * Change to Git / enable tests
>   * functionality: tested with example
>   * checked with guix lint
>   * reroll to trigger QA build
>
> Nicolas Graves via Guix-patches via (2):
>   gnu: Add perl-image-size.
>   gnu: Add latexml.
>
>  gnu/packages/markup.scm | 117 +++++++++++++++++++++++++++++++++++++++-
>  gnu/packages/perl.scm   |  20 +++++++
>  2 files changed, 136 insertions(+), 1 deletion(-)

Thanks both, this looks good to me so I've gone ahead and pushed these
patches to master as 6a6dde505888bb1aff84bb02480f94312ac2989f.

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 15 May 2024 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.