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.
parent
b741baa6ee
commit
8c0d071dfc
|
@ -3311,235 +3311,200 @@ formats.")
|
||||||
(license license:lppl)))
|
(license license:lppl)))
|
||||||
|
|
||||||
(define-public texlive-latex-base
|
(define-public texlive-latex-base
|
||||||
(let ((template (simple-texlive-package
|
(package
|
||||||
"texlive-latex-base"
|
(name "texlive-latex-base")
|
||||||
(list "/doc/latex/base/"
|
(version (number->string %texlive-revision))
|
||||||
"/source/latex/base/"
|
(source (texlive-origin
|
||||||
;; Almost all files in /tex/latex/base are generated, but
|
name version
|
||||||
;; these are not:
|
(list "doc/latex/base/" "makeindex/latex/"
|
||||||
"/tex/latex/base/idx.tex"
|
"source/latex/base/" "tex/latex/base/")
|
||||||
"/tex/latex/base/lablst.tex"
|
(base32
|
||||||
"/tex/latex/base/ltnews.cls"
|
"0k2b6qi281cl4zml6l537iyps1zwaq7pip81qq8vlkhb9h5ggpnw")))
|
||||||
"/tex/latex/base/ltxcheck.tex"
|
(build-system texlive-build-system)
|
||||||
"/tex/latex/base/ltxguide.cls"
|
(outputs '("out" "doc"))
|
||||||
"/tex/latex/base/minimal.cls"
|
(arguments
|
||||||
"/tex/latex/base/sample2e.tex"
|
(list
|
||||||
"/tex/latex/base/small2e.tex"
|
#:texlive-latex-base #f
|
||||||
"/tex/latex/base/testpage.tex"
|
#:modules '((guix build texlive-build-system)
|
||||||
"/tex/latex/base/texsys.cfg")
|
(guix build utils)
|
||||||
(base32
|
(ice-9 match)
|
||||||
"0msyjz0937rc7hs77v6la152sdiwd73qj41z1mlyh0m3dns9qz4g")
|
(srfi srfi-26))
|
||||||
#:trivial? #t)))
|
#:phases
|
||||||
(package
|
#~(modify-phases %standard-phases
|
||||||
(inherit template)
|
;; The literal tab in the dtx file is translated to the string "^^I"
|
||||||
(arguments
|
;; in the generated Lua file, which causes a syntax error.
|
||||||
(substitute-keyword-arguments (package-arguments template)
|
(add-after 'unpack 'fix-lua-sources
|
||||||
((#:modules modules '())
|
(lambda _
|
||||||
'((guix build gnu-build-system)
|
(substitute* "source/latex/base/ltluatex.dtx"
|
||||||
(guix build utils)
|
(("\t") " "))))
|
||||||
(ice-9 match)
|
(replace 'build
|
||||||
(srfi srfi-26)))
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
((#:phases phases)
|
;; Find required fonts
|
||||||
`(modify-phases ,phases
|
(setenv "TFMFONTS"
|
||||||
;; The literal tab in the dtx file is translated to the string
|
(string-join
|
||||||
;; "^^I" in the generated Lua file, which causes a syntax error.
|
(map (match-lambda
|
||||||
(add-after 'unpack 'fix-lua-sources
|
((pkg-name . dir)
|
||||||
(lambda _
|
(string-append
|
||||||
(substitute* "source/latex/base/ltluatex.dtx"
|
(assoc-ref inputs pkg-name)
|
||||||
((" ") " "))))
|
"/share/texmf-dist/fonts/tfm/public"
|
||||||
(replace 'build
|
dir)))
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
'(("texlive-etex" . "/etex")
|
||||||
;; Find required fonts
|
("texlive-cm" . "/cm")
|
||||||
(setenv "TFMFONTS"
|
("texlive-latex-fonts" . "/latex-fonts")
|
||||||
|
("texlive-knuth-lib" . "/knuth-lib")))
|
||||||
|
":"))
|
||||||
|
(let ((cwd (getcwd)))
|
||||||
|
(setenv "TEXINPUTS"
|
||||||
|
(string-append
|
||||||
|
cwd "//:"
|
||||||
|
cwd "/source/latex/base//:"
|
||||||
|
cwd "/build:"
|
||||||
(string-join
|
(string-join
|
||||||
(map (match-lambda
|
(map (match-lambda ((_ . dir) dir)) inputs)
|
||||||
((pkg-name . dir)
|
"//:")))
|
||||||
(string-append
|
(setenv "LUAINPUTS" (string-append cwd "/build:")))
|
||||||
(assoc-ref inputs pkg-name)
|
|
||||||
"/share/texmf-dist/fonts/tfm/public"
|
|
||||||
dir)))
|
|
||||||
'(("texlive-etex" . "/etex")
|
|
||||||
("texlive-cm" . "/cm")
|
|
||||||
("texlive-latex-fonts" . "/latex-fonts")
|
|
||||||
("texlive-knuth-lib" . "/knuth-lib")))
|
|
||||||
":"))
|
|
||||||
(let ((cwd (getcwd)))
|
|
||||||
(setenv "TEXINPUTS"
|
|
||||||
(string-append
|
|
||||||
cwd "//:"
|
|
||||||
cwd "/source/latex/base//:"
|
|
||||||
cwd "/build:"
|
|
||||||
(string-join
|
|
||||||
(map (match-lambda ((_ . dir) dir)) inputs)
|
|
||||||
"//:")))
|
|
||||||
(setenv "LUAINPUTS" (string-append cwd "/build:")))
|
|
||||||
|
|
||||||
;; This is the actual build step.
|
;; This is the actual build step.
|
||||||
(mkdir "build")
|
(mkdir "build")
|
||||||
(invoke "tex" "-ini" "-interaction=scrollmode"
|
(invoke "tex" "-ini" "-interaction=scrollmode"
|
||||||
"-output-directory=build" "unpack.ins")
|
"-output-directory=build" "unpack.ins")
|
||||||
|
|
||||||
;; XXX: We can't build all formats at this point, nor are they
|
;; XXX: We can't build all formats at this point, nor are they
|
||||||
;; part of the LaTeX base, so we disable them. Actually, we
|
;; part of the LaTeX base, so we disable them. Actually, we
|
||||||
;; should be running this all in a profile hook, so that only
|
;; should be running this all in a profile hook, so that only
|
||||||
;; selected formats and hyphenation patterns are included, but it
|
;; selected formats and hyphenation patterns are included, but it
|
||||||
;; takes long and TeX Live isn't designed to be modular like
|
;; takes long and TeX Live isn't designed to be modular like
|
||||||
;; that. Everything operates on a shared directory, which we
|
;; that. Everything operates on a shared directory, which we
|
||||||
;; would only have at profile generation time.
|
;; would only have at profile generation time.
|
||||||
(let ((disabled-formats
|
(let ((disabled-formats
|
||||||
'("aleph aleph" "lamed aleph" "uptex uptex" "euptex euptex"
|
'("aleph aleph" "lamed aleph" "uptex uptex" "euptex euptex"
|
||||||
"eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex"
|
"eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex"
|
||||||
"platex-dev eptex" "uplatex-dev euptex"
|
"platex-dev eptex" "uplatex-dev euptex"
|
||||||
"csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex"
|
"csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex"
|
||||||
"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"
|
||||||
"pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex"
|
"pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex"
|
||||||
"mptopdf pdftex" "uplatex euptex" "jadetex pdftex"
|
"mptopdf pdftex" "uplatex euptex" "jadetex pdftex"
|
||||||
"amstex pdftex" "pdfcslatex pdftex" "lollipop tex"
|
"amstex pdftex" "pdfcslatex pdftex" "lollipop tex"
|
||||||
"xmltex pdftex" "pdfjadetex pdftex" "eplain pdftex"
|
"xmltex pdftex" "pdfjadetex pdftex" "eplain pdftex"
|
||||||
"texsis pdftex" "mltex pdftex" "utf8mex pdftex")))
|
"texsis pdftex" "mltex pdftex" "utf8mex pdftex")))
|
||||||
(mkdir "web2c")
|
(mkdir "web2c")
|
||||||
(install-file (string-append
|
(install-file (string-append
|
||||||
(assoc-ref inputs "texlive-kpathsea")
|
(assoc-ref inputs "texlive-kpathsea")
|
||||||
"/share/texmf-dist/web2c/fmtutil.cnf")
|
"/share/texmf-dist/web2c/fmtutil.cnf")
|
||||||
"web2c")
|
"web2c")
|
||||||
(make-file-writable "web2c/fmtutil.cnf")
|
(make-file-writable "web2c/fmtutil.cnf")
|
||||||
(substitute* "web2c/fmtutil.cnf"
|
(substitute* "web2c/fmtutil.cnf"
|
||||||
(((string-append "^(" (string-join disabled-formats "|") ")") m)
|
(((string-append "^(" (string-join disabled-formats "|") ")") m)
|
||||||
(string-append "#! " m))
|
(string-append "#! " m))
|
||||||
(("translate-file=cp227")
|
(("translate-file=cp227")
|
||||||
(format #f "translate-file=~a/share/texmf-dist/web2c/cp227"
|
(format #f "translate-file=~a/share/texmf-dist/web2c/cp227"
|
||||||
(assoc-ref inputs "texlive-kpathsea")))))
|
(assoc-ref inputs "texlive-kpathsea")))))
|
||||||
(invoke "fmtutil-sys" "--all"
|
(invoke "fmtutil-sys" "--all"
|
||||||
"--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"))
|
(native-inputs
|
||||||
(root (string-append out "/share/texmf-dist"))
|
(list texlive-bin
|
||||||
(target (string-append root "/tex/latex/base"))
|
texlive-cm
|
||||||
(web2c (string-append root "/web2c"))
|
texlive-etex
|
||||||
(makeindex (string-append root "/makeindex/latex")))
|
texlive-knuth-lib
|
||||||
(for-each delete-file (find-files "." "\\.(log|aux)$"))
|
texlive-kpathsea
|
||||||
|
texlive-latex-fonts
|
||||||
;; The usedir directive in docstrip.ins is ignored, so these
|
texlive-luatex
|
||||||
;; two files end up in the wrong place. Move them.
|
texlive-plain
|
||||||
(mkdir-p makeindex)
|
texlive-tex-ini-files))
|
||||||
(for-each (lambda (file)
|
(propagated-inputs
|
||||||
(install-file file makeindex)
|
(list texlive-dehyph-exptl
|
||||||
(delete-file file))
|
texlive-etex
|
||||||
'("build/gglo.ist"
|
texlive-hyph-utf8
|
||||||
"build/gind.ist"))
|
texlive-hyphen-afrikaans
|
||||||
(for-each (cut install-file <> target)
|
texlive-hyphen-ancientgreek
|
||||||
(find-files "build" ".*"))
|
texlive-hyphen-armenian
|
||||||
(for-each (cut install-file <> web2c)
|
texlive-hyphen-base
|
||||||
(find-files "web2c" ".*")))))))))
|
texlive-hyphen-basque
|
||||||
(native-inputs
|
texlive-hyphen-belarusian
|
||||||
`(("texlive-bin" ,texlive-bin)
|
texlive-hyphen-bulgarian
|
||||||
("texlive-tex-ini-files" ,texlive-tex-ini-files)
|
texlive-hyphen-catalan
|
||||||
("texlive-plain" ,texlive-plain)
|
texlive-hyphen-chinese
|
||||||
("texlive-kpathsea" ,texlive-kpathsea)
|
texlive-hyphen-churchslavonic
|
||||||
("texlive-cm" ,texlive-cm)
|
texlive-hyphen-coptic
|
||||||
("texlive-latex-fonts" ,texlive-latex-fonts)
|
texlive-hyphen-croatian
|
||||||
("texlive-knuth-lib" ,texlive-knuth-lib)
|
texlive-hyphen-czech
|
||||||
("texlive-luatexconfig"
|
texlive-hyphen-danish
|
||||||
,(texlive-origin
|
texlive-hyphen-dutch
|
||||||
"texlive-luatexconfig" (number->string %texlive-revision)
|
texlive-hyphen-english
|
||||||
(list "/tex/generic/config/luatex-unicode-letters.tex"
|
texlive-hyphen-esperanto
|
||||||
"/tex/generic/config/luatexiniconfig.tex"
|
texlive-hyphen-estonian
|
||||||
"/web2c/texmfcnf.lua")
|
texlive-hyphen-ethiopic
|
||||||
(base32
|
texlive-hyphen-finnish
|
||||||
"065j47i2785nbj2507pzxlscyrwr4ghv6nksc3a01rp62bq8kkjp")))))
|
texlive-hyphen-french
|
||||||
(propagated-inputs
|
texlive-hyphen-friulan
|
||||||
(list texlive-dehyph-exptl
|
texlive-hyphen-galician
|
||||||
texlive-etex
|
texlive-hyphen-georgian
|
||||||
texlive-hyph-utf8
|
texlive-hyphen-german
|
||||||
texlive-hyphen-base
|
texlive-hyphen-greek
|
||||||
texlive-hyphen-afrikaans
|
texlive-hyphen-hungarian
|
||||||
texlive-hyphen-ancientgreek
|
texlive-hyphen-icelandic
|
||||||
texlive-hyphen-armenian
|
texlive-hyphen-indic
|
||||||
texlive-hyphen-basque
|
texlive-hyphen-indonesian
|
||||||
texlive-hyphen-belarusian
|
texlive-hyphen-interlingua
|
||||||
texlive-hyphen-bulgarian
|
texlive-hyphen-irish
|
||||||
texlive-hyphen-catalan
|
texlive-hyphen-italian
|
||||||
texlive-hyphen-chinese
|
texlive-hyphen-kurmanji
|
||||||
texlive-hyphen-churchslavonic
|
texlive-hyphen-latin
|
||||||
texlive-hyphen-coptic
|
texlive-hyphen-latvian
|
||||||
texlive-hyphen-croatian
|
texlive-hyphen-lithuanian
|
||||||
texlive-hyphen-czech
|
texlive-hyphen-macedonian
|
||||||
texlive-hyphen-danish
|
texlive-hyphen-mongolian
|
||||||
texlive-hyphen-dutch
|
texlive-hyphen-norwegian
|
||||||
texlive-hyphen-english
|
texlive-hyphen-occitan
|
||||||
texlive-hyphen-esperanto
|
texlive-hyphen-pali
|
||||||
texlive-hyphen-estonian
|
texlive-hyphen-piedmontese
|
||||||
texlive-hyphen-ethiopic
|
texlive-hyphen-polish
|
||||||
texlive-hyphen-finnish
|
texlive-hyphen-portuguese
|
||||||
texlive-hyphen-schoolfinnish
|
texlive-hyphen-romanian
|
||||||
texlive-hyphen-french
|
texlive-hyphen-romansh
|
||||||
texlive-hyphen-friulan
|
texlive-hyphen-russian
|
||||||
texlive-hyphen-galician
|
texlive-hyphen-sanskrit
|
||||||
texlive-hyphen-georgian
|
texlive-hyphen-schoolfinnish
|
||||||
texlive-hyphen-german
|
texlive-hyphen-serbian
|
||||||
texlive-hyphen-greek
|
texlive-hyphen-slovak
|
||||||
texlive-hyphen-hungarian
|
texlive-hyphen-slovenian
|
||||||
texlive-hyphen-icelandic
|
texlive-hyphen-spanish
|
||||||
texlive-hyphen-indic
|
texlive-hyphen-swedish
|
||||||
texlive-hyphen-indonesian
|
texlive-hyphen-thai
|
||||||
texlive-hyphen-interlingua
|
texlive-hyphen-turkish
|
||||||
texlive-hyphen-irish
|
texlive-hyphen-turkmen
|
||||||
texlive-hyphen-italian
|
texlive-hyphen-ukrainian
|
||||||
texlive-hyphen-kurmanji
|
texlive-hyphen-uppersorbian
|
||||||
texlive-hyphen-latin
|
texlive-hyphen-welsh
|
||||||
texlive-hyphen-latvian
|
texlive-l3backend
|
||||||
texlive-hyphen-lithuanian
|
texlive-l3kernel
|
||||||
texlive-hyphen-macedonian
|
texlive-latexconfig
|
||||||
texlive-hyphen-mongolian
|
texlive-ruhyphen
|
||||||
texlive-hyphen-norwegian
|
texlive-ukrhyph
|
||||||
texlive-hyphen-occitan
|
texlive-unicode-data
|
||||||
texlive-hyphen-pali
|
;; TODO: This dependency isn't needed for LaTeX version 2021-06-01
|
||||||
texlive-hyphen-piedmontese
|
;; and later. See:
|
||||||
texlive-hyphen-polish
|
;; <https://tug.org/pipermail/tex-live/2021-June/047180.html>
|
||||||
texlive-hyphen-portuguese
|
texlive-l3packages))
|
||||||
texlive-hyphen-romanian
|
(home-page "https://www.ctan.org/pkg/latex-base")
|
||||||
texlive-hyphen-romansh
|
(synopsis "Base sources of LaTeX")
|
||||||
texlive-hyphen-russian
|
(description
|
||||||
texlive-hyphen-sanskrit
|
"This bundle comprises the source of LaTeX itself, together with several
|
||||||
texlive-hyphen-serbian
|
packages which are considered part of the kernel. This bundle, together with
|
||||||
texlive-hyphen-slovak
|
the required packages, constitutes what every LaTeX distribution should
|
||||||
texlive-hyphen-slovenian
|
|
||||||
texlive-hyphen-spanish
|
|
||||||
texlive-hyphen-swedish
|
|
||||||
texlive-hyphen-thai
|
|
||||||
texlive-hyphen-turkish
|
|
||||||
texlive-hyphen-turkmen
|
|
||||||
texlive-hyphen-ukrainian
|
|
||||||
texlive-hyphen-uppersorbian
|
|
||||||
texlive-hyphen-welsh
|
|
||||||
texlive-unicode-data
|
|
||||||
texlive-ukrhyph
|
|
||||||
texlive-ruhyphen
|
|
||||||
texlive-l3kernel
|
|
||||||
texlive-l3backend
|
|
||||||
;; 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))
|
|
||||||
(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
|
|
||||||
contain.")
|
contain.")
|
||||||
(license license:lppl1.3c+))))
|
(license license:lppl1.3c+)))
|
||||||
|
|
||||||
(define-public texlive-atenddvi
|
(define-public texlive-atenddvi
|
||||||
(package
|
(package
|
||||||
|
|
Reference in New Issue