guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

66/97: gnu: Add texlive-mflua-bin.


From: guix-commits
Subject: 66/97: gnu: Add texlive-mflua-bin.
Date: Fri, 21 Jun 2024 06:41:23 -0400 (EDT)

ngz pushed a commit to branch tex-team
in repository guix.

commit fac8218154a9f2233585aced0a3ebcf5291b3d11
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sun Jun 2 12:12:21 2024 +0200

    gnu: Add texlive-mflua-bin.
    
    * gnu/packages/tex.scm (texlive-mflua-bin): New variable.
    (texlive-mflua)[arguments]<#:link-scripts>: Remove keyword, since 
"fmlua.lua"
    is a not meant to be symlinked to "bin/".
    [propagated-inputs]: Add TEXLIVE-MFLUA-BIN.
    
    Change-Id: I7dc275c169afbc4bdada02feec83fa9470d49f94
---
 gnu/packages/tex.scm | 60 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 55 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 34747518f9..809c87b2ad 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -40202,11 +40202,8 @@ clearly show any mismatches.")
              (base32
               "0ngbhdh8hgpjfqnrjlnp27x3qziks3yf2zp1qq7r4bjfa5jx9gr6")))
     (build-system texlive-build-system)
-    (arguments
-     (list
-      #:link-scripts #~(list "mflua.lua")
-      #:create-formats #~(list "mflua")))
-    (propagated-inputs (list texlive-luatex texlive-metafont))
+    (arguments (list #:create-formats #~(list "mflua")))
+    (propagated-inputs (list texlive-luatex texlive-metafont 
texlive-mflua-bin))
     (home-page "https://ctan.org/pkg/mflua";)
     (synopsis "Configuration and base files for MFLua")
     (description
@@ -40217,6 +40214,59 @@ MFLua without any modification to produce exactly the 
same result.")
     ;; released under Public Domain terms.
     (license (list license:knuth license:public-domain))))
 
+(define-public texlive-mflua-bin
+  (package
+    (inherit texlive-bin)
+    (name "texlive-mflua-bin")
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons* "--disable-web2c"
+                 "--enable-mflua"
+                 ;; LuaJIT is not ported to some architectures yet.
+                 #$@(if (or (target-ppc64le?)
+                            (target-riscv64?))
+                        '()
+                        '("--enable-mfluajit"))
+                 (delete "--disable-mflua"
+                         (delete "--disable-mfluajit"
+                                 (delete "--enable-web2c" #$flags)))))
+       ((#:phases phases)
+        #~(let ((bin (string-append #$output "/bin")))
+            ;; Once Web2C is disabled, build process refuses to build
+            ;; libraries in the source tree, in particular lua53 and luajit,
+            ;; required for MfluaJIT.  The following changes forces building
+            ;; them.
+            (modify-phases #$phases
+              #$@(if (or (target-ppc64le?) (target-riscv64?))
+                     '()
+                     '((add-after 'unpack 'force-luajit-build
+                         (lambda _
+                           (substitute* "libs/configure"
+                             (("x\\$need_luajit") "xyes"))))
+                       (add-after 'install 'install-mfluajiit
+                         (lambda _
+                           (with-directory-excursion "texk/web2c"
+                             (invoke "make" "mfluajit")
+                             (install-file ".libs/mfluajit" bin))))))
+              (add-after 'unpack 'force-lua53-build
+                (lambda _
+                  (substitute* "libs/configure"
+                    (("x\\$need_lua53") "xyes"))))
+              (add-after 'install 'install-mflua
+                (lambda _
+                  (with-directory-excursion "texk/web2c"
+                    (invoke "make" "mflua")
+                    (install-file ".libs/mflua" bin)))))))))
+    (native-inputs (list pkg-config))
+    (inputs (modify-inputs (package-inputs texlive-bin)
+              (append potrace)))
+    (home-page (package-home-page texlive-mflua))
+    (synopsis "Binaries for @code{texlive-mflua}")
+    (description
+     "This package provides the binaries for @code{texlive-mflua}.")
+    (license (package-license texlive-mflua))))
+
 (define-public texlive-mkjobtexmf
   (package
     (name "texlive-mkjobtexmf")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]