diff options
author | Nicolas Goaziou <[email protected]> | 2024-06-02 01:02:06 +0200 |
---|---|---|
committer | Ludovic Courtès <[email protected]> | 2024-08-31 10:45:29 +0200 |
commit | ff21fa3c23ccd6d97c35ed515b5d421a87547e9e (patch) | |
tree | 024cf80c49eb51d36b81feed6e58ab112eab43d2 /gnu | |
parent | 66ed294e5a53b5b80dbeccf1ddc168a1596a66c6 (diff) |
gnu: Add texlive-luajittex-bin.
* gnu/packages/tex.scm (texlive-luajittex-bin): New variable.
(texlive-luajittex)[arguments]<#:create-formats>: Build "luajithbtex" and
"luajittex" formats only on platforms where LuaJIT is supported.
[propagated-inputs]: Likewise, only add TEXLIVE-LUAJITTEX-BIN on such
platforms.
Change-Id: I7ce923642268e0db12802f368042703f14dc4a64
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/tex.scm | 64 |
1 files changed, 55 insertions, 9 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 37aa7161f1..3231bb90c3 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -40105,16 +40105,24 @@ environments and another with all extracted environments converted to "1qfbg0r6gsncgymh00yc83kcayd4m7bvryap8f63sm9s9bzfl6yv"))) (outputs '("out" "doc")) (build-system texlive-build-system) - (arguments (list #:create-formats #~(list "luajithbtex" "luajittex"))) + (arguments + (list #:create-formats + #~(and (not #$(or (target-ppc64le?) + (target-riscv64?))) + (list "luajithbtex" "luajittex")))) (propagated-inputs - (list texlive-cm - texlive-etex - texlive-hyphen-complete - texlive-knuth-lib - texlive-luatex - texlive-plain - texlive-tex-ini-files - texlive-unicode-data)) + (append (if (or (target-ppc64le?) + (target-riscv64?)) + '() + (list texlive-luajittex-bin)) + (list texlive-cm + texlive-etex + texlive-hyphen-complete + texlive-knuth-lib + texlive-luatex + texlive-plain + texlive-tex-ini-files + texlive-unicode-data))) (home-page "https://ctan.org/pkg/luajittex") (synopsis "LuaTeX with JIT compiler, with and without HarfBuzz") (description @@ -40122,6 +40130,44 @@ environments and another with all extracted environments converted to without HarfBuzz.") (license license:gpl2))) +(define-public texlive-luajittex-bin + (package + (inherit texlive-bin) + (name "texlive-luajittex-bin") + (arguments + (substitute-keyword-arguments (package-arguments texlive-bin) + ((#:configure-flags flags) + #~(cons* "--disable-web2c" + "--enable-luajithbtex" + "--enable-luajittex" + (delete "--disable-luajittex" + (delete "--disable-luajithbtex" + (delete "--enable-web2c" #$flags))))) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'force-libs-build + ;; Once Web2C is disabled, build process refuses to build + ;; libraries in the source tree, in particular pplib and luajit, + ;; required for LuajitTeX. The following change forces building + ;; them. + (lambda _ + (substitute* "libs/configure" + (("x\\$need_(pplib|luajit)") "xyes")))) + (add-after 'install 'install-binaries + (lambda _ + (with-directory-excursion "texk/web2c" + (invoke "make" "luajittex") + (invoke "make" "luajithbtex") + (let ((bin (string-append #$output "/bin"))) + (install-file ".libs/luajittex" bin) + (install-file ".libs/luajithbtex" bin))))))))) + (native-inputs (list pkg-config)) + (home-page (package-home-page texlive-luajittex)) + (synopsis "Binaries for @code{texlive-luajittex}") + (description + "This package provides the binaries for @code{texlive-luajittex}.") + (license (package-license texlive-luajittex)))) + (define-public texlive-match-parens (package (name "texlive-match-parens") |