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)))
(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
(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
(substitute-keyword-arguments (package-arguments template)
((#:modules modules '())
'((guix build gnu-build-system)
(list
#:texlive-latex-base #f
#:modules '((guix build texlive-build-system)
(guix build utils)
(ice-9 match)
(srfi srfi-26)))
((#:phases phases)
`(modify-phases ,phases
;; The literal tab in the dtx file is translated to the string
;; "^^I" in the generated Lua file, which causes a syntax error.
(srfi srfi-26))
#:phases
#~(modify-phases %standard-phases
;; The literal tab in the dtx file is translated to the string "^^I"
;; in the generated Lua file, which causes a syntax error.
(add-after 'unpack 'fix-lua-sources
(lambda _
(substitute* "source/latex/base/ltluatex.dtx"
((" ") " "))))
(("\t") " "))))
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
;; Find required fonts
@ -3394,7 +3384,7 @@ formats.")
"luacsplain luatex" "optex luatex"
;; LuaJIT is not ported to powerpc64le* or riscv64 yet and
;; building these fail on powerpc.
,@(if (or (target-powerpc?)
#$@(if (or (target-powerpc?)
(target-riscv64?))
'("luajittex" "luajithbtex" "mfluajit") '())
"cont-en xetex" "cont-en pdftex" "pdfcsplain xetex"
@ -3419,52 +3409,27 @@ formats.")
"--fmtdir=web2c"
(string-append "--cnffile=web2c/fmtutil.cnf"))
;; We don't actually want to install it.
(delete-file "web2c/fmtutil.cnf")))
(add-after 'install 'install-more
(lambda* (#:key inputs outputs #:allow-other-keys)
(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" ".*")))))))))
(delete-file "web2c/fmtutil.cnf")
;; Also remove cruft.
(for-each delete-file (find-files "web2c" "\\.log$")))))))
(native-inputs
`(("texlive-bin" ,texlive-bin)
("texlive-tex-ini-files" ,texlive-tex-ini-files)
("texlive-plain" ,texlive-plain)
("texlive-kpathsea" ,texlive-kpathsea)
("texlive-cm" ,texlive-cm)
("texlive-latex-fonts" ,texlive-latex-fonts)
("texlive-knuth-lib" ,texlive-knuth-lib)
("texlive-luatexconfig"
,(texlive-origin
"texlive-luatexconfig" (number->string %texlive-revision)
(list "/tex/generic/config/luatex-unicode-letters.tex"
"/tex/generic/config/luatexiniconfig.tex"
"/web2c/texmfcnf.lua")
(base32
"065j47i2785nbj2507pzxlscyrwr4ghv6nksc3a01rp62bq8kkjp")))))
(list texlive-bin
texlive-cm
texlive-etex
texlive-knuth-lib
texlive-kpathsea
texlive-latex-fonts
texlive-luatex
texlive-plain
texlive-tex-ini-files))
(propagated-inputs
(list texlive-dehyph-exptl
texlive-etex
texlive-hyph-utf8
texlive-hyphen-base
texlive-hyphen-afrikaans
texlive-hyphen-ancientgreek
texlive-hyphen-armenian
texlive-hyphen-base
texlive-hyphen-basque
texlive-hyphen-belarusian
texlive-hyphen-bulgarian
@ -3481,7 +3446,6 @@ formats.")
texlive-hyphen-estonian
texlive-hyphen-ethiopic
texlive-hyphen-finnish
texlive-hyphen-schoolfinnish
texlive-hyphen-french
texlive-hyphen-friulan
texlive-hyphen-galician
@ -3511,6 +3475,7 @@ formats.")
texlive-hyphen-romansh
texlive-hyphen-russian
texlive-hyphen-sanskrit
texlive-hyphen-schoolfinnish
texlive-hyphen-serbian
texlive-hyphen-slovak
texlive-hyphen-slovenian
@ -3522,24 +3487,24 @@ formats.")
texlive-hyphen-ukrainian
texlive-hyphen-uppersorbian
texlive-hyphen-welsh
texlive-unicode-data
texlive-ukrhyph
texlive-ruhyphen
texlive-l3kernel
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
;; and later. See:
;; https://tug.org/pipermail/tex-live/2021-June/047180.html
texlive-l3packages
texlive-latexconfig))
;; <https://tug.org/pipermail/tex-live/2021-June/047180.html>
texlive-l3packages))
(home-page "https://www.ctan.org/pkg/latex-base")
(synopsis "Base sources of LaTeX")
(description
"This bundle comprises the source of LaTeX itself, together with several
packages which are considered \"part of the kernel\". This bundle, together
with the required packages, constitutes what every LaTeX distribution should
packages which are considered part of the kernel. This bundle, together with
the required packages, constitutes what every LaTeX distribution should
contain.")
(license license:lppl1.3c+))))
(license license:lppl1.3c+)))
(define-public texlive-atenddvi
(package