me
/
guix
Archived
1
0
Fork 0

gnu: texlive-latex-base: Refresh package definition.

* gnu/packages/tex.scm (texlive-latex-base): Remove SIMPLE-TEXLIVE-PACKAGE
call.
[build-system]: Use TEXLIVE-BUILD-SYSTEM.
[arguments]: Use G-expressions.
<#:phases>: Remove unnecessary phase.
[native-inputs]: Add TEXLIVE-ETEX, TEXLIVE-LUATEX. Remove
TEXLIVE-LUATEXCONFIG.  Remove labels.
Nicolas Goaziou 2023-05-17 16:57:16 +02:00
parent b741baa6ee
commit 8c0d071dfc
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 189 additions and 224 deletions

View File

@ -3311,42 +3311,32 @@ formats.")
(license license:lppl))) (license license:lppl)))
(define-public texlive-latex-base (define-public texlive-latex-base
(let ((template (simple-texlive-package
"texlive-latex-base"
(list "/doc/latex/base/"
"/source/latex/base/"
;; Almost all files in /tex/latex/base are generated, but
;; these are not:
"/tex/latex/base/idx.tex"
"/tex/latex/base/lablst.tex"
"/tex/latex/base/ltnews.cls"
"/tex/latex/base/ltxcheck.tex"
"/tex/latex/base/ltxguide.cls"
"/tex/latex/base/minimal.cls"
"/tex/latex/base/sample2e.tex"
"/tex/latex/base/small2e.tex"
"/tex/latex/base/testpage.tex"
"/tex/latex/base/texsys.cfg")
(base32
"0msyjz0937rc7hs77v6la152sdiwd73qj41z1mlyh0m3dns9qz4g")
#:trivial? #t)))
(package (package
(inherit template) (name "texlive-latex-base")
(version (number->string %texlive-revision))
(source (texlive-origin
name version
(list "doc/latex/base/" "makeindex/latex/"
"source/latex/base/" "tex/latex/base/")
(base32
"0k2b6qi281cl4zml6l537iyps1zwaq7pip81qq8vlkhb9h5ggpnw")))
(build-system texlive-build-system)
(outputs '("out" "doc"))
(arguments (arguments
(substitute-keyword-arguments (package-arguments template) (list
((#:modules modules '()) #:texlive-latex-base #f
'((guix build gnu-build-system) #:modules '((guix build texlive-build-system)
(guix build utils) (guix build utils)
(ice-9 match) (ice-9 match)
(srfi srfi-26))) (srfi srfi-26))
((#:phases phases) #:phases
`(modify-phases ,phases #~(modify-phases %standard-phases
;; The literal tab in the dtx file is translated to the string ;; The literal tab in the dtx file is translated to the string "^^I"
;; "^^I" in the generated Lua file, which causes a syntax error. ;; in the generated Lua file, which causes a syntax error.
(add-after 'unpack 'fix-lua-sources (add-after 'unpack 'fix-lua-sources
(lambda _ (lambda _
(substitute* "source/latex/base/ltluatex.dtx" (substitute* "source/latex/base/ltluatex.dtx"
((" ") " ")))) (("\t") " "))))
(replace 'build (replace 'build
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; Find required fonts ;; Find required fonts
@ -3394,7 +3384,7 @@ formats.")
"luacsplain luatex" "optex luatex" "luacsplain luatex" "optex luatex"
;; LuaJIT is not ported to powerpc64le* or riscv64 yet and ;; LuaJIT is not ported to powerpc64le* or riscv64 yet and
;; building these fail on powerpc. ;; building these fail on powerpc.
,@(if (or (target-powerpc?) #$@(if (or (target-powerpc?)
(target-riscv64?)) (target-riscv64?))
'("luajittex" "luajithbtex" "mfluajit") '()) '("luajittex" "luajithbtex" "mfluajit") '())
"cont-en xetex" "cont-en pdftex" "pdfcsplain xetex" "cont-en xetex" "cont-en pdftex" "pdfcsplain xetex"
@ -3419,52 +3409,27 @@ formats.")
"--fmtdir=web2c" "--fmtdir=web2c"
(string-append "--cnffile=web2c/fmtutil.cnf")) (string-append "--cnffile=web2c/fmtutil.cnf"))
;; We don't actually want to install it. ;; We don't actually want to install it.
(delete-file "web2c/fmtutil.cnf"))) (delete-file "web2c/fmtutil.cnf")
(add-after 'install 'install-more ;; Also remove cruft.
(lambda* (#:key inputs outputs #:allow-other-keys) (for-each delete-file (find-files "web2c" "\\.log$")))))))
(let* ((out (assoc-ref outputs "out"))
(root (string-append out "/share/texmf-dist"))
(target (string-append root "/tex/latex/base"))
(web2c (string-append root "/web2c"))
(makeindex (string-append root "/makeindex/latex")))
(for-each delete-file (find-files "." "\\.(log|aux)$"))
;; The usedir directive in docstrip.ins is ignored, so these
;; two files end up in the wrong place. Move them.
(mkdir-p makeindex)
(for-each (lambda (file)
(install-file file makeindex)
(delete-file file))
'("build/gglo.ist"
"build/gind.ist"))
(for-each (cut install-file <> target)
(find-files "build" ".*"))
(for-each (cut install-file <> web2c)
(find-files "web2c" ".*")))))))))
(native-inputs (native-inputs
`(("texlive-bin" ,texlive-bin) (list texlive-bin
("texlive-tex-ini-files" ,texlive-tex-ini-files) texlive-cm
("texlive-plain" ,texlive-plain) texlive-etex
("texlive-kpathsea" ,texlive-kpathsea) texlive-knuth-lib
("texlive-cm" ,texlive-cm) texlive-kpathsea
("texlive-latex-fonts" ,texlive-latex-fonts) texlive-latex-fonts
("texlive-knuth-lib" ,texlive-knuth-lib) texlive-luatex
("texlive-luatexconfig" texlive-plain
,(texlive-origin texlive-tex-ini-files))
"texlive-luatexconfig" (number->string %texlive-revision)
(list "/tex/generic/config/luatex-unicode-letters.tex"
"/tex/generic/config/luatexiniconfig.tex"
"/web2c/texmfcnf.lua")
(base32
"065j47i2785nbj2507pzxlscyrwr4ghv6nksc3a01rp62bq8kkjp")))))
(propagated-inputs (propagated-inputs
(list texlive-dehyph-exptl (list texlive-dehyph-exptl
texlive-etex texlive-etex
texlive-hyph-utf8 texlive-hyph-utf8
texlive-hyphen-base
texlive-hyphen-afrikaans texlive-hyphen-afrikaans
texlive-hyphen-ancientgreek texlive-hyphen-ancientgreek
texlive-hyphen-armenian texlive-hyphen-armenian
texlive-hyphen-base
texlive-hyphen-basque texlive-hyphen-basque
texlive-hyphen-belarusian texlive-hyphen-belarusian
texlive-hyphen-bulgarian texlive-hyphen-bulgarian
@ -3481,7 +3446,6 @@ formats.")
texlive-hyphen-estonian texlive-hyphen-estonian
texlive-hyphen-ethiopic texlive-hyphen-ethiopic
texlive-hyphen-finnish texlive-hyphen-finnish
texlive-hyphen-schoolfinnish
texlive-hyphen-french texlive-hyphen-french
texlive-hyphen-friulan texlive-hyphen-friulan
texlive-hyphen-galician texlive-hyphen-galician
@ -3511,6 +3475,7 @@ formats.")
texlive-hyphen-romansh texlive-hyphen-romansh
texlive-hyphen-russian texlive-hyphen-russian
texlive-hyphen-sanskrit texlive-hyphen-sanskrit
texlive-hyphen-schoolfinnish
texlive-hyphen-serbian texlive-hyphen-serbian
texlive-hyphen-slovak texlive-hyphen-slovak
texlive-hyphen-slovenian texlive-hyphen-slovenian
@ -3522,24 +3487,24 @@ formats.")
texlive-hyphen-ukrainian texlive-hyphen-ukrainian
texlive-hyphen-uppersorbian texlive-hyphen-uppersorbian
texlive-hyphen-welsh texlive-hyphen-welsh
texlive-unicode-data
texlive-ukrhyph
texlive-ruhyphen
texlive-l3kernel
texlive-l3backend texlive-l3backend
texlive-l3kernel
texlive-latexconfig
texlive-ruhyphen
texlive-ukrhyph
texlive-unicode-data
;; TODO: This dependency isn't needed for LaTeX version 2021-06-01 ;; TODO: This dependency isn't needed for LaTeX version 2021-06-01
;; and later. See: ;; and later. See:
;; https://tug.org/pipermail/tex-live/2021-June/047180.html ;; <https://tug.org/pipermail/tex-live/2021-June/047180.html>
texlive-l3packages texlive-l3packages))
texlive-latexconfig))
(home-page "https://www.ctan.org/pkg/latex-base") (home-page "https://www.ctan.org/pkg/latex-base")
(synopsis "Base sources of LaTeX") (synopsis "Base sources of LaTeX")
(description (description
"This bundle comprises the source of LaTeX itself, together with several "This bundle comprises the source of LaTeX itself, together with several
packages which are considered \"part of the kernel\". This bundle, together packages which are considered part of the kernel. This bundle, together with
with the required packages, constitutes what every LaTeX distribution should the required packages, constitutes what every LaTeX distribution should
contain.") contain.")
(license license:lppl1.3c+)))) (license license:lppl1.3c+)))
(define-public texlive-atenddvi (define-public texlive-atenddvi
(package (package