122/137: gnu: texlive-amstex: Create missing symlink.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 6c5e6892da50f72b9e180f1068349f0b031339f6
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:00:16 2024 +0200

gnu: texlive-amstex: Create missing symlink.

* gnu/packages/tex.scm (texlive-amstex)[arguments]<#:phases>: Create missing
symlink.

Change-Id: Ibd71612febb0e7768e43f432bd3e71af82e39634
---
 gnu/packages/tex.scm | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b72a98963b..c7f1bfcfc6 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -3015,7 +3015,17 @@ create a bibliography.")
 "01yh10g2wwa58q151aqg246bsclks25qvd8axc1v799v37wlgqn3"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:create-formats #~(list "amstex")))
+(arguments
+ (list #:create-formats #~(list "amstex")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((pdftex (search-input-file inputs "bin/pdftex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink pdftex "amstex"
 (propagated-inputs
  (list texlive-amsfonts
texlive-cm



120/137: gnu: texlive-ec: Remove reference to TeX Live version in license.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 2d90db9f0e61e4f8fa284ad3fc821541c27f32f2
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 14:23:21 2024 +0200

gnu: texlive-ec: Remove reference to TeX Live version in license.

* gnu/packages/tex.scm (texlive-ec)[license]: Remove reference to TeX Live 
version.

Change-Id: Ib7c1de9f2b98cdcf71910e4148c2b24009ff42bc
---
 gnu/packages/tex.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b1fceb3f40..b72a98963b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -57259,8 +57259,8 @@ sign, and many others.  The fonts are available in 
(traced) Adobe Type
 Modern-style T1-encoded Type 1 set, Latin Modern, is not actually a direct
 development of the EC set, and differs from the EC in a number of
 particulars.")
-(license (license:fsf-free "https://www.tug.org/svn/texlive/tags/\
-texlive-2019.3/Master/texmf-dist/doc/fonts/ec/copyrite.txt"
+(license (license:fsf-free "https://www.tug.org/svn/texlive/trunk/\
+Master/texmf-dist/doc/fonts/ec/copyrite.txt"
 
 (define-deprecated-package texlive-fonts-ec texlive-ec)
 



127/137: gnu: texlive-mltex: Create missing symlinks.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 07380fb0560ff4886a8bacf3b2268cf6e773f083
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:20:09 2024 +0200

gnu: texlive-mltex: Create missing symlinks.

* gnu/packages/tex.scm (texlive-mltex)[arguments]<#:phases>: Create missing
symlinks.

Change-Id: I05c7aa88aee42f01fea96bd36a173fa494d54d6d
---
 gnu/packages/tex.scm | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 0c335685c2..563eee092e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -27062,7 +27062,18 @@ avoids the spindliness of most other Type 1 versions 
of Computer Modern.")
 "1ip0q5kqj6bg4jkginzljknbrd74ss4iky2gvlmf8nnrq06n89my"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:create-formats #~(list "mllatex" "mltex")))
+(arguments
+ (list #:create-formats #~(list "mllatex" "mltex")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((pdftex (search-input-file inputs "bin/pdftex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink pdftex "mllatex")
+   (symlink pdftex "mltex"
 (propagated-inputs
  (list texlive-atbegshi
texlive-atveryend



110/137: gnu: tex: Set properties to protect inputs during updates.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 93f11145f21f8078927681311fcbbe1981bc5e3e
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 22:38:50 2024 +0200

gnu: tex: Set properties to protect inputs during updates.

* gnu/packages/tex.scm (texlive-scripts)[properties]:
(texlive-accfonts)[properties]:
(texlive-arara)[properties]:
(texlive-burmese)[properties]:
(texlive-glossaries)[properties]:
(texlive-urlbst)[properties]:
(texlive-bundledoc)[properties]:
(texlive-clojure-pamphlet)[properties]:
(texlive-ctanify)[properties]:
(texlive-de-macro)[properties]:
(texlive-findhyph)[properties]:
(texlive-biber)[properties]:
(texlive-biblatex-philosophy)[properties]:
(texlive-bropd)[properties]:
(texlive-cmll)[properties]:
(texlive-charter)[properties]:
(texlive-concmath-fonts)[properties]:
(texlive-ecc)[properties]:
(texlive-eiad)[properties]:
(texlive-feyn)[properties]:
(texlive-fontsize)[properties]:
(texlive-hanzibox)[properties]:
(texlive-lxfonts)[properties]:
(texlive-nwafuthesis)[properties]:
(texlive-poetrytex)[properties]:
(texlive-reverxii)[properties]:
(texlive-stix)[properties]:
(texlive-suftesi)[properties]:
(texlive-ulqda)[properties]:
(texlive-vntex)[properties]:
(texlive-xduts)[properties]:
(texlive-xmuthesis)[properties]:
(texlive-yathesis)[properties]:
(texlive-fc)[properties]:
(texlive-gobble)[properties]:
(texlive-ibygrk)[properties]:
(texlive-pl)[properties]:
(texlive-yannisgr)[properties]:
(texlive-zhlipsum)[properties]:
(texlive-makecell)[properties]:
(texlive-cbfonts)[properties]:
(texlive-cm)[properties]:
(texlive-cmbright)[properties]:
(texlive-knuth-lib)[properties]:
(texlive-knuth-local)[properties]:
(texlive-latex-fonts)[properties]:
(texlive-mflogo)[properties]:
(texlive-prerex)[properties]:
(texlive-robotarm)[properties]:
(texlive-tikz-timing)[properties]:
(texlive-tikzpagenodes)[properties]:
(texlive-amsfonts)[properties]:
(texlive-ec)[properties]:
(texlive-etex)[properties]:
(texlive-halloweenmath)[properties]:
(texlive-atveryend)[properties]:
(texlive-filehook)[properties]:
(texlive-graphics)[properties]:
(texlive-xcjk2uni)[properties]:
(texlive-l3kernel)[properties]:
(texlive-l3backend)[properties]:
(texlive-l3packages)[properties]:
(texlive-sansmathfonts)[properties]:
(texlive-lualibs)[properties]:
(texlive-babel)[properties]:
(texlive-cs)[properties]:
(texlive-csplain)[properties]:
(texlive-babel-romansh)[properties]:
(texlive-cyrillic)[properties]:
(texlive-psnfss)[properties]:
(texlive-tipa)[properties]:
(texlive-firstaid)[properties]:
(texlive-trimspaces)[properties]:
(texlive-currfile)[properties]:
(texlive-rsfs)[properties]:
(texlive-stmaryrd)[properties]:
(texlive-xpeek)[properties]:
(texlive-wasy)[properties]:
(texlive-needspace)[properties]:
(texlive-changepage)[properties]:
(texlive-atbegshi)[properties]:
(texlive-xypic)[properties]:
(texlive-standalone)[properties]:
(texlive-ifmtarg)[properties]:
(texlive-ifoddpage)[properties]:
(texlive-storebox)[properties]:
(texlive-collectbox)[properties]:
(texlive-adjustbox)[properties]:
(texlive-asyfig)[properties]:
(texlive-eurosym)[properties]:
(texlive-unicode-math)[properties]:
(texlive-cc-pl)[properties]:
(texlive-easyfig)[properties]:
(texlive-lstaddons)[properties]:
(texlive-magicwatermark)[properties]:
(texlive-minibox)[properties]:
(texlive-multienv)[properties]:
(texlive-mwe)[properties]:
(texlive-recipecard)[properties]:
(texlive-svn-multi)[properties]:
(texlive-termsim)[properties]:
(texlive-wrapstuff)[properties]:
(texlive-chktex)[properties]:
(texlive-ps2eps)[properties]:
(texlive-psutils)[properties]:
(texlive-xindy)[properties]:
(texlive-fontools)[properties]:
(texlive-mkgrkindex)[properties]:
(texlive-latex-git-log)[properties]:
(texlive-latex2man)[properties]:
(texlive-latex2nemeth)[properties]:
(texlive-latexindent)[properties]:
(texlive-latexpand)[properties]:
(texlive-match-parens)[properties]:
(texlive-optexcount)[properties]:
(texlive-pdfbook2)[properties]:
(texlive-pkfix-helper)[properties]:
(texlive-purifyeps)[properties]:
(texlive-mkpic)[properties]:
(texlive-petri-nets)[properties]:
(texlive-tex4ht)[properties]:
(texlive-texdirflatten)[properties]:
(texlive-texdoctk)[properties]:
(texlive-texloganalyser)[properties]:
(texlive-texlogfilter)[properties]:
(texlive-tlcockpit)[properties]:
(texlive-kpathsea)[properties]:
(texlive-epstopdf)[properties]:
(texlive-pdftex)[properties]:
(texlive-fig4latex)[properties]:
(texlive-authorindex)[properties]:

112/137: gnu: texlive-match-parens: Specify upstream name.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 835fe45f774296e28983f44b7cc1b5b9fbbd1102
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 09:11:39 2024 +0200

gnu: texlive-match-parens: Specify upstream name.

* gnu/packages/tex.scm (texlive-match-parens)[properties]: Add UPSTREAM-NAME
property.

Change-Id: I831df8be99fd781724fa4bd5d7d2d8abf4d15101
---
 gnu/packages/tex.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 81f0ff8d66..29525ba95d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -48402,7 +48402,8 @@ without HarfBuzz.")
(base32
 "0qqxbh3h1xkggs5p2gnis4z8h3s0mwknszyjzs2fslnq16yyqi27"
 (outputs '("out" "doc"))
-(properties '((updater-extra-inputs "ruby")))
+(properties '((upstream-name . "match_parens")
+  (updater-extra-inputs "ruby")))
 (build-system texlive-build-system)
 (arguments (list #:link-scripts #~(list "match_parens")))
 (inputs (list ruby))



129/137: gnu: texlive-platex: Create missing symlink.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit c21c7c7fadecbea2e37fff91f7618677a85d46cb
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:23:26 2024 +0200

gnu: texlive-platex: Create missing symlink.

* gnu/packages/tex.scm (texlive-platex)[arguments]<#:phases>: Create missing
symlink.

Change-Id: I7924933a858526b2ffa1177ba29f916da99e3335
---
 gnu/packages/tex.scm | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 46e81052e0..a22382fc91 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -44970,7 +44970,14 @@ LaTeX packages use of @samp{}) in nested package 
files.")
  (lambda _
(substitute* "source/platex/base/plfmt.ins"
  (("keepsilent\n" all)
-  (string-append all "\\askforoverwritefalse\n"
+  (string-append all "\\askforoverwritefalse\n")
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((euptex (search-input-file inputs "bin/euptex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink euptex "platex"
 (propagated-inputs
  (list texlive-atbegshi
texlive-atveryend



33/137: gnu: Add texlive-velthuis-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 975f17aeb29363c7cb57b0da52b1cd9862d99364
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 23:48:23 2024 +0200

gnu: Add texlive-velthuis-bin.

* gnu/packages/tex.scm (texlive-velthuis-bin): New variable.
(texlive-velthuis)[propagated-inputs]: Add TEXLIVE-VELTHUIS-BIN.

Change-Id: Ib0f69bc3edb44b45164858ae48bd883dbddaee1d
---
 gnu/packages/tex.scm | 88 +++-
 1 file changed, 87 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 8fa229d494..ee8fdf48df 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -32497,7 +32497,7 @@ style).")
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
 (native-inputs (list texlive-metafont))
-(propagated-inputs (list texlive-xetex-devanagari))
+(propagated-inputs (list texlive-velthuis-bin texlive-xetex-devanagari))
 (home-page "https://ctan.org/pkg/devanagari;)
 (synopsis "Typeset Devanagari")
 (description
@@ -32508,6 +32508,52 @@ languages typically printed in the Devanagari script.  
The package provides
 fonts, in both Metafont and Type 1 formats.")
 (license license:gpl3+)))
 
+(define-public texlive-velthuis-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-velthuis-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("devnag"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-devnag" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/devnag"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/devnag"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '())
+(propagated-inputs '())
+(home-page (package-home-page texlive-velthuis))
+(synopsis "Binary for @code{texlive-velthuis}")
+(description
+ "This package provide the binary for @code{texlive-velthuis}.")
+(license (package-license texlive-velthuis
+
 (define-public texlive-venn
   (package
 (name "texlive-venn")
@@ -32599,6 +32645,46 @@ strong on layout, from simple alternate-line 
indentation to the @code{Mouse's
 tale} from @emph{Alice in Wonderland}.")
 (license license:lppl)))
 
+(define texlive-vlna-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-vlna-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("vlna"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--enable-vlna" (delete "--enable-web2c" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/vlna"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/vlna"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '(
+
 (define-public texlive-vlna
   (package
 (name 

116/137: gnu: texlive-ran-toks: Specify upstream name.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 69b5feb3913431e209392b7a1da26bf01f88c6a2
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 11:04:48 2024 +0200

gnu: texlive-ran-toks: Specify upstream name.

* gnu/packages/tex.scm (texlive-ran-toks)[properties]: Add UPSTREAM-NAME 
property.

Change-Id: I22ea91ec581249df44f7fd36dcd6aa3b8a38bfed
---
 gnu/packages/tex.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 46f085f958..b73c5207ad 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -116968,6 +116968,7 @@ The author now considers the package obsolete, and 
recommends use of
(base32
 "18js88apqcvsr4z4fwjf6219d28fxnhcv3srhhksbi5h4ky8y88m"
 (outputs '("out" "doc"))
+(properties '((upstream-name . "ran_toks")))
 (build-system texlive-build-system)
 (home-page "https://ctan.org/pkg/ran_toks;)
 (synopsis "Randomise token strings")



128/137: gnu: texlive-optex: Create missing symlink.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 61df9986d0b626d83a3c679d24c36bb6ab6d7aad
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:21:18 2024 +0200

gnu: texlive-optex: Create missing symlink.

* gnu/packages/tex.scm (texlive-optex)[arguments]<#:phases>: Create missing
symlink.

Change-Id: I5b86e979ca3c6ce2aa8e6481596389dd83acb4ca
---
 gnu/packages/tex.scm | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 563eee092e..46e81052e0 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -71830,7 +71830,17 @@ and back-ends.  It also ensures compatibility with the 
@code{media9} and
 "0bcrj9wrimcd2pxrcfk7x3vkhxzij4422l19a8j4h299lkq3pbx0"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:create-formats #~(list "optex")))
+(arguments
+ (list #:create-formats #~(list "optex")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((luatex (search-input-file inputs "bin/luatex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink luatex "optex"
 (propagated-inputs
  (list texlive-amsfonts
texlive-cm



32/137: gnu: Add texlive-pmx-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 97021cf38fafdb19ee5090efb15a9e0cff22a001
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 23:34:59 2024 +0200

gnu: Add texlive-pmx-bin.

* gnu/packages/tex.scm (texlive-pmx-bin): New variable.
(texlive-pmx)[propagated-inputs]: Add TEXLIVE-PMX-BIN.

Change-Id: Ie392c5735f495d724e44ab1e3a88e19be00edaf5
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 9c3900e40e..8fa229d494 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -25654,6 +25654,7 @@ is recommended.")
   "1p9js9izv50vg7qqqmyg5jz4am4phhscqdfnn4nszlyfv3zkg7p3")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-pmx-bin))
 (home-page "https://ctan.org/pkg/pmx;)
 (synopsis "Preprocessor for MusiXTeX")
 (description
@@ -25666,6 +25667,52 @@ your score.  @command{scor2prt} is an auxiliary 
program that makes parts from
 a score.")
 (license license:gpl2)))
 
+(define-public texlive-pmx-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-pmx-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("pmx"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-pmx" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/pmx"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/pmx"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '())
+(propagated-inputs '())
+(home-page (package-home-page texlive-pmx))
+(synopsis "Binaries for @code{texlive-pmx}")
+(description
+ "This package provides the binaries for @code{texlive-pmx}.")
+(license (package-license texlive-pmx
+
 (define-public texlive-pmxchords
   (package
 (name "texlive-pmxchords")



126/137: gnu: texlive-mex: Create missing symlinks.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit ef986239b1a44643d7d278b914e731129f95ebc6
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:18:08 2024 +0200

gnu: texlive-mex: Create missing symlinks.

* gnu/packages/tex.scm (texlive-mex)[arguments]<#:phases>: Create missing
symlinks.

Change-Id: I434db9503f3c04aeb27b0daf712cf45187d140a6
---
 gnu/packages/tex.scm | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 1387ba41aa..0c335685c2 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -26680,7 +26680,19 @@ with symbols, giving automatic alignment.")
 "0kc766cvvbcqrj60ncz4a105nrn454y5c2330y7s7jzh45dx8qsi"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:create-formats #~(list "mex" "pdfmex" "utf8mex")))
+(arguments
+ (list #:create-formats #~(list "mex" "pdfmex" "utf8mex")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((pdftex (search-input-file inputs "bin/pdftex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink pdftex "mex")
+   (symlink pdftex "pdfmex")
+   (symlink pdftex "utf8mex"
 (propagated-inputs
  (list texlive-enctex
texlive-hyphen-complete



113/137: guix: download-multi-svn-to-store: Allow exporting from base URL.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 0709868ff24f0b91380659269d7d4678bc9b5a5a
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 17:29:37 2024 +0200

guix: download-multi-svn-to-store: Allow exporting from base URL.

* guix/svn-download.scm (download-multi-svn-to-store): Allow exporting from
locations such as "./" or "somefile.txt".

Change-Id: If37362e4672b175fe413acc56ed67064ad998fe3
---
 guix/svn-download.scm | 40 
 1 file changed, 24 insertions(+), 16 deletions(-)

diff --git a/guix/svn-download.scm b/guix/svn-download.scm
index 62649e4374..b20cdc79d1 100644
--- a/guix/svn-download.scm
+++ b/guix/svn-download.scm
@@ -351,21 +351,29 @@ reports to LOG."
 reports to LOG."
   (call-with-temporary-directory
(lambda (temp)
- (and (every (lambda (location)
-   (let ((dir (string-append temp "/" (dirname location
- (mkdir-p dir))
-   (parameterize ((current-output-port log))
- (build:svn-fetch (string-append (svn-multi-reference-url 
ref)
- "/" location)
-  (svn-multi-reference-revision ref)
-  (if (string-suffix? "/" location)
-  (string-append temp "/" location)
-  (string-append temp "/" (dirname 
location)))
-  #:recursive?
-  (svn-multi-reference-recursive? ref)
-  #:user-name 
(svn-multi-reference-user-name ref)
-  #:password (svn-multi-reference-password 
ref
- (svn-multi-reference-locations ref))
-  (add-to-store store name #t "sha256" temp)
+ ;; When "svn" is called, TEMP already exists.  As a consequence, "svn"
+ ;; refuses to export files there, assuming it would overwrite a previous
+ ;; export.  It can be an issue if locations includes files at SVN URL.
+ ;; To circumvent this, export in a fresh sub-directory.
+ (let ((output (string-append temp "/svn")))
+   (mkdir-p output)
+   (and (every (lambda (location)
+ (unless (string-suffix? "/" location)
+   (mkdir-p (string-append output "/" (dirname location
+ (parameterize ((current-output-port log))
+   (build:svn-fetch
+(string-append (svn-multi-reference-url ref)
+   "/"
+   location)
+(svn-multi-reference-revision ref)
+(if (string-suffix? "/" location)
+(string-append output "/" location)
+(string-append output "/" (dirname location)))
+#:recursive?
+(svn-multi-reference-recursive? ref)
+#:user-name (svn-multi-reference-user-name ref)
+#:password (svn-multi-reference-password ref
+   (svn-multi-reference-locations ref))
+(add-to-store store name #t "sha256" output))
 
 ;;; svn-download.scm ends here



115/137: guix: import texlive: no bogus data with non-existing packages.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 1cb28f2bf1c245f0bb3954798a9780ba2b86fb2c
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 10:32:23 2024 +0200

guix: import texlive: no bogus data with non-existing packages.

* guix/import/texlive.scm (latest-release): Check if the package really 
exists
in the package database before returning an  object.

Change-Id: I85c600b7b125b02cac58f263eac645dd8fab63ab
---
 guix/import/texlive.scm | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 1881f40f16..e4e0654b78 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -794,11 +794,12 @@ include a VERSION string to fetch a specific version."
   (let* ((version (or version (latest-texlive-tag)))
  (database (tlpdb/cached version))
  (upstream-name (package-upstream-name* package)))
-(upstream-source
- (package upstream-name)
- (version version)
- (urls (texlive->svn-multi-reference upstream-name version database))
- (inputs (list-upstream-inputs upstream-name version database)
+(and (assoc-ref database upstream-name)
+ (upstream-source
+  (package upstream-name)
+  (version version)
+  (urls (texlive->svn-multi-reference upstream-name version database))
+  (inputs (list-upstream-inputs upstream-name version database))
 
 (define %texlive-updater
   ;; The TeX Live updater.  It is restricted to TeX Live releases (2023.0,



34/137: gnu: Add texlive-bibtex8-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 659a77bf125a65be22e7feaa2d2d4324ac871645
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 23:53:04 2024 +0200

gnu: Add texlive-bibtex8-bin.

* gnu/packages/tex.scm (texlive-bibtex8-bin): New variable.
(texlive-bibtex8)[propagated-inputs]: Add TEXLIVE-BIBTEX8-BIN.

Change-Id: I64ef0f00cbec29e6abd4e3f2e2c96bbfb8db10e2
---
 gnu/packages/tex.scm | 73 
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ee8fdf48df..22c07c3748 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -33704,6 +33704,7 @@ Japanese, for XeLaTeX.")
   "1ywv5rdk08dnrqr09pnjzff37x2c9m5i1wjzfsjnvm068is58c7s")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-bibtex8-bin))
 (home-page "https://ctan.org/pkg/bibtex8;)
 (synopsis "BibTeX variant supporting 8-bit encodings")
 (description
@@ -33713,6 +33714,78 @@ capacity and 8-bit support extensions.  National 
character set and sorting
 order are controlled by an external configuration file.")
 (license license:gpl3+)))
 
+(define-public texlive-bibtex8-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-bibtex8-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs with-files?)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") dirs)))
+  (or with-files?
+  (eq? 'directory (stat:type (stat 
file
+(delete-other-directories "libs" '() #f)
+(delete-other-directories "utils" '() #f)
+;; Tests require "texmf.cnf" to be present in the tree.  Also test
+;; data is spread across multiple directories, which need to be
+;; preserved.
+(delete-other-directories "texk" '("bibtex-x" "kpathsea" "tests" 
"web2c") #f)
+(delete-other-directories "texk/web2c" '("tests") #t)
+(with-directory-excursion "texk/kpathsea"
+  (for-each
+   delete-file-recursively
+   (scandir "." (lambda (f)
+  (not (member f '("." ".." "texmf.cnf")))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--enable-bibtex-x"
+ "--enable-bibtex8"
+ "--disable-bibtexu"
+ (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(add-after 'unpack 'locate-libkpathsea
+  (lambda _
+(let ((kpathsea #$(this-package-input "texlive-libkpathsea")))
+  (substitute* "texk/bibtex-x/Makefile.in"
+(("(KPATHSEA_LIBS =).*" _ lead)
+ (format #f "~a \"-L~a/lib -lkpathsea\"\n" lead 
kpathsea))
+(add-after 'unpack 'skip-bibtexu-test
+  ;; This package does not build "bibtexu" binary; the test below
+  ;; is therefore bound to fail.  Skip that part.
+  (lambda _
+(substitute* "texk/bibtex-x/tests/bibtex8u-mem.test"
+  (("\\./bibtexu .*") "exit 0\n"
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/bibtex-x"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/bibtex-x"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-bibtex8))
+(synopsis "Binary for @code{texlive-bibtex8}")
+(description
+ "This package provides the binary for @code{texlive-bibtex8}.")
+(license (package-license texlive-bibtex8
+
 (define-public texlive-bibtexu
   (package
 (name "texlive-bibtexu")



117/137: gnu: texlive-ctan-chk: Specify upstream name.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit cbf3ed7b71654333f63e5672e9045c5cd0d5
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 11:05:44 2024 +0200

gnu: texlive-ctan-chk: Specify upstream name.

* gnu/packages/tex.scm (texlive-ctan-chk)[properties]: Add UPSTREAM-NAME 
property.

Change-Id: I7ffbab1d0262a6e97c29af5060f2aa9b4835719c
---
 gnu/packages/tex.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b73c5207ad..6d11f01dc7 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -41319,6 +41319,7 @@ submission has to be requested by an appropriate 
command line option.")
(base32
 "09ngqgs08q8bld334jrzhnd558lv7fajfppmfrkp4kv9hc5iyz9a"
 (outputs '("out" "doc"))
+(properties '((upstream-name . "ctan_chk")))
 (build-system texlive-build-system)
 (home-page "https://ctan.org/pkg/ctan_chk;)
 (synopsis "CTAN guidelines verifier and corrector for uploading projects")



125/137: gnu: texlive-lollipop: Create missing symlink.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 87e3a75a7790325e05349f9ca783d26304967c94
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:39:01 2024 +0200

gnu: texlive-lollipop: Create missing symlink.

* gnu/packages/tex.scm (texlive-lollipop)[arguments]<#:phases>: Create 
missing
symlink.
[propagated-inputs]: Add TEXLIVE-TEX.

Change-Id: Id147f8b2210193df5b2b4e9de3bfa0ec3b39f431
---
 gnu/packages/tex.scm | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 21afe8eea3..1387ba41aa 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -24639,8 +24639,18 @@ symbol variants more suited to work in logic.")
 "0xdldlnhsr2n8544j9vd6gllin8bfkpcbhlpmxlhrvjl5bdg0rjp"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:create-formats #~(list "lollipop")))
-(propagated-inputs (list texlive-cm texlive-hyphen-base))
+(arguments
+ (list #:create-formats #~(list "lollipop")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((tex (search-input-file inputs "bin/tex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink tex "lollipop"
+(propagated-inputs (list texlive-cm texlive-hyphen-base texlive-tex))
 (home-page "https://ctan.org/pkg/lollipop;)
 (synopsis "TeX made easy")
 (description



44/137: gnu: Add texlive-makeindex-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit b85486f60c9def473d70fcfb9d233dd0f98a157d
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 07:18:47 2024 +0200

gnu: Add texlive-makeindex-bin.

* gnu/packages/tex.scm (texlive-makeindex-bin): New variable.
(texlive-makeindex)[propagated-inputs]: Add TEXLIVE-MAKEINDEX-BIN.

Change-Id: I00a5600d3260696c3c67f89902e7f69ea98ba30d
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index d27ffac5cb..04cfba4c0a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -54680,6 +54680,7 @@ always (re)defines a command.  There is also 
@code{\\makeenvironment} and
   "0m01m0x1kf10yvzxgrkvpic0amsr0g6q2r2wsg5f4ngybq4y9gyi")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-makeindex-bin))
 (home-page "https://ctan.org/pkg/makeindexk;)
 (synopsis "Makeindex development sources")
 (description
@@ -54687,6 +54688,52 @@ always (re)defines a command.  There is also 
@code{\\makeenvironment} and
 (license
  (license:fsf-free 
"https://mirrors.ctan.org/indexing/makeindex/COPYING;
 
+(define-public texlive-makeindex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-makeindex-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "texk" '("makeindexk" "tests"))
+(delete-other-directories "utils" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-makeindexk" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/makeindexk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/makeindexk"
+  (invoke "make" "install"
+(native-inputs (list perl pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-makeindex))
+(synopsis "Binary for @code{texlive-makeindex}")
+(description
+ "This package provides the binary for @code{texlive-makeindex}.")
+(license (package-license texlive-makeindex
+
 (define-public texlive-marginfix
   (package
 (name "texlive-marginfix")



35/137: gnu: Add texlive-bibtexu-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit facd8dc268ad90eda8c9a2c8c0efd4858ccc2c58
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 23:56:13 2024 +0200

gnu: Add texlive-bibtexu-bin.

* gnu/packages/tex.scm (texlive-bibtexu-bin): New variable.
(texlive-bibtexu)[propagated-inputs]: Add TEXLIVE-BIBTEXu-BIN.

Change-Id: Iafd01d42aee35030e30a761a2f8f42b8908e82b0
---
 gnu/packages/tex.scm | 29 +
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 22c07c3748..59cffa6858 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -33798,6 +33798,7 @@ order are controlled by an external configuration 
file.")
   "19bp8wn0ssz7gczxp0imbpgi1zwz9x3ya67f072rjzg2zmfpphqg")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-bibtexu-bin))
 (home-page "https://ctan.org/pkg/bibtexu;)
 (synopsis "BibTeX variant supporting Unicode (UTF-8), via ICU")
 (description
@@ -33805,6 +33806,34 @@ order are controlled by an external configuration 
file.")
 supported via the ICU library.")
 (license license:gpl3+)))
 
+(define-public texlive-bibtexu-bin
+  (package
+(inherit texlive-bibtex8-bin)
+(name "texlive-bibtexu-bin")
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bibtex8-bin)
+   ((#:configure-flags flags)
+#~(cons* "--enable-bibtexu"
+ "--disable-bibtex8"
+ (delete "--enable-bibtex8"
+ (delete "--disable-bibtexu" #$flags
+   ((#:phases phases)
+#~(modify-phases #$phases
+(delete 'skip-bibtexu-test)
+(add-after 'unpack 'skip-bibtex8-test
+  ;; This package does not build "bibtex8" binary; the test below
+  ;; is therefore bound to fail.  Skip that part.
+  (lambda _
+(substitute* "texk/bibtex-x/tests/bibtex8u-mem.test"
+  (("\\./bibtex8 .*") "exit 0\n"
+(native-inputs (list pkg-config))
+(inputs (list icu4c texlive-libkpathsea))
+(home-page (package-home-page texlive-bibtexu))
+(synopsis "Binary for @code{texlive-bibtexu}")
+(description
+ "This package provides the binary for @code{texlive-bibtexu}.")
+(license (package-license texlive-bibtexu
+
 (define-public texlive-bundledoc
   (package
 (name "texlive-bundledoc")



49/137: gnu: Add texlive-detex-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 16b8d88c29cd106360b0365a371667e3a1273228
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 15:31:51 2024 +0200

gnu: Add texlive-detex-bin.

* gnu/packages/tex.scm (texlive-detex-bin): New variable.
(texlive-detex)[propagated-inputs]: Add TEXLIVE-DETEX-BIN.

Change-Id: I42aa0aad1a47287705e30184228df62a18799b41
---
 gnu/packages/tex.scm | 48 
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 464c9209ef..24fd0659bf 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34435,6 +34435,7 @@ within the document, or in the document's private 
package file.")
   "08d017wn7a67pmp9b5yhnfg1x2q6f48qaa5ma4bplz9a782icwjy")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-detex-bin))
 (home-page "https://ctan.org/pkg/detex;)
 (synopsis "Strip TeX from a source file")
 (description
@@ -34446,6 +34447,53 @@ commands.  The author now considers this program to be 
obsolete and Piotr
 Kubowicz's OpenDetex as its successor.")
 (license license:bsd-3)))
 
+(define-public texlive-detex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-detex-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("detex"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-detex" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/detex"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/detex"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-detex))
+(synopsis "Binary for @code{texlive-detex}")
+(description
+ "This package provides the binary for @code{texlive-detex}.")
+(license (package-license texlive-detex
+
 (define-public texlive-digestif
   (package
 (name "texlive-digestif")



36/137: gnu: Add texlive-dvips-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 99b5d0e8fbc7b194ec1c37ea132200958d415e5e
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 00:02:13 2024 +0200

gnu: Add texlive-dvips-bin.

* gnu/packages/tex.scm (texlive-dvips-bin): New variable.
(texlive-dvips)[propagated-inputs]: Add TEXLIVE-DVIPS-BIN.

Change-Id: Ia4691342a105bae0571a94e86ad08155e0524ebb
---
 gnu/packages/tex.scm | 70 +---
 1 file changed, 39 insertions(+), 31 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 59cffa6858..e8daa3e42e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -39010,7 +39010,35 @@ does pdfTeX.")
  "This package provides the binaries for @code{texlive-dvipdfmx}.")
 (license (package-license texlive-dvipdfmx
 
-(define texlive-dvips-bin
+(define-public texlive-dvips
+  (package
+(name "texlive-dvips")
+(version (number->string %texlive-revision))
+(source (texlive-origin
+ name version
+ (list "doc/dvips/"
+   "doc/info/dvips.info"
+   "doc/man/man1/afm2tfm.1"
+   "doc/man/man1/afm2tfm.man1.pdf"
+   "doc/man/man1/dvips.1"
+   "doc/man/man1/dvips.man1.pdf"
+   "dvips/base/"
+   "dvips/config/"
+   "fonts/enc/dvips/base/"
+   "tex/generic/dvips/")
+ (base32
+  "0x11wx9p16z4nxhlbfqlgi5svnr96j1hnvdl9fpv1sr3n1j8m79g")))
+(outputs '("out" "doc"))
+(build-system texlive-build-system)
+(propagated-inputs (list texlive-dvips-bin))
+(home-page "https://ctan.org/pkg/dvips;)
+(synopsis "DVI to PostScript drivers")
+(description
+ "This package provides files needed for converting DVI files to
+PostScript.")
+(license license:lppl)))
+
+(define-public texlive-dvips-bin
   (package
 (inherit texlive-bin)
 (name "texlive-dvips-bin")
@@ -39041,9 +39069,9 @@ does pdfTeX.")
 (arguments
  (substitute-keyword-arguments (package-arguments texlive-bin)
((#:configure-flags flags)
-#~(cons* "--enable-dvipsk" (delete "--enable-web2c" #$flags)))
-   ((#:phases _)
-#~(modify-phases %standard-phases
+#~(cons "--enable-dvipsk" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
 (replace 'check
   (lambda* (#:key tests? #:allow-other-keys)
 (when tests?
@@ -39053,34 +39081,14 @@ does pdfTeX.")
   (lambda _
 (with-directory-excursion "texk/dvipsk"
   (invoke "make" "install"
-(inputs '(
-
-(define-public texlive-dvips
-  (package
-(name "texlive-dvips")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/dvips/"
-   "doc/info/dvips.info"
-   "doc/man/man1/afm2tfm.1"
-   "doc/man/man1/afm2tfm.man1.pdf"
-   "doc/man/man1/dvips.1"
-   "doc/man/man1/dvips.man1.pdf"
-   "dvips/base/"
-   "dvips/config/"
-   "fonts/enc/dvips/base/"
-   "tex/generic/dvips/")
- (base32
-  "0x11wx9p16z4nxhlbfqlgi5svnr96j1hnvdl9fpv1sr3n1j8m79g")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
-(home-page "https://ctan.org/pkg/dvips;)
-(synopsis "DVI to PostScript drivers")
+(native-inputs (list perl pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-dvips))
+(synopsis "Binaries for @code{texlive-dvips}")
 (description
- "This package provides files needed for converting DVI files to
-PostScript.")
-(license license:lppl)))
+ "This package provides the binaries for @code{texlive-dvips}.")
+(license (package-license texlive-dvips
 
 (define-public texlive-ketcindy
   (package



92/137: gnu: Factorize URLs relative to TeX Live.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 4595f793a9c2d60b213e0513367ad956ace89fdd
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 09:37:39 2024 +0200

gnu: Factorize URLs relative to TeX Live.

* guix/build-system/texlive.scm (%texlive-repository):
(texlive-packages-repository): New variables.
* guix/import/texlive.scm (texlive-repository-location):
(texlive-repository): Remove variables.
(version->revision):
(latest-texlive-tag):
(tlpdb):
(texlive->svn-multi-reference): Use new variables.
* gnu/packages/tex.scm (texlive-source):
(texlive-scripts): Use new variables.

Change-Id: Ibbb21f9869d7fcb5aa66f7d9dd2070d0d5d8682a
---
 gnu/packages/tex.scm  |  7 ---
 guix/build-system/texlive.scm | 15 ---
 guix/import/texlive.scm   | 31 +--
 3 files changed, 25 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index fa7428f820..f4361a4966 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -200,7 +200,8 @@
   (origin
 (method svn-fetch)
 (uri (svn-reference
-  (url "svn://www.tug.org/texlive/trunk/Build/source/")
+  (url (string-append %texlive-repository
+  "tags/texlive-" %texlive-version 
"/Build/source/"))
   (revision %texlive-revision)))
 (file-name (git-file-name "texlive-source" %texlive-version))
 (sha256
@@ -378,8 +379,8 @@ of user-specified directories similar to how shells look up 
executables.")
 (source (origin
   (method svn-multi-fetch)
   (uri (svn-multi-reference
-(url (string-append "svn://www.tug.org/texlive/tags/"
-"texlive-" version "/Master/"))
+(url (string-append %texlive-repository
+"tags/texlive-" version "/Master/"))
 (locations
  (list "texmf-dist/doc/man/man1/fmtutil-sys.1"
"texmf-dist/doc/man/man1/fmtutil-sys.man1.pdf"
diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm
index 88372faa58..c3bed76d6c 100644
--- a/guix/build-system/texlive.scm
+++ b/guix/build-system/texlive.scm
@@ -29,12 +29,14 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix svn-download)
   #:export (%texlive-build-system-modules
+%texlive-repository
+%texlive-revision
+%texlive-tag
 texlive-build
 texlive-build-system
-texlive-ref
 texlive-origin
-%texlive-tag
-%texlive-revision))
+texlive-packages-repository
+texlive-ref))
 
 ;; Commentary:
 ;;
@@ -42,6 +44,13 @@
 ;;
 ;; Code:
 
+(define %texlive-repository "svn://www.tug.org/texlive/")
+
+(define (texlive-packages-repository version)
+  "Return URL for packages location in TeX Live repository, at VERSION."
+  (string-append
+   %texlive-repository "tags/texlive-" version "/Master/texmf-dist"))
+
 ;; These variables specify the SVN tag and the matching SVN revision.  They
 ;; are taken from https://www.tug.org/svn/texlive/tags/
 (define %texlive-tag "texlive-2023.0")
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 411e345f2d..109bfc07e9 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -22,6 +22,7 @@
   #:use-module (gcrypt hash)
   #:use-module (guix base32)
   #:use-module (guix build-system)
+  #:use-module (guix build-system texlive)
   #:use-module (guix derivations)
   #:use-module (guix diagnostics)
   #:use-module (guix gexp)
@@ -56,20 +57,6 @@
 ;;;
 ;;; Code:
 
-(define texlive-repository "svn://www.tug.org/texlive")
-
-(define* (texlive-repository-location version #:optional location)
-  (format #f
-  "~a/tags/texlive-~a/~a"
-  texlive-repository
-  version
-  (cond
-   ((not location) "")
-   ((string-prefix? "/" location)
-(string-drop location 1))
-   (else
-location
-
 ;; Generic locations are parts of the tree shared by multiple packages.
 ;; Package definitions should single out files stored there, or all files in
 ;; the directory from all involved packages would be downloaded.
@@ -227,11 +214,10 @@ not succeed."
 (define version->revision
   ;; Return revision, as a number, associated to string VERSION.
   (lambda (version)
-(let ((output (svn-command "info"
-   (texlive-repository-location version)
-   "--show-item 'last-changed-revision'"
-   "--no-newline")))
-  (string->number output
+(let ((url (string-append %texlive-repository "tags/texlive-" version)))
+  (string->number
+   (svn-command
+"info" url "--show-item 'last-changed-revision'" "--no-newline")
 
 (define 

133/137: gnu: texlive-jadetex: Small refactoring.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit d3c3c7e08e23ed0ce345cf83595486a120a03f5e
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:28:00 2024 +0200

gnu: texlive-jadetex: Small refactoring.

* gnu/packages/tex.scm (texlive-jadetex)[arguments]<#:phases>: Small 
refactoring.

Change-Id: Idfce791bd7f3b0a1c5ce509ef90ddb9044c78ee3
---
 gnu/packages/tex.scm | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 83eec28f3c..0ad339959d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -70380,12 +70380,11 @@ of ink traps which typify the Kurier font.")
   (add-after 'install 'install-wrappers
 (lambda* (#:key inputs #:allow-other-keys)
   (let ((pdftex (search-input-file inputs "/bin/pdftex"))
-(web2c (string-append #$output "/share/texmf-dist/web2c")))
-(mkdir-p (string-append #$output "/bin"))
-(symlink pdftex
- (string-append #$output "/bin/jadetex"))
-(symlink pdftex
- (string-append #$output "/bin/pdfjadetex"
+(bin (string-append #$output "/bin")))
+(mkdir-p bin)
+(with-directory-excursion bin
+  (symlink pdftex "jadetex")
+  (symlink pdftex "pdfjadetex"
 (propagated-inputs
  (list texlive-amsfonts
texlive-atbegshi



114/137: gnu: Turn TEXLIVE-SOURCE into a complete package.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 564887b3d3b2e8379bbea2463829ac22a7abe715
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 10:24:20 2024 +0200

gnu: Turn TEXLIVE-SOURCE into a complete package.

* gnu/packages/tex.scm (%texlive-version): Remove variable.
(texlive-source): Turn into a complete package so it can benefit from 
auto-updates.
(texlive-libkpathsea):
(texlive-libptexenc):
(texlive-bin):
(texlive-scheme-basic):
(texlive-scheme-bookpub):
(texlive-scheme-context):
(texlive-scheme-full):
(texlive-scheme-gust):
(texlive-scheme-medium):
(texlive-scheme-minimal):
(texlive-scheme-small):
(texlive-scheme-tetex):
(texlive-afm2pl-bin):
(texlive-autosp-bin):
(texlive-axodraw2-bin):
(texlive-cjkutils-bin):
(texlive-gregoriotex-bin):
(texlive-m-tx-bin):
(texlive-musixtnt-bin):
(texlive-pmx-bin):
(texlive-velthuis-bin):
(texlive-vlna-bin):
(texlive-bibtex8-bin):
(texlive-chktex-bin):
(texlive-detex-bin):
(texlive-dtl-bin):
(texlive-dvi2tty-bin):
(texlive-dvidvi-bin):
(texlive-dviljk-bin):
(texlive-dviout-util-bin):
(texlive-dvipng-bin):
(texlive-dvipos-bin):
(texlive-dvisvgm-bin):
(texlive-ptex-bin):
(texlive-lcdftypetools-bin):
(texlive-dvipdfmx-bin):
(texlive-dvips-bin):
(texlive-lacheck-bin):
(texlive-seetexk-bin):
(texlive-ps2eps-bin):
(texlive-ps2pk-bin):
(texlive-psutils-bin):
(texlive-t1utils-bin):
(texlive-tex4ht-bin):
(texlive-tpic2pdftex-bin):
(texlive-ttfutils-bin):
(texlive-upmendex-bin):
(texlive-xpdfopen-bin):
(texlive-gsftopk-bin):
(texlive-xml2pmx-bin):
(texlive-makeindex-bin):
(texlive-collection-basic):
(texlive-collection-bibtexextra):
(texlive-collection-binextra):
(texlive-collection-context):
(texlive-collection-fontsextra):
(texlive-collection-fontsrecommended):
(texlive-collection-fontutils):
(texlive-collection-formatsextra):
(texlive-collection-games):
(texlive-collection-humanities):
(texlive-collection-langarabic):
(texlive-collection-langchinese):
(texlive-collection-langcjk):
(texlive-collection-langcyrillic):
(texlive-collection-langczechslovak):
(texlive-collection-langenglish):
(texlive-collection-langeuropean):
(texlive-collection-langfrench):
(texlive-collection-langgerman):
(texlive-collection-langgreek):
(texlive-collection-langitalian):
(texlive-collection-langjapanese):
(texlive-collection-langkorean):
(texlive-collection-langother):
(texlive-collection-langpolish):
(texlive-collection-langportuguese):
(texlive-collection-langspanish):
(texlive-collection-latex):
(texlive-collection-latexextra):
(texlive-collection-latexrecommended):
(texlive-collection-luatex):
(texlive-collection-mathscience):
(texlive-collection-metapost):
(texlive-collection-music):
(texlive-collection-pictures):
(texlive-collection-plaingeneric):
(texlive-collection-pstricks):
(texlive-collection-publishers):
(texlive-collection-xetex):
(texlive-xindy-bin):
(texlive-xdvi-bin): Adapt to change of record type.
(texlive-updmap.cfg)[version]: Use the same as TEXLIVE-SOURCE.
* guix/import/texlive.scm:
(tlpdb-guix-packages): Define "source" as a special package.
(texlive->svn-multi-reference):
(tlpdb->package):
(package-from-texlive-repository?): Treat TEXLIVE-SOURCE specially.

Change-Id: I33890e54d825fdfed4203d770e40ed6255dd4dd2

Change-Id: I62fdd2766938ea4562fe6e4d45fd11c1ee0104d3
---
 gnu/packages/tex.scm| 232 +---
 guix/import/texlive.scm |  50 +++
 2 files changed, 157 insertions(+), 125 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 29525ba95d..46f085f958 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -194,27 +194,41 @@
   (define-deprecated/public old-name name
 (deprecated-package (symbol->string 'old-name) name)))
 
-(define %texlive-version "2023.0")
-
-(define texlive-source
-  (origin
-(method svn-fetch)
-(uri (svn-reference
-  (url (string-append %texlive-repository
-  "tags/texlive-" %texlive-version 
"/Build/source/"))
-  (revision 66594)))
-(file-name (git-file-name "texlive-source" %texlive-version))
-(sha256
- (base32
-  "186q0r00zfd39wc9r56rvbxs8f1xix7hlrz62zj07c68a0fy76rd"
+(define-public texlive-source
+  (package
+(name "texlive-source")
+(version "2023.0")
+(source
+ (origin
+   ;; This could be written as a SVN reference, but with a multi-reference
+   ;; the package can benefit from the `texlive' updater.
+   (method svn-multi-fetch)
+   (uri (svn-multi-reference
+ (url (string-append %texlive-repository
+ 

45/137: gnu: Add texlive-metapost-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 704a16f90eae6e8c4eefa7f76cf39e60ee2dea5f
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 07:20:20 2024 +0200

gnu: Add texlive-metapost-bin.

* gnu/packages/tex.scm (texlive-metapost-bin): New variable.
(texlive-metapost)[propagated-inputs]: Add TEXLIVE-METAPOST-BIN.

Change-Id: I6826d2c74d107ef5d58651b1bb6838aec0fdb6aa
---
 gnu/packages/tex.scm | 30 +-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 04cfba4c0a..1ae940509e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -57842,7 +57842,7 @@ The package contains both the original TrueType font 
and the derived Type
   "0i6mjq59n7vll81m7r2k83x0q6xx7cg6qcia46298zqc0b0l3qb0")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(propagated-inputs (list texlive-kpathsea))
+(propagated-inputs (list texlive-kpathsea texlive-metapost-bin))
 (home-page "https://ctan.org/pkg/metapost;)
 (synopsis "Create scalable illustrations")
 (description
@@ -57851,6 +57851,34 @@ technical illustrations.  Its output is scalable 
PostScript or SVG, rather
 than the bitmaps Metafont creates.")
 (license license:lppl)))
 
+(define-public texlive-metapost-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-metapost-bin")
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(delete "--enable-web2c" #$flags))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'install
+  (lambda _
+(let ((bin (string-append #$output "/bin")))
+  (with-directory-excursion "texk/web2c"
+(invoke "make" "mpost")
+(install-file "mpost" bin))
+  (with-directory-excursion bin
+(for-each (lambda (link) (symlink "mpost" link))
+  '("dvitomp" "mfplain" "r-mpost"))
+(native-inputs (list pkg-config))
+(inputs (modify-inputs (package-inputs texlive-bin)
+  (append cairo mpfr)))
+(home-page (package-home-page texlive-metapost))
+(synopsis "Binary for @code{texlive-metapost}")
+(description
+ "This package provides the binary for @code{texlive-metapost}.")
+(license (package-license texlive-metapost
+
 (define-public texlive-acmart
   (package
 (name "texlive-acmart")



83/137: guix: import texlive: Remove `files-differ?' function.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit fc0700581e753b9e9d900a987427c667711ddca4
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 15 23:21:33 2024 +0200

guix: import texlive: Remove `files-differ?' function.

* guix/import/texlive.scm (files-differ?): Remove no longer used function.

Change-Id: I472b628da779c187fd315a929546c8e9bcefdcd3
---
 guix/import/texlive.scm | 41 +
 1 file changed, 1 insertion(+), 40 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index fba31f7343..a87f1346b0 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -37,8 +37,7 @@
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-2)
   #:use-module (srfi srfi-26)
-  #:export (files-differ?
-texlive->guix-package
+  #:export (texlive->guix-package
 texlive-recursive-import))
 
 ;;; Commentary:
@@ -346,44 +345,6 @@ extensions, and files without extension."
 (reverse scripts)))
   '()))
 
-(define* (files-differ? directory package-name
-#:key
-(package-database tlpdb)
-(type #false)
-(direction 'missing))
-  "Return a list of files in DIRECTORY that differ from the expected installed
-files for PACKAGE-NAME according to the PACKAGE-DATABASE.  By default all
-files considered, but this can be restricted by setting TYPE to 'runfiles,
-'docfiles, or 'srcfiles.  The names of files that are missing from DIRECTORY
-are returned; by setting DIRECTION to anything other than 'missing, the names
-of those files are returned that are unexpectedly installed."
-  (define (strip-directory-prefix file-name)
-(string-drop file-name (1+ (string-length directory
-  (let* ((data (or (assoc-ref (package-database) package-name)
-   (error (format #false
-  "~a is not a valid package name in the TeX 
Live package database."
-  package-name
- (files (if type
-(or (assoc-ref data type) (list))
-(append (or (assoc-ref data 'runfiles) (list))
-(or (assoc-ref data 'docfiles) (list))
-(or (assoc-ref data 'srcfiles) (list)
- (existing (file-system-fold
-(const #true) ;enter?
-(lambda (path stat result) (cons path result)) ;leaf
-(lambda (path stat result) result) ;down
-(lambda (path stat result) result) ;up
-(lambda (path stat result) result) ;skip
-(lambda (path stat errno result) result)   ;error
-(list)
-directory)))
-(if (eq? direction 'missing)
-(lset-difference string=?
- files (map strip-directory-prefix existing))
-;; List files that are installed but should not be.
-(lset-difference string=?
- (map strip-directory-prefix existing) files
-
 (define (files->locations files)
   (define (trim-filename entry)
 (string-join (drop-right (string-split entry #\/) 1) "/" 'suffix))



124/137: gnu: texlive-eplain: Create missing symlink.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 76ea6de0c0f02ff2488466a7a5a3b5816a267868
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:07:12 2024 +0200

gnu: texlive-eplain: Create missing symlink.

* gnu/packages/tex.scm (texlive-eplain)[arguments]<#:phases>: Create missing
symlink.

Change-Id: I4183b1bd6a7d699fc5a802b6da0330664f2f524b
---
 gnu/packages/tex.scm | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2137a23d36..21afe8eea3 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -15652,7 +15652,17 @@ Cosmetica font, which is a similar design to Optima 
and includes Greek.")
 "00nmqhfckrf8ygw6i93d5xnf85i8a88ryadb5ml73w4rllwjxr72"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:create-formats #~(list "eplain")))
+(arguments
+ (list #:create-formats #~(list "eplain")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((pdftex (search-input-file inputs "bin/pdftex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink pdftex "eplain"
 (propagated-inputs
  (list texlive-atbegshi
texlive-atveryend



123/137: gnu: texlive-csplain: Create missing symlinks.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit f74990a44fabac2a2089d9d738727f9a1f7df4d2
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:05:52 2024 +0200

gnu: texlive-csplain: Create missing symlinks.

* gnu/packages/tex.scm (texlive-csplain)[arguments]<#:phases>: Create 
missing
symlinks.

Change-Id: Ibf7a4ad521da7a69a00d59e1b8d4797873526fea
---
 gnu/packages/tex.scm | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c7f1bfcfc6..2137a23d36 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -61290,7 +61290,19 @@ available.")
 (properties '((updater-extra-native-inputs "texlive-xetex")))
 (build-system texlive-build-system)
 (arguments
- (list #:create-formats #~(list "csplain" "luacsplain" "pdfcsplain")))
+ (list #:create-formats #~(list "csplain" "luacsplain" "pdfcsplain")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((pdftex (search-input-file inputs "bin/pdftex"))
+ (luatex (search-input-file inputs "bin/luatex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink pdftex "csplain")
+   (symlink pdftex "pdfcsplain")
+   (symlink luatex "luacsplain"
 (native-inputs (list texlive-xetex))
 (propagated-inputs
  (list texlive-cm



37/137: gnu: Add texlive-psutils-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 37040486473a7a2a911dd49a8230c4dfff0b0242
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 00:05:17 2024 +0200

gnu: Add texlive-psutils-bin.

* gnu/packages/tex.scm (texlive-psutils-bin): New variable.
(texlive-psutils)[arguments]<#:link-scripts>: Remove as those are now 
provided
by TEXLIVE-PSUTILS-BIN.
[inputs]: Remove PERL.
[propagated-inputs]: Add TEXLIVE-PSUTILS-BIN.

Change-Id: I9435ed4216237893e503487f94c42ad9cc8c268f
---
 gnu/packages/tex.scm | 68 +---
 1 file changed, 65 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e8daa3e42e..f60c2bb855 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -42658,9 +42658,7 @@ documents generated that use Type 1 fonts.")
   "0ba514lz3pc03ll0kb9apdx62mi2yiyd7bnargkp2bbf62dq79cc")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments
- (list #:link-scripts #~(list "extractres.pl" "includeres.pl" 
"psjoin.pl")))
-(inputs (list perl))
+(propagated-inputs (list texlive-psutils-bin))
 (home-page "https://ctan.org/pkg/psutils;)
 (synopsis "PostScript utilities")
 (description
@@ -42674,6 +42672,70 @@ printing.  Utilities include @command{psbook}, 
@command{psselect},
(license:fsf-free
 
"https://tug.org/svn/texlive/trunk/Build/source/texk/psutils/psutils-src/LICENSE?revision=57915=markup;)
 
+(define-public texlive-psutils-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-psutils-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("psutils"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-psutils" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(add-after 'unpack 'patch-psutils-tests
+  (lambda _
+;; This test fails due to a rounding difference with libpaper
+;; 1.2: .
+;;
+;; Adjust the expected outcome to account for the minute
+;; difference.
+(substitute* "texk/psutils/tests/playres.ps"
+  (("844\\.647799") "844.647797"))
+;; Test suite also fails because it expects to find
+;; "texmf.cnf" in "../kpathsea/" directory, but we removed it
+;; in a snippet.  Point to the real "texmf.cnf".
+(let ((kpathsea #$(this-package-input "texlive-libkpathsea")))
+  (substitute* "texk/psutils/psutils.test"
+(("(TEXMFCNF=).+?;" _ var)
+ (string-append var
+kpathsea
+"/share/texmf-dist/web2c;"))
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/psutils"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/psutils"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list libpaper perl texlive-libkpathsea))
+(propagated-inputs '())
+(synopsis "Binaries for @code{texlive-psutils}")
+(description
+ "This package provides the binaries for @code{texlive-psutils}.")
+(license (package-license texlive-psutils
+
 (define-public texlive-ptolemaicastronomy
   (package
 (name "texlive-ptolemaicastronomy")



87/137: guix: import texlive: Implement auto-updates.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit a2362def9df31cd6fdf72b031563c9f7c9014d04
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 16 22:53:14 2024 +0200

guix: import texlive: Implement auto-updates.

* guix/import/texlive.scm (package-from-texlive-repository?):
(latest-release):
(tlpdb-guix-packages):
(%texlive-updater): New variables.
(tlpdb): Include Guix-specific package TEXLIVE-HYPHEN-COMPLETE.
* guix/upstream.scm (package-update/svn-multi-fetch): New variable.
(%method-updates): Extend it to support SVN-MULTI-FETCH.
(update-package-source): Also update revisions and locations from
svn-multi-reference sources.

Change-Id: I6d7f2cfe1e2f78887f410233bfd2799ffab80f3c
---
 guix/import/texlive.scm |  71 ++-
 guix/upstream.scm   | 182 
 2 files changed, 190 insertions(+), 63 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index cbccafb811..b743495008 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -45,7 +45,8 @@
   #:use-module (srfi srfi-19)
   #:use-module (srfi srfi-26)
   #:export (texlive->guix-package
-texlive-recursive-import))
+texlive-recursive-import
+%texlive-updater))
 
 ;;; Commentary:
 ;;;
@@ -102,6 +103,42 @@
 "tie"
 "web"))
 
+;; Guix introduces two specific packages based on TEXLIVE-BUILD-SYSTEM.  Add
+;; an entry for them in the package database, so they can be imported, and
+;; updated, like any other regular TeX Live package.
+(define tlpdb-guix-packages
+  '(("hyphen-complete"
+ (docfiles "texmf-dist/doc/generic/dehyph-exptl/"
+   "texmf-dist/doc/generic/elhyphen/"
+   "texmf-dist/doc/generic/huhyphen/"
+   "texmf-dist/doc/generic/hyph-utf8/"
+   "texmf-dist/doc/luatex/hyph-utf8/"
+   "texmf-dist/doc/generic/ukrhyph/")
+ (runfiles "texmf-dist/tex/generic/config/"
+   "texmf-dist/tex/generic/dehyph/"
+   "texmf-dist/tex/generic/dehyph-exptl/"
+   "texmf-dist/tex/generic/hyph-utf8/"
+   "texmf-dist/tex/generic/hyphen/"
+   "texmf-dist/tex/generic/ruhyphen/"
+   "texmf-dist/tex/generic/ukrhyph/"
+   "texmf-dist/tex/luatex/hyph-utf8/")
+ (srcfiles "texmf-dist/source/generic/hyph-utf8/"
+   "texmf-dist/source/luatex/hyph-utf8/"
+   "texmf-dist/source/generic/ruhyphen/")
+ (shortdesc . "Hyphenation patterns expressed in UTF-8")
+ (longdesc . "Modern native UTF-8 engines such as XeTeX and LuaTeX
+need hyphenation patterns in UTF-8 format, whereas older systems require
+hyphenation patterns in the 8-bit encoding of the font in use (such encodings
+are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1,
+etc).  The present package offers a collection of conversions of existing
+patterns to UTF-8 format, together with converters for use with 8-bit fonts in
+older systems.
+
+This Guix-specific package provides hyphenation patterns for all languages
+supported in TeX Live.  It is a strict super-set of code{hyphen-base} package
+and should be preferred to it whenever a package would otherwise depend on
+@code{hyph-utf8}."
+
 (define (svn-command . args)
   "Execute \"svn\" command with arguments ARGS, provided as strings, and
 return its output as a string.  Raise an error if the command execution did
@@ -301,7 +338,8 @@ association list."
  (last-property #false))
   (let ((line (read-line port)))
 (cond
- ((eof-object? line) (values all))
+ ;; End of file.  Don't forget to include Guix-specific package.
+ ((eof-object? line) (values (append tlpdb-guix-packages all)))
 
  ;; End of record.
  ((string-null? line)
@@ -617,4 +655,33 @@ VERSION."
 #:repo->guix-package texlive->guix-package
 #:guix-name guix-name))
 
+;;;
+;;; Updates.
+;;;
+
+(define (package-from-texlive-repository? package)
+  (and (string-prefix? "texlive-" (package-name package))
+   (eq? 'texlive (build-system-name (package-build-system package)
+
+(define* (latest-release package #:key version)
+  "Return an  for the latest release of PACKAGE.  Optionally
+include a VERSION string to fetch a specific version."
+  (let* ((version (or version (latest-texlive-tag)))
+ (database (tlpdb/cached version))
+ (upstream-name (package-upstream-name* package)))
+(upstream-source
+ (package upstream-name)
+ (version version)
+ (urls (texlive->svn-multi-reference upstream-name version database))
+ (inputs (list-upstream-inputs upstream-name version database)
+
+(define %texlive-updater
+  ;; The TeX Live updater.  It is restricted to TeX Live releases (2023.0,
+  ;; 2024.2, ...); it doesn't include revision bumps for 

119/137: gnu: texlive-pstricks-calcnotes: Specify upstream name.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 883f5cfa72fd269f0978f78fe9d8319daa882394
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 11:07:07 2024 +0200

gnu: texlive-pstricks-calcnotes: Specify upstream name.

* gnu/packages/tex.scm (texlive-pstricks_calcnotes)[properties]: Add 
UPSTREAM-NAME property.

Change-Id: Ib17e6358b40bcc8e0afdeea246059b3ea085e00e
---
 gnu/packages/tex.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index bc282c75c0..b1fceb3f40 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -77271,6 +77271,7 @@ differential equations; box plots; matrix plots; and 
pie charts.")
(base32
 "00vgcdf73p4143dfjcvs4b5v4phvisv76ink3iiijl6s6f9zbmy3"
 (outputs '("out" "doc"))
+(properties '((upstream-name . "pstricks_calcnotes")))
 (build-system texlive-build-system)
 (home-page "https://ctan.org/pkg/pstricks-calcnotes;)
 (synopsis "Use of PSTricks in calculus lecture notes")



99/137: gnu: texlive-metafont: Fix inputs.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 0a086c87faf173d23c53d6bc6a723be89edbd52c
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 22:57:19 2024 +0200

gnu: texlive-metafont: Fix inputs.

* gnu/packages/tex.scm (texlive-metafont)[native-inputs]: Remove 
TEXLIVE-BIN,
since it is a native inputs for any package using TEXLIVE-BUILD-SYSTEM.  
Move
TEXLIVE-MODES to...
[propagated-inputs]: ... here.  Add TEXLIVE-KPATHSEA.
[arguments]<#:phases>: Adapt to input change.

Change-Id: Icacb98031ee0d2e79b909c143701c7c434d0668d
---
 gnu/packages/tex.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 8ef8570279..dd7299dcd6 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -49220,7 +49220,7 @@ adapt the plain e-TeX source file to work with XeTeX 
and LuaTeX.")
 (lambda _
   (let* ((cwd (getcwd))
  (mf (string-append cwd "/metafont"))
- (modes #$(this-package-native-input "texlive-modes")))
+ (modes #$(this-package-input "texlive-modes")))
 (setenv "MFINPUTS"
 (string-append
  modes "/share/texmf-dist/fonts/source/public/modes:"
@@ -49238,8 +49238,7 @@ adapt the plain e-TeX source file to work with XeTeX 
and LuaTeX.")
 (install-file "mf.base"
   (string-append #$output
  "/share/texmf-dist/web2c"
-(native-inputs
- (list texlive-bin texlive-modes))
+(propagated-inputs (list texlive-kpathsea texlive-modes))
 (home-page "https://ctan.org/pkg/metafont;)
 (synopsis "Metafont base files")
 (description "This package provides the Metafont base files needed to



111/137: gnu: tex: Set properties to protect inputs during updates.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 34b1e2c4ae883df609df84431ee0def41774de31
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 20:36:59 2024 +0200

gnu: tex: Set properties to protect inputs during updates.

* gnu/packages/tex.scm (texlive-scripts)[properties]:
(texlive-accfonts)[properties]:
(texlive-arara)[properties]:
(texlive-burmese)[properties]:
(texlive-glossaries)[properties]:
(texlive-urlbst)[properties]:
(texlive-bundledoc)[properties]:
(texlive-clojure-pamphlet)[properties]:
(texlive-ctanify)[properties]:
(texlive-de-macro)[properties]:
(texlive-findhyph)[properties]:
(texlive-biber)[properties]:
(texlive-biblatex-philosophy)[properties]:
(texlive-bropd)[properties]:
(texlive-cmll)[properties]:
(texlive-charter)[properties]:
(texlive-concmath-fonts)[properties]:
(texlive-ecc)[properties]:
(texlive-eiad)[properties]:
(texlive-feyn)[properties]:
(texlive-fontsize)[properties]:
(texlive-hanzibox)[properties]:
(texlive-lxfonts)[properties]:
(texlive-nwafuthesis)[properties]:
(texlive-poetrytex)[properties]:
(texlive-reverxii)[properties]:
(texlive-stix)[properties]:
(texlive-suftesi)[properties]:
(texlive-ulqda)[properties]:
(texlive-vntex)[properties]:
(texlive-xduts)[properties]:
(texlive-xmuthesis)[properties]:
(texlive-yathesis)[properties]:
(texlive-fc)[properties]:
(texlive-gobble)[properties]:
(texlive-ibygrk)[properties]:
(texlive-pl)[properties]:
(texlive-yannisgr)[properties]:
(texlive-zhlipsum)[properties]:
(texlive-makecell)[properties]:
(texlive-cbfonts)[properties]:
(texlive-cm)[properties]:
(texlive-cmbright)[properties]:
(texlive-knuth-lib)[properties]:
(texlive-knuth-local)[properties]:
(texlive-latex-fonts)[properties]:
(texlive-mflogo)[properties]:
(texlive-prerex)[properties]:
(texlive-robotarm)[properties]:
(texlive-tikz-timing)[properties]:
(texlive-tikzpagenodes)[properties]:
(texlive-amsfonts)[properties]:
(texlive-ec)[properties]:
(texlive-etex)[properties]:
(texlive-halloweenmath)[properties]:
(texlive-atveryend)[properties]:
(texlive-filehook)[properties]:
(texlive-graphics)[properties]:
(texlive-xcjk2uni)[properties]:
(texlive-l3kernel)[properties]:
(texlive-l3backend)[properties]:
(texlive-l3packages)[properties]:
(texlive-sansmathfonts)[properties]:
(texlive-lualibs)[properties]:
(texlive-babel)[properties]:
(texlive-cs)[properties]:
(texlive-csplain)[properties]:
(texlive-babel-romansh)[properties]:
(texlive-cyrillic)[properties]:
(texlive-psnfss)[properties]:
(texlive-tipa)[properties]:
(texlive-firstaid)[properties]:
(texlive-trimspaces)[properties]:
(texlive-currfile)[properties]:
(texlive-rsfs)[properties]:
(texlive-stmaryrd)[properties]:
(texlive-xpeek)[properties]:
(texlive-wasy)[properties]:
(texlive-needspace)[properties]:
(texlive-changepage)[properties]:
(texlive-atbegshi)[properties]:
(texlive-xypic)[properties]:
(texlive-standalone)[properties]:
(texlive-ifmtarg)[properties]:
(texlive-ifoddpage)[properties]:
(texlive-storebox)[properties]:
(texlive-collectbox)[properties]:
(texlive-adjustbox)[properties]:
(texlive-asyfig)[properties]:
(texlive-eurosym)[properties]:
(texlive-unicode-math)[properties]:
(texlive-cc-pl)[properties]:
(texlive-easyfig)[properties]:
(texlive-lstaddons)[properties]:
(texlive-magicwatermark)[properties]:
(texlive-minibox)[properties]:
(texlive-multienv)[properties]:
(texlive-mwe)[properties]:
(texlive-recipecard)[properties]:
(texlive-svn-multi)[properties]:
(texlive-termsim)[properties]:
(texlive-wrapstuff)[properties]:
(texlive-chktex)[properties]:
(texlive-ps2eps)[properties]:
(texlive-psutils)[properties]:
(texlive-xindy)[properties]:
(texlive-fontools)[properties]:
(texlive-mkgrkindex)[properties]:
(texlive-latex-git-log)[properties]:
(texlive-latex2man)[properties]:
(texlive-latex2nemeth)[properties]:
(texlive-latexindent)[properties]:
(texlive-latexpand)[properties]:
(texlive-match-parens)[properties]:
(texlive-optexcount)[properties]:
(texlive-pdfbook2)[properties]:
(texlive-pkfix-helper)[properties]:
(texlive-purifyeps)[properties]:
(texlive-mkpic)[properties]:
(texlive-petri-nets)[properties]:
(texlive-tex4ht)[properties]:
(texlive-texdirflatten)[properties]:
(texlive-texdoctk)[properties]:
(texlive-texloganalyser)[properties]:
(texlive-texlogfilter)[properties]:
(texlive-tlcockpit)[properties]:
(texlive-kpathsea)[properties]:
(texlive-epstopdf)[properties]:
(texlive-pdftex)[properties]:
(texlive-fig4latex)[properties]:
(texlive-authorindex)[properties]:

108/137: gnu: texlive-blockdraw-mp: Specify upstream name.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 6414dae5999f87e8f01d7a83a5318579f272ac36
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 08:29:46 2024 +0200

gnu: texlive-blockdraw-mp: Specify upstream name.

* gnu/packages/tex.scm (texlive-blockdraw-mp)[properties]: Add 
UPSTREAM-NAME property.

Change-Id: I4fab412d4f2003bc7f5e01894343c67459b63504
---
 gnu/packages/tex.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b0dc794101..caa7a4ec99 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -60924,6 +60924,7 @@ with LaTeX.")
(base32
 "1z0cgjslx4kx8fspf3i5h4idxlzhgpm14i16vq88c96z8cdjb2xy"
 (outputs '("out" "doc"))
+(properties '((upstream-name . "blockdraw_mp")))
 (build-system texlive-build-system)
 (home-page "https://ctan.org/pkg/blockdraw_mp;)
 (synopsis "Block diagrams and bond graphs, with MetaPost")



130/137: gnu: texlive-uplatex: Create missing symlink.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 11e152ad7212e8cb28f698df82793bc3af04a3b5
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:24:47 2024 +0200

gnu: texlive-uplatex: Create missing symlink.

* gnu/packages/tex.scm (texlive-uplatex)[arguments]<#:phases>: Create 
missing
symlink.

Change-Id: I2f1d251f1826d7386507dd5717bebb8652614b3d
---
 gnu/packages/tex.scm | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index a22382fc91..fb84840ea4 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -46357,7 +46357,14 @@ barcodes.")
  (lambda _
(substitute* "source/uplatex/base/uplfmt.ins"
  (("keepsilent\n" all)
-  (string-append all "\\askforoverwritefalse\n"
+  (string-append all "\\askforoverwritefalse\n")
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((euptex (search-input-file inputs "bin/euptex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink euptex "uplatex"
 (propagated-inputs
  (list texlive-atbegshi
texlive-atveryend



61/137: gnu: texlive-texdoctk: Fix runtime error.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 9ded9232ed85dfe0f70b723c765e6b358ad97fd6
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 16:39:15 2024 +0200

gnu: texlive-texdoctk: Fix runtime error.

* gnu/packages/tex.scm (texlive-texdoctk)[arguments]<#:phases>: Wrap Perl
libraries.
[inputs]: Add PERL-TK.

Change-Id: Iec7a96ddf4378780a1720e1ad09197fcfc4616b7
---
 gnu/packages/tex.scm | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 4382f6aadc..aa3dc5a7db 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -44769,8 +44769,16 @@ other configuration can be extensively customized.")
   "18xxivpgjdh8v6kg0b45zjv18sm9a4ljpwk6a4cghg5l5yggrjcx")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:link-scripts #~(list "texdoctk.pl")))
-(inputs (list perl))
+(arguments
+ (list
+  #:link-scripts #~(list "texdoctk.pl")
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'link-scripts 'wrap-perl-script
+(lambda _
+  (wrap-program (string-append #$output "/bin/texdoctk")
+`("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")
+(inputs (list perl perl-tk))
 (propagated-inputs (list texlive-kpathsea))
 (home-page "https://ctan.org/pkg/texdoctk;)
 (synopsis "Easy access to package documentation")



135/137: gnu: texlive-context: Fix context executable.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 6e44a906c538e118aae6e5e975738279e5a6985f
Author: Nicolas Goaziou 
AuthorDate: Mon Jun 24 00:57:27 2024 +0200

gnu: texlive-context: Fix context executable.

* gnu/packages/tex.scm (texlive-context)[arguments]<#:link-scripts>:
"mtxrun.lua" is not meant to be symlinked to "/bin"
<#:phases>: Find another way to force using "texmfcnf.lua" from 
TEXLIVE-LUATEX
input.  Install "context" and "mtxrun" scripts in "/bin".

Change-Id: Ifc62772d6cc4dff1636f0e8c9470a91d8be69229
---
 gnu/packages/tex.scm | 52 
 1 file changed, 32 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ad9af93f62..9cd25407a9 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -73739,30 +73739,42 @@ a counter to be reset when another is incremented) and
 (build-system texlive-build-system)
 (arguments
  (list
-  #:link-scripts #~(list "mtxrun.lua")
   #:phases
   #~(modify-phases %standard-phases
-  (add-after 'unpack 'locate-texmfcnf.lua
-;; Out of the box, "mtxrun" first looks for "texmfcnf.lua" in
-;; "~/texmf", then in TEXMFCNF.  The latter is set within
-;; TEXLIVE-LIBKPATHSEA; it cannot contain the configuration file
-;; provided by TEXLIVE-LUATEX.  Point to the right file instead.
+  (add-after 'install 'install-executables
 (lambda* (#:key inputs #:allow-other-keys)
-  (let ((texmfcnf.lua
- (search-input-file inputs
-
"share/texmf-dist/web2c/texmfcnf.lua")))
-(substitute* (find-files "." "\\.lua$")
-  (("kpse\\.default_texmfcnf\\(\\)")
-   (format #f "\"~a\"" (dirname texmfcnf.lua)))
-  (add-after 'unpack 'create-context-wrapper
-;; Create a "context" script for convenience.
-(lambda _
-  (mkdir-p (string-append #$output "/bin"))
-  (with-directory-excursion (string-append #$output "/bin")
-(call-with-output-file "context"
+  (let* ((bin (string-append #$output "/bin"))
+ (context (string-append bin "/context"))
+ (mtxrun (string-append bin "/mtxrun"))
+ (texmfcnf.lua
+  (search-input-file inputs
+ 
"share/texmf-dist/web2c/texmfcnf.lua"))
+ (sh (search-input-file inputs "bin/sh")))
+(mkdir-p bin)
+;; Create "mtxrun" runner.
+;;
+;; Out of the box, "mtxrun" first looks for "texmfcnf.lua" in
+;; "~/texmf", then in TEXMFCNF.  The latter is set within
+;; TEXLIVE-LIBKPATHSEA; it cannot contain the configuration
+;; file provided by TEXLIVE-LUATEX.  Point to the right file
+;; instead.
+(call-with-output-file mtxrun
+  (lambda (port)
+(format port
+"#!~a~%env ~a ~a luatex --luaonly mtxrun.lua 
\"$@\""
+sh
+(string-append "LUATEXDIR="
+   #$output
+   
"/share/texmf-dist/scripts/context/lua")
+(format #f
+"TEXMFCNF={$HOME/texmf/web2c,~a}"
+(dirname texmfcnf.lua)
+(chmod mtxrun #o755)
+;; Create "context" runner.
+(call-with-output-file context
   (lambda (port)
-(format port "#!/bin/sh~%mtxrun --script context \"$@\"")))
-(chmod "context" #o755)))
+(format port "#!~a~%mtxrun --script context \"$@\"" sh)))
+(chmod context #o755)))
 (propagated-inputs
  (list texlive-amsfonts
texlive-context-companion-fonts



121/137: guix: import texlive: Add UPSTREAM-NAME property when necessary.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 1ab1076a7dcf8ec62d5a4cf9089ac5cc1fa9d07b
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 11:19:55 2024 +0200

guix: import texlive: Add UPSTREAM-NAME property when necessary.

* guix/import/texlive.scm (tlpdb->package): Add UPSTREAM-NAME property when 
necessary.
* tests/texlive.scm ("texlive->guix-package, with upstream-name property"):
Add new test.

Change-Id: I134a065cbe0a7f0ff4d72b0929dba4e4d46cfaeb
---
 guix/import/texlive.scm |  4 
 tests/texlive.scm   | 35 +++
 2 files changed, 39 insertions(+)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index e4e0654b78..6d04cc25ee 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -703,6 +703,10 @@ at VERSION."
   ,@(if (assoc-ref data 'docfiles)
 '((outputs '("out" "doc")))
 '())
+  ,@(if (string= upstream-name
+ (string-drop name (string-length "texlive-")))
+'()
+`((properties '((upstream-name . ,upstream-name)
   ;; Build system.
   ;;
   ;; Use trivial build system only when the package contains no files,
diff --git a/tests/texlive.scm b/tests/texlive.scm
index 0e21c2e9b0..8e7e596962 100644
--- a/tests/texlive.scm
+++ b/tests/texlive.scm
@@ -191,6 +191,9 @@
  (shortdesc . "x86_64-linux files of pax")
  (binfiles
   "bin/x86_64-linux/pdfannotextractor"))
+("r_und_s"
+ (name . "r_und_s")
+ (runfiles "texmf-dist/tex/latex/r_und_s/r_und_s.sty"))
 ("stricttex"
  . ((name
  . "stricttex")
@@ -952,4 +955,36 @@ completely compatible with Plain TeX.")
(format #t "~s~%" result)
(pk 'fail result #f)))
 
+(test-assert "texlive->guix-package, with upstream-name property"
+  ;; Replace network resources with sample data.
+  (mock ((guix build svn) svn-fetch
+ (lambda* (url revision directory
+   #:key (svn-command "svn")
+   (user-name #f)
+   (password #f)
+   (recursive? #t))
+   (mkdir-p directory)
+   (with-output-to-file (string-append directory "/foo")
+ (lambda ()
+   (display "source")
+(let ((result (texlive->guix-package "r_und_s"
+ #:version "0"
+ #:database %fake-tlpdb)))
+  (match result
+(('package
+   ('name "texlive-r-und-s")
+   ('version _)
+   ('source _)
+   ('properties _)
+   ('build-system 'texlive-build-system)
+   ('home-page _)
+   ('synopsis _)
+   ('description _)
+   ('license _))
+ #true)
+(_
+ (begin
+   (format #t "~s~%" result)
+   (pk 'fail result #f)))
+
 (test-end "texlive")



132/137: gnu: texlive-xmltex: Remove useless binding.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 8cce5df029d9c8f4867671f0b4673aff07b79d5a
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:26:38 2024 +0200

gnu: texlive-xmltex: Remove useless binding.

* gnu/packages/tex.scm (texlive-xmltex)[arguments]<#:phases>: Remove 
useless binding.

Change-Id: I5088d42203b85157f89c5ddcbdb6dc886504
---
 gnu/packages/tex.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b07d39a5a5..83eec28f3c 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -58967,8 +58967,7 @@ and @code{pdfxmltex}.")
   #~(modify-phases %standard-phases
   (add-after 'install 'install-wrappers
 (lambda* (#:key inputs #:allow-other-keys)
-  (let ((pdftex (search-input-file inputs "/bin/pdftex"))
-(web2c (string-append #$output "/share/texmf-dist/web2c")))
+  (let ((pdftex (search-input-file inputs "/bin/pdftex")))
 (mkdir-p (string-append #$output "/bin"))
 (symlink pdftex (string-append #$output "/bin/xmltex"))
 (symlink pdftex (string-append #$output 
"/bin/pdfxmltex"



57/137: gnu: Add texlive-lacheck-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit ada174f096fd1658747eca6a2f8a0583b1b9be19
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 16:19:31 2024 +0200

gnu: Add texlive-lacheck-bin.

* gnu/packages/tex.scm (texlive-lacheck-bin): New variable.
(texlive-lacheck)[propagated-inputs]: Add TEXLIVE-LACHECK-BIN.

Change-Id: Ibc2032c323f7631469d00291d9769327620b82de
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 79a1a1deb2..808d8aa1d3 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -39698,12 +39698,59 @@ generated code can be included in any LaTeX 
document.")
   "1hhx65yd800bl3y2sq20lix60wd2b2j3k7n9s788mlsn8b0p7yq3")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-lacheck-bin))
 (home-page "https://ctan.org/pkg/lacheck;)
 (synopsis "LaTeX checker")
 (description
  "Lacheck is a tool for finding common mistakes in LaTeX documents.")
 (license license:gpl3+)))
 
+(define-public texlive-lacheck-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-lacheck-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("lacheck"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-lacheck" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/lacheck"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/lacheck"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '())
+(propagated-inputs '())
+(home-page (package-home-page texlive-lacheck))
+(synopsis "Binary for @code{texlive-lacheck}")
+(description
+ "This package provides the binary for @code{texlive-lacheck}.")
+(license (package-license texlive-lacheck
+
 (define-public texlive-latex-git-log
   (package
 (name "texlive-latex-git-log")



14/137: gnu: texlive-latex-bin: Create symlinks for "latex" variants.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 156b605c164ccc837cf38eb9af3697af3bcb5db1
Author: Nicolas Goaziou 
AuthorDate: Thu May 30 23:45:32 2024 +0200

gnu: texlive-latex-bin: Create symlinks for "latex" variants.

* gnu/packages/tex.scm (texlive-latex-bin)[arguments]<#:phases>: Create
symlinks for "latex" variants.
* gnu/packages/tex.scm (texlive-bin)[arguments]<#:phases>: Remove symlink
creation.

Change-Id: Ib4f1b05082572e8ccb7f5dd5531ed30cf404ce29
---
 gnu/packages/tex.scm | 43 +++
 1 file changed, 27 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 3bda364e1d..7765e226fc 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -783,23 +783,20 @@ and should be preferred to it whenever a package would 
otherwise depend on
   (("/usr/include /usr/local/include")
(string-append #$(this-package-input "texlive-libkpathsea")
   "/include"))
-  (add-after 'install 'maybe-create-symlinks
-;; Create symbolic links for the latex variants.  We link lualatex
-;; to luahbtex; see issue #51252 for details.
+  (add-after 'install 'maybe-clear-symlinks
+;; XXX: No matter the combination of configure flags, process
+;; insists on creating those dangling links, resulting in an error
+;; during `validate-runpath' phase.
 ;;
-;; Make it conditional so packages inheriting from this one do not
-;; need to remove this phase.
+;; Make it specific to TEXLIVE-BIN package by verifying the
+;; existence of "tex" binary so that packages inheriting from this
+;; one do not need to remove the phase.
 (lambda _
-  (with-directory-excursion (string-append #$output "/bin/")
-(when (file-exists? "tex") ;for TEXLIVE-BIN only
-  (for-each symlink
-'("pdftex" "pdftex"   "luahbtex")
-'("latex"  "pdflatex" "lualatex"))
-  ;; XXX: No matter the combination of configure flags,
-  ;; process insists on creating those dangling links,
-  ;; resulting in an error during `validate-runpath' phase.
-  (for-each delete-file
-'("pbibtex" "pdvitype" "ppltotf" "ptftopl"))
+  (let ((bin (string-append #$output "/bin/")))
+(when (file-exists? (string-append bin "tex"))
+  (with-directory-excursion bin
+(for-each delete-file
+  '("pbibtex" "pdvitype" "ppltotf" "ptftopl")))
   (add-after 'install 'remove-documentation
 ;; Documentation is provided by specific TeX Live packages, in
 ;; a dedicated "doc" output.  Ignore documentation generated when
@@ -46023,7 +46020,21 @@ formats.")
 (arguments
  (list
   #:texlive-latex-bin? #f
-  #:create-formats #~(list "dvilualatex" "latex" "lualatex" "pdflatex")))
+  #:create-formats #~(list "dvilualatex" "latex" "lualatex" "pdflatex")
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'install 'symlink-binaries
+;; Create symbolic links for the latex variants.  We link lualatex
+;; to luahbtex; see issue #51252 for details.
+(lambda* (#:key inputs #:allow-other-keys)
+  (let ((pdftex (search-input-file inputs "bin/pdftex"))
+(luahbtex (search-input-file inputs "bin/luahbtex"))
+(bin (string-append #$output "/bin")))
+(mkdir-p bin)
+(with-directory-excursion bin
+  (symlink pdftex "latex")
+  (symlink pdftex "pdflatex")
+  (symlink luahbtex "lualatex"
 (propagated-inputs
  (list texlive-atbegshi
texlive-atveryend



60/137: gnu: Add texlive-t1utils-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 8ec1efd9ab9d4c0f14b246a6c6f734a0223eeaf6
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 16:34:14 2024 +0200

gnu: Add texlive-t1utils-bin.

* gnu/packages/tex.scm (texlive-t1utils-bin): New variable.
(texlive-t1utils)[propagated-inputs]: Add TEXLIVE-T1UTILS-BIN.

Change-Id: I35fff0ac6bc176da248a43e8d434c746830875e0
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index aea33d3c0a..4382f6aadc 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -44319,6 +44319,7 @@ known as railroad diagrams.")
   "0hdk57179nn57wnmvr3jasjavkvmrn6ryph6jvjhsfqprn7bhf1y")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-t1utils-bin))
 (home-page "https://ctan.org/pkg/t1utils;)
 (synopsis "Simple Type 1 font manipulation programs")
 (description
@@ -44336,6 +44337,52 @@ and -editable format;
 @end itemize")
 (license license:public-domain)))
 
+(define-public texlive-t1utils-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-t1utils-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "texk" '())
+(delete-other-directories "utils" '("t1utils"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-t1utils" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/t1utils"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/t1utils"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '())
+(propagated-inputs '())
+(home-page (package-home-page texlive-t1utils))
+(synopsis "Binaries for @code{texlive-t1utils}")
+(description
+ "This package provides the binaries for @code{texlive-t1utils}.")
+(license (package-license texlive-t1utils
+
 (define-public texlive-table-fct
   (package
 (name "texlive-table-fct")



65/137: gnu: Add texlive-luajittex-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 81335e6e888728a5230782fc9839aedfa1a501fb
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 2 01:02:06 2024 +0200

gnu: Add texlive-luajittex-bin.

* gnu/packages/tex.scm (texlive-luajittex-bin): New variable.
(texlive-luajittex)[arguments]<#:create-formats>: Build "luajithbtex" and
"luajittex" formats only on platforms where LuaJIT is supported.
[propagated-inputs]: Likewise, only add TEXLIVE-LUAJITTEX-BIN on such
platforms.

Change-Id: I7ce923642268e0db12802f368042703f14dc4a64
---
 gnu/packages/tex.scm | 64 
 1 file changed, 55 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ec55863775..34747518f9 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -40104,16 +40104,24 @@ environments and another with all extracted 
environments converted to
   "1qfbg0r6gsncgymh00yc83kcayd4m7bvryap8f63sm9s9bzfl6yv")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:create-formats #~(list "luajithbtex" "luajittex")))
+(arguments
+ (list #:create-formats
+   #~(and (not #$(or (target-ppc64le?)
+ (target-riscv64?)))
+  (list "luajithbtex" "luajittex"
 (propagated-inputs
- (list texlive-cm
-   texlive-etex
-   texlive-hyphen-complete
-   texlive-knuth-lib
-   texlive-luatex
-   texlive-plain
-   texlive-tex-ini-files
-   texlive-unicode-data))
+ (append (if (or (target-ppc64le?)
+ (target-riscv64?))
+ '()
+ (list texlive-luajittex-bin))
+ (list texlive-cm
+   texlive-etex
+   texlive-hyphen-complete
+   texlive-knuth-lib
+   texlive-luatex
+   texlive-plain
+   texlive-tex-ini-files
+   texlive-unicode-data)))
 (home-page "https://ctan.org/pkg/luajittex;)
 (synopsis "LuaTeX with JIT compiler, with and without HarfBuzz")
 (description
@@ -40121,6 +40129,44 @@ environments and another with all extracted 
environments converted to
 without HarfBuzz.")
 (license license:gpl2)))
 
+(define-public texlive-luajittex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-luajittex-bin")
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-web2c"
+ "--enable-luajithbtex"
+ "--enable-luajittex"
+ (delete "--disable-luajittex"
+ (delete "--disable-luajithbtex"
+ (delete "--enable-web2c" #$flags)
+   ((#:phases phases)
+#~(modify-phases #$phases
+(add-after 'unpack 'force-libs-build
+  ;; Once Web2C is disabled, build process refuses to build
+  ;; libraries in the source tree, in particular pplib and luajit,
+  ;; required for LuajitTeX.  The following change forces building
+  ;; them.
+  (lambda _
+(substitute* "libs/configure"
+  (("x\\$need_(pplib|luajit)") "xyes"
+(add-after 'install 'install-binaries
+  (lambda _
+(with-directory-excursion "texk/web2c"
+  (invoke "make" "luajittex")
+  (invoke "make" "luajithbtex")
+  (let ((bin (string-append #$output "/bin")))
+(install-file ".libs/luajittex" bin)
+(install-file ".libs/luajithbtex" bin)
+(native-inputs (list pkg-config))
+(home-page (package-home-page texlive-luajittex))
+(synopsis "Binaries for @code{texlive-luajittex}")
+(description
+ "This package provides the binaries for @code{texlive-luajittex}.")
+(license (package-license texlive-luajittex
+
 (define-public texlive-match-parens
   (package
 (name "texlive-match-parens")



102/137: gnu: texlive-makecmds: Remove unnecessary input.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 233a124dbc2501a900c850242f8ff41a41173dd4
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 23:56:49 2024 +0200

gnu: texlive-makecmds: Remove unnecessary input.

* gnu/packages/tex.scm (texlive-makecmds)[native-inputs]: Remove
TEXLIVE-UPDMAP.CFG.

Change-Id: Ia20a37f62d473a663dbc2f9c03b67636c4e12b7d
---
 gnu/packages/tex.scm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index bd50706fb4..927cc19281 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -66900,7 +66900,6 @@ diagrams.")
 "05y5n265in7mrbpgjxqg339l8r8dmp6lvl4k528pr3rkb8z94qaf"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(native-inputs (list (texlive-updmap.cfg)))
 (home-page "https://www.ctan.org/pkg/makecmds;)
 (synopsis "TeX macro to define or redefine a command")
 (description "The package provides a @code{\\makecommand} command, which



137/137: gnu: tex: Add comments about TeX Live updating process.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 017657f215d807d1dcb7e60bac2a11fe2e063c6c
Author: Nicolas Goaziou 
AuthorDate: Tue Jun 25 00:18:46 2024 +0200

gnu: tex: Add comments about TeX Live updating process.

* gnu/packages/tex.scm: Document TeX Live updating process.

Change-Id: I953afc423376eeeb943d38684f93fa26c555833d
---
 gnu/packages/tex.scm | 56 
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 224c4160c2..01e8ff7abd 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -187,6 +187,62 @@
 ;;; package definitions, as a native input.  It is possible to augment that
 ;;; tree, in particular with additional font packages.
 ;;;
+;;;
+;;; Notes about updating TeX Live distribution:
+;;; ---
+;;;
+;;; Thanks to the `texlive' updater, the more tedious part of that task, i.e.,
+;;; refreshing version strings, hashes, possibly locations and inputs, is
+;;; automated.  Yet, the following additional steps are required; they can
+;;; keep one busy for a while:
+;;;
+;;; 1. First and foremost, run the updater:
+;;;
+;;;  ./pre-inst-env guix refresh -t texlive -u
+;;;
+;;;This takes care of updating all binaries and all TeX Live packages,
+;;;barring "collections" and "schemes", in a single run.
+;;;
+;;; 2. Then delete packages absent from the new TeX Live version.  Those are
+;;;usually indicated by a failed update, or, more obviously, by their
+;;;outdated version in the module.
+;;;
+;;;Since "collections" and "schemes" are not updated automatically, all
+;;;references to deleted packages must also be cleared from their
+;;;propagated inputs.
+;;;
+;;; 3. Conversely, import newly integrated packages with, e.g.,
+;;;
+;;;   ./pre-inst-env guix import texlive -r scheme-full
+;;;
+;;; 4. Handle inputs issues.  No updater is allowed to create an input field
+;;;in a package if it didn't exist beforehand.  `texlive' updater is no
+;;;exception; it cannot update, e.g., propagated inputs if the relative
+;;;package don't propagate inputs already.  Double check its output to
+;;;resolve those situations manually.
+;;;
+;;;Likewise, look for (list) artefacts the updater may have scattered
+;;;throughout this module.  They usually appear when all elements have
+;;;been removed from an input field.  In this situation, for aesthetics,
+;;;the whole field can be suppressed.
+;;;
+;;; 5. Last, but not least, test and fix the new packages, progressively.  For
+;;;example, it is possible to consider the following packages as
+;;;milestones:
+;;;
+;;;  libkpathsea > bin > latex-bin > scheme-basic > scheme-small
+;;;
+;;;Also, for good measure, it is advisable to check some common
+;;;"collections" such as:
+;;;
+;;;  latexrecommended, fontsrecommended, pictures...
+;;;
+;;;At this point, if all is fine, send the update to the ML and let the CI
+;;;sort the rest out.
+;;;
+;;;Don't forget to pat yourself on the back!
+;;;
+;;;
 ;;; Code:
 
 (define-syntax-rule (define-deprecated-package old-name name)



68/137: gnu: texlive-ps2pk: Build binaries separately.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit fb28ba012d2201843893a66ab02ec3f2056a81d5
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 18:40:16 2024 +0200

gnu: texlive-ps2pk: Build binaries separately.

* gnu/packages/tex.scm (texlive-ps2pk-bin): New variable.
(texlive-ps2pk): Do not inherit from TEXLIVE-BIN.  Make it a regular TeX
Live package instead.
[source]: Use TEXLIVE-ORIGIN.
[arguments]: Remove it.
[propagated-inputs]: Add TEXLIVE-PS2PK-BIN.

Change-Id: I73619d2d8254b0bba320a7c83408a024d7218964
---
 gnu/packages/tex.scm | 49 ++---
 1 file changed, 38 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 58ce77eec1..c92e9ac894 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -43429,8 +43429,35 @@ produce bounding box values for Rawppm or Rawpbm 
format files.")
 
 (define-public texlive-ps2pk
   (package
-(inherit texlive-bin)
 (name "texlive-ps2pk")
+(version (number->string %texlive-revision))
+(source (texlive-origin
+ name version
+ (list "doc/man/man1/mag.1"
+   "doc/man/man1/mag.man1.pdf"
+   "doc/man/man1/pfb2pfa.1"
+   "doc/man/man1/pfb2pfa.man1.pdf"
+   "doc/man/man1/pk2bm.1"
+   "doc/man/man1/pk2bm.man1.pdf"
+   "doc/man/man1/ps2pk.1"
+   "doc/man/man1/ps2pk.man1.pdf")
+ (base32
+  "14xq9x5rf15ibzr41cm5rm4v3rpmj50rfsqp4zzvyhmpmyw4dsx3")))
+(outputs '("out" "doc"))
+(build-system texlive-build-system)
+(propagated-inputs (list texlive-ps2pk-bin))
+(home-page "https://ctan.org/pkg/ps2pk;)
+(synopsis "Generate a PK font from an Adobe Type 1 font")
+(description
+ "This package provides tools to generate a PK file from an Adobe Type
+1 font.  PK fonts are (or used to be) valuable in enabling previewers to view
+documents generated that use Type 1 fonts.")
+(license license:isc)))
+
+(define-public texlive-ps2pk-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-ps2pk-bin")
 (source
  (origin
(inherit texlive-source)
@@ -43452,9 +43479,9 @@ produce bounding box values for Rawppm or Rawpbm format 
files.")
 (arguments
  (substitute-keyword-arguments (package-arguments texlive-bin)
((#:configure-flags flags)
-#~(cons* "--enable-ps2pk" (delete "--enable-web2c" #$flags)))
-   ((#:phases _)
-#~(modify-phases %standard-phases
+#~(cons "--enable-ps2pk" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
 (replace 'check
   (lambda* (#:key tests? #:allow-other-keys)
 (when tests?
@@ -43464,14 +43491,14 @@ produce bounding box values for Rawppm or Rawpbm 
format files.")
   (lambda _
 (with-directory-excursion "texk/ps2pk"
   (invoke "make" "install"
-(inputs '())
-(home-page "https://ctan.org/pkg/ps2pk;)
-(synopsis "Generate a PK font from an Adobe Type 1 font")
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-ps2pk))
+(synopsis "Binaries for @code{texlive-ps2pk}")
 (description
- "This package provides tools to generate a PK file from an Adobe Type
-1 font.  PK fonts are (or used to be) valuable in enabling previewers to view
-documents generated that use Type 1 fonts.")
-(license license:isc)))
+ "This package provides the binaries for @code{texlive-ps2pk}.")
+(license (package-license texlive-ps2pk
 
 (define-public texlive-psutils
   (package



100/137: gnu: texlive-luatex: Remove unnecessary native input.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit c8399ad9388c0ddcfd79c3340b6040a18d77896c
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 23:43:30 2024 +0200

gnu: texlive-luatex: Remove unnecessary native input.

* gnu/packages/tex.scm (texlive-luatex)[native-inputs]: Remove 
TEXLIVE-KPATHSEA.

Change-Id: Ie1107907d596ceff1585ec5c985365c67bd3a5dd
---
 gnu/packages/tex.scm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index dd7299dcd6..28792b33f3 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -60287,7 +60287,6 @@ in the same way as BSD/GNU @code{getopt_long(3)} 
functions do.")
  "TEXMFSYSCONFIG = \"$TEXMFDIST/../texmf-config\",\n")
 (("TEXMF *=.*")
  "TEXMF = 
\"{$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,$TEXMFSYSVAR,$TEXMFDIST}\",\n")))
-(native-inputs (list texlive-kpathsea))
 (propagated-inputs
  (list texlive-cm
texlive-etex



20/137: gnu: Add texlive-uptex-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 283b95f0a5afec3f50ca8027dd74cf2e386241b8
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 16:24:10 2024 +0200

gnu: Add texlive-uptex-bin.

* gnu/packages/tex.scm (texlive-uptex-bin): New variable.
(texlive-uptex)[propagated-inputs]: Add TEXLIVE-UPTEX-BIN.

Change-Id: I540cea7f648f0e11aaf59000aeff763823f94b2f
---
 gnu/packages/tex.scm | 49 -
 1 file changed, 44 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6da193199d..61223a0164 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -37321,18 +37321,57 @@ and e-upTeX.")
texlive-plain
texlive-ptex-base
texlive-uptex-base
+   texlive-uptex-bin
texlive-uptex-fonts))
 (home-page "https://ctan.org/pkg/uptex;)
 (synopsis "Unicode version of pTeX")
 (description
- "upTeX is an extension of pTeX, using UTF-8 input and producing UTF-8 
output.
-It was originally designed to improve support for Japanese, but is also useful
-for documents in Chinese and Korean.  It can process Chinese simplified,
-Chinese traditional, Japanese, and Korean simultaneously, and can also process
-original LaTeX with @code{\\inputenc@{utf8@}} and Babel
+ "upTeX is an extension of pTeX, using UTF-8 input and producing UTF-8
+output.  It was originally designed to improve support for Japanese, but is
+also useful for documents in Chinese and Korean.  It can process Chinese
+simplified, Chinese traditional, Japanese, and Korean simultaneously, and can
+also process original LaTeX with @code{\\inputenc@{utf8@}} and Babel
 (Latin/Cyrillic/Greek etc.) by switching its @code{\\kcatcode} tables.")
 (license license:bsd-3)))
 
+(define-public texlive-uptex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-uptex-bin")
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(delete "--enable-web2c" #$flags))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(add-after 'build 'build-binaries
+  (lambda _
+(with-directory-excursion "texk/web2c"
+  (for-each (lambda (target) (invoke "make" target))
+'("euptex" "upbibtex" "updvitype" "upmpost"
+  "uppltotf" "uptex" "uptftopl" "wovp2ovf")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/web2c"
+  (let ((bin (string-append #$output "/bin")))
+(for-each (lambda (f) (install-file f bin))
+  '("euptex" "upbibtex" "updvitype"
+"upmpost" "uppltotf" "uptex" "uptftopl"
+"wovp2ovf"))
+(with-directory-excursion bin
+  (for-each symlink
+'("upmpost" "upmpost")
+'("r-upmpost" "updvitomp")))
+(native-inputs (list pkg-config))
+(inputs
+ (modify-inputs (package-inputs texlive-bin)
+   (append cairo gmp mpfr texlive-libptexenc)))
+(home-page (package-home-page texlive-uptex))
+(synopsis "Binaries for @code{texlive-uptex}")
+(description
+ "This package provides the binaries for @code{texlive-uptex}.")
+(license (package-license texlive-uptex
+
 (define-public texlive-uptex-fonts
   (package
 (name "texlive-uptex-fonts")



05/137: gnu: texlive-libkpathsea: Better default values in "texmf.cnf".

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 0ebb936cd64fc7c60c21b1b65e1a2d2cf6536c13
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 10:47:28 2024 +0200

gnu: texlive-libkpathsea: Better default values in "texmf.cnf".

* gnu/packages/tex.scm (texlive-libkpathsea)[arguments]<#:phases>: Use 
better
default values in "texmf.cnf".  This fixes slowness in ".tex" documents
compilation, left-over "{/" directories in compilation directory, and helps
LuaTeX finding system fonts.

Change-Id: I3a914507e9bf1e5cbff16d7d37924eadf1316d89
---
 gnu/packages/tex.scm | 38 --
 1 file changed, 24 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c0c5237b2c..dfaac0397b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -215,21 +215,31 @@
 ;; environment variable defined via a search path below.
 ;;
 ;; This phase must happen before the `configure' phase, because
-;; the value of the TEXMFCNF variable (modified along with the
-;; SELFAUTOLOC reference below) is used at compile time to
+;; the value of the TEXMFCNF variable is used at compile time to
 ;; generate "paths.h" file.
 (lambda _
   (substitute* "texk/kpathsea/texmf.cnf"
-(("^TEXMFROOT = .*")
- "TEXMFROOT = {$GUIX_TEXMF}/..\n")
+(("^TEXMFROOT = .*") "TEXMFROOT = {$GUIX_TEXMF}/..\n")
+(("^TEXMFDIST = .*") "TEXMFDIST = {$GUIX_TEXMF}\n")
+;; "ls-R" files are to be expected only in the TEXMFDIST
+;; directories.  However, those are not always present, e.g.,
+;; when building a package with `texlive-build-system' or when
+;; generating a profile.  Since both situations need to be
+;; handled, drop the "!!" prefixes.
 (("^TEXMF = .*")
- "TEXMF = {$GUIX_TEXMF}\n")
-(("\\$SELFAUTOLOC(/share/texmf-dist/web2c)" _ suffix)
- (string-append #$output suffix))
-;; Ignore system-wide cache.  Use local one, by default
-;; "$HOME/.texlive/texmf-var/".
-(("^TEXMFCACHE = .*")
- "TEXMFCACHE = $TEXMFVAR\n")
+ "TEXMF = 
{$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,$TEXMFSYSVAR,$TEXMFDIST}\n")
+(("^TEXMFDBS = .*") "TEXMFDBS = {$TEXMFDIST}\n")
+;; Ignore system-wide cache, which is not writable.  Use local
+;; one instead, i.e. "$HOME/.texlive/texmf-var/".
+(("^TEXMFCACHE = .*") "TEXMFCACHE = $TEXMFVAR\n")
+;; Set TEXMFCNF.  Since earlier values of variables have
+;; precedence over later ones, insert the desired value first.
+(("^TEXMFCNF =")
+ (string-append
+  "TEXMFCNF = " #$output "/share/texmf-dist/web2c\n"
+  "TEXMFCNF ="))
+;; Help TeX finding fonts installed on the system.
+(("^OSFONTDIR = .*") "OSFONTDIR = {$XDG_DATA_DIRS}\n")
 ;; Don't truncate lines.
 (("^error_line = .*$") "error_line = 254\n")
 (("^half_error_line = .*$") "half_error_line = 238\n")
@@ -237,9 +247,9 @@
   (add-after 'unpack 'patch-directory-traversal
 ;; When ST_NLINK_TRICK is set, kpathsea attempts to avoid work
 ;; when searching files by assuming that a directory with exactly
-;; two links has no subdirectories.  This assumption does not hold
-;; in our case, so some directories with symlinked sub-directories
-;; would not be traversed.
+;; two links has no sub-directories.  This assumption does not
+;; hold in our case, so some directories with symlinked
+;; sub-directories would not be traversed.
 (lambda _
   (substitute* "texk/kpathsea/config.h"
 (("#define ST_NLINK_TRICK") ""



78/137: gnu: texlive-scripts: Add missing "mktexfmt" symlink.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit a1fef537e649a90257d8290fb524d36ad15859f6
Author: spencerpeters 
AuthorDate: Mon Jun 17 09:09:53 2024 +0200

gnu: texlive-scripts: Add missing "mktexfmt" symlink.

* gnu/packages/tex.scm (texlive-scripts)[arguments]<#:phases>: Add missing
"mktexfmt" symlink during LINK-SCRIPTS phase.

Change-Id: I7100fc3d92ab625ff4d6a0a6945d5ab4c5121ed8
Signed-off-by: Nicolas Goaziou 
---
 gnu/packages/tex.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 9d356e580c..e7e5444195 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -498,7 +498,9 @@ of user-specified directories similar to how shells look up 
executables.")
 (apply (assoc-ref tex:%standard-phases 'link-scripts)
(list #:outputs outputs
  #:link-scripts
- (find-files "scripts")
+ (find-files "scripts"
+  (with-directory-excursion (string-append #$output "/bin")
+(symlink "fmtutil" "mktexfmt")))
 (inputs (list perl))
 (home-page "https://www.tug.org/texlive/;)
 (synopsis "TeX Live infrastructure programs")



103/137: gnu: texlive-dotseqn: Remove native input.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 633ceb134aa5c3b6873a1186509f01934da54c58
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 00:01:50 2024 +0200

gnu: texlive-dotseqn: Remove native input.

* gnu/packages/tex.scm (texlive-dotseqn)[native-inputs]: Remove
TEXLIVE-HYPODOC.

Change-Id: I4acdec4230937e59f1dd0876a6dc38fd35a2aa5e
---
 gnu/packages/tex.scm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 927cc19281..c79c86851d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -99497,7 +99497,6 @@ intended for symbols in non English languages.")
  "\\ifodd89\n") ;create "dotseqn.sty"
 (("ifoddanswer else OnlyDescription fi")
  "\\OnlyDescription"))) ;no documentation.
-(native-inputs (list (texlive-updmap.cfg (list texlive-hypdoc
 (home-page "https://ctan.org/pkg/dotseqn;)
 (synopsis "Flush left equations with dotted leaders to the numbers")
 (description



136/137: gnu: texlive-luajittex-bin: Skip build on ppc64le and riscv64 architectures.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 6797f2588a450f2cdd2e36ed9250e45ede0a40b3
Author: Nicolas Goaziou 
AuthorDate: Mon Jun 24 23:04:33 2024 +0200

gnu: texlive-luajittex-bin: Skip build on ppc64le and riscv64 architectures.

* gnu/packages/tex.scm (texlive-luajittex-bin)[arguments]<#:phases>: Skip
build on ppc64le and riscv64 architectures.

Change-Id: Ifb70cbb2637c64bb8f2cc31598e7059647210789
---
 gnu/packages/tex.scm | 26 ++
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 9cd25407a9..224c4160c2 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -48518,17 +48518,27 @@ without HarfBuzz.")
   ;; libraries in the source tree, in particular pplib and luajit,
   ;; required for LuajitTeX.  The following change forces building
   ;; them.
+  ;;
+  ;; XXX: Skip build on architectures not supporting LuaJIT.  It
+  ;; avoid creating conditional inputs in TEXLIVE-LUAJITTEX, which
+  ;; would give more manual work after an update.
   (lambda _
-(substitute* "libs/configure"
-  (("x\\$need_(pplib|luajit)") "xyes"
+#$@(if (or (target-ppc64le?)
+   (target-riscv64?))
+   '("skip")
+   '((substitute* "libs/configure"
+   (("x\\$need_(pplib|luajit)") "xyes"))
 (add-after 'install 'install-binaries
   (lambda _
-(with-directory-excursion "texk/web2c"
-  (invoke "make" "luajittex")
-  (invoke "make" "luajithbtex")
-  (let ((bin (string-append #$output "/bin")))
-(install-file ".libs/luajittex" bin)
-(install-file ".libs/luajithbtex" bin)
+#$@(if (or (target-ppc64le?)
+   (target-riscv64?))
+   '("skip")
+   '((with-directory-excursion "texk/web2c"
+   (invoke "make" "luajittex")
+   (invoke "make" "luajithbtex")
+   (let ((bin (string-append #$output "/bin")))
+ (install-file ".libs/luajittex" bin)
+ (install-file ".libs/luajithbtex" bin)))
 (native-inputs (list pkg-config))
 (home-page (package-home-page texlive-luajittex))
 (synopsis "Binaries for @code{texlive-luajittex}")



69/137: gnu: texlive-dvipos: Build binaries separately.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 2e364709c04a314a05ab6eea4e7ba5b9792ff08d
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 21:38:35 2024 +0200

gnu: texlive-dvipos: Build binaries separately.

* gnu/packages/tex.scm (texlive-dvipos-bin): New variable.
(texlive-dvipos): Do not inherit from TEXLIVE-BIN.  Make it a regular TeX
Live package instead.
[source]: Use TEXLIVE-ORIGIN.
[arguments]: Remove it.
[propagated-inputs]: Add TEXLIVE-DVIPOS-BIN.

Change-Id: I0f1e169b7f078e022b65a13045b24a11099e8303
---
 gnu/packages/tex.scm | 44 +---
 1 file changed, 33 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c92e9ac894..5b88116bda 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -35134,8 +35134,30 @@ not read the postamble, so it can be started before 
TeX finishes.")
 
 (define-public texlive-dvipos
   (package
-(inherit texlive-bin)
 (name "texlive-dvipos")
+(version (number->string %texlive-revision))
+(source (texlive-origin
+ name version
+ (list "doc/man/man1/dvipos.1"
+   "doc/man/man1/dvipos.man1.pdf")
+ (base32
+  "0dmaas4m9y4px53vlg0jr73xviki338fm2n176l8ldwqj0vvq1b8")))
+(outputs '("out" "doc"))
+(build-system texlive-build-system)
+(propagated-inputs (list texlive-dvipos-bin))
+(home-page "https://www.tug.org/texlive/;)
+(synopsis "Support DVI @samp{pos:} specials used by ConTeXt DVI output")
+(description
+ "@command{dvipos} parses a DVI file looking for @samp{pos:} specials.
+It then outputs the information from those specials along with information
+that only a DVI postprocessor could determine, such as the current @samp{x}
+and @samp{y} location.")
+(license license:gpl2+)))
+
+(define-public texlive-dvipos-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-dvipos-bin")
 (source
  (origin
(inherit texlive-source)
@@ -35158,9 +35180,9 @@ not read the postamble, so it can be started before TeX 
finishes.")
 (arguments
  (substitute-keyword-arguments (package-arguments texlive-bin)
((#:configure-flags flags)
-#~(cons* "--enable-dvipos" (delete "--enable-web2c" #$flags)))
-   ((#:phases _)
-#~(modify-phases %standard-phases
+#~(cons "--enable-dvipos" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
 (replace 'check
   (lambda* (#:key tests? #:allow-other-keys)
 (when tests?
@@ -35170,14 +35192,14 @@ not read the postamble, so it can be started before 
TeX finishes.")
   (lambda _
 (with-directory-excursion "texk/dvipos"
   (invoke "make" "install"
-(home-page "https://www.tug.org/texlive/;)
-(synopsis "Support DVI @samp{pos:} specials used by ConTeXt DVI output")
+(home-page (package-home-page texlive-dvipos))
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(synopsis "Binary for @code{texlive-dvipos}")
 (description
- "@command{dvipos} parses a DVI file looking for @samp{pos:} specials.
-It then outputs the information from those specials along with information
-that only a DVI postprocessor could determine, such as the current @samp{x}
-and @samp{y} location.")
-(license license:gpl2+)))
+ "This package provides the binary for @code{texlive-dvipos}.")
+(license (package-license texlive-dvipos
 
 (define-public texlive-dvipsconfig
   (package



17/137: gnu: Add texlive-fontware-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 94f8803023b965c92aedc2e20ba8f22792163b42
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 16:11:20 2024 +0200

gnu: Add texlive-fontware-bin.

* gnu/packages/tex.scm (texlive-fontware-bin): New variable.
(texlive-fontware)[propagated-inputs]: Add TEXLIVE-FONTWARE-BIN.

Change-Id: I5c59658aeab1a3cb289e87f77fae9436acae8a7f
---
 gnu/packages/tex.scm | 25 +
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index cb2a70..0d652797f5 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34825,6 +34825,7 @@ sources, and with LaTeX @file{.fd} files.")
   "0ng27m6cz92aa52z99gnw5i8s8fbkxq4354mygwnchchgxndcba0")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-fontware-bin))
 (home-page "https://ctan.org/pkg/vfware;)
 (synopsis "Tools for virtual font metrics")
 (description
@@ -34836,6 +34837,30 @@ generates a VF file and a TFM file; @command{vftovp} 
takes a VF file and a TFM
 file and generates a VPL file.")
 (license license:knuth)))
 
+(define-public texlive-fontware-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-fontware-bin")
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(delete "--enable-web2c" #$flags))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/web2c"
+  (let ((bin (string-append #$output "/bin"))
+(files '("pltotf" "tftopl" "vftovp" "vptovf")))
+(for-each (lambda (f) (invoke "make" f)) files)
+(for-each (lambda (f) (install-file f bin)) files)
+(native-inputs (list pkg-config))
+(home-page (package-home-page texlive-fontware))
+(synopsis "Binaries for @code{texlive-fontware}")
+(description
+ "This package provides the binaries for @code{texlive-fontware}.")
+(license (package-license texlive-fontware
+
 (define-public texlive-forest-quickstart
   (package
 (name "texlive-forest-quickstart")



109/137: gnu: texlive-kfsh-nat: Specify upstream name.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit fe25ce81b8dae5f6b17ab12263da4b15c77c4e98
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 09:02:38 2024 +0200

gnu: texlive-kfsh-nat: Specify upstream name.

* gnu/packages/tex.scm (texlive-kfsh-nat)[properties]: Add UPSTREAM-NAME 
property.

Change-Id: Ia26e469a702365baaf89c10066faaeeb980b7f40
---
 gnu/packages/tex.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index caa7a4ec99..85fb3322b1 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -22879,6 +22879,7 @@ links to the individual documents, either in HTML or in 
PDF format.")
   (sha256
(base32
 "1qzn0n19lslf2qg8fvm844xx5k7s8a275a77z2ynbb0vs1w4prpw"
+(properties '((upstream-name . "ksfh_nat")))
 (build-system texlive-build-system)
 (home-page "https://ctan.org/pkg/ksfh-nat;)
 (synopsis "BibTeX style for KSFH Munich")



98/137: gnu: Do not create origins for "ctxdocstrip.tex".

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 7b6696ffa95ca4a282f4dfa43be8cae9546a0bb4
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 22:45:35 2024 +0200

gnu: Do not create origins for "ctxdocstrip.tex".

* gnu/packages/tex.scm (texlive-xecjk)[native-inputs]:
(texlive-xcjk2uni)[native-inputs]:
(texlive-xpinyin)[native-inputs]: Remove  pointing to
"ctxdocstrip.tex".  Grab it from TEXLIVE-CTEX's source instead.

Change-Id: I8208f4e1cc25b6ac03e0727a41d79d0c76568bdc
---
 gnu/packages/tex.scm | 34 +++---
 1 file changed, 3 insertions(+), 31 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 72788b021b..8ef8570279 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -39996,16 +39996,7 @@ undergraduate and postgraduate that meet the school's 
requirements.")
 "build/")
   (setenv "TEXINPUTS" (string-append (getcwd) "/build:")))
 (native-inputs
- (list (origin
- (method svn-multi-fetch)
- (uri (svn-multi-reference
-   (url (texlive-packages-repository version))
-   (revision 66594)
-   (locations (list "tex/generic/ctex/ctxdocstrip.tex"
- (file-name (git-file-name name version))
- (sha256
-  (base32
-   "154v2d6wfzhfg654nlh2apy9zr78d09rkimymyjqpxymkpbk8lli")
+ (list (package-source texlive-ctex)))
 (home-page "https://ctan.org/pkg/xecjk;)
 (synopsis "Support for CJK documents in XeLaTeX")
 (description
@@ -58589,17 +58580,7 @@ for the user.")
 "build/")
   (setenv "TEXINPUTS" (string-append (getcwd) "/build:")))
 (native-inputs
- (list texlive-ttfutils
-   (origin
- (method svn-multi-fetch)
- (uri (svn-multi-reference
-   (url (texlive-packages-repository version))
-   (revision 66594)
-   (locations (list "tex/generic/ctex/ctxdocstrip.tex"
- (file-name (git-file-name name version))
- (sha256
-  (base32
-   "154v2d6wfzhfg654nlh2apy9zr78d09rkimymyjqpxymkpbk8lli")
+ (list (package-source texlive-ctex) texlive-ttfutils))
 (home-page "https://ctan.org/pkg/xcjk2uni;)
 (synopsis "Convert CJK characters to Unicode, in pdfTeX")
 (description
@@ -58918,16 +58899,7 @@ others.")
   ;; should be a native input) and `ctex' (where this package is
   ;; a propagated input).  To work around this, grab the required
   ;; "ctxdocstrip.tex" file from `ctex'.
-  (origin
-(method svn-multi-fetch)
-(uri (svn-multi-reference
-  (url (texlive-packages-repository version))
-  (revision 66594)
-  (locations (list "tex/generic/ctex/ctxdocstrip.tex"
-(file-name (git-file-name name version))
-(sha256
- (base32
-  "154v2d6wfzhfg654nlh2apy9zr78d09rkimymyjqpxymkpbk8lli")
+  (package-source texlive-ctex)))
 (home-page "https://ctan.org/pkg/xpinyin;)
 (synopsis "Automatically add pinyin to Chinese characters")
 (description



90/137: gnu: texlive-scripts: Allow auto-updates.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit d76c9ccc26fc347a7c74ac7ee27801cf6e95a2a1
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 08:31:23 2024 +0200

gnu: texlive-scripts: Allow auto-updates.

* guix/import/texlive.scm (tlpdb-guix-packages): Add meta-data for
TEXLIVE-SCRIPTS.
(texlive->svn-multi-reference):
(package-from-texlive-repository?): Special case TEXLIVE-SCRIPTS.

Change-Id: Ide47d25430a39f620aae115fa4891c85d1d0c151
---
 guix/import/texlive.scm | 94 ++---
 1 file changed, 82 insertions(+), 12 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 0fba171f46..411e345f2d 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -137,7 +137,65 @@ older systems.
 This Guix-specific package provides hyphenation patterns for all languages
 supported in TeX Live.  It is a strict super-set of code{hyphen-base} package
 and should be preferred to it whenever a package would otherwise depend on
-@code{hyph-utf8}."
+@code{hyph-utf8}."))
+("scripts"
+ (shortdesc . "TeX Live infrastructure programs")
+ (longdesc . "This package provides core TeX Live scripts such as updmap,
+fmtutil, and tlmgr.  It is automatically installed alongside texlive-bin.")
+ (docfiles "texmf-dist/doc/man/man1/fmtutil-sys.1"
+   "texmf-dist/doc/man/man1/fmtutil-sys.man1.pdf"
+   "texmf-dist/doc/man/man1/fmtutil-user.1"
+   "texmf-dist/doc/man/man1/fmtutil-user.man1.pdf"
+   "texmf-dist/doc/man/man1/fmtutil.1"
+   "texmf-dist/doc/man/man1/fmtutil.man1.pdf"
+   "texmf-dist/doc/man/man1/install-tl.1"
+   "texmf-dist/doc/man/man1/install-tl.man1.pdf"
+   "texmf-dist/doc/man/man1/mktexfmt.1"
+   "texmf-dist/doc/man/man1/mktexfmt.man1.pdf"
+   "texmf-dist/doc/man/man1/mktexlsr.1"
+   "texmf-dist/doc/man/man1/mktexlsr.man1.pdf"
+   "texmf-dist/doc/man/man1/mktexmf.1"
+   "texmf-dist/doc/man/man1/mktexmf.man1.pdf"
+   "texmf-dist/doc/man/man1/mktexpk.1"
+   "texmf-dist/doc/man/man1/mktexpk.man1.pdf"
+   "texmf-dist/doc/man/man1/mktextfm.1"
+   "texmf-dist/doc/man/man1/mktextfm.man1.pdf"
+   "texmf-dist/doc/man/man1/texhash.1"
+   "texmf-dist/doc/man/man1/texhash.man1.pdf"
+   "texmf-dist/doc/man/man1/tlmgr.1"
+   "texmf-dist/doc/man/man1/tlmgr.man1.pdf"
+   "texmf-dist/doc/man/man1/updmap-sys.1"
+   "texmf-dist/doc/man/man1/updmap-sys.man1.pdf"
+   "texmf-dist/doc/man/man1/updmap-user.1"
+   "texmf-dist/doc/man/man1/updmap-user.man1.pdf"
+   "texmf-dist/doc/man/man1/updmap.1"
+   "texmf-dist/doc/man/man1/updmap.man1.pdf"
+   "texmf-dist/doc/man/man5/fmtutil.cnf.5"
+   "texmf-dist/doc/man/man5/fmtutil.cnf.man5.pdf"
+   "texmf-dist/doc/man/man5/updmap.cfg.5"
+   "texmf-dist/doc/man/man5/updmap.cfg.man5.pdf")
+ (runfiles "texmf-dist/dvips/tetex/"
+   "texmf-dist/fonts/enc/dvips/tetex/"
+   "texmf-dist/fonts/map/dvips/tetex/"
+   "texmf-dist/scripts/texlive/fmtutil-sys.sh"
+   "texmf-dist/scripts/texlive/fmtutil-user.sh"
+   "texmf-dist/scripts/texlive/fmtutil.pl"
+   "texmf-dist/scripts/texlive/mktexlsr.pl"
+   "texmf-dist/scripts/texlive/mktexmf"
+   "texmf-dist/scripts/texlive/mktexpk"
+   "texmf-dist/scripts/texlive/mktextfm"
+   "texmf-dist/scripts/texlive/tlmgr.pl"
+   "texmf-dist/scripts/texlive/updmap-sys.sh"
+   "texmf-dist/scripts/texlive/updmap-user.sh"
+   "texmf-dist/scripts/texlive/updmap.pl"
+   "texmf-dist/web2c/fmtutil-hdr.cnf"
+   "texmf-dist/web2c/updmap-hdr.cfg"
+   "texmf-dist/web2c/updmap.cfg"
+   "tlpkg/gpg/"
+   "tlpkg/installer/config.guess"
+   "tlpkg/installer/curl/curl-ca-bundle.crt"
+   "tlpkg/TeXLive/"
+   "tlpkg/texlive.tlpdb"
 
 (define (svn-command . args)
   "Execute \"svn\" command with arguments ARGS, provided as strings, and
@@ -537,16 +595,23 @@ of package with UPSTREAM-NAME in VERSION."
   "Return  object for TeX Live package with UPSTREAM-NAME
 at VERSION."
   (let* ((data (assoc-ref database upstream-name))
+ (files (append (or (assoc-ref data 'docfiles) (list))
+(or (assoc-ref data 'runfiles) (list))
+(or (assoc-ref data 'srcfiles) (list
  (locations
-  (files->locations
-   (filter-map (lambda (file)
- ;; Ignore any file not starting with the expected
- ;; prefix.  Nothing good can come from 

54/137: gnu: Add texlive-dvipng-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 72b455371f5e1002f13a1f487f5e325df4c9116d
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 16:02:19 2024 +0200

gnu: Add texlive-dvipng-bin.

* gnu/packages/tex.scm (texlive-dvipng-bin): New variable.
(texlive-dvipng)[propagated-inputs]: Add TEXLIVE-DVIPNG-BIN.

Change-Id: I63d8c06ea96d3f153f94abac1a7830aaa54b315c
---
 gnu/packages/tex.scm | 100 ++-
 1 file changed, 91 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6973fd1626..36c086aa08 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -35042,6 +35042,7 @@ transforms between a DVI file and a text file.")
   "0r001q4p5569dagayds1c56y10ls6f6v7mmywiw81l995q16apxi")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-dvipng-bin))
 (home-page "https://ctan.org/pkg/dvipng;)
 (synopsis "DVI to PNG/GIF converter")
 (description
@@ -35052,18 +35053,99 @@ on-the-fly, as needed in @code{preview-latex}, 
WeBWorK and others.  It does
 not read the postamble, so it can be started before TeX finishes.")
 (license license:lgpl3)))
 
+(define-public texlive-dvipng-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-dvipng-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '("xpdf"))
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dvipng"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-dvipng" (delete "--disable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dvipng"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dvipng"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs
+ (list freetype
+   gd
+   graphite2
+   harfbuzz
+   icu4c
+   libpng
+   potrace
+   texlive-libkpathsea
+   zziplib))
+(propagated-inputs '())
+(home-page (package-home-page texlive-dvipng))
+(synopsis "Binaries for @code{texlive-dvipng}")
+(description
+ "This package provides the binaries for @code{texlive-dvipng}.")
+(license (package-license texlive-dvipng
+
 (define-public texlive-dvipos
   (package
+(inherit texlive-bin)
 (name "texlive-dvipos")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/dvipos.1"
-   "doc/man/man1/dvipos.man1.pdf")
- (base32
-  "0dmaas4m9y4px53vlg0jr73xviki338fm2n176l8ldwqj0vvq1b8")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dvipos"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--enable-dvipos" (delete "--enable-web2c" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion 

09/137: gnu: Add texlive-libptexenc.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 9d757df9c7f79ce6a40d690c23a28c17a43c7f15
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 10:50:04 2024 +0200

gnu: Add texlive-libptexenc.

* gnu/packages/tex.scm (texlive-libptexenc): New variable.

Change-Id: I102a97a4b5319e434becbe2187336dd5bc36833e
---
 gnu/packages/tex.scm | 60 
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 3bfcd13e5a..06c7250c86 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -275,6 +275,66 @@
 of user-specified directories similar to how shells look up executables.")
 (license license:lgpl2.1)))
 
+(define-public texlive-libptexenc
+  (package
+(name "texlive-libptexenc")
+(version (number->string %texlive-revision))
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("ptexenc"))
+(build-system gnu-build-system)
+(arguments
+ (list
+  #:out-of-source? #t
+  #:configure-flags
+  #~(list "--disable-static"
+  "--disable-native-texlive-build"
+  "--enable-shared"
+  "--with-banner-add=/GNU Guix"
+  "--disable-all-pkgs")
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'unpack 'install-missing-files
+;; These two files are not installed (on purpose, see ChangeLog),
+;; but are required nonetheless if this library is meant to be
+;; used externally.
+(lambda _
+  (with-directory-excursion "texk/ptexenc/ptexenc"
+(let ((inc (string-append #$output "/include/ptexenc")))
+  (for-each (lambda (f) (install-file f inc))
+'("kanjicnv.h" "unicode-jp.h"))
+  (replace 'check
+(lambda* (#:key tests? #:allow-other-keys)
+  (when tests?
+(with-directory-excursion "texk/ptexenc"
+  (invoke "make" "check")
+  (replace 'install
+(lambda* (#:key inputs #:allow-other-keys)
+  (with-directory-excursion "texk/ptexenc"
+(invoke "make" "install")))
+(native-inputs (list pkg-config texlive-libkpathsea))
+(inputs (list libiconv))
+(home-page "http://tutimura.ath.cx/ptexlive/?ptexenc%2FDetails;)
+(synopsis "Library for Japanese pTeX")
+(description
+ "This package provides a library for Japanese pTeX and its surrounding 
tools.")
+(license license:gpl2)))
+
 (define-public texlive-scripts
   (package
 (name "texlive-scripts")



21/137: gnu: Add texlive-ptex-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit f0dce41f22deff987b181b8a4b8ea9e14946a47e
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 16:24:46 2024 +0200

gnu: Add texlive-ptex-bin.

* gnu/packages/tex.scm (texlive-ptex-bin): New variable.
(texlive-ptex)[propagated-inputs]: Add TEXLIVE-PTEX-BIN.

Change-Id: Ib8ef4d9283cd1bd79f621a864166da56b15bebd2
---
 gnu/packages/tex.scm | 75 
 1 file changed, 75 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 61223a0164..8bd7efa44d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -36396,6 +36396,7 @@ their specific needs.")
texlive-knuth-lib
texlive-plain
texlive-ptex-base
+   texlive-ptex-bin
texlive-ptex-fonts))
 (home-page "https://ctan.org/pkg/ptex;)
 (synopsis "TeX system for publishing in Japanese")
@@ -36405,6 +36406,80 @@ problems in typesetting Japanese.  A manual (in both 
Japanese and English) is
 distributed as package @code{pTeX-manual}.")
 (license license:bsd-3)))
 
+(define-public texlive-ptex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-ptex-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("makejvf" "mendexk" 
"web2c"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--enable-makejvf"
+ "--enable-mendexk"
+ (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/makejvf"
+(invoke "make" "check"))
+  (with-directory-excursion "texk/mendexk"
+(invoke "make" "check")
+(add-after 'build 'build-web2c-binaries
+  (lambda _
+(with-directory-excursion "texk/web2c"
+  (for-each (lambda (target) (invoke "make" target))
+'("eptex" "pmpost")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/makejvf"
+  (invoke "make" "install"))
+(with-directory-excursion "texk/mendexk"
+  (invoke "make" "install"))
+;; Install Web2C parts.
+(let ((bin (string-append #$output "/bin")))
+  (with-directory-excursion "texk/web2c"
+(for-each (lambda (f) (install-file f bin))
+  '("eptex" "pmpost")))
+  (with-directory-excursion bin
+(for-each symlink
+  '("eptex" "pmpost"   "pmpost")
+  '("ptex"  "pdvitomp" "r-pmpost"))
+;; Some executables are symlinks to TEXLIVE-UPTEX-BIN's.
+(let ((uptex #$(this-package-input "texlive-uptex-bin")))
+  (for-each
+   symlink
+   (map (lambda (f) (string-append uptex "/bin/" f))
+'("upbibtex" "updvitype" "uppltotf" "uptftopl"))
+   '("pbibtex" "pdvitype" "ppltotf" "ptftopl")))
+(native-inputs (list pkg-config))
+(inputs
+ (modify-inputs (package-inputs texlive-bin)
+   (append cairo gmp mpfr texlive-libptexenc texlive-uptex-bin)))
+(home-page (package-home-page texlive-ptex))
+(synopsis "Binaries for @code{texlive-ptex}")
+(description
+ "This package provides the binaries for @code{texlive-ptex}.")
+(license (package-license texlive-ptex
+
 (define-public texlive-ptex-base
   (package
 (name "texlive-ptex-base")



94/137: gnu: Remove artefacts from previous TeX Live packaging.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit b0d97398c47d24059aba2cb0de4f3508f4cedcef
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 12:03:15 2024 +0200

gnu: Remove artefacts from previous TeX Live packaging.

* guix/build-system/texlive.scm (%texlive-tag):
(%texlive-revision):
(texlive-origin):
(texlive-ref): Remove variables.

Change-Id: Ic9b2fed76fc1dd1ff02fc567c3d88a941927452b
---
 guix/build-system/texlive.scm | 38 +-
 1 file changed, 1 insertion(+), 37 deletions(-)

diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm
index c3bed76d6c..f5dd8ac69c 100644
--- a/guix/build-system/texlive.scm
+++ b/guix/build-system/texlive.scm
@@ -30,13 +30,9 @@
   #:use-module (guix svn-download)
   #:export (%texlive-build-system-modules
 %texlive-repository
-%texlive-revision
-%texlive-tag
 texlive-build
 texlive-build-system
-texlive-origin
-texlive-packages-repository
-texlive-ref))
+texlive-packages-repository))
 
 ;; Commentary:
 ;;
@@ -51,38 +47,6 @@
   (string-append
%texlive-repository "tags/texlive-" version "/Master/texmf-dist"))
 
-;; These variables specify the SVN tag and the matching SVN revision.  They
-;; are taken from https://www.tug.org/svn/texlive/tags/
-(define %texlive-tag "texlive-2023.0")
-(define %texlive-revision 66594)
-
-(define (texlive-origin name version locations hash)
-  "Return an  object for a TeX Live package consisting of multiple
-LOCATIONS with a provided HASH.  Use NAME and VERSION to compute a prettier
-name for the checkout directory."
-  (origin
-(method svn-multi-fetch)
-(uri (svn-multi-reference
-  (url (string-append "svn://www.tug.org/texlive/tags/"
-  %texlive-tag "/Master/texmf-dist/"))
-  (locations locations)
-  (revision %texlive-revision)))
-(file-name (string-append name "-" version "-checkout"))
-(sha256 hash)))
-
-(define* (texlive-ref component #:optional id)
-  "Return a  object for the package ID, which is part of the
-given Texlive COMPONENT.  If ID is not provided, COMPONENT is used as the top
-level package ID."
-  (svn-reference
-   (url (string-append "svn://www.tug.org/texlive/tags/"
-   %texlive-tag "/Master/texmf-dist/"
-   "source/" component
-   (if id
-   (string-append "/" id)
-   "")))
-   (revision %texlive-revision)))
-
 (define %texlive-build-system-modules
   ;; Build-side modules imported by default.
   `((guix build texlive-build-system)



104/137: gnu: texlive-psfragx: Remove native inputs.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit f55512baf10e6c3cce4c4b7b873eb1d1175623df
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 00:08:50 2024 +0200

gnu: texlive-psfragx: Remove native inputs.

* gnu/packages/tex.scm (texlive-psfragx)[native-inputs]: Remove
TEXLIVE-UPDMAP.CFG.

Change-Id: Ia18cf6dd2304a6bd6f3c0dc33c3af3071450e91d
---
 gnu/packages/tex.scm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c79c86851d..0afea3689f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -116321,7 +116321,6 @@ vote results and action items.")
 (arguments
  (list #:tex-format "latex"
#:build-targets #~(list "psfragx.dtx")))
-(native-inputs (list (texlive-updmap.cfg)))
 (home-page "https://ctan.org/pkg/psfragx;)
 (synopsis "@code{psfrag} extension")
 (description



84/137: guix: import texlive: Move a comment.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 2c2f0a32ab9ae05b06238238864d2593b3b09394
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 15 23:26:50 2024 +0200

guix: import texlive: Move a comment.

* guix/import/texlive.scm (latex-bin-dependency-tree): Move comment inside 
the
variable.

Change-Id: Ia3fd8b49b9680122c0f85dca0226db42b0dd3927
---
 guix/import/texlive.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index a87f1346b0..7cf8d41cc4 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -274,10 +274,10 @@ Guix-specific packages."
  (loop all (record key value current field-type) 
key
  (loop all current #false
 
-;; Packages listed below are used to build "latex-bin" package, and therefore
-;; cannot provide it automatically as a native input.  Consequently, the
-;; importer sets TEXLIVE-LATEX-BIN? argument to #F for all of them.
 (define latex-bin-dependency-tree
+  ;; Return a list of packages used to build "latex-bin" package.  Those
+  ;; cannot provide it as a native input.  Consequently, the importer sets
+  ;; TEXLIVE-LATEX-BIN? argument to #F for all of them.
   (memoize
(lambda (package-database)
  ;; Start out with "latex-bin", but also provide native inputs, which do



105/137: gnu: texlive-texaccents: Add missing script.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 18434edc1dff363cdb6fff617a9bbb9d8bd9b7fb
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 00:17:45 2024 +0200

gnu: texlive-texaccents: Add missing script.

* gnu/packages/tex.scm (texlive-texaccents)[arguments]<#:link-scripts>: Add
missing script.

Change-Id: I0a9ac72484375f61c7bc5e30de89ca44dde0147f
---
 gnu/packages/tex.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 0afea3689f..3b0ebf8805 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -53719,6 +53719,7 @@ the conversion engine.")
 "1kh4cpvrxgcvnmzxgb3my4jawyqd4348cy6h195346pvdb5xsphh"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments (list #:link-scripts #~(list "texaccents.sno")))
 (home-page "https://ctan.org/pkg/texaccents;)
 (synopsis "Convert composite accented characters to Unicode")
 (description



101/137: gnu: texlive-newverbs: Do not create origin for "ydocstrip.tex".

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit c6e8cc2a78cbbca92327d0ecc2a68206f54cb456
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 23:53:02 2024 +0200

gnu: texlive-newverbs: Do not create origin for "ydocstrip.tex".

* gnu/packages/tex.scm (texlive-newverbs)[native-inputs]:  Remove 
pointing to "ydocstrip.tex".  Grab it from TEXLIVE-YDOC's source instead.

Change-Id: I730a34e0e8aaca8a50262d16c05ad4161f068fa0
---
 gnu/packages/tex.scm | 17 +++--
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 28792b33f3..bd50706fb4 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -64560,23 +64560,12 @@ Unicode option of @code{inputenc} or @code{inputenx}, 
or by XeLaTeX/LuaLaTeX.")
 ;; a propagated input).  To work around this, install the specific
 ;; "ydocstrip.tex" file from `ydoc' in the build directory and set
 ;; TEXINPUTS variable accordingly so the process can find it.
-(lambda* (#:key inputs #:allow-other-keys)
-  (install-file (search-input-file inputs
+(lambda* (#:key inputs native-inputs #:allow-other-keys)
+  (install-file (search-input-file (or native-inputs inputs)

"tex/generic/ydoc/ydocstrip.tex")
 "build/")
   (setenv "TEXINPUTS" (string-append (getcwd) "/build:")))
-(native-inputs
- (list
-  (origin
-(method svn-multi-fetch)
-(uri (svn-multi-reference
-  (url (texlive-packages-repository version))
-  (revision 66594)
-  (locations (list "tex/generic/ydoc/ydocstrip.tex"
-(file-name (git-file-name name version))
-(sha256
- (base32
-  "1nixgvmw8c6jznhxys3yfzr3qw1lci8kyx54rs0shm6i63xjgr9i")
+(native-inputs (list (package-source texlive-ydoc)))
 (home-page "https://ctan.org/pkg/newverbs;)
 (synopsis "Define new versions of @code{\\verb}")
 (description



18/137: gnu: Add texlive-texware-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit a53493c0bfba7a30ba8282ca78d4fec59ffb102c
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 16:11:40 2024 +0200

gnu: Add texlive-texware-bin.

* gnu/packages/tex.scm (texlive-texware-bin): New variable.
(texlive-texware)[propagated-inputs]: Add TEXLIVE-TEXWARE-BIN.

Change-Id: I8c3393f3c7e54477f8ffc350a122e20a0a074c97
---
 gnu/packages/tex.scm | 25 +
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 0d652797f5..6ca72f86bd 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -43459,6 +43459,7 @@ university, is proposed.")
   "122r0aq02vwx6irsnapnfbvhgy5d09x90rc8zc7a0bi7b25bxnd1")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-texware-bin))
 (home-page "https://ctan.org/pkg/texware;)
 (synopsis "Utility programs for use with TeX")
 (description
@@ -43470,6 +43471,30 @@ convert TeX Font Metric (TFM) file to human readable 
Property List (PL) files
 and vice versa.")
 (license license:public-domain)))
 
+(define-public texlive-texware-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-texware-bin")
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(delete "--enable-web2c" #$flags))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/web2c"
+  (let ((bin (string-append #$output "/bin"))
+(files '("dvitype" "pooltype")))
+(for-each (lambda (f) (invoke "make" f)) files)
+(for-each (lambda (f) (install-file f bin)) files)
+(native-inputs (list pkg-config))
+(home-page (package-home-page texlive-texware))
+(synopsis "Binaries for @code{texlive-texware}")
+(description
+ "This package provides the binaries for @code{texlive-texware}.")
+(license (package-license texlive-texware
+
 (define-public texlive-ticollege
   (package
 (name "texlive-ticollege")



59/137: gnu: Add texlive-ps2eps-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 39e4f7102088ed45d5507f770a5493b983cfd87e
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 16:27:52 2024 +0200

gnu: Add texlive-ps2eps-bin.

* gnu/packages/tex.scm (texlive-ps2eps-bin): New variable.
(texlive-ps2eps)[arguments]<#:link-scripts, #:phases>: Remove arguments.
[inputs]: Remove PERL.
[propagated-inputs]: Add TEXLIVE-PS2EPS-BIN.

Change-Id: Ie3152ae25c9444bd9839559a81fd68139e4f1df1
---
 gnu/packages/tex.scm | 120 ++-
 1 file changed, 91 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index a875f1e526..aea33d3c0a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -43238,20 +43238,7 @@ and glued together.  This will lead to a physical 
product box.")
   "1anrvgs0hd3790dwpxqal0c2drjmvh93vnyqap40rvp8axwi0a6n")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments
- (list #:link-scripts #~(list "ps2eps.pl")
-   #:phases
-   #~(modify-phases %standard-phases
-   (add-after 'unpack 'configure-ghostscript-executable
- ;; ps2eps.pl uses the "gswin32c" ghostscript executable on
- ;; Windows, and the "gs" ghostscript executable on Unix.  It
- ;; detects Unix by checking for the existence of the
- ;; "/usr/bin" directory.  Since Guix System does not have
- ;; "/usr/bin", it is also detected as Windows.
- (lambda _
-   (substitute* "scripts/ps2eps/ps2eps.pl"
- (("gswin32c") "gs")))
-(inputs (list perl))
+(propagated-inputs (list texlive-ps2eps-bin))
 (home-page "https://ctan.org/pkg/ps2eps;)
 (synopsis "Produce Encapsulated PostScript from PostScript")
 (description
@@ -43266,24 +43253,99 @@ Included in the distribution is the @command{bbox} 
program, an application to
 produce bounding box values for Rawppm or Rawpbm format files.")
 (license license:gpl3+)))
 
+(define-public texlive-ps2eps-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-ps2eps-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("ps2eps"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-ps2eps" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(add-after 'unpack 'configure-ghostscript-executable
+  ;; ps2eps.pl uses the "gswin32c" ghostscript executable on
+  ;; Windows, and the "gs" ghostscript executable on Unix.  It
+  ;; detects Unix by checking for the existence of the "/usr/bin"
+  ;; directory.  Since Guix System does not have "/usr/bin", it is
+  ;; also detected as a Windows system :(.
+  (lambda _
+(substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
+  (("gswin32c") "gs"
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/ps2eps"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/ps2eps"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs (list perl))
+(propagated-inputs '())
+(home-page (package-home-page texlive-ps2eps))
+(synopsis "Binaries for @code{texlive-ps2eps}")
+(description
+ "This package provides the binaries for @code{texlive-ps2eps}.")
+(license (package-license texlive-ps2eps
+
 (define-public texlive-ps2pk
   (package
+(inherit texlive-bin)
 (name "texlive-ps2pk")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/mag.1"
-   "doc/man/man1/mag.man1.pdf"
-   "doc/man/man1/pfb2pfa.1"
-   "doc/man/man1/pfb2pfa.man1.pdf"
-   "doc/man/man1/pk2bm.1"
-   

62/137: gnu: Add texlive-xpdfopen-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 8412d7b86fd1dce00be37a715b3e4bb0f21952a9
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 18:22:12 2024 +0200

gnu: Add texlive-xpdfopen-bin.

* gnu/packages/tex.scm (texlive-xpdfopen-bin): New variable.
(texlive-xpdfopen)[propagated-inputs]: Add TEXLIVE-XPDFOPEN-BIN.

Change-Id: I1dc9aced9c0a601be60e60157deb36a752bea6f9
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index aa3dc5a7db..f52e148ee9 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -47217,6 +47217,7 @@ integer (given as a string) as a Cistercian numeral.")
   "130wvaypfrg9sav0pdcdy1g10fll8pqcsqsy70fxlzzr937glsh1")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-xpdfopen-bin))
 (home-page "https://ctan.org/pkg/xpdfopen;)
 (synopsis "Commands to control PDF readers, under X11")
 (description
@@ -47226,6 +47227,52 @@ command line or from within a (shell) script.  The 
programs work with
 @command{xpdf} and @command{evince}.")
 (license license:public-domain)))
 
+(define-public texlive-xpdfopen-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-xpdfopen-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("xpdfopen"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-xpdfopen" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/xpdfopen"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/xpdfopen"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list libxt))
+(propagated-inputs '())
+(home-page (package-home-page texlive-xpdfopen))
+(synopsis "Binaries for @code{texlive-xpdfopen}")
+(description
+ "This package provides the binaries for @code{texlive-xpdfopen}.")
+(license (package-license texlive-xpdfopen
+
 (define-public texlive-xpicture
   (package
 (name "texlive-xpicture")



95/137: gnu: texlive-scripts: Add missing file name for checkout.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 63b1871624340fb1630f97367dcf4d3874c9a1c5
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 12:16:16 2024 +0200

gnu: texlive-scripts: Add missing file name for checkout.

* gnu/packages/tex.scm (texlive-scripts)[source]: Add FILE-NAME 
field.  Also
move REVISION field as in other packages.

Change-Id: I44340d838b7802bdf7262accd0807adef3246749
---
 gnu/packages/tex.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6eed65d0a6..72788b021b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -378,6 +378,7 @@ of user-specified directories similar to how shells look up 
executables.")
   (uri (svn-multi-reference
 (url (string-append %texlive-repository
 "tags/texlive-" version "/Master/"))
+(revision 66594)
 (locations
  (list "texmf-dist/doc/man/man1/fmtutil-sys.1"
"texmf-dist/doc/man/man1/fmtutil-sys.man1.pdf"
@@ -432,8 +433,8 @@ of user-specified directories similar to how shells look up 
executables.")
"tlpkg/installer/config.guess"
"tlpkg/installer/curl/curl-ca-bundle.crt"
"tlpkg/TeXLive/"
-   "tlpkg/texlive.tlpdb"))
-(revision 66594)))
+   "tlpkg/texlive.tlpdb"
+  (file-name (git-file-name name version))
   (sha256
"0sqbg5kjpzkpm1fq2c9hpf4f21bvjs3xas944dlbqp44lsqhcmsk")))
 (outputs '("out" "doc"))



72/137: gnu: texlive-xindy: Build binary separately.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit b481d8ff708773d2b2300650181ab78c4cc57d34
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 22:07:11 2024 +0200

gnu: texlive-xindy: Build binary separately.

* gnu/packages/tex.scm (texlive-xindy-bin): New variable.
(texlive-xindy): Use source from TEXLIVE-ORIGIN and make it a regular TeX
Live package.
[arguments]: Remove it.
[propagated-inputs]: Add TEXLIVE-XINDY-BIN.

Change-Id: I589b192dcd8fb35deab5d4017c411001a4d05dda
---
 gnu/packages/tex.scm | 64 +++-
 1 file changed, 43 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2de017714f..58a340187d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -73329,12 +73329,38 @@ handle complex tests.")
 
 (define-public texlive-xindy
   (package
-;; Texmf tree in TeX Live is incomplete, as it doesn't include
-;; "xindy.mem", so it is not possible to use `texlive-origin'.  This file
-;; isn't build by default by `texlive-bin' either.  Build it specially
-;; from TEXLIVE-SOURCE instead.
-(inherit texlive-bin)
 (name "texlive-xindy")
+(version (number->string %texlive-revision))
+(source
+ (texlive-origin name version
+ (list "doc/man/man1/tex2xindy.1"
+   "doc/man/man1/tex2xindy.man1.pdf"
+   "doc/man/man1/texindy.1"
+   "doc/man/man1/texindy.man1.pdf"
+   "doc/man/man1/xindy.1"
+   "doc/man/man1/xindy.man1.pdf"
+   "doc/xindy/"
+   "scripts/xindy/"
+   "xindy/")
+ (base32
+  "12j2bi0wwp1hyxr1427hhigqmhsd1fyg90bvghxkm1qck85r24vf")))
+(outputs '("out" "doc"))
+(build-system texlive-build-system)
+(propagated-inputs (list texlive-xindy-bin))
+(home-page "https://ctan.org/pkg/xindy;)
+(synopsis "General-purpose index processor")
+(description
+ "Xindy was developed after an impasse had been encountered in the attempt
+to complete internationalisation of @command{makeindex}.  Xindy can be used to
+process indexes for documents marked up using (La)TeX, Nroff family and
+SGML-based languages.  Xindy is highly configurable, both in markup terms and
+in terms of the collating order of the text being processed.")
+(license license:gpl2+)))
+
+(define-public texlive-xindy-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-xindy-bin")
 (source
  (origin
(inherit texlive-source)
@@ -73357,16 +73383,16 @@ handle complex tests.")
  (substitute-keyword-arguments (package-arguments texlive-bin)
((#:configure-flags flags)
 #~(cons "--enable-xindy" (delete "--enable-web2c" #$flags)))
-   ((#:phases _)
-#~(modify-phases %standard-phases
-;; Building documentation require to generate font metrics, but
-;; HOME and therefore TEXMFVAR are unavailable.  Use a local
-;; TEXMFVAR instead.
+   ((#:phases phases)
+#~(modify-phases #$phases
 (add-before 'build 'set-texmfvar
+  ;; Building documentation require to generate font metrics, but
+  ;; HOME and therefore TEXMFVAR are unavailable.  Use a local
+  ;; TEXMFVAR instead.
   (lambda _
 (setenv "TEXMFVAR" (string-append (getcwd) "/texmf-var"
-;; XXX: Install process does not create this directory.
 (add-before 'install 'create-missing-directory
+  ;; XXX: Install process does not create this directory.
   (lambda _
 (mkdir-p (string-append #$output "/bin"
 (add-after 'install 'patch-clisp-location
@@ -73378,23 +73404,19 @@ handle complex tests.")
  (format #f "our $clisp = ~s;~%"
  (search-input-file inputs "/bin/clisp")))
 (native-inputs
- (list clisp
-   (texlive-updmap.cfg
+ (list (texlive-updmap.cfg
 (list texlive-cbfonts-fd
   texlive-cyrillic
   texlive-greek-fontenc
   texlive-lh
 (inputs (list clisp perl))
+(propagated-inputs '())
 (native-search-paths '())
-(home-page "https://ctan.org/pkg/xindy;)
-(synopsis "General-purpose index processor")
+(home-page (package-home-page texlive-xindy))
+(synopsis "Binary for @code{texlive-xindy}")
 (description
- "Xindy was developed after an impasse had been encountered in the attempt
-to complete internationalisation of @command{makeindex}.  Xindy can be used to
-process indexes for documents marked up using (La)TeX, Nroff family and
-SGML-based languages.  Xindy is highly configurable, both in markup terms and
-in terms of the collating 

85/137: guix: import texlive: Factorize package inputs listing.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 820f3c5e6cebea097641fcaf1c77067b89361fc8
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 16 20:30:32 2024 +0200

guix: import texlive: Factorize package inputs listing.

* guix/import/texlive.scm (list-upstream-inputs):
(upstream-inputs->texlive-inputs): New functions.
(tlpdb->package): Use new functions.

Use  record to store associated inputs.

Change-Id: I70d42d291347feaade36eef83a04218fb100aae9
---
 guix/import/texlive.scm | 122 
 1 file changed, 81 insertions(+), 41 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 7cf8d41cc4..0e0369a416 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -30,6 +30,7 @@
   #:use-module (guix serialization)
   #:use-module (guix store)
   #:use-module (guix svn-download)
+  #:use-module (guix upstream)
   #:use-module (ice-9 ftw)
   #:use-module (ice-9 match)
   #:use-module (ice-9 rdelim)
@@ -345,6 +346,79 @@ extensions, and files without extension."
 (reverse scripts)))
   '()))
 
+(define (list-upstream-inputs upstream-name)
+  "Return the list of  corresponding to all the dependencies
+of package with UPSTREAM-NAME."
+  (let* ((database (tlpdb))
+ (package-data (assoc-ref database upstream-name))
+ (scripts (list-linked-scripts upstream-name database)))
+(append
+ ;; Native inputs.
+ ;;
+ ;; Texlive build system generates font metrics whenever a font metrics
+ ;; file has the same base name as a Metafont file.  In this case, provide
+ ;; TEXLIVE-METAFONT.
+ (or (and-let* ((runfiles (assoc-ref package-data 'runfiles))
+(metrics
+ (filter-map (lambda (f)
+   (and (string-suffix? ".tfm" f)
+(basename f ".tfm")))
+ runfiles))
+((not (null? metrics)))
+((any (lambda (f)
+(and (string-suffix? ".mf" f)
+ (member (basename f ".mf") metrics)))
+  runfiles)))
+   (list (upstream-input
+  (name "metafont")
+  (downstream-name "texlive-metafont")
+  (type 'native
+ '())
+ ;; Regular inputs.
+ ;;
+ ;; Those may be required by scripts associated to the package.
+ (match (append-map (lambda (s)
+  (cond ((string-suffix? ".pl" s) '("perl"))
+((string-suffix? ".py" s) '("python"))
+((string-suffix? ".rb" s) '("ruby"))
+((string-suffix? ".tcl" s) '("tcl" "tk"))
+(else '(
+scripts)
+   (() '())
+   (inputs (map (lambda (input-name)
+  (upstream-input
+   (name input-name)
+   (downstream-name input-name)
+   (type 'regular)))
+(delete-duplicates inputs string=
+ ;; Propagated inputs.
+ ;;
+ ;; Return the "depend" references given in the TeX Live database.  Also
+ ;; check if the package has associated binaries built from
+ ;; TEXLIVE-SOURCE.  In that case, add a Guix-specific NAME-bin propagated
+ ;; input.
+ (let ((binfiles (list-binfiles upstream-name database)))
+   (map (lambda (input-name)
+  (upstream-input
+   (name input-name)
+   (downstream-name (guix-name input-name))
+   (type 'propagated)))
+(sort (append
+   (filter-depends (or (assoc-ref package-data 'depend) '()))
+   ;; Check if propagation of binaries is necessary.  It
+   ;; happens when binfiles outnumber the scripts, if any.
+   (if (and (> (length binfiles) (length scripts))
+(not (member upstream-name
+ no-bin-propagation-packages)))
+   (list (string-append upstream-name "-bin"))
+   '()))
+  stringtexlive-inputs upstream-inputs type)
+  (map (compose string->symbol upstream-input-downstream-name)
+   (filter (upstream-input-type-predicate type)
+   upstream-inputs)))
+
 (define (files->locations files)
   (define (trim-filename entry)
 (string-join (drop-right (string-split entry #\/) 1) "/" 'suffix))
@@ -392,19 +466,7 @@ extensions, and files without extension."
(download-multi-svn-to-store
 store ref (string-append name 
"-svn-multi-checkout")
 (let* ((scripts (list-linked-scripts texlive-name package-database))
-   (propagated-inputs
-(let 

58/137: gnu: Add texlive-seetexk-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 02b5f3229958b21b776c9937bfba3e949bae500f
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 16:24:10 2024 +0200

gnu: Add texlive-seetexk-bin.

* gnu/packages/tex.scm (texlive-seetexk-bin): New variable.
(texlive-seetexk)[propagated-inputs]: Add TEXLIVE-SEETEXK-BIN.

Change-Id: I6ea1f8cd3100267cf3ba8593f49370f7739d40f2
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 808d8aa1d3..a875f1e526 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -40636,6 +40636,7 @@ stylized format that Metapost outputs.")
   "1bhv5xgv8jpam5apdybd0cggnvcizk2r6zs7lim1hmhzafpqqlcx")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-seetexk-bin))
 (home-page "https://ctan.org/pkg/dvibook;)
 (synopsis "Utilities for manipulating DVI files")
 (description
@@ -40661,6 +40662,52 @@ SeeTeX project.
 @end itemize")
 (license license:expat)))
 
+(define-public texlive-seetexk-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-seetexk-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("seetexk"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-seetexk" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/seetexk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/seetexk"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-seetexk))
+(synopsis "Binary for @code{texlive-seetexk}")
+(description
+ "This package provides the binary for @code{texlive-seetexk}.")
+(license (package-license texlive-seetexk
+
 (define-public texlive-spix
   (package
 (name "texlive-spix")



64/137: gnu: Add texlive-xml2pmx-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 4be493081437a904f79770e3afa7bdb78c75a068
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 18:26:02 2024 +0200

gnu: Add texlive-xml2pmx-bin.

* gnu/packages/tex.scm (texlive-xml2pmx-bin): New variable.
(texlive-xml2pmx)[propagated-inputs]: Add TEXLIVE-XML2PMX-BIN.

Change-Id: I112c29945b0643374cced1eb24d598d2cd2259ea
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index d00744b0b0..ec55863775 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -48742,6 +48742,7 @@ correctly; and define two extra commands: 
@code{\\vfrac} and
   "1d3ralqh0b71scd59b4hmm707yfrz1rj28ni2lzkhbb1ql73bvah")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-xml2pmx-bin))
 (home-page "https://ctan.org/pkg/xml2pmx;)
 (synopsis "Convert MusicXML to PMX and MusiXTeX")
 (description
@@ -48749,6 +48750,52 @@ correctly; and define two extra commands: 
@code{\\vfrac} and
 MusiXTeX processing.")
 (license license:gpl3+)))
 
+(define-public texlive-xml2pmx-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-xml2pmx-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("xml2pmx"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-xml2pmx" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/xml2pmx"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/xml2pmx"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '())
+(propagated-inputs '())
+(home-page (package-home-page texlive-xml2pmx))
+(synopsis "Binary for @code{texlive-xml2pmx}")
+(description
+ "This package provides the binary for @code{texlive-xml2pmx}.")
+(license (package-license texlive-xml2pmx
+
 (define-public texlive-xmltexconfig
   (package
 (name "texlive-xmltexconfig")



53/137: gnu: Add texlive-dviljk-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 2dd37d01cb514df12278c0e2078af88cd7859acd
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 15:59:06 2024 +0200

gnu: Add texlive-dviljk-bin.

* gnu/packages/tex.scm (texlive-dviljk-bin): New variable.
(texlive-dviljk)[propagated-inputs]: Add TEXLIVE-DVILJK-BIN.

Change-Id: I204c06b42175150eec618ed58a1f4e46d6aeb9c5
---
 gnu/packages/tex.scm | 95 ++--
 1 file changed, 84 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 845dcfc655..6973fd1626 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34923,6 +34923,7 @@ file.  It also supports XeTeX XDV format.")
   "03pi78c8ghy2gghzk1ffrvf5x7h8c1r0pv5pcspwxz365x2rsbjw")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-dviljk-bin))
 (home-page "https://ctan.org/pkg/dviljk;)
 (synopsis "DVI to Laserjet output")
 (description
@@ -34930,20 +34931,92 @@ file.  It also supports XeTeX XDV format.")
 @command{kpathsea} recursive file searching.")
 (license license:gpl3+)))
 
+(define-public texlive-dviljk-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-dviljk-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dviljk"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-dviljk" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dviljk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dviljk"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-dviljk))
+(synopsis "Binary for @code{texlive-dviljk}")
+(description
+ "This package provides the binary for @code{texlive-dviljk}.")
+(license (package-license texlive-dviljk
+
 (define-public texlive-dviout-util
   (package
+(inherit texlive-bin)
 (name "texlive-dviout-util")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/chkdvifont.1"
-   "doc/man/man1/chkdvifont.man1.pdf"
-   "doc/man/man1/dvispc.1"
-   "doc/man/man1/dvispc.man1.pdf")
- (base32
-  "098pksgf2iamq96rmzg5fw7i9dlpvdksficsz1bf8k8z4djnbk8n")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dviout-util" "tests"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--enable-dviout-util" (delete "--enable-web2c" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dviout-util"
+(invoke "make" "check")
+(replace 'install
+ 

107/137: gnu: texlive-cluttex: Add "cllualatex" and "clxelatex" symlinks.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 3454ec672bbefb6ea9ddf00f1fb6ba1ea69e5ea4
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 00:22:45 2024 +0200

gnu: texlive-cluttex: Add "cllualatex" and "clxelatex" symlinks.

* gnu/packages/tex.scm (texlive-cluttex)[arguments]<#:phases>: Add missing 
symlinks.

Change-Id: I3b756d91c87259e8f1e20a06c038653d49dff54d
---
 gnu/packages/tex.scm | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 9015978c6d..b0dc794101 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -41152,7 +41152,15 @@ chunk of code.")
 "06i59jxanssx0hngnzkvmigg4gh0szm8n11095wlpdqrma1d162c"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:link-scripts #~(list "cluttex.lua")))
+(arguments
+ (list #:link-scripts #~(list "cluttex.lua")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'link-scripts 'add-symlink
+ (lambda _
+   (with-directory-excursion (string-append #$output "/bin")
+ (for-each (lambda (link) (symlink "cluttex" link))
+   '("cllualatex" "clxelatex"
 (home-page "https://ctan.org/pkg/cluttex;)
 (synopsis "Automation tool for running LaTeX")
 (description



79/137: gnu: python-sphinx: Fix build.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 88e700841d0c85e5c6d92bd9a25f02da02ed6c0c
Author: Nicolas Goaziou 
AuthorDate: Wed Jun 12 21:46:13 2024 +0200

gnu: python-sphinx: Fix build.

* gnu/packages/sphinx.scm (python-sphinx)[propagated-inputs]: Add
TEXLIVE-SCHEME-BASIC in order to propagate an autonomous TeX Live tree.  
Also
add TEXLIVE-ANYFONTSIZE, TEXLIVE-CM-SUPER, TEXLIVE-FONTSPEC, 
TEXLIVE-LUATEX85,
TEXLIVE-LUATEXBASE, TEXLIVE-POLYGLOSSIA and TEXLIVE-TEX-GYRE.  Remove
TEXLIVE-AMSFONTS, TEXLIVE-AMSMATH, TEXLIVE-CARLISLE, TEXLIVE-FANCYHDR,
TEXLILVE-GEOMETRY, TEXLIVE-HYPERREF, TEXLIVE-KVOPTIONS, TEXLIVE-LATEX-BIN,
TEXLIVE-LTXCMDS, TEXLIVE-OBERDIEK and TEXLIVE-TOOLS, all included in
TEXLIVE-SCHEME-BASIC.
[native-inputs]: Add FONTCONFIG, FONT-GNU-FREEFONT, TEXLIVE-CM-SUPER, and
TEXLIVE-TEX-GYRE.  Also call TEXLIVE-UPMAP.CFG to generate proper font maps
during tests.

Change-Id: Ifc5c5eb37ea6568c5a602ddff66dc8a92a1a6072
---
 gnu/packages/sphinx.scm | 29 -
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index e280c06f2b..9b0cbdc584 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -47,6 +47,8 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages fonts)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
@@ -107,38 +109,39 @@
 
;; The Sphinx LaTeX library '\RequirePackage' or \\usepackage
;; these:
-   texlive-amsfonts ;amsmath, amssymb, amstext
-   texlive-amsmath
+   texlive-scheme-basic ;for a valid TeX Live tree
+   texlive-anyfontsize
texlive-capt-of
-   texlive-carlisle ;remreset
+   texlive-cm-super
texlive-cmap
texlive-etoolbox
-   texlive-fancyhdr
texlive-fancyvrb
texlive-float
texlive-fncychap
+   texlive-fontspec
texlive-framed
-   texlive-geometry
-   texlive-hyperref
-   texlive-kvoptions
-   texlive-latex-bin
-   texlive-ltxcmds
+   texlive-luatex85
+   texlive-luatexbase
texlive-needspace
-   texlive-oberdiek ;hypcap
texlive-parskip
+   texlive-polyglossia
texlive-preview
texlive-tabulary
+   texlive-tex-gyre
texlive-titlesec
-   texlive-tools;multicol, longtable
texlive-upquote
texlive-varwidth
texlive-wrapfig
texlive-xcolor))
 (native-inputs
- (list imagemagick  ;for "convert"
+ (list fontconfig
+   font-gnu-freefont
+   imagemagick  ;for "convert"
python-cython
python-html5lib
-   python-pytest))
+   python-pytest
+   (texlive-updmap.cfg
+(list texlive-cm-super texlive-tex-gyre
 (home-page "https://www.sphinx-doc.org;)
 (synopsis "Python documentation generator")
 (description "Sphinx is a tool that makes it easy to create documentation



27/137: gnu: Add texlive-hitex-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 4cdc002b67530401411af2975403518ead395625
Author: Nicolas Goaziou 
AuthorDate: Mon May 27 18:54:32 2024 +0200

gnu: Add texlive-hitex-bin.

* gnu/packages/tex.scm (texlive-hitex-bin): New variable.
(texlive-hitex)[propagated-inputs]: Add TEXLIVE-HITEX-BIN.

Change-Id: I1d116623970d60261b366c5c48e05b2dcf53fbde
---
 gnu/packages/tex.scm | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index a102770697..a3c00c2daa 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -16773,6 +16773,7 @@ Indian Type Foundry, with support for LaTeX and 
pdfLaTeX.")
texlive-etex
texlive-everyshi
texlive-firstaid
+   texlive-hitex-bin
texlive-hyphen-base
texlive-knuth-lib
texlive-l3backend
@@ -16799,6 +16800,35 @@ TeX to format a document for nearly-arbitrary values 
of @code{\\hsize} and
 @code{\\vsize}.")
 (license license:x11)))
 
+(define-public texlive-hitex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-hitex-bin")
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-web2c"
+ "--enable-hitex"
+ (delete "--disable-hitex"
+ (delete "--enable-web2c" #$flags
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/web2c"
+  (let ((bin (string-append #$output "/bin"))
+(files '("hishrink" "histretch" "hitex")))
+(for-each (lambda (f) (invoke "make" f)) files)
+(for-each (lambda (f) (install-file f bin)) files)
+(with-directory-excursion bin
+  (symlink "hitex" "hilatex"))
+(native-inputs (list pkg-config))
+(home-page (package-home-page texlive-hitex))
+(synopsis "Binaries for @code{texlive-hitex}")
+(description
+ "This package provides the binaries for @code{texlive-hitex}.")
+(license (package-license texlive-hitex
+
 (define-public texlive-hitszbeamer
   (package
 (name "texlive-hitszbeamer")



91/137: gnu: texlive-scripts: Fix typo in description.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 81047016519b7aca624cf41a35d8a306ac88c208
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 09:00:51 2024 +0200

gnu: texlive-scripts: Fix typo in description.

* gnu/packages/tex.scm (texlive-scripts)[description]: Fix typo.

Change-Id: I6a495a44f65549d0250f179c75c231b665b006b2
---
 gnu/packages/tex.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 3c33988e08..fa7428f820 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -507,7 +507,7 @@ of user-specified directories similar to how shells look up 
executables.")
 (synopsis "TeX Live infrastructure programs")
 (description
  "This package provides core TeX Live scripts such as @code{updmap},
-@code{fmtutil}, and @code{tlmgr}.  It is is automatically installed alongside
+@code{fmtutil}, and @code{tlmgr}.  It is automatically installed alongside
 @code{texlive-bin}.")
 (license (license:fsf-free "https://www.tug.org/texlive/copying.html;
 



118/137: gnu: texlive-r-und-s: Specify upstream name.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 66a5e132b1eab705ace950b7bba63e3df5f11fcc
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 11:06:20 2024 +0200

gnu: texlive-r-und-s: Specify upstream name.

* gnu/packages/tex.scm (texlive-r-und-s)[properties]: Add UPSTREAM-NAME 
property.

Change-Id: Ifc479d127150ba5f79bf86efe8b8ea4147c711f8
---
 gnu/packages/tex.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6d11f01dc7..bc282c75c0 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -52768,6 +52768,7 @@ Currently the template is only designed for Chinese 
typesetting.")
(base32
 "15w8sggvlh28567y1d4vpbq8and12hvhphfvd7vabbn8g1l6h1yi"
 (outputs '("out" "doc"))
+(properties '((upstream-name . "r_und_s")))
 (build-system texlive-build-system)
 (home-page "https://ctan.org/pkg/r-und-s;)
 (synopsis "Chemical hazard codes")



71/137: gnu: texlive-axodraw2: Build binary separately.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 0520b90d154d3c32a734bb881f0d368c1337477f
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 21:55:12 2024 +0200

gnu: texlive-axodraw2: Build binary separately.

* gnu/packages/tex.scm (texlive-axodraw2-bin): New variable.
(texlive-axodraw2): Use source from TEXLIVE-SOURCE and make it a regular TeX
Live package.
[arguments]: Remove it.
[inputs]: Remove OPENLIBM.
[propagated-inputs]: Add TEXLIVE-AXODRAW2-BIN.

Change-Id: I119617e48ef419e4e09887002a29a591eaa27e9e
---
 gnu/packages/tex.scm | 74 ++--
 1 file changed, 48 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e00192abed..2de017714f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -4263,7 +4263,6 @@ other parts.")
  "This package provides binaries for @code{texlive-autosp}.")
 (license (package-license texlive-autosp
 
-
 (define-public texlive-axodraw2
   (package
 (name "texlive-axodraw2")
@@ -4279,31 +4278,7 @@ other parts.")
   "0x1cskdm3kmf08gdrvgasd1b3l0dri9mdmk13880dz4g2rdgbvi2")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments
- (list
-  #:tests? #true
-  #:phases
-  #~(modify-phases %standard-phases
-  (add-after 'unpack 'build-axohelp
-(lambda* (#:key tests? #:allow-other-keys)
-  (with-directory-excursion "source/latex/axodraw2"
-;; Autoreconf.
-(invoke "autoreconf" "-vfi")
-;; Configure.
-(let ((sh (which "sh")))
-  (setenv "CONFIG_SHELL" sh)
-  (setenv "SHELL" sh)
-  (invoke sh "configure" (string-append "--prefix=" #$output)))
-;; Build.
-(invoke "make")
-;; Tests.
-(when tests?
-  (patch-shebang "axohelp.test") ;Bash script
-  (invoke "make" "check"))
-;; Install.
-(invoke "make" "install")))
-(native-inputs (list autoconf automake pkg-config))
-(inputs (list openlibm))
+(propagated-inputs (list texlive-axodraw2-bin))
 (home-page "https://ctan.org/pkg/axodraw2;)
 (synopsis "Feynman diagrams in a LaTeX document")
 (description
@@ -4321,6 +4296,53 @@ the pdf code inserted in the output file.  The 
processing involves a run of
 @command{pdflatex}.")
 (license license:gpl3+)))
 
+(define-public texlive-axodraw2-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-axodraw2-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("axodraw2"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-axodraw2" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/axodraw2"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/axodraw2"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '())
+(propagated-inputs '())
+(home-page (package-home-page texlive-axodraw2))
+(synopsis "Binary for @code{texlive-axodraw2}")
+(description
+ "This package provides the binary for @code{texlive-axodraw2}.")
+(license (package-license texlive-axodraw2
+
 (define-public texlive-b1encoding
   (package
 (name "texlive-b1encoding")



131/137: gnu: texlive-texsis: Create missing symlink.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit b05a1dd607abadd1b61b4e721f89f90dcce3745c
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 23 11:25:38 2024 +0200

gnu: texlive-texsis: Create missing symlink.

* gnu/packages/tex.scm (texlive-texsis)[arguments]<#:phases>: Create missing
symlink.

Change-Id: Iad8dc76aa53f6794aef3e282bd3de136deab3511
---
 gnu/packages/tex.scm | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index fb84840ea4..b07d39a5a5 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -36414,7 +36414,17 @@ produces.")
 "1vdywyg03ab5w50370ml8hwiidim2sy7hhygmz917rnhsnm87lnv"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:create-formats #~(list "texsis")))
+(arguments
+ (list #:create-formats #~(list "texsis")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'symlink-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+   (let ((pdftex (search-input-file inputs "bin/pdftex"))
+ (bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+   (symlink pdftex "texsis"
 (propagated-inputs
  (list texlive-cm
texlive-hyphen-base



97/137: guix: import texlive: Reduce friction when updating.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit d5e4ca148eaf64fb501e3be5024ab156ea379137
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 20:13:44 2024 +0200

guix: import texlive: Reduce friction when updating.

* guix/import/texlive.scm (no-bin-propagation-packages): Add more false
positives that do not need to propagate binaries.
(list-linked-scripts): Recognize ".sco" extension.
(list-upstream-inputs): Special case TEXLIVE-KPATHSEA, which should 
propagate
TEXLIVE-LIBKPATHSEA, not TEXLIVE-KPATHSEA-BIN.
(texlive->svn-multi-reference):
(tlpdb->package): Special case URL for TEXLIVE-SCRIPTS.

Change-Id: Ib0954b42a4664184ab006b4c6ec9bdacd48c1646
---
 guix/import/texlive.scm | 89 -
 1 file changed, 66 insertions(+), 23 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 5aae1c3d49..eb6262e140 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -73,22 +73,53 @@
 "tex/generic/hyphen/"
 "web2c/"))
 
-;; The following packages should propagate their binaries according to the TeX
-;; Live database, but won't because said binaries are already provided by
-;; "texlive-bin".  As a consequence, the importer does not make them propagate
-;; their "-bin" counterpart.
+;; The following packages do not have any auxiliary "-bin" package to
+;; propagate, even if they do have a corresponding ".ARCH" entry in the TeX
+;; Live package database.  They fall into 3 categories:
+;;
+;; 1. Associated entries in NAME.ARCH are already provided by TEXLIVE-BIN.
+;;
+;; 2. Associated entries in NAME.ARCH are symlinks to binaries provided by
+;; TEXLIVE-BIN.
+;;
+;; 3. They fool the (naive) algorithm for "-bin" propagation and generate
+;; false positives.  This generally happens when the package creates multiple
+;; symlinks to a script it bundles.
 (define no-bin-propagation-packages
-  (list "cweb"
-"latex-bin"
-"luahbtex"
-"luatex"
-"metafont"
-"pdftex"
-"pdftosrc"
-"synctex"
-"tex"
-"tie"
-"web"))
+  (list
+   ;; Category 1.
+   "ctie"
+   "cweb"
+   "luahbtex"
+   "luatex"
+   "metafont"
+   "pdftex"
+   "pdftosrc"
+   "synctex"
+   "tex"
+   "tie"
+   "web"
+   ;; Category 2.
+   "amstex"
+   "csplain"
+   "eplain"
+   "jadetex"
+   "latex-bin"
+   "lollipop"
+   "mex"
+   "mltex"
+   "optex"
+   "platex"
+   "uplatex"
+   "texsis"
+   "xmltex"
+   ;; Category 3.
+   "biber"
+   "context"
+   "cluttex"
+   "esptopdf"
+   "pdfcrop"
+   "texdef"))
 
 ;; Guix introduces two specific packages based on TEXLIVE-BUILD-SYSTEM.  Add
 ;; an entry for them in the package database, so they can be imported, and
@@ -468,8 +499,8 @@ association list."
 (define (list-linked-scripts name package-database)
   "Return a list of script names to symlink from \"bin/\" directory for
 package NAME according to PACKAGE-DATABASE.  Consider as scripts files with
-\".lua\", \".pl\", \".py\", \".rb\", \".sh\", \".tcl\", \".texlua\", \".tlu\"
-extensions, and files without extension."
+\".lua\", \".pl\", \".py\", \".rb\", \".sh\", \".sno\", \".tcl\", \".texlua\",
+\".tlu\" extensions, and files without extension."
   (or (and-let* ((data (assoc-ref package-database name))
  ;; List scripts candidates.  Bail out if there are none.
  (runfiles (assoc-ref data 'runfiles))
@@ -480,8 +511,8 @@ extensions, and files without extension."
 (filter-map (lambda (script)
   (and (any (lambda (ext)
   (member (basename script ext) binfiles))
-'(".lua" ".pl" ".py" ".rb" ".sh" ".tcl" 
".texlua"
-  ".tlu"))
+'(".lua" ".pl" ".py" ".rb" ".sh" ".sno" ".tcl"
+  ".texlua" ".tlu"))
(basename script)))
 ;; Get the right (alphabetic) order.
 (reverse scripts)))
@@ -550,7 +581,11 @@ of package with UPSTREAM-NAME in VERSION."
(if (and (> (length binfiles) (length scripts))
 (not (member upstream-name
  no-bin-propagation-packages)))
-   (list (string-append upstream-name "-bin"))
+   ;; LIBKPATHSEA contains the executables for KPATHSEA.
+   ;; There is no KPATHSEA-BIN.
+   (list (if (equal? upstream-name "kpathsea")
+ "libkpathsea"
+ (string-append upstream-name "-bin")))
'()))
   stringlocations
;; Ignore any file not starting with the expected prefix, such
@@ -600,7 +636,10 @@ at VERSION."
(string-drop file (string-length "texmf-dist/"
  

106/137: gnu: texlive-pdfcrop. Add "rpdfcrop" symlink.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 12ba9e5f1ff0c8c465faf8153757980521bd8e1a
Author: Nicolas Goaziou 
AuthorDate: Sat Jun 22 00:20:01 2024 +0200

gnu: texlive-pdfcrop. Add "rpdfcrop" symlink.

* gnu/packages/tex.scm (texlive-pdfcrop)[arguments]<#:phases>: Add missing
"rpdfcrop" link.

Change-Id: I498222565c8f63a678c4c6f2548f962e6365cedd
---
 gnu/packages/tex.scm | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 3b0ebf8805..9015978c6d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -48695,7 +48695,14 @@ occurs.")
 "0wb67hsfasxvl1b484hyxvghhm9nkxwgs6m8ygzshr0m874hsl01"
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:link-scripts #~(list "pdfcrop.pl")))
+(arguments
+ (list #:link-scripts #~(list "pdfcrop.pl")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'link-scripts 'add-symlink
+ (lambda _
+   (with-directory-excursion (string-append #$output "/bin")
+ (symlink "pdfcrop" "rpdfcrop")))
 (inputs (list perl))
 (home-page "https://ctan.org/pkg/pdfcrop;)
 (synopsis "Crop PDF graphics")



50/137: gnu: Add texlive-dtl-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 8aea609d83dc476e18e294c57dabf4b028cd8f62
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 15:37:22 2024 +0200

gnu: Add texlive-dtl-bin.

* gnu/packages/tex.scm (texlive-dtl-bin): New variable.
(texlive-dtl)[propagated-inputs]: Add TEXLIVE-DTL-BIN.

Change-Id: I27ea9d82451f96f3548f6556e9260736c96137c9
---
 gnu/packages/tex.scm | 48 
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 24fd0659bf..1698904b35 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34577,6 +34577,7 @@ information on creating packages and documentation.")
   "0kvnsr8nxrys99rp74wlxnisfripx6jpjjkqy38d3d4gw13cvb5g")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-dtl-bin))
 (home-page "https://ctan.org/pkg/dtl;)
 (synopsis "Tools to dis-assemble and re-assemble DVI files")
 (description
@@ -34586,6 +34587,53 @@ which is readily readable by humans.  The DTL bundle 
contains an assembler
 @command{dv2dt}, which produces DTL files from DVI files.")
 (license license:public-domain)))
 
+(define-public texlive-dtl-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-dtl-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dtl"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-dtl" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dtl"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dtl"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-dtl))
+(synopsis "Binaries for @code{texlive-dtl}")
+(description
+ "This package provides the binaries for @code{texlive-dtl}.")
+(license (package-license texlive-dtl
+
 (define-public texlive-dtxgen
   (package
 (name "texlive-dtxgen")



89/137: gnu: TeX Live packages built from TEXLIVE-SOURCE use same version.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit b3d77446973d0ab025f16fb592560c390555a19b
Author: Nicolas Goaziou 
AuthorDate: Mon Jun 17 13:18:35 2024 +0200

gnu: TeX Live packages built from TEXLIVE-SOURCE use same version.

* gnu/packages/tex.scm (%texlive-version): New variable.
(texlive-source):
(texlive-libkpathsea)[version]:
(texlive-libptexenc)[version]:
(texlive-bin)[version]:
(texlive-scheme-basic)[version]:
(texlive-scheme-bookpub)[version]:
(texlive-scheme-context)[version]:
(texlive-scheme-full)[version]:
(texlive-scheme-gust)[version]:
(texlive-scheme-medium)[version]:
(texlive-scheme-minimal)[version]:
(texlive-scheme-small)[version]:
(texlive-scheme-tetex)[version]:
(texlive-collection-basic)[version]:
(texlive-collection-bibtexextra)[version]:
(texlive-collection-binextra)[version]:
(texlive-collection-context)[version]:
(texlive-collection-fontsextra)[version]:
(texlive-collection-fontsrecommended)[version]:
(texlive-collection-fontutils)[version]:
(texlive-collection-formatsextra)[version]:
(texlive-collection-games)[version]:
(texlive-collection-humanities)[version]:
(texlive-collection-langarabic)[version]:
(texlive-collection-langchinese)[version]:
(texlive-collection-langcjk)[version]:
(texlive-collection-langcyrillic)[version]:
(texlive-collection-langczechslovak)[version]:
(texlive-collection-langenglish)[version]:
(texlive-collection-langeuropean)[version]:
(texlive-collection-langfrench)[version]:
(texlive-collection-langgerman)[version]:
(texlive-collection-langgreek)[version]:
(texlive-collection-langitalian)[version]:
(texlive-collection-langjapanese)[version]:
(texlive-collection-langkorean)[version]:
(texlive-collection-langother)[version]:
(texlive-collection-langpolish)[version]:
(texlive-collection-langportuguese)[version]:
(texlive-collection-langspanish)[version]:
(texlive-collection-latex)[version]:
(texlive-collection-latexextra)[version]:
(texlive-collection-latexrecommended)[version]:
(texlive-collection-luatex)[version]:
(texlive-collection-mathscience)[version]:
(texlive-collection-metapost)[version]:
(texlive-collection-music)[version]:
(texlive-collection-pictures)[version]:
(texlive-collection-plaingeneric)[version]:
(texlive-collection-pstricks)[version]:
(texlive-collection-publishers)[version]:
(texlive-collection-xetex)[version]: Use new variable.
* guix/import/texlive.scm (tlpdb->package): Always use version from
%TEXLIVE-VERSION.
* tests/texlive.scm ("texlive->guix-package, meta-package"): Test change to
importer.

Since meta-packages are empty, they are not going through an updater.  This
change makes sure they always refer to an up-to-date version when the rest 
of
TeX Live is updated.

Change-Id: I55445e3337c1dea22158103d9ed952f75c3c4964

texlive-source

Change-Id: I198a361fd6df3c5dd2b4fa376e1ad623937f08cc
---
 gnu/packages/tex.scm| 111 
 guix/import/texlive.scm |   2 +-
 tests/texlive.scm   |   2 +-
 3 files changed, 58 insertions(+), 57 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index d1ccb4c7c0..3c33988e08 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -194,14 +194,15 @@
   (define-deprecated/public old-name name
 (deprecated-package (symbol->string 'old-name) name)))
 
+(define %texlive-version "2023.0")
+
 (define texlive-source
   (origin
 (method svn-fetch)
 (uri (svn-reference
-  (url (string-append "svn://www.tug.org/texlive/tags/"
-  %texlive-tag "/Build/source/"))
+  (url "svn://www.tug.org/texlive/trunk/Build/source/")
   (revision %texlive-revision)))
-(file-name (string-append "texlive-source-" %texlive-tag "-checkout"))
+(file-name (git-file-name "texlive-source" %texlive-version))
 (sha256
  (base32
   "186q0r00zfd39wc9r56rvbxs8f1xix7hlrz62zj07c68a0fy76rd"
@@ -209,7 +210,7 @@
 (define-public texlive-libkpathsea
   (package
 (name "texlive-libkpathsea")
-(version "2023.0")
+(version %texlive-version)
 (source
  (origin
(inherit texlive-source)
@@ -310,7 +311,7 @@ of user-specified directories similar to how shells look up 
executables.")
 (define-public texlive-libptexenc
   (package
 (name "texlive-libptexenc")
-(version "2023.0")
+(version %texlive-version)
 (source
  (origin
(inherit texlive-source)
@@ -378,7 +379,7 @@ of user-specified directories similar to how shells look up 
executables.")
   (method svn-multi-fetch)
   (uri (svn-multi-reference
 (url (string-append "svn://www.tug.org/texlive/tags/"
-%texlive-tag 

47/137: gnu: Add texlive-cjkutils-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit a416960a6c0be8fdb93ac73d2d8c202ac90be67a
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 15:26:07 2024 +0200

gnu: Add texlive-cjkutils-bin.

* gnu/packages/tex.scm (texlive-cjkutils-bin): New variable.
(texlive-cjkutils)[propagated-inputs]: Add TEXLIVE-CJKUTILS-BIN.

Change-Id: I0790442c9295a00fdb7024d844a75dcac2f9ad3a
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6f18e29593..ef15853299 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -9445,6 +9445,7 @@ adjust locations and kerning of CJK punctuation marks.")
   "0by2g05xv5dndnd78jz9y73fyswqhfvcbzcw8rzhvpvd6inrcdq8")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-cjkutils-bin))
 (home-page "https://ctan.org/pkg/cjk;)
 (synopsis "CJK language support")
 (description
@@ -9457,6 +9458,52 @@ the above --- Cyrillic, Greek, Latin-based scripts, 
Russian and Vietnamese are
 supported.")
 (license license:gpl2)))
 
+(define-public texlive-cjkutils-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-cjkutils-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs/" '())
+(delete-other-directories "utils/" '())
+(delete-other-directories "texk/" '("cjkutils"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-cjkutils-x" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/cjkutils"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/cjkutils"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-cjkutils))
+(synopsis "Binaries for @code{texlive-cjkutils}")
+(description
+ "This package provides the binaries for @code{texlive-cjkutils}.")
+(license (package-license texlive-cjkutils
+
 (define-public texlive-clara
   (package
 (name "texlive-clara")



96/137: guix: import texlive: Adjust to generate new source format.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 90cbaa9ebb10f9fcb945e08fa6c7a454b9e761d1
Author: Nicolas Goaziou 
AuthorDate: Fri Jun 21 12:26:10 2024 +0200

guix: import texlive: Adjust to generate new source format.

* guix/import/texlive.scm (tlpdb->package): Adjust source according to new 
format.
* tests/texlive.scm (%fake-tlpdb): Add database revision.
("texlive->guix-package, no docfiles"):
("texlive->guix-package"):
("texlive->guix-package, with catalogue entry, no inputs"):
("texlive->guix-package, multiple licenses"):
("texlive->guix-package, with TeX format"): Update checks.

Change-Id: I60d5fe0f5f8db194c679dcb262f64c824cd19909
---
 guix/import/texlive.scm | 27 +--
 tests/texlive.scm   | 88 -
 2 files changed, 75 insertions(+), 40 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 109bfc07e9..5aae1c3d49 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -623,16 +623,23 @@ at VERSION."
`(package
   (name ,name)
   (version ,(if empty-package? '%texlive-version version))
-  (source ,(and (not meta-package?)
-`(texlive-origin
-  name version
-  (list ,@(svn-multi-reference-locations reference))
-  (base32
-   ,(bytevector->nix-base32-string
- (let-values (((port get-hash) (open-sha256-port)))
-   (write-file source port)
-   (force-output port)
-   (get-hash)))
+  (source
+   ,(and (not meta-package?)
+ `(origin
+(method svn-multi-fetch)
+(uri (svn-multi-reference
+  (url (texlive-packages-repository version))
+  (revision ,(svn-multi-reference-revision reference))
+  (locations
+   (list ,@(svn-multi-reference-locations 
reference)
+(file-name (git-file-name name version))
+(sha256
+ (base32
+  ,(bytevector->nix-base32-string
+(let-values (((port get-hash) (open-sha256-port)))
+  (write-file source port)
+  (force-output port)
+  (get-hash
   ,@(if (assoc-ref data 'docfiles)
 '((outputs '("out" "doc")))
 '())
diff --git a/tests/texlive.scm b/tests/texlive.scm
index 39f7a8f856..0e21c2e9b0 100644
--- a/tests/texlive.scm
+++ b/tests/texlive.scm
@@ -32,7 +32,8 @@
 (test-begin "texlive")
 
 (define %fake-tlpdb
-  '(("12many"
+  '((database-revision . 12345)
+("12many"
  . ((name
  . "12many")
 (catalogue
@@ -375,10 +376,15 @@ completely compatible with Plain TeX.")
 (('package
('name "texlive-example")
('version _)
-   ('source ('texlive-origin
- 'name 'version
- ('list "tex/latex/example/")
- ('base32 (? string? hash
+   ('source ('origin
+  ('method 'svn-multi-fetch)
+  ('uri ('svn-multi-reference
+ ('url ('texlive-packages-repository 'version))
+ ('revision 12345)
+ ('locations ('list "tex/latex/example/"
+  ('file-name ('git-file-name 'name 'version))
+  ('sha256
+   ('base32 (? string? hash)
('build-system 'texlive-build-system)
('home-page (? string?))
('synopsis (? string?))
@@ -409,15 +415,21 @@ completely compatible with Plain TeX.")
 (('package
('name "texlive-texsis")
('version _)
-   ('source ('texlive-origin
- 'name 'version
- ('list "bibtex/bst/texsis/"
-"doc/man/man1/texsis.1"
-"doc/man/man1/texsis.man1.pdf"
-"doc/otherformats/texsis/base/"
-"tex/texsis/base/"
-"tex/texsis/config/")
- ('base32 (? string? hash
+   ('source ('origin
+  ('method 'svn-multi-fetch)
+  ('uri ('svn-multi-reference
+ ('url ('texlive-packages-repository 'version))
+ ('revision 12345)
+ ('locations
+  

48/137: gnu: Add texlive-chktex-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit a847cc91f61fbfd3610024e04c0ed9dab47608be
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 15:28:30 2024 +0200

gnu: Add texlive-chktex-bin.

* gnu/packages/tex.scm (texlive-chktex-bin): New variable.
(texlive-chktex)[arguments]<#:link-scripts>: Remove as those are now 
provided
by TEXLIVE-CHKTEX-BIN.
[inputs]: Remove PERL.
[propagated-inputs]: Add TEXLIVE-CHKTEX-BIN.

Change-Id: If9801ba8bf677899c6e96b20d17f2f41da0fdc50
---
 gnu/packages/tex.scm | 64 ++--
 1 file changed, 62 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ef15853299..464c9209ef 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -33993,8 +33993,7 @@ labels and advises the user to use a starred version 
instead.")
   "0qyrllxvcymmr1a4sq9c88fw5zchcx0n6yac69s61fg6xypk18bq")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:link-scripts #~(list "chkweb.sh" "deweb.pl")))
-(inputs (list perl))
+(propagated-inputs (list texlive-chktex-bin))
 (home-page "https://ctan.org/pkg/chktex;)
 (synopsis "Check for errors in LaTeX documents")
 (description
@@ -34002,6 +34001,67 @@ labels and advises the user to use a starred version 
instead.")
 Filters are also provided for checking the LaTeX parts of CWEB documents.")
 (license license:gpl2+)))
 
+(define-public texlive-chktex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-chktex-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("chktex"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-chktex" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(add-after 'unpack 'locate-global-configuration-file
+  ;; `chktex' needs to know where its global configuration file is.
+  ;; However, it cannot understand our convoluted TEXMFMAIN value.
+  ;; This phase forces configuration file name.
+  (lambda _
+(substitute* "texk/chktex/chktex-src/OpSys.c"
+  (("kpse_var_value\\(\"TEXMFMAIN\"\\)")
+   (string-append "strdup(\"" #$output 
"/share/texmf-dist\")")
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/chktex"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/chktex"
+  (invoke "make" "install"
+;; Compilation forces a "/usr/bin/env perl" shebang.  Change it.
+(add-after 'install 'patch-shebang
+  (lambda _
+(patch-shebang
+ (string-append #$output
+
"/share/texmf-dist/scripts/chktex/deweb.pl"
+(native-inputs (list pkg-config))
+(inputs (list perl texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-chktex))
+(synopsis "Binaries for @code{texlive-chktex}")
+(description
+ "This package provides the binaries for @code{texlive-chktex}.")
+(license (package-license texlive-chktex
+
 (define-public texlive-clojure-pamphlet
   (package
 (name "texlive-clojure-pamphlet")



46/137: gnu: Add texlive-vlna-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 68dc56f15e41f0bc3ee761fda92c6c384c501c7d
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 07:24:36 2024 +0200

gnu: Add texlive-vlna-bin.

* gnu/packages/tex.scm (texlive-vlna-bin): New variable.
(texlive-vlna)[propagated-inputs]: Add TEXLIVE-VLNA-BIN.

Change-Id: I98c4345f732488f43491a31c5faea54b231d3846
---
 gnu/packages/tex.scm | 55 +---
 1 file changed, 31 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 1ae940509e..6f18e29593 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -32645,7 +32645,28 @@ strong on layout, from simple alternate-line 
indentation to the @code{Mouse's
 tale} from @emph{Alice in Wonderland}.")
 (license license:lppl)))
 
-(define texlive-vlna-bin
+(define-public texlive-vlna
+  (package
+(name "texlive-vlna")
+(version (number->string %texlive-revision))
+(source (texlive-origin
+ name version
+ (list "doc/man/man1/vlna.1"
+   "doc/man/man1/vlna.man1.pdf" "doc/vlna/")
+ (base32
+  "0nfb7mj6y9d4n89z59ppi96grfylwky97mxcv9rjflr5kpqlpga2")))
+(outputs '("out" "doc"))
+(build-system texlive-build-system)
+(propagated-inputs (list texlive-vlna-bin))
+(home-page "https://ctan.org/pkg/vlna;)
+(synopsis "Add @samp{~} after non-syllabic preposition, for Czech/Slovak")
+(description
+ "This package provides a preprocessor for TeX source implementing the
+Czech/Slovak typographical rule forbidding a non-syllabic preposition alone at
+the end of a line.")
+(license license:knuth)))
+
+(define-public texlive-vlna-bin
   (package
 (inherit texlive-bin)
 (name "texlive-vlna-bin")
@@ -32670,9 +32691,9 @@ tale} from @emph{Alice in Wonderland}.")
 (arguments
  (substitute-keyword-arguments (package-arguments texlive-bin)
((#:configure-flags flags)
-#~(cons* "--enable-vlna" (delete "--enable-web2c" #$flags)))
-   ((#:phases _)
-#~(modify-phases %standard-phases
+#~(cons "--enable-vlna" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
 (replace 'check
   (lambda* (#:key tests? #:allow-other-keys)
 (when tests?
@@ -32683,27 +32704,13 @@ tale} from @emph{Alice in Wonderland}.")
 (with-directory-excursion "utils/vlna"
   (invoke "make" "install"
 (native-inputs '())
-(inputs '(
-
-(define-public texlive-vlna
-  (package
-(name "texlive-vlna")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/vlna.1"
-   "doc/man/man1/vlna.man1.pdf" "doc/vlna/")
- (base32
-  "0nfb7mj6y9d4n89z59ppi96grfylwky97mxcv9rjflr5kpqlpga2")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
-(home-page "https://ctan.org/pkg/vlna;)
-(synopsis "Add @samp{~} after non-syllabic preposition, for Czech/Slovak")
+(inputs '())
+(propagated-inputs '())
+(home-page (package-home-page texlive-vlna))
+(synopsis "Binary for @code{texlive-vlna}")
 (description
- "This package provides a preprocessor for TeX source implementing the
-Czech/Slovak typographical rule forbidding a non-syllabic preposition alone at
-the end of a line.")
-(license license:knuth)))
+ "This package provides the binary for @code{texlive-vlna}.")
+(license (package-license texlive-vlna
 
 (define-public texlive-vntex
   (package



63/137: gnu: texlive-kpathsea: Propagate the binaries.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit f30473eb355f165373144b2d9d3b7c6d5b98e320
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 18:23:00 2024 +0200

gnu: texlive-kpathsea: Propagate the binaries.

* gnu/packages/tex.scm (texlive-kpathsea)[propagated-inputs]: Add 
TEXLIVE-LIBKPATHSEA.
* gnu/packages/tex.scm (texlive-collection-basic): Update comment about
TEXLIVE-BIN, since GUIX_TEXMF is now specifed by TEXLIVE-KPATHSEA.

Change-Id: I2a5a39d7980f835fa3cdb819c7fbade7e48802ce
---
 gnu/packages/tex.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index f52e148ee9..d00744b0b0 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -47850,6 +47850,7 @@ replacement for the @code{inputenc} package.")
(format #false "PATH=\"~{~a:~}$PATH\"; export PATH~%~a"
dirs m)
 (inputs (list sed gawk))
+(propagated-inputs (list texlive-libkpathsea)) ;for the executables
 (home-page "https://ctan.org/pkg/kpathsea;)
 (synopsis "Files related to the path searching library for TeX")
 (description
@@ -65820,7 +65821,7 @@ The macros were designed for use within other macros.")
 (propagated-inputs
  (list texlive-amsfonts
texlive-bibtex
-   texlive-bin  ;set GUIX_TEXMF and engines
+   texlive-bin  ;for the TeX engine
texlive-cm
texlive-colorprofiles
texlive-dvipdfmx



66/137: gnu: Add texlive-mflua-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit fac8218154a9f2233585aced0a3ebcf5291b3d11
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 2 12:12:21 2024 +0200

gnu: Add texlive-mflua-bin.

* gnu/packages/tex.scm (texlive-mflua-bin): New variable.
(texlive-mflua)[arguments]<#:link-scripts>: Remove keyword, since 
"fmlua.lua"
is a not meant to be symlinked to "bin/".
[propagated-inputs]: Add TEXLIVE-MFLUA-BIN.

Change-Id: I7dc275c169afbc4bdada02feec83fa9470d49f94
---
 gnu/packages/tex.scm | 60 +++-
 1 file changed, 55 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 34747518f9..809c87b2ad 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -40202,11 +40202,8 @@ clearly show any mismatches.")
  (base32
   "0ngbhdh8hgpjfqnrjlnp27x3qziks3yf2zp1qq7r4bjfa5jx9gr6")))
 (build-system texlive-build-system)
-(arguments
- (list
-  #:link-scripts #~(list "mflua.lua")
-  #:create-formats #~(list "mflua")))
-(propagated-inputs (list texlive-luatex texlive-metafont))
+(arguments (list #:create-formats #~(list "mflua")))
+(propagated-inputs (list texlive-luatex texlive-metafont 
texlive-mflua-bin))
 (home-page "https://ctan.org/pkg/mflua;)
 (synopsis "Configuration and base files for MFLua")
 (description
@@ -40217,6 +40214,59 @@ MFLua without any modification to produce exactly the 
same result.")
 ;; released under Public Domain terms.
 (license (list license:knuth license:public-domain
 
+(define-public texlive-mflua-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-mflua-bin")
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-web2c"
+ "--enable-mflua"
+ ;; LuaJIT is not ported to some architectures yet.
+ #$@(if (or (target-ppc64le?)
+(target-riscv64?))
+'()
+'("--enable-mfluajit"))
+ (delete "--disable-mflua"
+ (delete "--disable-mfluajit"
+ (delete "--enable-web2c" #$flags)
+   ((#:phases phases)
+#~(let ((bin (string-append #$output "/bin")))
+;; Once Web2C is disabled, build process refuses to build
+;; libraries in the source tree, in particular lua53 and luajit,
+;; required for MfluaJIT.  The following changes forces building
+;; them.
+(modify-phases #$phases
+  #$@(if (or (target-ppc64le?) (target-riscv64?))
+ '()
+ '((add-after 'unpack 'force-luajit-build
+ (lambda _
+   (substitute* "libs/configure"
+ (("x\\$need_luajit") "xyes"
+   (add-after 'install 'install-mfluajiit
+ (lambda _
+   (with-directory-excursion "texk/web2c"
+ (invoke "make" "mfluajit")
+ (install-file ".libs/mfluajit" bin))
+  (add-after 'unpack 'force-lua53-build
+(lambda _
+  (substitute* "libs/configure"
+(("x\\$need_lua53") "xyes"
+  (add-after 'install 'install-mflua
+(lambda _
+  (with-directory-excursion "texk/web2c"
+(invoke "make" "mflua")
+(install-file ".libs/mflua" bin)
+(native-inputs (list pkg-config))
+(inputs (modify-inputs (package-inputs texlive-bin)
+  (append potrace)))
+(home-page (package-home-page texlive-mflua))
+(synopsis "Binaries for @code{texlive-mflua}")
+(description
+ "This package provides the binaries for @code{texlive-mflua}.")
+(license (package-license texlive-mflua
+
 (define-public texlive-mkjobtexmf
   (package
 (name "texlive-mkjobtexmf")



70/137: gnu: texlive-musixtnt: Build binary separately.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 6aa3a4e9e82af85d8a16667446907c3ce9a357a2
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 21:44:18 2024 +0200

gnu: texlive-musixtnt: Build binary separately.

* gnu/packages/tex.scm (texlive-musixtnt-bin): New variable.
(texlive-musixtnt): Do not use prerex source. Make it a regular TeX Live
package instead.
[arguments]: Remove it.
[propagated-inputs]: Add TEXLIVE-MUSIXTNT-BIN.

Change-Id: I24bbdb6ba5cc2b5205e20db9fdeb1c00f08a9d82
---
 gnu/packages/tex.scm | 126 ---
 1 file changed, 79 insertions(+), 47 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 5b88116bda..e00192abed 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -22916,34 +22916,7 @@ the older (Type 1 fonts only) bundle 
@code{musixtex-t1fonts} obsolete.")
   "0z1rfscla1hiibd0gs3lgf8x5yx19pmwdsbzvx2vvz0ikwgjglm9")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments
- (list
-  #:tests? #true
-  #:modules '((guix build texlive-build-system)
-  ((guix build gnu-build-system) #:prefix gnu:)
-  (guix build utils)
-  (srfi srfi-1))
-  #:phases
-  #~(modify-phases %standard-phases
-  (add-after 'unpack 'unpack-musixtnt-source
-(lambda _
-  (mkdir-p "build")
-  (with-directory-excursion "build"
-(invoke "tar" "xvf"
-;; Tarball includes a release date that we ignore.
-(first (find-files ".." "^musixtnt-.*\\.tar.gz"))
-"--strip-components=1"
-  (add-after 'unpack-prerex-source 'build-msxlint
-(lambda args
-  (with-directory-excursion "build"
-(for-each (lambda (phase)
-(apply (assoc-ref gnu:%standard-phases phase) 
args))
-  '(configure
-build
-check
-install
-compress-documentation
-(propagated-inputs (list texlive-musixtex))
+(propagated-inputs (list texlive-musixtex texlive-musixtnt-bin))
 (home-page "https://ctan.org/pkg/musixtnt;)
 (synopsis
  "MusiXTeX extension library enabling transformations of the effect of
@@ -22963,6 +22936,53 @@ example is extracting single-instrument parts from a 
multi-instrument score.
 source file.  This should be used before using @code{\\TransformNotes}.")
 (license license:gpl2)))
 
+(define-public texlive-musixtnt-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-musixtnt-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("musixtnt"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-musixtnt" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/musixtnt"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/musixtnt"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-musixtnt))
+(synopsis "Binary for @code{texlive-musixtnt}")
+(description
+ "This package provides the binary for @code{texlive-musixtnt}.")
+(license (package-license texlive-musixtnt
+
 (define-public texlive-musuos
   (package
 (name "texlive-musuos")
@@ -73290,31 +73310,43 @@ handle complex tests.")
 ;; Texmf tree in TeX Live is incomplete, as it doesn't include
 ;; "xindy.mem", so it is not possible to use `texlive-origin'.  This file
 ;; isn't build by default by `texlive-bin' either.  Build it specially
-;; from `texlive-bin' source instead.
-(inherit 

56/137: gnu: Add texlive-lcdftypetools-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit d1c323f5e75402559c42f6db6bd912f1e8db5ed0
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 16:16:48 2024 +0200

gnu: Add texlive-lcdftypetools-bin.

* gnu/packages/tex.scm (texlive-lcdftypetools-bin): New variable.
(texlive-lcdftypetools)[propagated-inputs]: Add TEXLIVE-LCDFTYPETOOLS-BIN.

Change-Id: I3091f6122365dc087d030d0e1458ce412fd94e30
---
 gnu/packages/tex.scm | 48 +++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 48391b24ba..79a1a1deb2 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -38802,7 +38802,7 @@ TeX.")
   "0yjbc6rsf8c62qa1lyi9kjyjy2p0xlps19llnvly3xyhla08j76f")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(propagated-inputs (list texlive-glyphlist))
+(propagated-inputs (list texlive-glyphlist texlive-lcdftypetools-bin))
 (home-page "https://ctan.org/pkg/lcdf-typetools;)
 (synopsis "Bundle of outline font manipulation tools")
 (description
@@ -38837,6 +38837,52 @@ a Type 1 font.
 @end itemize")
 (license license:gpl3+)))
 
+(define-public texlive-lcdftypetools-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-lcdftypetools-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("lcdf-typetools"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-lcdf-typetools" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/lcdf-typetools"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/lcdf-typetools"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-lcdftypetools))
+(synopsis "Binaries for @code{texlive-lcdftypetools}")
+(description
+ "This package provides the binaries for @code{texlive-lcdftypetools}.")
+(license (package-license texlive-lcdftypetools
+
 (define-public texlive-latex
   (package
 (name "texlive-latex")



67/137: gnu: texlive-dviout-util: Build binaries separately.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 5990f1409eb767f5a958d0228379c06118b2a0de
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 18:29:02 2024 +0200

gnu: texlive-dviout-util: Build binaries separately.

* gnu/packages/tex.scm (texlive-dviout-util-bin): New variable.
(texlive-dviout-util): Do not inherit from TEXLIVE-BIN.  Make it a regular 
TeX
Live package instead.
[source]: Use TEXLIVE-ORIGIN.
[arguments]: Remove it.
[propagated-inputs]: Add TEXLIVE-DVIOUT-UTIL-BIN.

Change-Id: Id6c82baf15df8d253cd15aa6bd31d2d1e707c5fd
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 35 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 809c87b2ad..58ce77eec1 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34981,8 +34981,32 @@ file.  It also supports XeTeX XDV format.")
 
 (define-public texlive-dviout-util
   (package
-(inherit texlive-bin)
 (name "texlive-dviout-util")
+(version (number->string %texlive-revision))
+(source (texlive-origin
+ name version
+ (list "doc/man/man1/chkdvifont.1"
+   "doc/man/man1/chkdvifont.man1.pdf"
+   "doc/man/man1/dvispc.1"
+   "doc/man/man1/dvispc.man1.pdf")
+ (base32
+  "098pksgf2iamq96rmzg5fw7i9dlpvdksficsz1bf8k8z4djnbk8n")))
+(outputs '("out" "doc"))
+(build-system texlive-build-system)
+(propagated-inputs (list texlive-dviout-util-bin))
+(home-page "https://www.tug.org/texlive/;)
+(synopsis "Utilities from the @code{dviout} package")
+(description
+ "This package provides two utilities: @command{chkdvifont}, which check
+fonts in DVI/TFM/JFM/FONT files, and @command{dvispc}, which corrects the
+page-independence of DVI file using color specials or tpic specials, and
+transforms between a DVI file and a text file.")
+(license license:expat)))
+
+(define-public texlive-dviout-util-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-dviout-util-bin")
 (source
  (origin
(inherit texlive-source)
@@ -35005,9 +35029,9 @@ file.  It also supports XeTeX XDV format.")
 (arguments
  (substitute-keyword-arguments (package-arguments texlive-bin)
((#:configure-flags flags)
-#~(cons* "--enable-dviout-util" (delete "--enable-web2c" #$flags)))
-   ((#:phases _)
-#~(modify-phases %standard-phases
+#~(cons "--enable-dviout-util" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
 (replace 'check
   (lambda* (#:key tests? #:allow-other-keys)
 (when tests?
@@ -35017,15 +35041,14 @@ file.  It also supports XeTeX XDV format.")
   (lambda _
 (with-directory-excursion "texk/dviout-util"
   (invoke "make" "install"
-(inputs (list texlive-libptexenc))
-(home-page "https://www.tug.org/texlive/;)
-(synopsis "Utilities from the @code{dviout} package")
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea texlive-libptexenc))
+(propagated-inputs '())
+(home-page (package-home-page texlive-dviout-util))
+(synopsis "Binary for @code{texlive-dviout-util}")
 (description
- "This package provides two utilities: @command{chkdvifont}, which check
-fonts in DVI/TFM/JFM/FONT files, and @command{dvispc}, which corrects the
-page-independence of DVI file using color specials or tpic specials, and
-transforms between a DVI file and a text file.")
-(license license:expat)))
+ "This package provides the binary for @code{texlive-dviout-util}.")
+(license (package-license texlive-dviout-util
 
 (define-public texlive-dvipng
   (package



42/137: gnu: Add texlive-upmendex-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit d944a8612aef8c7990bac106b3eef2028a59668b
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 00:39:50 2024 +0200

gnu: Add texlive-upmendex-bin.

* gnu/packages/tex.scm (texlive-upmendex-bin): New variable.
(texlive-upmendex)[propagated-inputs]: Add TEXLIVE-UPMENDEX-BIN.

Change-Id: I4212732a116800942577fc2e1fa7b8179fe094b0
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 827358af7e..c89b0aab1d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -46062,6 +46062,7 @@ chosen and developed with an emphasis on drawing graphs 
in economics.")
   "0mj8nmqr3z7b802kvjmnkckq89l694an7s639yghf3b9b5v7xihx")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-upmendex-bin))
 (home-page "https://ctan.org/pkg/upmendex;)
 (synopsis "Multilingual index processor")
 (description
@@ -46087,6 +46088,52 @@ Zhuyin) for Chinese Han scripts (Hanzi ideographs).
 @end itemize")
 (license license:bsd-3)))
 
+(define-public texlive-upmendex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-upmendex-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs/" '())
+(delete-other-directories "utils/" '())
+(delete-other-directories "texk/" '("upmendex"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-upmendex" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/upmendex"
+(invoke "make" "check")
+(replace 'install
+  (lambda* (#:key inputs native-inputs #:allow-other-keys)
+(with-directory-excursion "texk/upmendex"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list icu4c texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-upmendex))
+(synopsis "Binary for @code{texlive-upmendex}")
+(description
+ "This package provides the binary for @code{texlive-upmendex}.")
+(license (package-license texlive-upmendex
+
 (define-public texlive-utf8mex
   (package
 (name "texlive-utf8mex")



86/137: guix: import texlive: Handle versions.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit ec8d79cb2054bb39c75c8f22eaf2ac6737bf99cc
Author: Nicolas Goaziou 
AuthorDate: Sun Jun 16 21:10:02 2024 +0200

guix: import texlive: Handle versions.

* guix/import/texlive.scm (texlive-repository):
(texlive-repository-location):
(svn-command):
(version->revision):
(current-day):
(latest-texlive-tag):
(texlive->svn-multi-reference): New variables.
(tlpdb-file) Remove function.
(tlpdb): Add VERSION argument.
* guix/import/texlive.scm (list-upstream-inputs): Add VERSION and DATABASE
arguments.
(tlpdb->package): Do not use fixed version.  Instead, make use of the 
version
provided as an argument.  Add DATABASE argument for testing.
(texlive->guix-package): Do not memoize.  Allow providing any TeX Live 
release
tag as version.  Default to latest tag.  Add DATABASE argument for testing.
Improve docstring.

* tests/texlive.scm ("texlive->guix-package, no docfiles"):
("texlive->guix-package"):
("texlive->guix-package, with METAFONT files"):
("texlive->guix-package, with catalogue entry, no inputs"):
("texlive->guix-package, multiple licenses"):
("texlive->guix-package, meta-package"):
("texlive->guix-package, with TeX format"):
("texlive->guix-package, execute but no TeX format"):
("texlive->guix-package, translate dependencies"):
("texlive->guix-package, lonely `hyphen-base' dependency and ARCH"):
("texlive->guix-package, single script, no extension"):
("texlive->guix-package, multiple scripts, with extensions"):
("texlive->guix-package, script with associated input"):
("texlive->guix-package, propagated binaries, no script"):
("texlive->guix-package, propagated binaries and scripts"):
("texlive->guix-package, with skipped propagated binaries"): Update tests.

Change-Id: I7576b6e31e9ec3ff84258b71d0c4dd180d2b5c38
---
 guix/import/texlive.scm | 336 
 tests/texlive.scm   |  64 -
 2 files changed, 229 insertions(+), 171 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 0e0369a416..cbccafb811 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -21,22 +21,28 @@
 (define-module (guix import texlive)
   #:use-module (gcrypt hash)
   #:use-module (guix base32)
-  #:use-module (guix build-system texlive)
+  #:use-module (guix build-system)
   #:use-module (guix derivations)
+  #:use-module (guix diagnostics)
   #:use-module (guix gexp)
+  #:use-module (guix i18n)
   #:use-module (guix import utils)
   #:use-module (guix memoization)
   #:use-module (guix monads)
-  #:use-module (guix serialization)
+  #:use-module (guix packages)
+  #:use-module ((guix serialization) #:select (write-file))
   #:use-module (guix store)
   #:use-module (guix svn-download)
   #:use-module (guix upstream)
   #:use-module (ice-9 ftw)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 popen)
   #:use-module (ice-9 rdelim)
+  #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-2)
+  #:use-module (srfi srfi-11)
+  #:use-module (srfi srfi-19)
   #:use-module (srfi srfi-26)
   #:export (texlive->guix-package
 texlive-recursive-import))
@@ -49,6 +55,20 @@
 ;;;
 ;;; Code:
 
+(define texlive-repository "svn://www.tug.org/texlive")
+
+(define* (texlive-repository-location version #:optional location)
+  (format #f
+  "~a/tags/texlive-~a/~a"
+  texlive-repository
+  version
+  (cond
+   ((not location) "")
+   ((string-prefix? "/" location)
+(string-drop location 1))
+   (else
+location
+
 ;; Generic locations are parts of the tree shared by multiple packages.
 ;; Package definitions should single out files stored there, or all files in
 ;; the directory from all involved packages would be downloaded.
@@ -82,6 +102,58 @@
 "tie"
 "web"))
 
+(define (svn-command . args)
+  "Execute \"svn\" command with arguments ARGS, provided as strings, and
+return its output as a string.  Raise an error if the command execution did
+not succeed."
+  (define subversion
+;; Resolve this variable lazily so that (gnu packages ...) does not end up
+;; in the closure of this module.
+(module-ref (resolve-interface '(gnu packages version-control))
+'subversion))
+  (let* ((svn
+  (with-store store
+(run-with-store store
+  (mlet* %store-monad
+  ((drv (lower-object subversion))
+   (built (built-derivations (list drv
+(match (derivation->output-paths drv)
+  (((names . locations) ...)
+   (return (string-append (first locations) "/bin/svn"
+ (command (string-append svn (string-join args " " 'prefix)))
+ (pipe 

43/137: gnu: Add texlive-gsftopk-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 7f4d5da19cf4aa8659d8f4f10865e0f0af995b50
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 00:49:34 2024 +0200

gnu: Add texlive-gsftopk-bin.

* gnu/packages/tex.scm (texlive-gsftopk-bin): New variable.
(texlive-gsftopk)[propagated-inputs]: Add TEXLIVE-GSFTOPK-BIN.

Change-Id: I91c459392b4fb4b433b4abd47d09170e3927fefc
---
 gnu/packages/tex.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c89b0aab1d..d27ffac5cb 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -47721,6 +47721,7 @@ definition files for Greek text font encodings for use 
with @code{fontenc}.")
   "1qlac704qbm7kq762z0b887wfncprpcm8zj2lb4nag0wzdrrjdq5")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-gsftopk-bin))
 (home-page "https://ctan.org/pkg/gsftopk;)
 (synopsis "Convert Ghostscript fonts to PK files")
 (description
@@ -47730,6 +47731,52 @@ much used nowadays, since both its target applications 
are now capable of
 dealing with Type 1 fonts, direct.")
 (license license:gpl3+)))
 
+(define-public texlive-gsftopk-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-gsftopk-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("gsftopk"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-gsftopk" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/gsftopk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/gsftopk"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list texlive-libkpathsea))
+(propagated-inputs '())
+(home-page (package-home-page texlive-gsftopk))
+(synopsis "Binary for @code{texlive-gsftopk}")
+(description
+ "This package provides the binary for @code{texlive-gsftopk}.")
+(license (package-license texlive-gsftopk
+
 (define-public texlive-hycolor
   (package
 (name "texlive-hycolor")



branch tex-team created (now 017657f215)

2024-06-24 Thread guix-commits
ngz pushed a change to branch tex-team
in repository guix.

  at 017657f215 gnu: tex: Add comments about TeX Live updating process.

This branch includes the following new commits:

 new 214129956f gnu: texlive-libkpathsea: Fix TEXMFCACHE location.
 new c1f1a0b44a gnu: texlive-libkpathsea: Remove duplicate documentation.
 new 51f9197e5d gnu: Add texlive-source.
 new 30a9ba965e gnu: texlive-libkpathsea: Use TEXLIVE-SOURCE.
 new 0ebb936cd6 gnu: texlive-libkpathsea: Better default values in 
"texmf.cnf".
 new 6b54b4990e gnu: texlive-luatex: Set proper default values for 
"texmfcnf.lua".
 new 11891842a8 gnu: texlive-updmap.cfg: Fix font file creation in $HOME.
 new 1304921c51 gnu: texlive-context: Fix "context" call.
 new 9d757df9c7 gnu: Add texlive-libptexenc.
 new c8921e34d7 gnu: texlive-bin: Minimize build surface.
 new 969c475737 gnu: tex.scm: Remove completed TODO.
 new e1f6cdaf81 gnu: texlive-xcjk2uni: Fix build.
 new 43fdffe215 gnu: texlive-csplain: Fix build.
 new 156b605c16 gnu: texlive-latex-bin: Create symlinks for "latex" 
variants.
 new ad694de0fe gnu: Add texlive-mfware-bin.
 new 1d295e84eb gnu: Add texlive-omegaware-bin.
 new 94f8803023 gnu: Add texlive-fontware-bin.
 new a53493c0bf gnu: Add texlive-texware-bin.
 new a7573bef2c gnu: Add texlive-patgen-bin.
 new 283b95f0a5 gnu: Add texlive-uptex-bin.
 new f0dce41f22 gnu: Add texlive-ptex-bin.
 new be9fd105c0 gnu: Add texlive-bibtex-bin.
 new 14981e0055 gnu: Add texlive-dvicopy-bin.
 new 1d546fbb47 gnu: Add texlive-dvipdfmx-bin.
 new 95c3407c9b gnu: Add texlive-xetex-bin.
 new a3c76e12a0 gnu: Add texlive-aleph-bin.
 new 4cdc002b67 gnu: Add texlive-hitex-bin.
 new 5991c65513 gnu: Add texlive-afm2pl-bin.
 new 33d3649ee5 gnu: Add texlive-m-tx-bin.
 new 84290a3041 gnu: Add texlive-autosp-bin.
 new f3dd3f940b gnu: Add texlive-gregoriotex-bin.
 new 97021cf38f gnu: Add texlive-pmx-bin.
 new 975f17aeb2 gnu: Add texlive-velthuis-bin.
 new 659a77bf12 gnu: Add texlive-bibtex8-bin.
 new facd8dc268 gnu: Add texlive-bibtexu-bin.
 new 99b5d0e8fb gnu: Add texlive-dvips-bin.
 new 3704048647 gnu: Add texlive-psutils-bin.
 new e008d61960 gnu: Add texlive-tex4ht-bin.
 new cea9c93df9 gnu: Add texlive-xdvi-bin.
 new 2ab0c67bd1 gnu: Add texlive-tpic2pdftex-bin.
 new ea1bf1e1d8 gnu: Add texlive-ttfutils-bin.
 new d944a8612a gnu: Add texlive-upmendex-bin.
 new 7f4d5da19c gnu: Add texlive-gsftopk-bin.
 new b85486f60c gnu: Add texlive-makeindex-bin.
 new 704a16f90e gnu: Add texlive-metapost-bin.
 new 68dc56f15e gnu: Add texlive-vlna-bin.
 new a416960a6c gnu: Add texlive-cjkutils-bin.
 new a847cc91f6 gnu: Add texlive-chktex-bin.
 new 16b8d88c29 gnu: Add texlive-detex-bin.
 new 8aea609d83 gnu: Add texlive-dtl-bin.
 new e60e74a9b9 gnu: Add texlive-dvi2tty-bin.
 new 509bdb8f5b gnu: Add texlive-dvidvi-bin.
 new 2dd37d01cb gnu: Add texlive-dviljk-bin.
 new 72b455371f gnu: Add texlive-dvipng-bin.
 new da0bf02067 gnu: Add texlive-dvisvgm-bin.
 new d1c323f5e7 gnu: Add texlive-lcdftypetools-bin.
 new ada174f096 gnu: Add texlive-lacheck-bin.
 new 02b5f32299 gnu: Add texlive-seetexk-bin.
 new 39e4f71020 gnu: Add texlive-ps2eps-bin.
 new 8ec1efd9ab gnu: Add texlive-t1utils-bin.
 new 9ded9232ed gnu: texlive-texdoctk: Fix runtime error.
 new 8412d7b86f gnu: Add texlive-xpdfopen-bin.
 new f30473eb35 gnu: texlive-kpathsea: Propagate the binaries.
 new 4be4930814 gnu: Add texlive-xml2pmx-bin.
 new 81335e6e88 gnu: Add texlive-luajittex-bin.
 new fac8218154 gnu: Add texlive-mflua-bin.
 new 5990f1409e gnu: texlive-dviout-util: Build binaries separately.
 new fb28ba012d gnu: texlive-ps2pk: Build binaries separately.
 new 2e364709c0 gnu: texlive-dvipos: Build binaries separately.
 new 6aa3a4e9e8 gnu: texlive-musixtnt: Build binary separately.
 new 0520b90d15 gnu: texlive-axodraw2: Build binary separately.
 new b481d8ff70 gnu: texlive-xindy: Build binary separately.
 new e5c2b09309 guix: import texlive: Propagate binaries when necessary.
 new 0234830cee gnu: texlive-docstrip: Remove it.
 new 1aeec306d2 gnu: Update commentary section in "tex.scm".
 new 909007fd58 gnu: texlive-xits: Fix typo in description.
 new 761dc16bea gnu: texlive-texdirflatten: Add missing Perl input.
 new a1fef537e6 gnu: texlive-scripts: Add missing "mktexfmt" symlink.
 new 88e700841d gnu: python-sphinx: Fix build.
 new 787eeeb8b4 gnu: texlive-hyphen-complete: Fix locations.
 new c1ec4c2161 guix: import texlive: Rename some functions.
 new 2a971b3b49 guix: import texlive: Sort modules alphabetically.
 new fc0700581e guix: import texlive: Remove `files-differ?' function.
 new 2c2f0a32ab guix: import texlive: Move a comment.
 new 820f3c5e6c guix: import texlive: Factorize package inputs 

75/137: gnu: Update commentary section in "tex.scm".

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 1aeec306d2880870f41a77eb28f124a594b6c999
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 15:33:49 2024 +0200

gnu: Update commentary section in "tex.scm".

* gnu/packages/tex.scm: Describe new bootstrap story in "tex.scm".

Change-Id: I713c225c02169deec077ef06f165d559b2625779
---
 gnu/packages/tex.scm | 87 +++-
 1 file changed, 59 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ff2b9e0ef8..9924bc95c6 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -113,36 +113,36 @@
 
 ;;; Commentary:
 ;;;
-;;; This module aims at being as faithful as possible to TeX Live
-;;; distribution.  Yet, some of the packages in this module are Guix specific.
-;;; The following paragraphs describe them.
-;;;
 ;;; Guix provides two different TeX Live systems: one monolithic, the TEXLIVE
-;;; package, and the other modular.  Both are built from TEXLIVE-LIBKPATHSEA,
-;;; which is therefore the starting of any TeX Live update.  Both also rely on
-;;; TEXLIVE-SCRIPTS, which contains core scripts and related files---although
-;;; monolithic TeX Live only makes use of its source.  At that point, both
-;;; systems diverge.
+;;; package, and the other modular.  This module is about the latter.  It aims
+;;; at being as faithful as possible to TeX Live distribution.  Yet, some of
+;;; the packages defined here are Guix specific.  The following paragraphs
+;;; describe them.
 ;;;
-;;; On the one hand, the monolithic TeX Live merges TEXLIVE-BIN-FULL and
-;;; TEXLIVE-TEXMF in order to create TEXLIVE.
+;;; Source for all TeX Live binaries is located in TEXLIVE-SOURCE, which is
+;;; therefore the starting point of any TeX Live update.  This is first used
+;;; to build TEXLIVE-LIBKPATHSEA and TEXLIVE-LIBPTEXENC.
 ;;;
-;;; On the other hand, modular TeX Live relies on TEXLIVE-BIN, which is
-;;; provided as a mandatory native input in the texlive build system.  Unlike
-;;; TEXLIVE-BIN-FULL, it doesn't provide any script (but still include all the
-;;; binaries; this might change in the future).  Then the system builds its
-;;; way towards regular `texlive-latex-bin' package, which is a convenient
-;;; native input (that can be ignored) for most TeX Live packages.  Those
-;;; earlier in the build chain need the TEXLIVE-DOCSTRIP package to still be
-;;; able to generate their runfiles.
+;;; Both TEXLIVE-SOURCE and TEXLIVE-LIBKPATHSEA---which takes care of creating
+;;; a search path for GUIX_TEXMF environment variable---are used to compile
+;;; TEXLIVE-BIN.  In turn, TEXLIVE-BIN propagates TEXLIVE-SCRIPTS, which
+;;; contains core scripts and related files, including "texlive.tldb"
+;;; database.  TEXLIVE-BIN is a mandatory native input in the `texlive' build
+;;; system.
 ;;;
-;;; Default font map files are updated in a profile hook (see
-;;; `texlive-font-maps' in "profiles.scm").  However, this option is not
-;;; available when building documentation for a package.  Consequently, this
-;;; module also provides TEXLIVE-UPDMAP.CFG function, which creates a TeX Live
-;;; tree with font map files updates.  It should be used exclusively for
-;;; package definitions, as a native input.  It is possible to augment that
-;;; tree, in particular with additional font packages.
+;;; Then, the system builds its way towards regular TEXLIVE-LATEX-BIN package,
+;;; which is a convenient native input---that can be ignored using
+;;; `texlive-latex-bin?' keyword argument---for most TeX Live packages.  For
+;;; obvious reasons, packages used to build TEXLIVE-LATEX-BIN must be set it
+;;; to `#f'.
+;;;
+;;; The TEXLIVE-BIN package provides a few Web2C tools, Metafont and some TeX
+;;; engines---i.e, TeX, pdfLaTeX, LuaTeX and LuaHBTeX.  The rest of the
+;;; binaries are built in separate packages, from TEXLIVE-SOURCE, and possibly
+;;; with the help of TEXLIVE-LIBKPATHSEA and TEXLIVE-LIBPTEXENC.  Those
+;;; packages inherit their phases from TEXLIVE-BIN.  As a convention, the
+;;; package named "texlive-NAME-bin" provides binaries for "texlive-NAME",
+;;; TEXLIVE-LATEX-BIN being the obvious exception to this scheme.
 ;;;
 ;;; Unlike font map files, TeX formats are not built from a profile hook, as
 ;;; the process would be too time-consuming, e.g., when invoking "guix shell".
@@ -153,8 +153,39 @@
 ;;; TEXLIVE-HYPHEN-COMPLETE, and all formats, being built with it, include all
 ;;; rules right from the start.
 ;;;
-;;; Any other "texlive-name" package matches the "name" TeX Live package, as
-;;; defined in the "texlive.tlpdb" file.
+;;; Any other "texlive-NAME" package matches "NAME" TeX Live package, as
+;;; defined in the "texlive.tlpdb" database.
+;;;
+;;; The following piece of art illustrates the bootstrap process of the
+;;; modular Guix TeX Live distribution.  All "texlive-" prefixes have been
+;;; dropped for brevity.
+;;;
+;;;
+;;;   ,-- 

55/137: gnu: Add texlive-dvisvgm-bin.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit da0bf02067d3e6a91926a7739f180e7c9893fe58
Author: Nicolas Goaziou 
AuthorDate: Tue May 28 16:13:48 2024 +0200

gnu: Add texlive-dvisvgm-bin.

* gnu/packages/tex.scm (texlive-dvisvgm-bin): New variable.
(texlive-dvisvgm)[propagated-inputs]: Add TEXLIVE-DVISVGM-BIN.

Change-Id: I0e43627712943efd9e81204dfe76042e19368ea6
---
 gnu/packages/tex.scm | 67 
 1 file changed, 67 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 36c086aa08..48391b24ba 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -99,6 +99,7 @@
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages base)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages web)
@@ -35189,6 +35190,7 @@ paper feed errors!")
   "1fz3sa7p9wk2g1v0bpy87vz7nxwrh5bsfl4m734n6lhsh1bkj6fb")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(propagated-inputs (list texlive-dvisvgm-bin))
 (home-page "https://ctan.org/pkg/dvisvgm;)
 (synopsis
  "Convert DVI, EPS, and PDF files to Scalable Vector Graphics format 
(SVG)")
@@ -35202,6 +35204,71 @@ optionally be replaced with graphics paths so that 
applications that do not
 support SVG fonts are enabled to render the graphics properly.")
 (license license:gpl3+)))
 
+(define-public texlive-dvisvgm-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-dvisvgm-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
+(delete-other-directories "texk" '("dvisvgm"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons "--enable-dvisvgm" (delete "--enable-web2c" #$flags)))
+   ((#:phases phases)
+#~(modify-phases #$phases
+;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
+;; the appropriate linker flags are not added.
+(add-after 'unpack 'patch-dvisvgm-build-files
+  (lambda _
+(substitute* "texk/dvisvgm/configure"
+  (("^have_libgs=yes" all)
+   (string-append all "\nHAVE_LIBGS=1")
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dvisvgm"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dvisvgm"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs
+ (list brotli
+   clipper
+   freetype
+   ghostscript
+   openssl
+   potrace
+   texlive-libkpathsea
+   woff2
+   xxhash
+   zlib))
+(propagated-inputs '())
+(home-page (package-home-page texlive-dvisvgm))
+(synopsis "Binary for @code{texlive-dvisvgm}")
+(description
+ "This package provides the binary for @code{texlive-dvisvgm}.")
+(license (package-license texlive-dvisvgm
+
 (define-public texlive-ebong
   (package
 (name "texlive-ebong")



77/137: gnu: texlive-texdirflatten: Add missing Perl input.

2024-06-24 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 761dc16beac9369c75b2e919a1ed5d35f77136b5
Author: Nicolas Goaziou 
AuthorDate: Mon Jun 3 21:02:03 2024 +0200

gnu: texlive-texdirflatten: Add missing Perl input.

* gnu/packages/tex.scm (texlive-texdirflatten)[inputs]: Add PERL.

Change-Id: Ie1089d37e0fb95cccdb3bc5bfed8dff4eb0074d3
---
 gnu/packages/tex.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 3a4c5f200a..9d356e580c 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -44933,6 +44933,7 @@ marked at the margin with grey bars by the LaTeX 
@code{changebar} package.")
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
 (arguments (list #:link-scripts #~(list "texdirflatten")))
+(inputs (list perl))
 (home-page "https://ctan.org/pkg/texdirflatten;)
 (synopsis "Collect files related to a LaTeX job in a single directory")
 (description



  1   2   >