mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-01 00:52:55 -05:00
gnu: texlive-hyph-utf8: Remove SIMPLE-TEXLIVE-PACKAGE call.
* gnu/packages/tex.scm (texlive-hyph-utf8): Remove SIMPLE-TEXLIVE-PACKAGE call. [arguments]: Use G-expressions. Remove trailing #T from phases. [native-inputs]: Add TEXLIVE-DOCSTRIP.
This commit is contained in:
parent
12a22bfdb5
commit
2e4f91bcce
1 changed files with 91 additions and 94 deletions
|
@ -2891,115 +2891,112 @@ (define-public texlive-hyphen-welsh
|
||||||
|
|
||||||
(define-public texlive-hyph-utf8
|
(define-public texlive-hyph-utf8
|
||||||
(package
|
(package
|
||||||
(inherit (simple-texlive-package
|
(name "texlive-hyph-utf8")
|
||||||
"texlive-hyph-utf8"
|
(version (number->string %texlive-revision))
|
||||||
(list "/source/generic/hyph-utf8/"
|
(source (texlive-origin
|
||||||
"/source/luatex/hyph-utf8/"
|
name version
|
||||||
"/doc/luatex/hyph-utf8/"
|
(list "doc/luatex/hyph-utf8/"
|
||||||
"/tex/luatex/hyph-utf8/etex.src"
|
"source/generic/hyph-utf8/"
|
||||||
;; Used to extract luatex-hyphen.lua
|
"source/generic/hyph-utf8/contributed/"
|
||||||
"/tex/latex/base/docstrip.tex"
|
"source/generic/hyph-utf8/data/"
|
||||||
|
"source/luatex/hyph-utf8/"
|
||||||
;; Documentation; we can't use the whole directory because
|
"tex/luatex/hyph-utf8/"
|
||||||
;; it includes files from other packages.
|
;; Documentation; we can't use the whole directory because
|
||||||
"/doc/generic/hyph-utf8/CHANGES"
|
;; it includes files from other packages.
|
||||||
"/doc/generic/hyph-utf8/HISTORY"
|
"doc/generic/hyph-utf8/CHANGES"
|
||||||
"/doc/generic/hyph-utf8/hyph-utf8.pdf"
|
"doc/generic/hyph-utf8/HISTORY"
|
||||||
"/doc/generic/hyph-utf8/hyph-utf8.tex"
|
"doc/generic/hyph-utf8/hyph-utf8.pdf"
|
||||||
"/doc/generic/hyph-utf8/hyphenation-distribution.pdf"
|
"doc/generic/hyph-utf8/hyph-utf8.tex"
|
||||||
"/doc/generic/hyph-utf8/hyphenation-distribution.tex"
|
"doc/generic/hyph-utf8/hyphenation-distribution.pdf"
|
||||||
"/doc/generic/hyph-utf8/img/miktex-languages.png"
|
"doc/generic/hyph-utf8/hyphenation-distribution.tex"
|
||||||
"/doc/generic/hyph-utf8/img/texlive-collection.png")
|
"doc/generic/hyph-utf8/img/miktex-languages.png"
|
||||||
(base32
|
"doc/generic/hyph-utf8/img/texlive-collection.png")
|
||||||
"0rgp0zn36gwzqwpmjb9h01ns3m19v3r7lpw1h0pc9bx115w6c9jx")))
|
(base32
|
||||||
|
"1dm023k05c0pnnyqgbsy1cbpq8layabdp8acln0v59kpsx7flmj9")))
|
||||||
(outputs '("out" "doc"))
|
(outputs '("out" "doc"))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; there are none
|
(list
|
||||||
#:modules ((guix build gnu-build-system)
|
#:tests? #f ; there are none
|
||||||
|
#:modules '((guix build gnu-build-system)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(ice-9 match))
|
(ice-9 match))
|
||||||
#:make-flags
|
#:make-flags
|
||||||
(list "-C" "source/luatex/hyph-utf8/"
|
#~(list "-C" "source/luatex/hyph-utf8/"
|
||||||
(string-append "DO_TEX = tex --interaction=nonstopmode '&tex' $<")
|
(string-append "DO_TEX = tex --interaction=nonstopmode '&tex' $<")
|
||||||
(string-append "RUNDIR =" (assoc-ref %outputs "out") "/share/texmf-dist/tex/luatex/hyph-utf8/")
|
(string-append "RUNDIR =" (assoc-ref %outputs "out") "/share/texmf-dist/tex/luatex/hyph-utf8/")
|
||||||
(string-append "DOCDIR =" (assoc-ref %outputs "doc") "/share/texmf-dist/doc/luatex/hyph-utf8/")
|
(string-append "DOCDIR =" (assoc-ref %outputs "doc") "/share/texmf-dist/doc/luatex/hyph-utf8/")
|
||||||
;; hyphen.cfg is neither included nor generated, so let's only build the lua file.
|
;; hyphen.cfg is neither included nor generated, so let's only build the lua file.
|
||||||
(string-append "UNPACKED = $(NAME).lua"))
|
(string-append "UNPACKED = $(NAME).lua"))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
;; TeX isn't usable at this point, so we first need to generate the
|
;; TeX isn't usable at this point, so we first need to generate the
|
||||||
;; tex.fmt.
|
;; tex.fmt.
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
;; Target directories must exist.
|
;; Target directories must exist.
|
||||||
(mkdir-p (string-append (assoc-ref %outputs "out")
|
(mkdir-p (string-append (assoc-ref %outputs "out")
|
||||||
"/share/texmf-dist/tex/luatex/hyph-utf8/"))
|
"/share/texmf-dist/tex/luatex/hyph-utf8/"))
|
||||||
(mkdir-p (string-append (assoc-ref %outputs "doc")
|
(mkdir-p (string-append (assoc-ref %outputs "doc")
|
||||||
"/share/texmf-dist/doc/luatex/hyph-utf8/"))
|
"/share/texmf-dist/doc/luatex/hyph-utf8/"))
|
||||||
|
|
||||||
;; We cannot build the documentation because that requires a
|
;; We cannot build the documentation because that requires a
|
||||||
;; fully functional pdflatex, which depends on this package.
|
;; fully functional pdflatex, which depends on this package.
|
||||||
(substitute* "source/luatex/hyph-utf8/Makefile"
|
(substitute* "source/luatex/hyph-utf8/Makefile"
|
||||||
(("all: .*") "all: $(RUNFILES)\n"))
|
(("all: .*") "all: $(RUNFILES)\n"))
|
||||||
|
|
||||||
;; Find required fonts for building tex.fmt
|
;; Find required fonts for building tex.fmt
|
||||||
(setenv "TFMFONTS"
|
(setenv "TFMFONTS"
|
||||||
(string-append (assoc-ref inputs "texlive-cm")
|
(string-append (assoc-ref inputs "texlive-cm")
|
||||||
"/share/texmf-dist/fonts/tfm/public/cm:"
|
"/share/texmf-dist/fonts/tfm/public/cm:"
|
||||||
(assoc-ref inputs "texlive-knuth-lib")
|
(assoc-ref inputs "texlive-knuth-lib")
|
||||||
"/share/texmf-dist/fonts/tfm/public/knuth-lib"))
|
"/share/texmf-dist/fonts/tfm/public/knuth-lib"))
|
||||||
;; ...and find all tex files in this environment.
|
;; ...and find all tex files in this environment.
|
||||||
(setenv "TEXINPUTS"
|
(setenv "TEXINPUTS"
|
||||||
(string-append
|
(string-append
|
||||||
(getcwd) ":"
|
(getcwd) ":"
|
||||||
(string-join
|
(string-join
|
||||||
(map (match-lambda ((_ . dir) dir)) inputs)
|
(map (match-lambda ((_ . dir) dir)) inputs)
|
||||||
"//:")))
|
"//:")))
|
||||||
|
|
||||||
;; Generate tex.fmt.
|
;; Generate tex.fmt.
|
||||||
(let ((where "source/luatex/hyph-utf8"))
|
(let ((where "source/luatex/hyph-utf8"))
|
||||||
(mkdir-p where)
|
(mkdir-p where)
|
||||||
(with-directory-excursion where
|
(with-directory-excursion where
|
||||||
(invoke "tex" "-ini"
|
(invoke "tex" "-ini"
|
||||||
(string-append (assoc-ref inputs "texlive-plain")
|
(string-append (assoc-ref inputs "texlive-plain")
|
||||||
"/share/texmf-dist/tex/plain/config/tex.ini"))))))
|
"/share/texmf-dist/tex/plain/config/tex.ini"))))))
|
||||||
(add-before 'build 'build-loaders-and-converters
|
(add-before 'build 'build-loaders-and-converters
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let* ((root (string-append (assoc-ref outputs "out")
|
(let* ((root (string-append #$output "/share/texmf-dist"))
|
||||||
"/share/texmf-dist"))
|
(conv
|
||||||
(conv
|
(string-append root "/tex/generic/hyph-utf8/conversions")))
|
||||||
(string-append root
|
|
||||||
"/tex/generic/hyph-utf8/conversions")))
|
|
||||||
|
|
||||||
;; Build converters
|
;; Build converters
|
||||||
(mkdir-p conv)
|
(mkdir-p conv)
|
||||||
(with-directory-excursion "source/generic/hyph-utf8"
|
(with-directory-excursion "source/generic/hyph-utf8"
|
||||||
(substitute* "generate-converters.rb"
|
(substitute* "generate-converters.rb"
|
||||||
(("\\$path_root=File.*")
|
(("\\$path_root=File.*")
|
||||||
(string-append "$path_root=\"" root "\"\n"))
|
(string-append "$path_root=\"" root "\"\n"))
|
||||||
;; Avoid error with newer Ruby.
|
;; Avoid error with newer Ruby.
|
||||||
(("#1\\{%") "#1{%%"))
|
(("#1\\{%") "#1{%%"))
|
||||||
(invoke "ruby" "generate-converters.rb"))
|
(invoke "ruby" "generate-converters.rb")))))
|
||||||
#t)))
|
(replace 'install
|
||||||
(replace 'install
|
(lambda* (#:key source #:allow-other-keys)
|
||||||
(lambda* (#:key source outputs #:allow-other-keys)
|
(mkdir-p #$output:doc)
|
||||||
(let ((doc (assoc-ref outputs "doc"))
|
(copy-recursively
|
||||||
(out (assoc-ref outputs "out")))
|
(string-append source "/doc")
|
||||||
(mkdir-p doc)
|
(string-append #$output:doc "/doc"))
|
||||||
(copy-recursively
|
(install-file
|
||||||
(string-append source "/doc")
|
(string-append source "/tex/luatex/hyph-utf8/etex.src")
|
||||||
(string-append doc "/doc"))
|
(string-append #$output "/share/texmf-dist/tex/luatex/hyph-utf8/")))))))
|
||||||
(install-file
|
|
||||||
(string-append source "/tex/luatex/hyph-utf8/etex.src")
|
|
||||||
(string-append out "/share/texmf-dist/tex/luatex/hyph-utf8/")))
|
|
||||||
#t)))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list ruby-2.7
|
(list ruby-2.7
|
||||||
texlive-bin
|
texlive-bin
|
||||||
;; The following packages are needed for build "tex.fmt", which we
|
;; The following packages are needed for build "tex.fmt", which we
|
||||||
;; need for a working "tex".
|
;; need for a working "tex".
|
||||||
texlive-cm
|
texlive-cm
|
||||||
|
texlive-docstrip
|
||||||
texlive-knuth-lib
|
texlive-knuth-lib
|
||||||
texlive-hyphen-base
|
texlive-hyphen-base
|
||||||
texlive-plain))
|
texlive-plain))
|
||||||
|
|
Loading…
Reference in a new issue