From 653556e881f029fa1788d9cac49323c95d16dbf4 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 27 Sep 2024 02:23:21 -0600 Subject: [PATCH] texlive: fixup mtxrun for 2024 version (#46465) --- var/spack/repos/builtin/packages/texlive/package.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/texlive/package.py b/var/spack/repos/builtin/packages/texlive/package.py index 909aade8618..7accb43e8e5 100644 --- a/var/spack/repos/builtin/packages/texlive/package.py +++ b/var/spack/repos/builtin/packages/texlive/package.py @@ -104,6 +104,7 @@ class Texlive(AutotoolsPackage): depends_on("teckit") depends_on("zlib-api") depends_on("zziplib") + depends_on("lua-lpeg", when="@20240312:") build_directory = "spack-build" @@ -152,9 +153,17 @@ def setup_texlive(self): # Create and run setup utilities fmtutil_sys = Executable(join_path(self.prefix.bin, self.tex_arch(), "fmtutil-sys")) mktexlsr = Executable(join_path(self.prefix.bin, self.tex_arch(), "mktexlsr")) - mtxrun = Executable(join_path(self.prefix.bin, self.tex_arch(), "mtxrun")) mktexlsr() fmtutil_sys("--all") + if self.spec.satisfies("@:2023"): + mtxrun = Executable(join_path(self.prefix.bin, self.tex_arch(), "mtxrun")) + else: + mtxrun_lua = join_path( + self.prefix, "texmf-dist", "scripts", "context", "lua", "mtxrun.lua" + ) + chmod = which("chmod") + chmod("+x", mtxrun_lua) + mtxrun = Executable(mtxrun_lua) mtxrun("--generate") def setup_build_environment(self, env):