gnu: texlive-bin: Fix indentation.

* gnu/packages/tex.scm (texlive-bin): Fix indentation.
This commit is contained in:
Maxim Cournoyer 2021-01-02 22:56:23 -05:00
parent 8e7c75043a
commit ed4b0f78b2
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -233,96 +233,96 @@ (define texlive-texmf-src
(define-public texlive-bin (define-public texlive-bin
(package (package
(name "texlive-bin") (name "texlive-bin")
(version "20190410") (version "20190410")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "ftp://tug.org/historic/systems/texlive/2019/" (uri (string-append "ftp://tug.org/historic/systems/texlive/2019/"
"texlive-" version "-source.tar.xz")) "texlive-" version "-source.tar.xz"))
(sha256 (sha256
(base32 (base32
"1dfps39q6bdr1zsbp9p74mvalmy3bycihv19sb9c6kg30kprz8nj")) "1dfps39q6bdr1zsbp9p74mvalmy3bycihv19sb9c6kg30kprz8nj"))
(patches (patches
(let ((arch-patch (let ((arch-patch
(lambda (name revision hash) (lambda (name revision hash)
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://git.archlinux.org/svntogit/packages.git" (uri (string-append "https://git.archlinux.org/svntogit/packages.git"
"/plain/trunk/" name "?h=packages/texlive-bin" "/plain/trunk/" name "?h=packages/texlive-bin"
"&id=" revision)) "&id=" revision))
(file-name (string-append "texlive-bin-" name)) (file-name (string-append "texlive-bin-" name))
(sha256 (base32 hash))))) (sha256 (base32 hash)))))
(arch-revision "49d7fe25e5ea63f136ebc20270c1d8fc9b00041c")) (arch-revision "49d7fe25e5ea63f136ebc20270c1d8fc9b00041c"))
(list (list
(arch-patch "pdftex-poppler0.76.patch" arch-revision (arch-patch "pdftex-poppler0.76.patch" arch-revision
"03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaax") "03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaax")
(search-patch "texlive-bin-poppler-0.83.patch") (search-patch "texlive-bin-poppler-0.83.patch")
(arch-patch "texlive-poppler-0.84.patch" arch-revision (arch-patch "texlive-poppler-0.84.patch" arch-revision
"1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa") "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa")
(search-patch "texlive-bin-poppler-0.86.patch")))) (search-patch "texlive-bin-poppler-0.86.patch"))))
(modules '((guix build utils) (modules '((guix build utils)
(ice-9 ftw))) (ice-9 ftw)))
(snippet (snippet
'(begin '(begin
(with-directory-excursion "libs" (with-directory-excursion "libs"
(let ((preserved-directories '("." ".." "lua53" "luajit"))) (let ((preserved-directories '("." ".." "lua53" "luajit")))
;; Delete bundled software, except Lua which cannot easily be ;; Delete bundled software, except Lua which cannot easily be
;; used as an external dependency. ;; used as an external dependency.
(for-each delete-file-recursively (for-each delete-file-recursively
(scandir "." (scandir "."
(lambda (file) (lambda (file)
(and (not (member file preserved-directories)) (and (not (member file preserved-directories))
(eq? 'directory (stat:type (stat file))))))))) (eq? 'directory (stat:type (stat file)))))))))
;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too. ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
#t)))) #t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
`(("texlive-extra-src" ,texlive-extra-src) `(("texlive-extra-src" ,texlive-extra-src)
("texlive-scripts" ("texlive-scripts"
,(origin ,(origin
(method svn-fetch) (method svn-fetch)
(uri (svn-reference (uri (svn-reference
(url (string-append "svn://www.tug.org/texlive/tags/" (url (string-append "svn://www.tug.org/texlive/tags/"
%texlive-tag "/Master/texmf-dist/" %texlive-tag "/Master/texmf-dist/"
"/scripts/texlive")) "/scripts/texlive"))
(revision %texlive-revision))) (revision %texlive-revision)))
(file-name (string-append "texlive-scripts-" (file-name (string-append "texlive-scripts-"
(number->string %texlive-revision) (number->string %texlive-revision)
"-checkout")) "-checkout"))
(sha256 (sha256
(base32 (base32
"1cj04svl8bpfwjr4gqfcc04rmklz3aggrxvgj7q5bxrh7c7g18xh")))) "1cj04svl8bpfwjr4gqfcc04rmklz3aggrxvgj7q5bxrh7c7g18xh"))))
("cairo" ,cairo) ("cairo" ,cairo)
("fontconfig" ,fontconfig) ("fontconfig" ,fontconfig)
("fontforge" ,fontforge) ("fontforge" ,fontforge)
("freetype" ,freetype) ("freetype" ,freetype)
("gd" ,gd) ("gd" ,gd)
("gmp" ,gmp) ("gmp" ,gmp)
("ghostscript" ,ghostscript) ("ghostscript" ,ghostscript)
("graphite2" ,graphite2) ("graphite2" ,graphite2)
("harfbuzz" ,harfbuzz) ("harfbuzz" ,harfbuzz)
("icu4c" ,icu4c) ("icu4c" ,icu4c)
("libpaper" ,libpaper) ("libpaper" ,libpaper)
("libpng" ,libpng) ("libpng" ,libpng)
("libxaw" ,libxaw) ("libxaw" ,libxaw)
("libxt" ,libxt) ("libxt" ,libxt)
("mpfr" ,mpfr) ("mpfr" ,mpfr)
("perl" ,perl) ("perl" ,perl)
("pixman" ,pixman) ("pixman" ,pixman)
("poppler" ,poppler) ("poppler" ,poppler)
("potrace" ,potrace) ("potrace" ,potrace)
("python" ,python) ("python" ,python)
("ruby" ,ruby) ("ruby" ,ruby)
("tcsh" ,tcsh) ("tcsh" ,tcsh)
("teckit" ,teckit) ("teckit" ,teckit)
("zlib" ,zlib) ("zlib" ,zlib)
("zziplib" ,zziplib))) ("zziplib" ,zziplib)))
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config))) `(("pkg-config" ,pkg-config)))
(arguments (arguments
`(#:out-of-source? #t `(#:out-of-source? #t
#:configure-flags #:configure-flags
'("--disable-static" '("--disable-static"
"--disable-native-texlive-build" "--disable-native-texlive-build"
"--enable-shared" "--enable-shared"
@ -345,108 +345,108 @@ (define-public texlive-bin
"--with-system-zlib" "--with-system-zlib"
"--with-system-zziplib") "--with-system-zziplib")
;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test. ;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test.
;; XXX FIXME fix luajit properly on mips64 and aarch64. ;; XXX FIXME fix luajit properly on mips64 and aarch64.
#:tests? ,(let ((s (or (%current-target-system) #:tests? ,(let ((s (or (%current-target-system)
(%current-system)))) (%current-system))))
(not (or (string-prefix? "aarch64" s) (not (or (string-prefix? "aarch64" s)
(string-prefix? "mips64" s)))) (string-prefix? "mips64" s))))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'configure-ghostscript-executable (add-after 'unpack 'configure-ghostscript-executable
;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows, ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows,
;; and the "gs" ghostscript executable on Unix. It detects Unix by ;; and the "gs" ghostscript executable on Unix. It detects Unix by
;; checking for the existence of the /usr/bin directory. Since ;; checking for the existence of the /usr/bin directory. Since
;; Guix System does not have /usr/bin, it is also detected as Windows. ;; Guix System does not have /usr/bin, it is also detected as Windows.
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl" (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
(("gswin32c") "gs")) (("gswin32c") "gs"))
(substitute* "texk/texlive/linked_scripts/epstopdf/epstopdf.pl" (substitute* "texk/texlive/linked_scripts/epstopdf/epstopdf.pl"
(("\"gs\"") (("\"gs\"")
(string-append "\"" (assoc-ref inputs "ghostscript") "/bin/gs\""))) (string-append "\"" (assoc-ref inputs "ghostscript") "/bin/gs\"")))
#t)) #t))
(add-after 'unpack 'use-code-for-new-poppler (add-after 'unpack 'use-code-for-new-poppler
(lambda _ (lambda _
(copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc" (copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc"
"texk/web2c/pdftexdir/pdftoepdf.cc") "texk/web2c/pdftexdir/pdftoepdf.cc")
(copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc" (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc"
"texk/web2c/pdftexdir/pdftosrc.cc") "texk/web2c/pdftexdir/pdftosrc.cc")
#t)) #t))
(add-after 'unpack 'patch-dvisvgm-build-files (add-after 'unpack 'patch-dvisvgm-build-files
(lambda _ (lambda _
;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
;; the appropriate linker flags are not added. ;; the appropriate linker flags are not added.
(substitute* "texk/dvisvgm/configure" (substitute* "texk/dvisvgm/configure"
(("^have_libgs=yes" all) (("^have_libgs=yes" all)
(string-append all "\nHAVE_LIBGS=1"))) (string-append all "\nHAVE_LIBGS=1")))
#t)) #t))
(add-after 'unpack 'disable-failing-test (add-after 'unpack 'disable-failing-test
(lambda _ (lambda _
;; FIXME: This test fails on 32-bit architectures since Glibc 2.28: ;; FIXME: This test fails on 32-bit architectures since Glibc 2.28:
;; <https://bugzilla.redhat.com/show_bug.cgi?id=1631847>. ;; <https://bugzilla.redhat.com/show_bug.cgi?id=1631847>.
(substitute* "texk/web2c/omegafonts/check.test" (substitute* "texk/web2c/omegafonts/check.test"
(("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck \\|\\| exit 1") (("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck \\|\\| exit 1")
"./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 77")) "./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 77"))
#t)) #t))
(add-after 'install 'postint (add-after 'install 'postint
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args) (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(share (string-append out "/share")) (share (string-append out "/share"))
(texlive-extra (assoc-ref inputs "texlive-extra-src")) (texlive-extra (assoc-ref inputs "texlive-extra-src"))
(unpack (assoc-ref %standard-phases 'unpack)) (unpack (assoc-ref %standard-phases 'unpack))
(patch-source-shebangs (patch-source-shebangs
(assoc-ref %standard-phases 'patch-source-shebangs))) (assoc-ref %standard-phases 'patch-source-shebangs)))
(substitute* (string-append share "/texmf-dist/web2c/texmf.cnf") (substitute* (string-append share "/texmf-dist/web2c/texmf.cnf")
;; Don't truncate lines. ;; Don't truncate lines.
(("^error_line = .*$") "error_line = 254\n") (("^error_line = .*$") "error_line = 254\n")
(("^half_error_line = .*$") "half_error_line = 238\n") (("^half_error_line = .*$") "half_error_line = 238\n")
(("^max_print_line = .*$") "max_print_line = 1000\n")) (("^max_print_line = .*$") "max_print_line = 1000\n"))
;; Create symbolic links for the latex variants and their ;; Create symbolic links for the latex variants and their
;; man pages. ;; man pages.
(with-directory-excursion (string-append out "/bin/") (with-directory-excursion (string-append out "/bin/")
(for-each symlink (for-each symlink
'("pdftex" "pdftex" "xetex" "luatex") '("pdftex" "pdftex" "xetex" "luatex")
'("latex" "pdflatex" "xelatex" "lualatex"))) '("latex" "pdflatex" "xelatex" "lualatex")))
(with-directory-excursion (string-append share "/man/man1/") (with-directory-excursion (string-append share "/man/man1/")
(symlink "luatex.1" "lualatex.1")) (symlink "luatex.1" "lualatex.1"))
;; Unpack texlive-extra and install tlpkg. ;; Unpack texlive-extra and install tlpkg.
(mkdir "texlive-extra") (mkdir "texlive-extra")
(with-directory-excursion "texlive-extra" (with-directory-excursion "texlive-extra"
(apply unpack (list #:source texlive-extra)) (apply unpack (list #:source texlive-extra))
(apply patch-source-shebangs (list #:source texlive-extra)) (apply patch-source-shebangs (list #:source texlive-extra))
(invoke "mv" "tlpkg" share)) (invoke "mv" "tlpkg" share))
(let ((scripts (string-append share "/texmf-dist/scripts/texlive/"))) (let ((scripts (string-append share "/texmf-dist/scripts/texlive/")))
(mkdir-p scripts) (mkdir-p scripts)
(copy-recursively (assoc-ref inputs "texlive-scripts") scripts) (copy-recursively (assoc-ref inputs "texlive-scripts") scripts)
;; Make sure that fmtutil can find its Perl modules. ;; Make sure that fmtutil can find its Perl modules.
(substitute* (string-append scripts "fmtutil.pl") (substitute* (string-append scripts "fmtutil.pl")
(("\\$TEXMFROOT/") (string-append share "/")))) (("\\$TEXMFROOT/") (string-append share "/"))))
;; texlua shebangs are not patched by the patch-source-shebangs ;; texlua shebangs are not patched by the patch-source-shebangs
;; phase because the texlua executable does not exist at that ;; phase because the texlua executable does not exist at that
;; time. ;; time.
(setenv "PATH" (string-append (getenv "PATH") ":" out "/bin")) (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
(with-directory-excursion out (with-directory-excursion out
(patch-source-shebangs)))))))) (patch-source-shebangs))))))))
(native-search-paths (native-search-paths
(list (search-path-specification (list (search-path-specification
(variable "TEXMF") (variable "TEXMF")
(files '("share/texmf-dist")) (files '("share/texmf-dist"))
(separator #f)) (separator #f))
(search-path-specification (search-path-specification
(variable "TEXMFCNF") (variable "TEXMFCNF")
(files '("share/texmf-dist/web2c")) (files '("share/texmf-dist/web2c"))
(separator #f)))) (separator #f))))
(synopsis "TeX Live, a package of the TeX typesetting system") (synopsis "TeX Live, a package of the TeX typesetting system")
(description (description
"TeX Live provides a comprehensive TeX document production system. "TeX Live provides a comprehensive TeX document production system.
It includes all the major TeX-related programs, macro packages, and fonts It includes all the major TeX-related programs, macro packages, and fonts
that are free software, including support for many languages around the that are free software, including support for many languages around the
world. world.
This package contains the binaries.") This package contains the binaries.")
(license (license:fsf-free "https://www.tug.org/texlive/copying.html")) (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
(home-page "https://www.tug.org/texlive/"))) (home-page "https://www.tug.org/texlive/")))
(define texlive-docstrip (define texlive-docstrip