mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-01 00:52:55 -05:00
gnu: texlive-hyphen-package: Remove SIMPLE-TEXLIVE-PACKAGE call.
* gnu/packages/tex.scm (texlive-hyphen-package): Remove SIMPLE-TEXLIVE-PACKAGE call.
This commit is contained in:
parent
8c0d071dfc
commit
6a09a6c5eb
1 changed files with 63 additions and 58 deletions
|
@ -184,70 +184,75 @@ (define hyph-utf8-scripts
|
||||||
|
|
||||||
(define (texlive-hyphen-package name code locations hash)
|
(define (texlive-hyphen-package name code locations hash)
|
||||||
"Return a TeX Live hyphenation package with the given NAME, using source
|
"Return a TeX Live hyphenation package with the given NAME, using source
|
||||||
files from LOCATIONS with expected checksum HASH. CODE is not currently in use."
|
files from LOCATIONS with expected checksum HASH. CODE is not currently in
|
||||||
(let ((parent (simple-texlive-package
|
use."
|
||||||
name locations hash #:trivial? #t)))
|
(package
|
||||||
(package
|
(name name)
|
||||||
(inherit parent)
|
(version (number->string %texlive-revision))
|
||||||
(arguments
|
(source (texlive-origin name version location hash))
|
||||||
(substitute-keyword-arguments (package-arguments parent)
|
(build-system texlive-build-system)
|
||||||
((#:phases phases)
|
(arguments
|
||||||
`(modify-phases ,phases
|
(list
|
||||||
(replace 'build
|
#:texlive-latex-base #f
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
#:phases
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
#~(modify-phases %standard-phases
|
||||||
(root (string-append out "/share/texmf-dist"))
|
(replace 'build
|
||||||
(patterns
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(string-append root "/tex/generic/hyph-utf8/patterns/txt/"))
|
(let* ((root (string-append #$output "/share/texmf-dist"))
|
||||||
(loaders
|
(patterns
|
||||||
(string-append root "/tex/generic/hyph-utf8/loadhyph"))
|
(string-append root "/tex/generic/hyph-utf8/patterns/txt/"))
|
||||||
(ptex
|
(loaders
|
||||||
(string-append root "/tex/generic/hyph-utf8/patterns/ptex"))
|
(string-append root "/tex/generic/hyph-utf8/loadhyph"))
|
||||||
(quote
|
(ptex
|
||||||
(string-append root "/tex/generic/hyph-utf8/patterns/quote")))
|
(string-append root "/tex/generic/hyph-utf8/patterns/ptex"))
|
||||||
(mkdir "scripts")
|
(quote
|
||||||
(copy-recursively
|
(string-append root "/tex/generic/hyph-utf8/patterns/quote")))
|
||||||
(dirname (search-input-file inputs "hyph-utf8.rb"))
|
(mkdir "scripts")
|
||||||
"scripts")
|
(copy-recursively
|
||||||
|
(dirname (search-input-file inputs "hyph-utf8.rb"))
|
||||||
|
"scripts")
|
||||||
|
|
||||||
;; Prepare target directories
|
;; Prepare target directories
|
||||||
(mkdir-p patterns)
|
(mkdir-p patterns)
|
||||||
(mkdir-p loaders)
|
(mkdir-p loaders)
|
||||||
(mkdir-p ptex)
|
(mkdir-p ptex)
|
||||||
(mkdir-p quote)
|
(mkdir-p quote)
|
||||||
|
|
||||||
;; Generate plain patterns
|
;; Generate plain patterns
|
||||||
(with-directory-excursion "scripts"
|
(with-directory-excursion "scripts"
|
||||||
(substitute* "lib/tex/hyphen/path.rb"
|
(substitute* "lib/tex/hyphen/path.rb"
|
||||||
(("^([[:blank:]]+)TeXROOT = .*" _ indent)
|
(("^([[:blank:]]+)TeXROOT = .*" _ indent)
|
||||||
(string-append indent "TeXROOT = \""
|
(string-append indent "TeXROOT = \""
|
||||||
(getcwd) "/..\"\n")))
|
(getcwd) "/..\"\n")))
|
||||||
|
|
||||||
(substitute* "generate-plain-patterns.rb"
|
(substitute* "generate-plain-patterns.rb"
|
||||||
;; Ruby 2 does not need this.
|
;; Ruby 2 does not need this.
|
||||||
(("require 'unicode'") "")
|
(("require 'unicode'") "")
|
||||||
;; Write directly to the output directory
|
;; Write directly to the output directory
|
||||||
(("File\\.join\\(PATH::TXT")
|
(("File\\.join\\(PATH::TXT")
|
||||||
(string-append "File.join(\"" patterns "\""))
|
(string-append "File.join(\"" patterns "\""))
|
||||||
(("File\\.join\\(PATH::QUOTE")
|
(("File\\.join\\(PATH::QUOTE")
|
||||||
(string-append "File.join(\"" quote "\"")))
|
(string-append "File.join(\"" quote "\"")))
|
||||||
(invoke "ruby" "generate-plain-patterns.rb")
|
(invoke "ruby" "generate-plain-patterns.rb")
|
||||||
|
|
||||||
;; Build pattern loaders
|
;; Build pattern loaders
|
||||||
(substitute* "generate-pattern-loaders.rb"
|
(substitute* "generate-pattern-loaders.rb"
|
||||||
(("File\\.join\\(PATH::LOADER")
|
(("File\\.join\\(PATH::LOADER")
|
||||||
(string-append "File.join(\"" loaders "\"")))
|
(string-append "File.join(\"" loaders "\"")))
|
||||||
|
|
||||||
(invoke "ruby" "generate-pattern-loaders.rb")
|
(invoke "ruby" "generate-pattern-loaders.rb")
|
||||||
|
|
||||||
;; Build ptex patterns
|
;; Build ptex patterns
|
||||||
(substitute* "generate-ptex-patterns.rb"
|
(substitute* "generate-ptex-patterns.rb"
|
||||||
(("File\\.join\\(PATH::PTEX")
|
(("File\\.join\\(PATH::PTEX")
|
||||||
(string-append "File.join(\"" ptex "\"")))
|
(string-append "File.join(\"" ptex "\"")))
|
||||||
(invoke "ruby" "generate-ptex-patterns.rb")))))))))
|
(invoke "ruby" "generate-ptex-patterns.rb"))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list ruby-2.7 ruby-hydra-minimal/pinned hyph-utf8-scripts))
|
(list hyph-utf8-scripts ruby-2.7 ruby-hydra-minimal/pinned))
|
||||||
(home-page "https://ctan.org/pkg/hyph-utf8"))))
|
(home-page "https://ctan.org/pkg/hyph-utf8")
|
||||||
|
(synopsis #f)
|
||||||
|
(description #f)
|
||||||
|
(license #f)))
|
||||||
|
|
||||||
(define texlive-extra-src
|
(define texlive-extra-src
|
||||||
(origin
|
(origin
|
||||||
|
|
Loading…
Reference in a new issue