Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Texlive 2025
@ 2025-04-11 20:41 dkwo
  2025-04-11 21:53 ` leahneukirchen
                   ` (48 more replies)
  0 siblings, 49 replies; 50+ messages in thread
From: dkwo @ 2025-04-11 20:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

There is a new pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- I built this PR locally for my native architecture, (aarch64-glibc)
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it. I will add the various packages to removed later, if this looks fine.
- `texlive`: I removed tlmgr as everything is packaged via xbps, and split latexindent subpkg.

cc: @fosslinux @tornaria @leahneukirchen What do you think?
[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 41473 bytes --]

From c29225f6231f38a36cdba9015883ce279da9fa2b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 7a0f45b99058ff7810c1baeb3597d392883e981c Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  16 +-
 srcpkgs/texlive/template                      |  92 +++----
 7 files changed, 42 insertions(+), 355 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
index af78c42f08c1a5..7737c320399946 100644
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ b/srcpkgs/texlive/patches/tlmgr.patch
@@ -9,7 +9,7 @@
  if ($svnrev =~ m/: ([0-9]+) /) {
    $tlmgrrevision = $1;
  } else {
-@@ -44,43 +44,12 @@
+@@ -44,38 +44,7 @@
  
  BEGIN {
    $^W = 1;
@@ -34,7 +34,7 @@
 -    $kpsewhichname = "kpsewhich";
 -  }
 -  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
 -    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
 -  }
 -
@@ -55,7 +55,7 @@
  }
  
  use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
+@@ -628,6 +597,13 @@
      tldie("$prg: Try --help if you need it.\n");
    }
  
@@ -66,10 +66,10 @@
 +    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
 +  }
 +
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
  # sets up the user tree for tlmgr in user mode
  sub action_init_usertree {
    # init_local_db but do not die if localtlpdb is not found!
@@ -80,7 +80,7 @@
    my $tlpdb = TeXLive::TLPDB->new;
    my $usertree;
    if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
+@@ -7149,7 +7127,11 @@
      if ($should_i_die == 2) {
        return undef;
      } else {
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..377ffeaa1bd8c6 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -69,15 +74,16 @@ makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
 depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +141,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -212,37 +206,19 @@ post_install() {
 		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
 	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
 		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
+
+	# trick from Alpine
+	export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	texlinks -f ${DESTDIR}/usr/share/texmf-dist/web2c/fmtutil.cnf "$DESTDIR"/usr/bin
+	rm -r ${DESTDIR}/usr/share/texmf-dist
 	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +254,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +286,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +320,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +336,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +344,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From d783753d8786cd5cc5e841ab27beaa930567d9fc Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ------
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++++++++
 srcpkgs/texlive-core/patches/0003-tlmgr.patch | 39 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ------
 srcpkgs/texlive-formatsextra/template         | 12 ------
 srcpkgs/texlive-games/template                | 12 ------
 srcpkgs/texlive-humanities/template           | 12 ------
 srcpkgs/texlive-langchinese/template          | 12 ------
 srcpkgs/texlive-langcyrillic/template         | 12 ------
 srcpkgs/texlive-langextra/template            | 12 ------
 srcpkgs/texlive-langgreek/template            | 12 ------
 srcpkgs/texlive-langjapanese/template         | 12 ------
 srcpkgs/texlive-langkorean/template           | 12 ------
 srcpkgs/texlive-latexextra/template           | 12 ------
 srcpkgs/texlive-music/template                | 12 ------
 srcpkgs/texlive-pictures/template             | 12 ------
 srcpkgs/texlive-pstricks/template             | 12 ------
 srcpkgs/texlive-publishers/template           | 11 ------
 srcpkgs/texlive-science/template              | 12 ------
 20 files changed, 83 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/0003-tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/0003-tlmgr.patch b/srcpkgs/texlive-core/patches/0003-tlmgr.patch
new file mode 100644
index 00000000000000..46b5ca3cfc3010
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0003-tlmgr.patch
@@ -0,0 +1,39 @@
+This patch drops the logic to detect if tlmgr is run in bootstrapping mode,
+which assumes that tlmgr.pl is installed next to kpsewhich. However, we
+(intentionally) hide it a bit so that users use apk to install texmf-dist
+subpackages, rather than mixing distro provided and side-loaded packages.
+
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -44,30 +44,7 @@ END {
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
++  chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+ 
+   # if we have no directory in which to find our modules,
+   # no point in going on.
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
@ 2025-04-11 21:53 ` leahneukirchen
  2025-04-16 14:16 ` dkwo
                   ` (47 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: leahneukirchen @ 2025-04-11 21:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2798073431

Comment:
Probably fine, but I don't use this package.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
  2025-04-11 21:53 ` leahneukirchen
@ 2025-04-16 14:16 ` dkwo
  2025-04-16 14:26 ` leahneukirchen
                   ` (46 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-16 14:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2809737322

Comment:
is this something to worry about?
```
Updating texmf-dist formats...
(guessed encoding #4: ASCII = utf8)
```

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
  2025-04-11 21:53 ` leahneukirchen
  2025-04-16 14:16 ` dkwo
@ 2025-04-16 14:26 ` leahneukirchen
  2025-04-16 14:34 ` dkwo
                   ` (45 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: leahneukirchen @ 2025-04-16 14:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2809767336

Comment:
If it still succeeds, I don't think so, the upsteam TeXLive prints the same.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (2 preceding siblings ...)
  2025-04-16 14:26 ` leahneukirchen
@ 2025-04-16 14:34 ` dkwo
  2025-04-16 14:48 ` [PR PATCH] [Updated] " dkwo
                   ` (44 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-16 14:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2809790244

Comment:
Yes, it succeeds. Thanks!

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (3 preceding siblings ...)
  2025-04-16 14:34 ` dkwo
@ 2025-04-16 14:48 ` dkwo
  2025-04-16 18:19 ` dkwo
                   ` (43 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-16 14:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- I built this PR locally for my native architecture, (aarch64-glibc)
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it. I will add the various packages to removed later, if this looks fine.
- `texlive`: I removed tlmgr as everything is packaged via xbps, and split latexindent subpkg.

cc: @fosslinux @tornaria @leahneukirchen What do you think?
[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 50017 bytes --]

From 9e94edae962b05ac88b5c953fa1abc2d707a39d5 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 3b0db4ecb152f5a44c123e21e82e6d9d1bd67ac1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      |  99 +++-----
 7 files changed, 36 insertions(+), 447 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..61e56e6d326e1c 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -69,15 +74,16 @@ makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
 depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +141,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +195,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +207,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +251,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +283,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +317,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +333,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +341,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From d78f389937d6c140d7def12b7064485471f6ede1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 srcpkgs/texlive-core/patches/texmf.cnf.patch  | 62 ++++++++++++
 .../texlive-core/patches/texmfcnf.lua.patch   | 62 ++++++++++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 21 files changed, 242 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/texmf.cnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/texmfcnf.lua.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/texmf.cnf.patch b/srcpkgs/texlive-core/patches/texmf.cnf.patch
new file mode 100644
index 00000000000000..018b0c8d449cff
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/texmf.cnf.patch
@@ -0,0 +1,62 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = $SELFAUTODIR/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = /usr/local/share/texmf;/usr/share/texmf
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/patches/texmfcnf.lua.patch b/srcpkgs/texlive-core/patches/texmfcnf.lua.patch
new file mode 100644
index 00000000000000..1bab367a90e64b
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/texmfcnf.lua.patch
@@ -0,0 +1,62 @@
+--- a/texmf-dist/web2c/texmfcnf.lua
++++ b/texmf-dist/web2c/texmfcnf.lua
+@@ -1,6 +1,12 @@
+ -- todo: come up with an auto-texlive identification (texmf-dist)
+ 
+-local hiddentexlivepath = ".texlive2025"
++local hiddentexlivepath = ".texlive"
++
++-- ConTeXt needs a properly expanded TEXMFLOCAL, so here is a
++-- bit of lua code to make that happen
++
++local texmflocal = resolvers.prefixes.selfautoparent();
++texmflocal = string.gsub(texmflocal, "20%d%d$", "texmf-local");
+ 
+ return {
+ 
+@@ -52,7 +58,7 @@
+ 
+             TEXMFVAR        = "home:" .. hiddentexlivepath .. "/texmf-var",
+             TEXMFCONFIG     = "home:" .. hiddentexlivepath .. "/texmf-config",
+-            TEXMFSYSVAR     = "selfautoparent:texmf-var",
++            TEXMFSYSVAR     = "/var/lib/texmf",
+             TEXMFCACHE      = "$TEXMFSYSVAR;$TEXMFVAR",
+ 
+             -- I don't like this texmf under home and texmf-home would make more sense. One never knows
+@@ -62,7 +68,7 @@
+             -- By using prefixes we don't get expanded paths in the cache __path__ entry. This makes the
+             -- tex root relocatable.
+ 
+-            TEXMFOS         = "selfautodir:",
++            TEXMFOS         = "selfautodir:share",
+ 
+             -- standalone:
+ 
+@@ -73,8 +79,8 @@
+ 
+             -- texlive:
+ 
+-            TEXMFDIST       = "selfautoparent:texmf-dist",
+-            TEXMFSYSCONFIG  = "selfautoparent:texmf-config",
++            TEXMFDIST       = "selfautodir:share/texmf-dist",
++            TEXMFSYSCONFIG  = "/etc/texmf",
+ 
+             -- The texmf-local path is only used for (maybe) some additional configuration file.
+ 	    -- Changed texmf-local to use ../ per Bruno Voisin,
+@@ -86,7 +92,7 @@
+ 	    -- More info:
+ 	    --   https://wiki.contextgarden.net/Use_the_fonts_you_want
+ 	    --   https://wiki.contextgarden.net/Mtxrun#base and #fontsa
+-            TEXMFLOCAL      = "selfautoparent:../texmf-local",
++            TEXMFLOCAL      = texmflocal,
+             TEXMFFONTS      = "selfautoparent:texmf-fonts",
+             TEXMFPROJECT    = "selfautoparent:texmf-project",
+ 
+@@ -101,7 +107,6 @@
+          -- TEXMF           = "{$TEXMFHOME,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFMODULES,!!$TEXMFCONTEXT,!!$TEXMFSYSTEM,!!$TEXMFMAIN}",
+ 
+             -- texlive:
+-
+             TEXMF           = "{$TEXMFCONFIG,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFDIST}",
+ 
+             TEXFONTMAPS     = ".;$TEXMF/fonts/data//;$TEXMF/fonts/map/{pdftex,dvips}//",
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (4 preceding siblings ...)
  2025-04-16 14:48 ` [PR PATCH] [Updated] " dkwo
@ 2025-04-16 18:19 ` dkwo
  2025-04-16 20:25 ` dkwo
                   ` (42 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-16 18:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- I built this PR locally for my native architecture, (aarch64-glibc)
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it. I will add the various packages to removed later, if this looks fine.
- `texlive`: I removed tlmgr as everything is packaged via xbps, and split latexindent subpkg.

cc: @fosslinux @tornaria @leahneukirchen What do you think?
[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 50180 bytes --]

From 06348afe6361c641ced0365c12aceaff051116d8 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From ef142a437e9b7a291351b68450270f5392c30830 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..cb350b6a1a894e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 23be84ff006e7dc93081ac6791aea30891f43310 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 srcpkgs/texlive-core/patches/texmf.cnf.patch  | 62 ++++++++++++
 .../texlive-core/patches/texmfcnf.lua.patch   | 62 ++++++++++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 21 files changed, 242 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/texmf.cnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/texmfcnf.lua.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/texmf.cnf.patch b/srcpkgs/texlive-core/patches/texmf.cnf.patch
new file mode 100644
index 00000000000000..018b0c8d449cff
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/texmf.cnf.patch
@@ -0,0 +1,62 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = $SELFAUTODIR/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = /usr/local/share/texmf;/usr/share/texmf
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/patches/texmfcnf.lua.patch b/srcpkgs/texlive-core/patches/texmfcnf.lua.patch
new file mode 100644
index 00000000000000..1bab367a90e64b
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/texmfcnf.lua.patch
@@ -0,0 +1,62 @@
+--- a/texmf-dist/web2c/texmfcnf.lua
++++ b/texmf-dist/web2c/texmfcnf.lua
+@@ -1,6 +1,12 @@
+ -- todo: come up with an auto-texlive identification (texmf-dist)
+ 
+-local hiddentexlivepath = ".texlive2025"
++local hiddentexlivepath = ".texlive"
++
++-- ConTeXt needs a properly expanded TEXMFLOCAL, so here is a
++-- bit of lua code to make that happen
++
++local texmflocal = resolvers.prefixes.selfautoparent();
++texmflocal = string.gsub(texmflocal, "20%d%d$", "texmf-local");
+ 
+ return {
+ 
+@@ -52,7 +58,7 @@
+ 
+             TEXMFVAR        = "home:" .. hiddentexlivepath .. "/texmf-var",
+             TEXMFCONFIG     = "home:" .. hiddentexlivepath .. "/texmf-config",
+-            TEXMFSYSVAR     = "selfautoparent:texmf-var",
++            TEXMFSYSVAR     = "/var/lib/texmf",
+             TEXMFCACHE      = "$TEXMFSYSVAR;$TEXMFVAR",
+ 
+             -- I don't like this texmf under home and texmf-home would make more sense. One never knows
+@@ -62,7 +68,7 @@
+             -- By using prefixes we don't get expanded paths in the cache __path__ entry. This makes the
+             -- tex root relocatable.
+ 
+-            TEXMFOS         = "selfautodir:",
++            TEXMFOS         = "selfautodir:share",
+ 
+             -- standalone:
+ 
+@@ -73,8 +79,8 @@
+ 
+             -- texlive:
+ 
+-            TEXMFDIST       = "selfautoparent:texmf-dist",
+-            TEXMFSYSCONFIG  = "selfautoparent:texmf-config",
++            TEXMFDIST       = "selfautodir:share/texmf-dist",
++            TEXMFSYSCONFIG  = "/etc/texmf",
+ 
+             -- The texmf-local path is only used for (maybe) some additional configuration file.
+ 	    -- Changed texmf-local to use ../ per Bruno Voisin,
+@@ -86,7 +92,7 @@
+ 	    -- More info:
+ 	    --   https://wiki.contextgarden.net/Use_the_fonts_you_want
+ 	    --   https://wiki.contextgarden.net/Mtxrun#base and #fontsa
+-            TEXMFLOCAL      = "selfautoparent:../texmf-local",
++            TEXMFLOCAL      = texmflocal,
+             TEXMFFONTS      = "selfautoparent:texmf-fonts",
+             TEXMFPROJECT    = "selfautoparent:texmf-project",
+ 
+@@ -101,7 +107,6 @@
+          -- TEXMF           = "{$TEXMFHOME,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFMODULES,!!$TEXMFCONTEXT,!!$TEXMFSYSTEM,!!$TEXMFMAIN}",
+ 
+             -- texlive:
+-
+             TEXMF           = "{$TEXMFCONFIG,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFDIST}",
+ 
+             TEXFONTMAPS     = ".;$TEXMF/fonts/data//;$TEXMF/fonts/map/{pdftex,dvips}//",
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (5 preceding siblings ...)
  2025-04-16 18:19 ` dkwo
@ 2025-04-16 20:25 ` dkwo
  2025-04-22 18:23 ` dkwo
                   ` (41 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-16 20:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- I built this PR locally for my native architecture, (aarch64-glibc)
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it. I will add the various packages to removed later, if this looks fine.
- `texlive`: I removed tlmgr as everything is packaged via xbps, and split latexindent subpkg.

cc: @fosslinux @tornaria @leahneukirchen What do you think?
[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 45549 bytes --]

From 06348afe6361c641ced0365c12aceaff051116d8 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From ef142a437e9b7a291351b68450270f5392c30830 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..cb350b6a1a894e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From eff69ca82c368e4f0dae364cbb47cada2fb02b1b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 20 files changed, 139 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (6 preceding siblings ...)
  2025-04-16 20:25 ` dkwo
@ 2025-04-22 18:23 ` dkwo
  2025-04-22 18:23 ` dkwo
                   ` (40 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-22 18:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.
- todo:  add the various packages to removed

cc: @fosslinux @tornaria @leahneukirchen What do you think?
[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 73678 bytes --]

From 1549ca44c37a686ec5cf9cbbb918af0876285d38 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/5] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From c517b7722eaf3a5d757fb862cd29bebc1f6cb9da Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/5] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..cb350b6a1a894e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From d7ff4dc80f21973544dd49c8e6f46ce9c7bd1448 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/5] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 20 files changed, 139 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 4fdc6c1432436a903b321c12d6013fd285728557 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 11:37:23 -0400
Subject: [PATCH 4/5] texlive: simplify cross luajit

---
 srcpkgs/texlive/patches/cross-luajit.patch | 124 ---------------------
 srcpkgs/texlive/template                   |  38 ++-----
 2 files changed, 9 insertions(+), 153 deletions(-)
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch

diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index cb350b6a1a894e..01d98eb533aae2 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -73,7 +73,7 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+depends="dialog ghostscript perl-Tk xbps-triggers
  texlive-latexmk latexindent"
 checkdepends="diffutils"
 short_desc="TeX Live"
@@ -137,40 +137,20 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-" 
+	fi
+fi
+
 post_extract() {
 	mkdir -p "${build_wrksrc}"
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
 pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
-	fi
-
 	# web2c should not be cross
 	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
 	cd "${wrksrc}/build/texk/web2c/web2c"

From c9db676249a08b736bb4d9a17d31187975baabe8 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 14:10:09 -0400
Subject: [PATCH 5/5] texlive: simplify cross

---
 srcpkgs/texlive/files/remove-himktables.patch | 13 ---------
 srcpkgs/texlive/template                      | 28 +++----------------
 2 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch

diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 01d98eb533aae2..066b8e766b171e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -147,31 +147,11 @@ fi
 
 post_extract() {
 	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-pre_build() {
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
 
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (7 preceding siblings ...)
  2025-04-22 18:23 ` dkwo
@ 2025-04-22 18:23 ` dkwo
  2025-04-22 18:25 ` [PR PATCH] [Updated] " dkwo
                   ` (39 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-22 18:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2822134755

Comment:
Fixed and simplified cross-compiling.
One nitpick: how do I edit (in configure) `--with-banner-add=/VoidLinux`, such that it adds a space in between?

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (8 preceding siblings ...)
  2025-04-22 18:23 ` dkwo
@ 2025-04-22 18:25 ` dkwo
  2025-04-22 18:29 ` dkwo
                   ` (38 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-22 18:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.
- todo:  add the various packages to removed

cc: @fosslinux @tornaria @leahneukirchen What do you think?
[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 73186 bytes --]

From 1549ca44c37a686ec5cf9cbbb918af0876285d38 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/5] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From c517b7722eaf3a5d757fb862cd29bebc1f6cb9da Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/5] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..cb350b6a1a894e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From d7ff4dc80f21973544dd49c8e6f46ce9c7bd1448 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/5] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 20 files changed, 139 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 1962a7a50f79ff8e73b375a753cafe03daf68f79 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 11:37:23 -0400
Subject: [PATCH 4/5] texlive: simplify cross luajit

---
 srcpkgs/texlive/patches/cross-luajit.patch | 124 ---------------------
 srcpkgs/texlive/template                   |  36 ++----
 2 files changed, 8 insertions(+), 152 deletions(-)
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch

diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index cb350b6a1a894e..fe5dbbe71eaaf7 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -137,40 +137,20 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-" 
+	fi
+fi
+
 post_extract() {
 	mkdir -p "${build_wrksrc}"
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
 pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
-	fi
-
 	# web2c should not be cross
 	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
 	cd "${wrksrc}/build/texk/web2c/web2c"

From bff5a5baf1fd15c4493ce01d8c1de108c7cb3589 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 14:10:09 -0400
Subject: [PATCH 5/5] texlive: simplify cross

---
 srcpkgs/texlive/files/remove-himktables.patch | 13 ---------
 srcpkgs/texlive/template                      | 28 +++----------------
 2 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch

diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index fe5dbbe71eaaf7..c0735612ceb65b 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -147,31 +147,11 @@ fi
 
 post_extract() {
 	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-pre_build() {
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
 
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (9 preceding siblings ...)
  2025-04-22 18:25 ` [PR PATCH] [Updated] " dkwo
@ 2025-04-22 18:29 ` dkwo
  2025-04-25 18:43 ` dkwo
                   ` (37 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-22 18:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.
- todo:  add the various packages to removed

cc: @fosslinux @tornaria @leahneukirchen What do you think?
[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 73185 bytes --]

From 1549ca44c37a686ec5cf9cbbb918af0876285d38 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/5] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From c517b7722eaf3a5d757fb862cd29bebc1f6cb9da Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/5] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..cb350b6a1a894e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From d7ff4dc80f21973544dd49c8e6f46ce9c7bd1448 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/5] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 20 files changed, 139 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 4f3b46ad2ca6c667cb844e1a21ed88055e4c9be1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 11:37:23 -0400
Subject: [PATCH 4/5] texlive: simplify cross luajit

---
 srcpkgs/texlive/patches/cross-luajit.patch | 124 ---------------------
 srcpkgs/texlive/template                   |  36 ++----
 2 files changed, 8 insertions(+), 152 deletions(-)
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch

diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index cb350b6a1a894e..616d91188a5261 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -137,40 +137,20 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
+	fi
+fi
+
 post_extract() {
 	mkdir -p "${build_wrksrc}"
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
 pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
-	fi
-
 	# web2c should not be cross
 	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
 	cd "${wrksrc}/build/texk/web2c/web2c"

From fda114f34eedec0a740e6f9c172aa7f5fde9cfa7 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 14:10:09 -0400
Subject: [PATCH 5/5] texlive: simplify cross

---
 srcpkgs/texlive/files/remove-himktables.patch | 13 ---------
 srcpkgs/texlive/template                      | 28 +++----------------
 2 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch

diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 616d91188a5261..6182216f09114a 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -147,31 +147,11 @@ fi
 
 post_extract() {
 	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-pre_build() {
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
 
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (10 preceding siblings ...)
  2025-04-22 18:29 ` dkwo
@ 2025-04-25 18:43 ` dkwo
  2025-04-28 14:19 ` dkwo
                   ` (36 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-25 18:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.
- todo:  add the various packages to removed

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 74678 bytes --]

From 50835a36cb836ca622d4ba89d0d74b2bdfd13a32 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/6] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 5efff62ac47fdc4257c11d6d919efd374f5f7426 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/6] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..cb350b6a1a894e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From b0c008601beb0dac64c7b734db733abfe1c51536 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/6] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 20 files changed, 139 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 1df097442075c44b2f60d48951c54847e1beb9b1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 11:37:23 -0400
Subject: [PATCH 4/6] texlive: simplify cross luajit

---
 srcpkgs/texlive/patches/cross-luajit.patch | 124 ---------------------
 srcpkgs/texlive/template                   |  36 ++----
 2 files changed, 8 insertions(+), 152 deletions(-)
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch

diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index cb350b6a1a894e..616d91188a5261 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -137,40 +137,20 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
+	fi
+fi
+
 post_extract() {
 	mkdir -p "${build_wrksrc}"
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
 pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
-	fi
-
 	# web2c should not be cross
 	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
 	cd "${wrksrc}/build/texk/web2c/web2c"

From 2e7c042813397f638e066e8846a46fed6797fd1e Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 14:10:09 -0400
Subject: [PATCH 5/6] texlive: simplify cross

---
 srcpkgs/texlive/files/remove-himktables.patch | 13 ---------
 srcpkgs/texlive/template                      | 28 +++----------------
 2 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch

diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 616d91188a5261..6182216f09114a 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -147,31 +147,11 @@ fi
 
 post_extract() {
 	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-pre_build() {
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
 
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 

From cf6c4b34567e17b3d9c795174e1696979cbdf472 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 25 Apr 2025 14:42:26 -0400
Subject: [PATCH 6/6] texlive-core: drop subpackages

---
 srcpkgs/removed-packages/template | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 83e1a512c29cc0..6ce8aae4485961 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250322
+version=0.1.20250425
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -842,6 +842,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (11 preceding siblings ...)
  2025-04-25 18:43 ` dkwo
@ 2025-04-28 14:19 ` dkwo
  2025-04-28 20:44 ` dkwo
                   ` (35 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-28 14:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.

todo: fix `texdoc`, possibly add /etc to path

[ci skip]

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 75372 bytes --]

From f6cc1968341c39670c5b45dcca425ec7af08c818 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/7] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 3d0e7356af8f3c86c28b453432c48514e8a2af46 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/7] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..cb350b6a1a894e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 7d308a843fbcc1defa65ab5c3f63d6eacbba4dd2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/7] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 20 files changed, 139 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 055ee825301cdfe53184e20904b092d85c971ce1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 11:37:23 -0400
Subject: [PATCH 4/7] texlive: simplify cross luajit

---
 srcpkgs/texlive/patches/cross-luajit.patch | 124 ---------------------
 srcpkgs/texlive/template                   |  36 ++----
 2 files changed, 8 insertions(+), 152 deletions(-)
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch

diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index cb350b6a1a894e..616d91188a5261 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -137,40 +137,20 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
+	fi
+fi
+
 post_extract() {
 	mkdir -p "${build_wrksrc}"
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
 pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
-	fi
-
 	# web2c should not be cross
 	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
 	cd "${wrksrc}/build/texk/web2c/web2c"

From 97d8edbc78c8a1bd3717c11f887beabf4067adab Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 14:10:09 -0400
Subject: [PATCH 5/7] texlive: simplify cross

---
 srcpkgs/texlive/files/remove-himktables.patch | 13 ---------
 srcpkgs/texlive/template                      | 28 +++----------------
 2 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch

diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 616d91188a5261..6182216f09114a 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -147,31 +147,11 @@ fi
 
 post_extract() {
 	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-pre_build() {
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
 
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 

From 9e0e9bdc0315125da448719626e2eb927cff5aef Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 25 Apr 2025 14:42:26 -0400
Subject: [PATCH 6/7] texlive-core: drop subpackages

---
 srcpkgs/removed-packages/template | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 83e1a512c29cc0..6ce8aae4485961 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250322
+version=0.1.20250425
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -842,6 +842,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25

From f43ff4eed55be4c0a7c5f8d516310dbfbadcfa46 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 28 Apr 2025 10:18:38 -0400
Subject: [PATCH 7/7] texlive: try fix texdoc WIP

---
 srcpkgs/texlive/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6182216f09114a..155e6063f18e11 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -169,6 +169,8 @@ post_install() {
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
 
+	# fixme: try to make texdoc work
+	# vinstall tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
 	rm -r ${DESTDIR}/usr/share/texmf-dist
 	rm -f ${DESTDIR}/usr/bin/tlmgr
 }

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (12 preceding siblings ...)
  2025-04-28 14:19 ` dkwo
@ 2025-04-28 20:44 ` dkwo
  2025-04-28 20:47 ` dkwo
                   ` (34 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-28 20:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.

todo: fix `texdoc`, possibly add /etc to path

[ci skip]

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 76432 bytes --]

From f6cc1968341c39670c5b45dcca425ec7af08c818 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/7] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 3d0e7356af8f3c86c28b453432c48514e8a2af46 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/7] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..cb350b6a1a894e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 7d308a843fbcc1defa65ab5c3f63d6eacbba4dd2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/7] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 20 files changed, 139 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 055ee825301cdfe53184e20904b092d85c971ce1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 11:37:23 -0400
Subject: [PATCH 4/7] texlive: simplify cross luajit

---
 srcpkgs/texlive/patches/cross-luajit.patch | 124 ---------------------
 srcpkgs/texlive/template                   |  36 ++----
 2 files changed, 8 insertions(+), 152 deletions(-)
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch

diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index cb350b6a1a894e..616d91188a5261 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -137,40 +137,20 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
+	fi
+fi
+
 post_extract() {
 	mkdir -p "${build_wrksrc}"
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
 pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
-	fi
-
 	# web2c should not be cross
 	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
 	cd "${wrksrc}/build/texk/web2c/web2c"

From 97d8edbc78c8a1bd3717c11f887beabf4067adab Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 14:10:09 -0400
Subject: [PATCH 5/7] texlive: simplify cross

---
 srcpkgs/texlive/files/remove-himktables.patch | 13 ---------
 srcpkgs/texlive/template                      | 28 +++----------------
 2 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch

diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 616d91188a5261..6182216f09114a 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -147,31 +147,11 @@ fi
 
 post_extract() {
 	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-pre_build() {
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
 
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 

From 9e0e9bdc0315125da448719626e2eb927cff5aef Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 25 Apr 2025 14:42:26 -0400
Subject: [PATCH 6/7] texlive-core: drop subpackages

---
 srcpkgs/removed-packages/template | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 83e1a512c29cc0..6ce8aae4485961 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250322
+version=0.1.20250425
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -842,6 +842,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25

From 9fe9a1be3a65c7c46243a2c67b3230f2a3935394 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 28 Apr 2025 14:56:57 -0400
Subject: [PATCH 7/7] texlive-core: fix texdocs

---
 srcpkgs/texlive-core/template | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 3db052377c7510..542fb8f05923f9 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -9,11 +9,16 @@ maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
 distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
- https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
 checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
- 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 
+# may want to use https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# as it includes critical post-release patches
+
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
@@ -27,4 +32,5 @@ do_install() {
 
 	vmkdir usr/share/tlpkg
 	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
 }

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (13 preceding siblings ...)
  2025-04-28 20:44 ` dkwo
@ 2025-04-28 20:47 ` dkwo
  2025-04-30 17:40 ` [PR PATCH] [Updated] " dkwo
                   ` (33 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-28 20:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2836551694

Comment:
@tornaria I think I fixed texdoc, in case you want to try this (e.g., `texdoc enumitem` opens the pdf :)

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (14 preceding siblings ...)
  2025-04-28 20:47 ` dkwo
@ 2025-04-30 17:40 ` dkwo
  2025-06-03  8:08 ` fosslinux
                   ` (32 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-04-30 17:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.
- fixed the use of `texdoc`

Todo (optional): add `/etc` to the path, so user can customize things like paper. for future: it may become possible to build with system luajit.

[ci skip]

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 85454 bytes --]

From 6e55b5e216da0ed866a21e89291cb59c10b5f3fc Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/9] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 94625b64e25fee661dc723584d215a778780b837 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/9] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index bf293b8624e64e..cb350b6a1a894e 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 305868f994b9510d02469326a15422561e64064b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/9] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 20 files changed, 139 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 30a42442ad65d7febcc91c367a277b86cf45325e Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 11:37:23 -0400
Subject: [PATCH 4/9] texlive: simplify cross luajit

---
 srcpkgs/texlive/patches/cross-luajit.patch | 124 ---------------------
 srcpkgs/texlive/template                   |  36 ++----
 2 files changed, 8 insertions(+), 152 deletions(-)
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch

diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index cb350b6a1a894e..616d91188a5261 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -137,40 +137,20 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
+	fi
+fi
+
 post_extract() {
 	mkdir -p "${build_wrksrc}"
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
 pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
-	fi
-
 	# web2c should not be cross
 	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
 	cd "${wrksrc}/build/texk/web2c/web2c"

From 3a01f5917fa059ef6e6c2854f0e492f5b43509cd Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 14:10:09 -0400
Subject: [PATCH 5/9] texlive: simplify cross

---
 srcpkgs/texlive/files/remove-himktables.patch | 13 ---------
 srcpkgs/texlive/template                      | 28 +++----------------
 2 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch

diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 616d91188a5261..6182216f09114a 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -147,31 +147,11 @@ fi
 
 post_extract() {
 	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-pre_build() {
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
 
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 

From d4fc42c4aec8dde97714632b8a2c64b36c9f2f8e Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 25 Apr 2025 14:42:26 -0400
Subject: [PATCH 6/9] texlive-core: drop subpackages

---
 srcpkgs/removed-packages/template | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 83e1a512c29cc0..6ce8aae4485961 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250322
+version=0.1.20250425
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -842,6 +842,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25

From e7129aa17e13e9c3f3c49c17ae017c469dbb559d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 28 Apr 2025 14:56:57 -0400
Subject: [PATCH 7/9] texlive-core: fix texdocs

---
 srcpkgs/texlive-core/template | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 3db052377c7510..542fb8f05923f9 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -9,11 +9,16 @@ maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
 distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
- https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
 checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
- 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 
+# may want to use https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# as it includes critical post-release patches
+
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
@@ -27,4 +32,5 @@ do_install() {
 
 	vmkdir usr/share/tlpkg
 	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
 }

From fed8a8ae99327a909cdb6a8fa4c2b66bd896e428 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 29 Apr 2025 09:41:53 -0400
Subject: [PATCH 8/9] texlive-core: use var/lib

---
 .../texlive-core/patches/0001-texmfcnf.patch  | 47 ++++++++-
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 -------------------
 srcpkgs/texlive-core/template                 | 11 +--
 3 files changed, 48 insertions(+), 105 deletions(-)
 delete mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch

diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
index d2b911ae71587e..d7489ad64f117e 100644
--- a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -1,4 +1,4 @@
-Provide correct path's in texmf.cnf
+Provide correct paths in texmf.cnf
 --- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
 +++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
 @@ -59,7 +59,7 @@
@@ -10,7 +10,7 @@ Provide correct path's in texmf.cnf
  
  % The various texmf trees used by TeX Live, follow.
  % They must must all have the TDS directory structure (https://tug.org/tds).
-@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+@@ -72,13 +72,13 @@
  TEXMFMAIN = $TEXMFDIST
  
  % Local additions to the distribution trees.
@@ -18,4 +18,45 @@ Provide correct path's in texmf.cnf
 +TEXMFLOCAL = $TEXMFROOT/texmf-local
  
  % TEXMFSYSVAR, where *-sys store cached runtime data.
- TEXMFSYSVAR = $TEXMFROOT/texmf-var
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
deleted file mode 100644
index 4df77bf201783a..00000000000000
--- a/srcpkgs/texlive-core/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
-+++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,38 +44,7 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -628,6 +597,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   # nice to have the version if debugging.
-   debug("tlmgr version $tlmgrversion\n");
- 
-@@ -6364,7 +6340,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -7149,7 +7127,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 542fb8f05923f9..51053cef6a1edf 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -8,16 +8,14 @@ short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# as it includes critical post-release patches
 distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
- https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz
  https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
 checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
- 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6
  ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
-
-# may want to use https://svn.tug.org:8369/texlive/branches/branch2025/Master/
-# as it includes critical post-release patches
+make_dirs="/var/lib/texmf 0755 root root"
 
 post_extract() {
 	mv texlive-${version}-texmf/* .
@@ -30,7 +28,6 @@ do_install() {
 	vmkdir usr/share
 	vcopy texmf-dist usr/share
 
-	vmkdir usr/share/tlpkg
-	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
 	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
 }

From 0b2cdb938983fb7105110b4df1776ff161c85701 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 29 Apr 2025 16:02:46 -0400
Subject: [PATCH 9/9] texlive: really remove texmf-dist

---
 srcpkgs/texlive/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6182216f09114a..e7e291f946d18d 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -169,7 +169,7 @@ post_install() {
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
 
-	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
 	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (15 preceding siblings ...)
  2025-04-30 17:40 ` [PR PATCH] [Updated] " dkwo
@ 2025-06-03  8:08 ` fosslinux
  2025-06-16 14:22 ` [PR PATCH] [Updated] " dkwo
                   ` (31 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: fosslinux @ 2025-06-03  8:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2934049084

Comment:
Any status update on this? This looks fairly good to me.

@dkwo  if you would like to take Maintainer= of TeXLive as well, be my guest:)

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (16 preceding siblings ...)
  2025-06-03  8:08 ` fosslinux
@ 2025-06-16 14:22 ` dkwo
  2025-06-16 14:23 ` dkwo
                   ` (30 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-16 14:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.
- fixed the use of `texdoc`

Todo (optional):
- add `/etc` to the path, so user can customize things like paper.
- for future: it may become possible to build with system luajit.
- if we keep a monolith, may move xbps-trigger into pkg install trigger or post-install

[ci skip]

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 87941 bytes --]

From 19d3a375a457bbf309be770bebf37f020174cdee Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 01/12] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From db9c49ef8831a5d61731965abca3b66743a4f42f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 02/12] texlive: update to 2025

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/tlmgr                   |   2 -
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 102 +++-----
 7 files changed, 38 insertions(+), 448 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..415d26be5f7e6b 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -135,18 +142,6 @@ post_extract() {
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"
@@ -201,6 +196,11 @@ EOF
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +208,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +252,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +284,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +318,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +334,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +342,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 387c7b10226a01f00039f37cae57cadf0a37ee07 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 03/12] texlive-core: switch to upstream texmf-dist

---
 srcpkgs/texlive-bibtexextra/template          | 12 ---
 .../texlive-core/patches/0001-texmfcnf.patch  | 21 ++++
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 27 +++++-
 srcpkgs/texlive-fontsextra/template           | 12 ---
 srcpkgs/texlive-formatsextra/template         | 12 ---
 srcpkgs/texlive-games/template                | 12 ---
 srcpkgs/texlive-humanities/template           | 12 ---
 srcpkgs/texlive-langchinese/template          | 12 ---
 srcpkgs/texlive-langcyrillic/template         | 12 ---
 srcpkgs/texlive-langextra/template            | 12 ---
 srcpkgs/texlive-langgreek/template            | 12 ---
 srcpkgs/texlive-langjapanese/template         | 12 ---
 srcpkgs/texlive-langkorean/template           | 12 ---
 srcpkgs/texlive-latexextra/template           | 12 ---
 srcpkgs/texlive-music/template                | 12 ---
 srcpkgs/texlive-pictures/template             | 12 ---
 srcpkgs/texlive-pstricks/template             | 12 ---
 srcpkgs/texlive-publishers/template           | 11 ---
 srcpkgs/texlive-science/template              | 12 ---
 20 files changed, 139 insertions(+), 207 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 create mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d2b911ae71587e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,21 @@
+Provide correct path's in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+ TEXMFSYSVAR = $TEXMFROOT/texmf-var
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
new file mode 100644
index 00000000000000..4df77bf201783a
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/tlmgr.patch
@@ -0,0 +1,95 @@
+--- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
++++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
+@@ -13,7 +13,7 @@
+ my $tlmgrrevision;
+ my $tlmgrversion;
+ my $prg;
+-my $bindir;
++my $bindir = '/usr/bin';
+ if ($svnrev =~ m/: ([0-9]+) /) {
+   $tlmgrrevision = $1;
+ } else {
+@@ -44,38 +44,7 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/windows";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    $bindir = $Master;
+-    $Master = "$Master/../..";
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+   unshift (@INC, "$Master/tlpkg");
+-  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
++  unshift (@INC, "$Master/scripts/texlive");
+ }
+ 
+ use Cwd qw/abs_path/;
+@@ -628,6 +597,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "(running on Void Linux, switching to user mode!)\n";
++    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
++  }
++
+   # nice to have the version if debugging.
+   debug("tlmgr version $tlmgrversion\n");
+ 
+@@ -6364,7 +6340,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb for system files, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -7149,7 +7127,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..3db052377c7510 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,30 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+build_style="meta"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+python_version=3
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# it is a binary
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 78d8574eb44958f7f68b945106043ced06d95fef Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 11:37:23 -0400
Subject: [PATCH 04/12] texlive: simplify cross luajit

---
 srcpkgs/texlive/patches/cross-luajit.patch | 124 ---------------------
 srcpkgs/texlive/template                   |  36 ++----
 2 files changed, 8 insertions(+), 152 deletions(-)
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch

diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 415d26be5f7e6b..5250060eac9876 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -137,40 +137,20 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
+	fi
+fi
+
 post_extract() {
 	mkdir -p "${build_wrksrc}"
 	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
 }
 
 pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
-	fi
-
 	# web2c should not be cross
 	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
 	cd "${wrksrc}/build/texk/web2c/web2c"

From 664580888fbccc9825e1a11114b1ea67bfa5ddd6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 22 Apr 2025 14:10:09 -0400
Subject: [PATCH 05/12] texlive: simplify cross

---
 srcpkgs/texlive/files/remove-himktables.patch | 13 ---------
 srcpkgs/texlive/template                      | 28 +++----------------
 2 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch

diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 5250060eac9876..703a0b08062585 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -147,31 +147,11 @@ fi
 
 post_extract() {
 	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-pre_build() {
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
 
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 

From 8b03ea570598a7cf02df279fd8b99c4ae294d859 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 25 Apr 2025 14:42:26 -0400
Subject: [PATCH 06/12] texlive-core: drop subpackages

---
 srcpkgs/removed-packages/template | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25

From d5b68fc258827d20b2173e8960706f4c97c2facb Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 28 Apr 2025 14:56:57 -0400
Subject: [PATCH 07/12] texlive-core: fix texdocs

---
 srcpkgs/texlive-core/template | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 3db052377c7510..542fb8f05923f9 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -9,11 +9,16 @@ maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
 distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
- https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz"
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
 checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
- 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6"
+ 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 
+# may want to use https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# as it includes critical post-release patches
+
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
@@ -27,4 +32,5 @@ do_install() {
 
 	vmkdir usr/share/tlpkg
 	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
 }

From 429ae5f1c8b6c70b03f717be6fd8aeecd5b7d23d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 29 Apr 2025 09:41:53 -0400
Subject: [PATCH 08/12] texlive-core: use var/lib

---
 .../texlive-core/patches/0001-texmfcnf.patch  | 47 ++++++++-
 srcpkgs/texlive-core/patches/tlmgr.patch      | 95 -------------------
 srcpkgs/texlive-core/template                 | 11 +--
 3 files changed, 48 insertions(+), 105 deletions(-)
 delete mode 100644 srcpkgs/texlive-core/patches/tlmgr.patch

diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
index d2b911ae71587e..d7489ad64f117e 100644
--- a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -1,4 +1,4 @@
-Provide correct path's in texmf.cnf
+Provide correct paths in texmf.cnf
 --- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
 +++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
 @@ -59,7 +59,7 @@
@@ -10,7 +10,7 @@ Provide correct path's in texmf.cnf
  
  % The various texmf trees used by TeX Live, follow.
  % They must must all have the TDS directory structure (https://tug.org/tds).
-@@ -72,7 +72,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+@@ -72,13 +72,13 @@
  TEXMFMAIN = $TEXMFDIST
  
  % Local additions to the distribution trees.
@@ -18,4 +18,45 @@ Provide correct path's in texmf.cnf
 +TEXMFLOCAL = $TEXMFROOT/texmf-local
  
  % TEXMFSYSVAR, where *-sys store cached runtime data.
- TEXMFSYSVAR = $TEXMFROOT/texmf-var
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/patches/tlmgr.patch b/srcpkgs/texlive-core/patches/tlmgr.patch
deleted file mode 100644
index 4df77bf201783a..00000000000000
--- a/srcpkgs/texlive-core/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texmf-dist/scripts/texlive/tlmgr.pl	2024-02-23 00:13:07.000000000 +0100
-+++ b/texmf-dist/scripts/texlive/tlmgr.pl	2024-06-07 19:30:00.553109055 +0200
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,38 +44,7 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -628,6 +597,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   # nice to have the version if debugging.
-   debug("tlmgr version $tlmgrversion\n");
- 
-@@ -6364,7 +6340,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -7149,7 +7127,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 542fb8f05923f9..51053cef6a1edf 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -8,16 +8,14 @@ short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# as it includes critical post-release patches
 distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
- https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/install-tl-unx.tar.gz
  https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
 checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
- 9938f192af75f792e84282580cce6eedac32969e0e07b33cb39ca1b699e948b6
  ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
-
-# may want to use https://svn.tug.org:8369/texlive/branches/branch2025/Master/
-# as it includes critical post-release patches
+make_dirs="/var/lib/texmf 0755 root root"
 
 post_extract() {
 	mv texlive-${version}-texmf/* .
@@ -30,7 +28,6 @@ do_install() {
 	vmkdir usr/share
 	vcopy texmf-dist usr/share
 
-	vmkdir usr/share/tlpkg
-	vcopy ${wrksrc}/install-tl-${version}/tlpkg/TeXLive usr/share/tlpkg
 	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
 }

From 29df654d9b0541449b45545dae3cf7e72de1b102 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 29 Apr 2025 16:02:46 -0400
Subject: [PATCH 09/12] texlive: really remove texmf-dist

---
 srcpkgs/texlive/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 703a0b08062585..b0008a6089ea56 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -169,7 +169,7 @@ post_install() {
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
 
-	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
 	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 

From 8b497d299cf2ef2e9980b5cb371f805fcf7a7466 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Wed, 14 May 2025 10:32:42 -0400
Subject: [PATCH 10/12] texlive-core: add comment

---
 srcpkgs/texlive-core/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 51053cef6a1edf..c0335233343fd1 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -9,6 +9,7 @@ maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
 # may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
 # as it includes critical post-release patches
 distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
  https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"

From 25614754ab15a00e8c435b8a3f184181e33ab1fa Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 16 Jun 2025 10:17:59 -0400
Subject: [PATCH 11/12] texlive-core: just chmod -x on binary

---
 srcpkgs/texlive-core/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index c0335233343fd1..979109eeee8fa8 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -23,8 +23,7 @@ post_extract() {
 }
 
 do_install() {
-	# it is a binary
-	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+	chmod -x texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
 
 	vmkdir usr/share
 	vcopy texmf-dist usr/share

From f82ea5d76acffa6a592bb1481b35b9ceddfab9a1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 16 Jun 2025 10:22:12 -0400
Subject: [PATCH 12/12] texlive-core: new meta label

---
 srcpkgs/texlive-core/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 979109eeee8fa8..9ad0fdca7cc867 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -2,7 +2,7 @@
 pkgname=texlive-core
 version=20250308
 revision=1
-build_style="meta"
+metapackage=yes
 depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (17 preceding siblings ...)
  2025-06-16 14:22 ` [PR PATCH] [Updated] " dkwo
@ 2025-06-16 14:23 ` dkwo
  2025-06-16 14:55 ` [PR PATCH] [Updated] " dkwo
                   ` (29 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-16 14:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2976865258

Comment:
This has been working fine for me all this time.

It would be nice to use either [svn](https://svn.tug.org:8369/texlive/branches/branch2025/Master/) or [git](https://git.texlive.info/texlive/) for the distfiles, since they contain point releases (of the form 2025.2) with some small updates, but the first uses svn and the second does not seem to provide tarball archives. Maybe sometimes in the future?

Also, `texlive-core` is quite large: is it acceptable to keep it like this? or should I at least split a docs subpkg?

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (18 preceding siblings ...)
  2025-06-16 14:23 ` dkwo
@ 2025-06-16 14:55 ` dkwo
  2025-06-16 15:12 ` dkwo
                   ` (28 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-16 14:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.
- fixed the use of `texdoc`

Todo (optional):
- add `/etc` to the path, so user can customize things like paper.
- for future: it may become possible to build with system luajit.

[ci skip]

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 71857 bytes --]

From 19d3a375a457bbf309be770bebf37f020174cdee Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 12948a91ee39094a36f897c8fc61510c5f66f726 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 166 ++++---------
 9 files changed, 50 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..703a0b08062585 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -130,77 +137,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +168,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +212,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +244,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +278,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +294,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +302,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 1bf64c0e6fe1c470abe2a402557a803410fb229d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 31 ++++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 srcpkgs/texlive/template                      |  2 +-
 21 files changed, 108 insertions(+), 209 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..fd07d227bf6a8b 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,34 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+metapackage=yes
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 703a0b08062585..b0008a6089ea56 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -169,7 +169,7 @@ post_install() {
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
 
-	rm -r ${DESTDIR}/usr/share/texmf-dist
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
 	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (19 preceding siblings ...)
  2025-06-16 14:55 ` [PR PATCH] [Updated] " dkwo
@ 2025-06-16 15:12 ` dkwo
  2025-06-16 15:47 ` dkwo
                   ` (27 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-16 15:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I'm open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via xbps, and split `latexindent` subpkg.
- fixed the use of `texdoc`

Todo (optional):
- add `/etc` to the path, so user can customize things like paper.
- for future: it may become possible to build with system luajit.

[ci skip]

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 71638 bytes --]

From 19d3a375a457bbf309be770bebf37f020174cdee Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 8a6628efa57b4b40a8fe0096327119835641ca2d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 167 ++++---------
 9 files changed, 51 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..58b82add6506a6 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,7 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +138,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +169,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +213,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +245,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +279,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +295,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +303,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 9ab71b3ff3e40c2d79a481467477026f900d96b8 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 31 ++++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 107 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..fd07d227bf6a8b 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,34 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+metapackage=yes
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (20 preceding siblings ...)
  2025-06-16 15:12 ` dkwo
@ 2025-06-16 15:47 ` dkwo
  2025-06-17 18:55 ` dkwo
                   ` (26 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-16 15:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 930 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: Since Arch does not provide its collections anymore, I took texmf from upstream. Two patches from Alpine. I let it be a monolith (Size required on disk: 8049MB), but I am open to suggestions how to split it.
- `texlive`: I removed `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

[ci skip]

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 71620 bytes --]

From 19d3a375a457bbf309be770bebf37f020174cdee Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 8a6628efa57b4b40a8fe0096327119835641ca2d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 167 ++++---------
 9 files changed, 51 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..58b82add6506a6 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,7 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +138,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +169,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +213,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +245,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +279,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +295,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +303,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 5f1e5fa9fee8b46c409582bafedaeb6dd71bb06a Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 30 +++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 106 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..404c1ff4e34d06 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,33 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (21 preceding siblings ...)
  2025-06-16 15:47 ` dkwo
@ 2025-06-17 18:55 ` dkwo
  2025-06-17 22:00 ` dkwo
                   ` (25 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-17 18:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2981500862

Comment:
I think I found a way to adapt the Alpine Linux script for packaging collections, which gives a better result in terms of size.
I will push a sample for comments and review, before I add all collections, as we may want to move the helper functions somewhere else.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (22 preceding siblings ...)
  2025-06-17 18:55 ` dkwo
@ 2025-06-17 22:00 ` dkwo
  2025-06-17 22:11 ` [PR PATCH] [Updated] " dkwo
                   ` (24 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-17 22:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2981958224

Comment:
I had to add collection dependencies the dumb way by hand, as the inject script does not work as is (they are also not correct in current Void repo). I still have to split the docs subpackages, as they are huge.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (23 preceding siblings ...)
  2025-06-17 22:00 ` dkwo
@ 2025-06-17 22:11 ` dkwo
  2025-06-17 22:16 ` dkwo
                   ` (23 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-17 22:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: adapt helpers from Alpine Linux to process collections
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 100274 bytes --]

From 13b006315cc5caa2cdbe5e19dd5b58b10cf99b7b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/4] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 321ed6853a9e2873e27872da063382b8a6ee3040 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/4] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 167 ++++---------
 9 files changed, 51 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..58b82add6506a6 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,7 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +138,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +169,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +213,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +245,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +279,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +295,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +303,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 81a31287a59b750d8aaa9cd2b454b486e770c8cb Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/4] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 30 +++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 106 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..404c1ff4e34d06 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,33 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 228c870ccdb06fe31dd2fabfcd0962f54397e05b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 17 Jun 2025 14:52:27 -0400
Subject: [PATCH 4/4] texlive-core: split collections WIP

---
 srcpkgs/removed-packages/template |  16 -
 srcpkgs/texlive-bibtexextra       |   1 +
 srcpkgs/texlive-bibtexextra-doc   |   1 +
 srcpkgs/texlive-binextra          |   1 +
 srcpkgs/texlive-context           |   1 +
 srcpkgs/texlive-core-doc          |   1 +
 srcpkgs/texlive-core/template     | 500 +++++++++++++++++++++++++++++-
 srcpkgs/texlive-fontsextra        |   1 +
 srcpkgs/texlive-fontsrecommended  |   1 +
 srcpkgs/texlive-fontutils         |   1 +
 srcpkgs/texlive-formatsextra      |   1 +
 srcpkgs/texlive-games             |   1 +
 srcpkgs/texlive-humanities        |   1 +
 srcpkgs/texlive-langarabic        |   1 +
 srcpkgs/texlive-langchinese       |   1 +
 srcpkgs/texlive-langcjk           |   1 +
 srcpkgs/texlive-langcyrillic      |   1 +
 srcpkgs/texlive-langczechslovak   |   1 +
 srcpkgs/texlive-langenglish       |   1 +
 srcpkgs/texlive-langeuropean      |   1 +
 srcpkgs/texlive-langfrench        |   1 +
 srcpkgs/texlive-langgerman        |   1 +
 srcpkgs/texlive-langgreek         |   1 +
 srcpkgs/texlive-langitalian       |   1 +
 srcpkgs/texlive-langjapanese      |   1 +
 srcpkgs/texlive-langkorean        |   1 +
 srcpkgs/texlive-langother         |   1 +
 srcpkgs/texlive-langpolish        |   1 +
 srcpkgs/texlive-langportuguese    |   1 +
 srcpkgs/texlive-langspanish       |   1 +
 srcpkgs/texlive-latex             |   1 +
 srcpkgs/texlive-latexextra        |   1 +
 srcpkgs/texlive-latexrecommended  |   1 +
 srcpkgs/texlive-luatex            |   1 +
 srcpkgs/texlive-mathscience       |   1 +
 srcpkgs/texlive-metapost          |   1 +
 srcpkgs/texlive-music             |   1 +
 srcpkgs/texlive-pictures          |   1 +
 srcpkgs/texlive-plaingeneric      |   1 +
 srcpkgs/texlive-pstricks          |   1 +
 srcpkgs/texlive-publishers        |   1 +
 srcpkgs/texlive-xetex             |   1 +
 42 files changed, 534 insertions(+), 22 deletions(-)
 create mode 120000 srcpkgs/texlive-bibtexextra
 create mode 120000 srcpkgs/texlive-bibtexextra-doc
 create mode 120000 srcpkgs/texlive-binextra
 create mode 120000 srcpkgs/texlive-context
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 120000 srcpkgs/texlive-fontsextra
 create mode 120000 srcpkgs/texlive-fontsrecommended
 create mode 120000 srcpkgs/texlive-fontutils
 create mode 120000 srcpkgs/texlive-formatsextra
 create mode 120000 srcpkgs/texlive-games
 create mode 120000 srcpkgs/texlive-humanities
 create mode 120000 srcpkgs/texlive-langarabic
 create mode 120000 srcpkgs/texlive-langchinese
 create mode 120000 srcpkgs/texlive-langcjk
 create mode 120000 srcpkgs/texlive-langcyrillic
 create mode 120000 srcpkgs/texlive-langczechslovak
 create mode 120000 srcpkgs/texlive-langenglish
 create mode 120000 srcpkgs/texlive-langeuropean
 create mode 120000 srcpkgs/texlive-langfrench
 create mode 120000 srcpkgs/texlive-langgerman
 create mode 120000 srcpkgs/texlive-langgreek
 create mode 120000 srcpkgs/texlive-langitalian
 create mode 120000 srcpkgs/texlive-langjapanese
 create mode 120000 srcpkgs/texlive-langkorean
 create mode 120000 srcpkgs/texlive-langother
 create mode 120000 srcpkgs/texlive-langpolish
 create mode 120000 srcpkgs/texlive-langportuguese
 create mode 120000 srcpkgs/texlive-langspanish
 create mode 120000 srcpkgs/texlive-latex
 create mode 120000 srcpkgs/texlive-latexextra
 create mode 120000 srcpkgs/texlive-latexrecommended
 create mode 120000 srcpkgs/texlive-luatex
 create mode 120000 srcpkgs/texlive-mathscience
 create mode 120000 srcpkgs/texlive-metapost
 create mode 120000 srcpkgs/texlive-music
 create mode 120000 srcpkgs/texlive-pictures
 create mode 120000 srcpkgs/texlive-plaingeneric
 create mode 120000 srcpkgs/texlive-pstricks
 create mode 120000 srcpkgs/texlive-publishers
 create mode 120000 srcpkgs/texlive-xetex

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b4ebd5ba13fdf..f68400d4e9ed59 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -850,22 +850,6 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
- texlive-bibtexextra<=2023.66579_1
- texlive-fontsextra<=2023.66328_1
- texlive-formatsextra<=2023.66186_1
- texlive-games<=2023.66190_1
- texlive-humanities<=2023.65502_1
- texlive-langchinese<=2023.66188_1
- texlive-langcyrillic<=2023.64588_1
- texlive-langextra<=2023.66225_1
- texlive-langgreek<=2023.66513_1
- texlive-langjapanese<=2023.66482_1
- texlive-langkorean<=2023.66513_1
- texlive-latexextra<=2023.66551_1
- texlive-music<=2023.66278_1
- texlive-pictures<=2023.66549_1
- texlive-pstricks<=2023.66115_1
- texlive-publishers<=2023.66550_1
  texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra b/srcpkgs/texlive-bibtexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-bibtexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-bibtexextra-doc b/srcpkgs/texlive-bibtexextra-doc
new file mode 120000
index 00000000000000..6936c61a20c9a6
--- /dev/null
+++ b/srcpkgs/texlive-bibtexextra-doc
@@ -0,0 +1 @@
+texlive-bibtexextra
\ No newline at end of file
diff --git a/srcpkgs/texlive-binextra b/srcpkgs/texlive-binextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-binextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-context b/srcpkgs/texlive-context
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-context
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 404c1ff4e34d06..ee1daecbbe6a53 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -2,7 +2,6 @@
 pkgname=texlive-core
 version=20250308
 revision=1
-depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
@@ -16,18 +15,507 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
  ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+_tlpdb_get_values() {
+	local pkg
+	local key
+	pkg="$1"
+	key="$2"
+
+	awk \
+		"/^name $pkg\$/,/^$/{if(/^$key /) print substr(\$0, length(\"$key\") + 2)}" \
+		"$_tlpdb"
+}
+
+_tlpdb_write_pkgsnip() {
+	local pkg
+	pkg="$1"
+	local snip
+	snip="$2"
+
+	awk \
+		"/^name $pkg\$/,/^\$/{print \$0}" \
+		"$_tlpdb" > "$snip"
+}
+
+_tlpdb_get_xfiles() {
+	local pkg
+	local type
+	snip="$1"
+	type="$2"
+
+	awk \
+		'/^'"$type"'files size=[0-9]*$/ {flag=1; next} flag && /^ texmf-dist/ {print $1; next} flag && !/^ / {exit}' \
+		"$snip"
+}
+
+_tlpdb_get_docfiles() {
+	_tlpdb_get_xfiles "$1" doc
+}
+
+_tlpdb_get_datafiles() {
+	_tlpdb_get_xfiles "$1" run
+	_tlpdb_get_xfiles "$1" src
+}
+
+_pack_collection() {
+	local collection
+	local deps
+	local pkgsnip
+	pkgsnip="$(mktemp)"
+	collection="$1"
+	deps="$(_tlpdb_get_values "collection-$collection" "depend")"
+
+	for dep in $deps; do
+		case "$dep" in
+		collection-basic)
+			# All subpackages already depend on texlive-core
+			;;
+		collection-*)
+			local actualdep
+			actualdep="texlive-${dep#collection-}"
+			echo "Injecting dependency on $actualdep"
+			depends+=" $actualdep"
+			;;
+		*)
+			echo "Adding $dep"
+			# writing part of DB for current package into temporary file, so
+			# that when parsing metadata from it we do not need to search the
+			# whole DB again.
+			_tlpdb_write_pkgsnip "$dep" "$pkgsnip"
+			local paths
+			paths="$(_tlpdb_get_datafiles "$pkgsnip")"
+			for path in $paths; do
+				mkdir -p ${PKGDESTDIR}/usr/share/texmf-dist
+				mv "$wrksrc/$path" ${PKGDESTDIR}/usr/share/texmf-dist
+			done
+			paths="$(_tlpdb_get_docfiles "$pkgsnip")"
+			for path in $paths; do
+				case "$path" in
+				texmf-dist/doc/man/*.pdf)
+					# all man pages are provided twice, one as PDF and once
+					# as troff. Since they are identical content-wise, we only
+					# pack the smaller troff file
+					;;
+				texmf-dist/doc/man/*.1)
+					vman "$wrksrc/$path"
+					;;
+				texmf-dist/doc/man/*.5)
+					vman "$wrksrc/$path"
+					;;
+				*)
+					vdoc "$wrksrc/$path"
+					;;
+				esac
+			done
+			;;
+		esac
+	done
+
+	rm -f "$pkgsnip"
+}
 
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
 
 do_install() {
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+
+	_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+	_pack_collection "basic"
+
 	# non-PIE executable found in PIE build
-	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+	# rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" documentation"
+	pkg_install() {
+		vmove usr/share/doc/texlive-core
+	}
+}
 
-	vmkdir usr/share
-	vcopy texmf-dist usr/share
+texlive-bibtexextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
 
-	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
-	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+texlive-bibtexextra-doc_package() {
+	nostrip=yes
+	short_desc+=" documentation"
+	pkg_install() {
+		vmove usr/share/doc/texlive-bibtexextra
+	}
+}
+
+texlive-binextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-context_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsrecommended_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontutils_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-formatsextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-games_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-humanities_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+
+		# fixme: ELF files found in /usr/share
+		rm  ${PKGDESTDIR}/usr/share/doc/texlive-humanities/mod2tex
+	}
+}
+
+texlive-langchinese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcjk_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcyrillic_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langczechslovak_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langenglish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langeuropean_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langfrench_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgerman_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgreek_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langitalian_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langjapanese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langkorean_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langother_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langpolish_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langportuguese_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langspanish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexextra_package() {
+	nostrip=yes
+	depends="perl-File-Which python3-Pygments texlive-core texlive-latexrecommended texlive-pictures"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexrecommended_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-luatex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-mathscience_package() {
+	nostrip=yes
+	depends="texlive-core texlive-fontsrecommended texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-metapost_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-music_package() {
+	nostrip=yes
+	depends="fontforge python3 texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pictures_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-plaingeneric_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pstricks_package() {
+	nostrip=yes
+	depends="texlive-core texlive-plaingeneric"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-publishers_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-xetex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
 }
diff --git a/srcpkgs/texlive-fontsextra b/srcpkgs/texlive-fontsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontsrecommended b/srcpkgs/texlive-fontsrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontutils b/srcpkgs/texlive-fontutils
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontutils
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-formatsextra b/srcpkgs/texlive-formatsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-formatsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-games b/srcpkgs/texlive-games
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-games
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-humanities b/srcpkgs/texlive-humanities
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-humanities
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langarabic b/srcpkgs/texlive-langarabic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langarabic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langchinese b/srcpkgs/texlive-langchinese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langchinese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcjk b/srcpkgs/texlive-langcjk
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcjk
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcyrillic b/srcpkgs/texlive-langcyrillic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcyrillic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langczechslovak b/srcpkgs/texlive-langczechslovak
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langczechslovak
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langenglish b/srcpkgs/texlive-langenglish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langenglish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langeuropean b/srcpkgs/texlive-langeuropean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langeuropean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langfrench b/srcpkgs/texlive-langfrench
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langfrench
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgerman b/srcpkgs/texlive-langgerman
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgerman
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgreek b/srcpkgs/texlive-langgreek
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgreek
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langitalian b/srcpkgs/texlive-langitalian
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langitalian
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langjapanese b/srcpkgs/texlive-langjapanese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langjapanese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langkorean b/srcpkgs/texlive-langkorean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langkorean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langother b/srcpkgs/texlive-langother
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langother
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langpolish b/srcpkgs/texlive-langpolish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langpolish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langportuguese b/srcpkgs/texlive-langportuguese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langportuguese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langspanish b/srcpkgs/texlive-langspanish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langspanish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latex b/srcpkgs/texlive-latex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexextra b/srcpkgs/texlive-latexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexrecommended b/srcpkgs/texlive-latexrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-luatex b/srcpkgs/texlive-luatex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-luatex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-mathscience b/srcpkgs/texlive-mathscience
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-mathscience
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-metapost b/srcpkgs/texlive-metapost
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-metapost
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-music b/srcpkgs/texlive-music
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-music
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pictures b/srcpkgs/texlive-pictures
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pictures
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-plaingeneric b/srcpkgs/texlive-plaingeneric
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-plaingeneric
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pstricks b/srcpkgs/texlive-pstricks
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pstricks
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-publishers b/srcpkgs/texlive-publishers
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-publishers
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-xetex b/srcpkgs/texlive-xetex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-xetex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (24 preceding siblings ...)
  2025-06-17 22:11 ` [PR PATCH] [Updated] " dkwo
@ 2025-06-17 22:16 ` dkwo
  2025-06-18 14:25 ` dkwo
                   ` (22 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-17 22:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: adapt helpers from Alpine Linux to process collections
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 99775 bytes --]

From 13b006315cc5caa2cdbe5e19dd5b58b10cf99b7b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/4] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 321ed6853a9e2873e27872da063382b8a6ee3040 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/4] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 167 ++++---------
 9 files changed, 51 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..58b82add6506a6 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,7 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +138,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +169,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +213,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +245,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +279,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +295,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +303,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 81a31287a59b750d8aaa9cd2b454b486e770c8cb Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/4] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 30 +++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 106 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..404c1ff4e34d06 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,33 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From f5c13df3b10fcdc2104a22c7f43f12d5857ac535 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 17 Jun 2025 14:52:27 -0400
Subject: [PATCH 4/4] texlive-core: split collections WIP

---
 srcpkgs/removed-packages/template |  16 -
 srcpkgs/texlive-bibtexextra       |   1 +
 srcpkgs/texlive-binextra          |   1 +
 srcpkgs/texlive-context           |   1 +
 srcpkgs/texlive-core-doc          |   1 +
 srcpkgs/texlive-core/template     | 492 +++++++++++++++++++++++++++++-
 srcpkgs/texlive-fontsextra        |   1 +
 srcpkgs/texlive-fontsrecommended  |   1 +
 srcpkgs/texlive-fontutils         |   1 +
 srcpkgs/texlive-formatsextra      |   1 +
 srcpkgs/texlive-games             |   1 +
 srcpkgs/texlive-humanities        |   1 +
 srcpkgs/texlive-langarabic        |   1 +
 srcpkgs/texlive-langchinese       |   1 +
 srcpkgs/texlive-langcjk           |   1 +
 srcpkgs/texlive-langcyrillic      |   1 +
 srcpkgs/texlive-langczechslovak   |   1 +
 srcpkgs/texlive-langenglish       |   1 +
 srcpkgs/texlive-langeuropean      |   1 +
 srcpkgs/texlive-langfrench        |   1 +
 srcpkgs/texlive-langgerman        |   1 +
 srcpkgs/texlive-langgreek         |   1 +
 srcpkgs/texlive-langitalian       |   1 +
 srcpkgs/texlive-langjapanese      |   1 +
 srcpkgs/texlive-langkorean        |   1 +
 srcpkgs/texlive-langother         |   1 +
 srcpkgs/texlive-langpolish        |   1 +
 srcpkgs/texlive-langportuguese    |   1 +
 srcpkgs/texlive-langspanish       |   1 +
 srcpkgs/texlive-latex             |   1 +
 srcpkgs/texlive-latexextra        |   1 +
 srcpkgs/texlive-latexrecommended  |   1 +
 srcpkgs/texlive-luatex            |   1 +
 srcpkgs/texlive-mathscience       |   1 +
 srcpkgs/texlive-metapost          |   1 +
 srcpkgs/texlive-music             |   1 +
 srcpkgs/texlive-pictures          |   1 +
 srcpkgs/texlive-plaingeneric      |   1 +
 srcpkgs/texlive-pstricks          |   1 +
 srcpkgs/texlive-publishers        |   1 +
 srcpkgs/texlive-xetex             |   1 +
 41 files changed, 525 insertions(+), 22 deletions(-)
 create mode 120000 srcpkgs/texlive-bibtexextra
 create mode 120000 srcpkgs/texlive-binextra
 create mode 120000 srcpkgs/texlive-context
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 120000 srcpkgs/texlive-fontsextra
 create mode 120000 srcpkgs/texlive-fontsrecommended
 create mode 120000 srcpkgs/texlive-fontutils
 create mode 120000 srcpkgs/texlive-formatsextra
 create mode 120000 srcpkgs/texlive-games
 create mode 120000 srcpkgs/texlive-humanities
 create mode 120000 srcpkgs/texlive-langarabic
 create mode 120000 srcpkgs/texlive-langchinese
 create mode 120000 srcpkgs/texlive-langcjk
 create mode 120000 srcpkgs/texlive-langcyrillic
 create mode 120000 srcpkgs/texlive-langczechslovak
 create mode 120000 srcpkgs/texlive-langenglish
 create mode 120000 srcpkgs/texlive-langeuropean
 create mode 120000 srcpkgs/texlive-langfrench
 create mode 120000 srcpkgs/texlive-langgerman
 create mode 120000 srcpkgs/texlive-langgreek
 create mode 120000 srcpkgs/texlive-langitalian
 create mode 120000 srcpkgs/texlive-langjapanese
 create mode 120000 srcpkgs/texlive-langkorean
 create mode 120000 srcpkgs/texlive-langother
 create mode 120000 srcpkgs/texlive-langpolish
 create mode 120000 srcpkgs/texlive-langportuguese
 create mode 120000 srcpkgs/texlive-langspanish
 create mode 120000 srcpkgs/texlive-latex
 create mode 120000 srcpkgs/texlive-latexextra
 create mode 120000 srcpkgs/texlive-latexrecommended
 create mode 120000 srcpkgs/texlive-luatex
 create mode 120000 srcpkgs/texlive-mathscience
 create mode 120000 srcpkgs/texlive-metapost
 create mode 120000 srcpkgs/texlive-music
 create mode 120000 srcpkgs/texlive-pictures
 create mode 120000 srcpkgs/texlive-plaingeneric
 create mode 120000 srcpkgs/texlive-pstricks
 create mode 120000 srcpkgs/texlive-publishers
 create mode 120000 srcpkgs/texlive-xetex

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b4ebd5ba13fdf..f68400d4e9ed59 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -850,22 +850,6 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
- texlive-bibtexextra<=2023.66579_1
- texlive-fontsextra<=2023.66328_1
- texlive-formatsextra<=2023.66186_1
- texlive-games<=2023.66190_1
- texlive-humanities<=2023.65502_1
- texlive-langchinese<=2023.66188_1
- texlive-langcyrillic<=2023.64588_1
- texlive-langextra<=2023.66225_1
- texlive-langgreek<=2023.66513_1
- texlive-langjapanese<=2023.66482_1
- texlive-langkorean<=2023.66513_1
- texlive-latexextra<=2023.66551_1
- texlive-music<=2023.66278_1
- texlive-pictures<=2023.66549_1
- texlive-pstricks<=2023.66115_1
- texlive-publishers<=2023.66550_1
  texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra b/srcpkgs/texlive-bibtexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-bibtexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-binextra b/srcpkgs/texlive-binextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-binextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-context b/srcpkgs/texlive-context
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-context
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 404c1ff4e34d06..790e7df313f5c3 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -2,7 +2,6 @@
 pkgname=texlive-core
 version=20250308
 revision=1
-depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
@@ -16,18 +15,499 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
  ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+_tlpdb_get_values() {
+	local pkg
+	local key
+	pkg="$1"
+	key="$2"
+
+	awk \
+		"/^name $pkg\$/,/^$/{if(/^$key /) print substr(\$0, length(\"$key\") + 2)}" \
+		"$_tlpdb"
+}
+
+_tlpdb_write_pkgsnip() {
+	local pkg
+	pkg="$1"
+	local snip
+	snip="$2"
+
+	awk \
+		"/^name $pkg\$/,/^\$/{print \$0}" \
+		"$_tlpdb" > "$snip"
+}
+
+_tlpdb_get_xfiles() {
+	local pkg
+	local type
+	snip="$1"
+	type="$2"
+
+	awk \
+		'/^'"$type"'files size=[0-9]*$/ {flag=1; next} flag && /^ texmf-dist/ {print $1; next} flag && !/^ / {exit}' \
+		"$snip"
+}
+
+_tlpdb_get_docfiles() {
+	_tlpdb_get_xfiles "$1" doc
+}
+
+_tlpdb_get_datafiles() {
+	_tlpdb_get_xfiles "$1" run
+	_tlpdb_get_xfiles "$1" src
+}
+
+_pack_collection() {
+	local collection
+	local deps
+	local pkgsnip
+	pkgsnip="$(mktemp)"
+	collection="$1"
+	deps="$(_tlpdb_get_values "collection-$collection" "depend")"
+
+	for dep in $deps; do
+		case "$dep" in
+		collection-basic)
+			# All subpackages already depend on texlive-core
+			;;
+		collection-*)
+			local actualdep
+			actualdep="texlive-${dep#collection-}"
+			echo "Injecting dependency on $actualdep"
+			depends+=" $actualdep"
+			;;
+		*)
+			echo "Adding $dep"
+			# writing part of DB for current package into temporary file, so
+			# that when parsing metadata from it we do not need to search the
+			# whole DB again.
+			_tlpdb_write_pkgsnip "$dep" "$pkgsnip"
+			local paths
+			paths="$(_tlpdb_get_datafiles "$pkgsnip")"
+			for path in $paths; do
+				mkdir -p ${PKGDESTDIR}/usr/share/texmf-dist
+				mv "$wrksrc/$path" ${PKGDESTDIR}/usr/share/texmf-dist
+			done
+			paths="$(_tlpdb_get_docfiles "$pkgsnip")"
+			for path in $paths; do
+				case "$path" in
+				texmf-dist/doc/man/*.pdf)
+					# all man pages are provided twice, one as PDF and once
+					# as troff. Since they are identical content-wise, we only
+					# pack the smaller troff file
+					;;
+				texmf-dist/doc/man/*.1)
+					vman "$wrksrc/$path"
+					;;
+				texmf-dist/doc/man/*.5)
+					vman "$wrksrc/$path"
+					;;
+				*)
+					vdoc "$wrksrc/$path"
+					;;
+				esac
+			done
+			;;
+		esac
+	done
+
+	rm -f "$pkgsnip"
+}
 
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
 
 do_install() {
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+
+	_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+	_pack_collection "basic"
+
 	# non-PIE executable found in PIE build
-	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+	# rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+}
 
-	vmkdir usr/share
-	vcopy texmf-dist usr/share
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" documentation"
+	pkg_install() {
+		vmove usr/share/doc/texlive-core
+	}
+}
 
-	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
-	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+texlive-bibtexextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-binextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-context_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsrecommended_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontutils_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-formatsextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-games_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-humanities_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+
+		# fixme: ELF files found in /usr/share
+		rm  ${PKGDESTDIR}/usr/share/doc/texlive-humanities/mod2tex
+	}
+}
+
+texlive-langchinese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcjk_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcyrillic_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langczechslovak_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langenglish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langeuropean_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langfrench_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgerman_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgreek_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langitalian_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langjapanese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langkorean_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langother_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langpolish_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langportuguese_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langspanish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexextra_package() {
+	nostrip=yes
+	depends="perl-File-Which python3-Pygments texlive-core texlive-latexrecommended texlive-pictures"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexrecommended_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-luatex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-mathscience_package() {
+	nostrip=yes
+	depends="texlive-core texlive-fontsrecommended texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-metapost_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-music_package() {
+	nostrip=yes
+	depends="fontforge python3 texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pictures_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-plaingeneric_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pstricks_package() {
+	nostrip=yes
+	depends="texlive-core texlive-plaingeneric"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-publishers_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-xetex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
 }
diff --git a/srcpkgs/texlive-fontsextra b/srcpkgs/texlive-fontsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontsrecommended b/srcpkgs/texlive-fontsrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontutils b/srcpkgs/texlive-fontutils
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontutils
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-formatsextra b/srcpkgs/texlive-formatsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-formatsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-games b/srcpkgs/texlive-games
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-games
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-humanities b/srcpkgs/texlive-humanities
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-humanities
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langarabic b/srcpkgs/texlive-langarabic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langarabic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langchinese b/srcpkgs/texlive-langchinese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langchinese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcjk b/srcpkgs/texlive-langcjk
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcjk
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcyrillic b/srcpkgs/texlive-langcyrillic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcyrillic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langczechslovak b/srcpkgs/texlive-langczechslovak
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langczechslovak
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langenglish b/srcpkgs/texlive-langenglish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langenglish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langeuropean b/srcpkgs/texlive-langeuropean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langeuropean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langfrench b/srcpkgs/texlive-langfrench
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langfrench
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgerman b/srcpkgs/texlive-langgerman
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgerman
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgreek b/srcpkgs/texlive-langgreek
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgreek
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langitalian b/srcpkgs/texlive-langitalian
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langitalian
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langjapanese b/srcpkgs/texlive-langjapanese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langjapanese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langkorean b/srcpkgs/texlive-langkorean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langkorean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langother b/srcpkgs/texlive-langother
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langother
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langpolish b/srcpkgs/texlive-langpolish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langpolish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langportuguese b/srcpkgs/texlive-langportuguese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langportuguese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langspanish b/srcpkgs/texlive-langspanish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langspanish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latex b/srcpkgs/texlive-latex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexextra b/srcpkgs/texlive-latexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexrecommended b/srcpkgs/texlive-latexrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-luatex b/srcpkgs/texlive-luatex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-luatex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-mathscience b/srcpkgs/texlive-mathscience
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-mathscience
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-metapost b/srcpkgs/texlive-metapost
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-metapost
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-music b/srcpkgs/texlive-music
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-music
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pictures b/srcpkgs/texlive-pictures
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pictures
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-plaingeneric b/srcpkgs/texlive-plaingeneric
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-plaingeneric
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pstricks b/srcpkgs/texlive-pstricks
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pstricks
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-publishers b/srcpkgs/texlive-publishers
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-publishers
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-xetex b/srcpkgs/texlive-xetex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-xetex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (25 preceding siblings ...)
  2025-06-17 22:16 ` dkwo
@ 2025-06-18 14:25 ` dkwo
  2025-06-18 19:35 ` dkwo
                   ` (21 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-18 14:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: adapt helpers from Alpine Linux to process collections
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 100085 bytes --]

From c36723751ffc462b878f5a583aef2274c515311c Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/4] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 09f632bd56b8f9b0a8d47a19f0d0d2489ac4a8ad Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/4] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 167 ++++---------
 9 files changed, 51 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..58b82add6506a6 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,7 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +138,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +169,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +213,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +245,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +279,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +295,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +303,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From e35e062157a9ac8b3cd853b60ec36495c21cf7a8 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/4] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 30 +++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 106 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..404c1ff4e34d06 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,33 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 6b2e4d19a89bcd55c664fc8c2769f01e87f061a8 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 17 Jun 2025 14:52:27 -0400
Subject: [PATCH 4/4] texlive-core: split collections

---
 srcpkgs/removed-packages/template |  16 -
 srcpkgs/texlive-bibtexextra       |   1 +
 srcpkgs/texlive-binextra          |   1 +
 srcpkgs/texlive-context           |   1 +
 srcpkgs/texlive-core-doc          |   1 +
 srcpkgs/texlive-core/template     | 497 +++++++++++++++++++++++++++++-
 srcpkgs/texlive-fontsextra        |   1 +
 srcpkgs/texlive-fontsrecommended  |   1 +
 srcpkgs/texlive-fontutils         |   1 +
 srcpkgs/texlive-formatsextra      |   1 +
 srcpkgs/texlive-games             |   1 +
 srcpkgs/texlive-humanities        |   1 +
 srcpkgs/texlive-langarabic        |   1 +
 srcpkgs/texlive-langchinese       |   1 +
 srcpkgs/texlive-langcjk           |   1 +
 srcpkgs/texlive-langcyrillic      |   1 +
 srcpkgs/texlive-langczechslovak   |   1 +
 srcpkgs/texlive-langenglish       |   1 +
 srcpkgs/texlive-langeuropean      |   1 +
 srcpkgs/texlive-langfrench        |   1 +
 srcpkgs/texlive-langgerman        |   1 +
 srcpkgs/texlive-langgreek         |   1 +
 srcpkgs/texlive-langitalian       |   1 +
 srcpkgs/texlive-langjapanese      |   1 +
 srcpkgs/texlive-langkorean        |   1 +
 srcpkgs/texlive-langother         |   1 +
 srcpkgs/texlive-langpolish        |   1 +
 srcpkgs/texlive-langportuguese    |   1 +
 srcpkgs/texlive-langspanish       |   1 +
 srcpkgs/texlive-latex             |   1 +
 srcpkgs/texlive-latexextra        |   1 +
 srcpkgs/texlive-latexrecommended  |   1 +
 srcpkgs/texlive-luatex            |   1 +
 srcpkgs/texlive-mathscience       |   1 +
 srcpkgs/texlive-metapost          |   1 +
 srcpkgs/texlive-music             |   1 +
 srcpkgs/texlive-pictures          |   1 +
 srcpkgs/texlive-plaingeneric      |   1 +
 srcpkgs/texlive-pstricks          |   1 +
 srcpkgs/texlive-publishers        |   1 +
 srcpkgs/texlive-xetex             |   1 +
 41 files changed, 530 insertions(+), 22 deletions(-)
 create mode 120000 srcpkgs/texlive-bibtexextra
 create mode 120000 srcpkgs/texlive-binextra
 create mode 120000 srcpkgs/texlive-context
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 120000 srcpkgs/texlive-fontsextra
 create mode 120000 srcpkgs/texlive-fontsrecommended
 create mode 120000 srcpkgs/texlive-fontutils
 create mode 120000 srcpkgs/texlive-formatsextra
 create mode 120000 srcpkgs/texlive-games
 create mode 120000 srcpkgs/texlive-humanities
 create mode 120000 srcpkgs/texlive-langarabic
 create mode 120000 srcpkgs/texlive-langchinese
 create mode 120000 srcpkgs/texlive-langcjk
 create mode 120000 srcpkgs/texlive-langcyrillic
 create mode 120000 srcpkgs/texlive-langczechslovak
 create mode 120000 srcpkgs/texlive-langenglish
 create mode 120000 srcpkgs/texlive-langeuropean
 create mode 120000 srcpkgs/texlive-langfrench
 create mode 120000 srcpkgs/texlive-langgerman
 create mode 120000 srcpkgs/texlive-langgreek
 create mode 120000 srcpkgs/texlive-langitalian
 create mode 120000 srcpkgs/texlive-langjapanese
 create mode 120000 srcpkgs/texlive-langkorean
 create mode 120000 srcpkgs/texlive-langother
 create mode 120000 srcpkgs/texlive-langpolish
 create mode 120000 srcpkgs/texlive-langportuguese
 create mode 120000 srcpkgs/texlive-langspanish
 create mode 120000 srcpkgs/texlive-latex
 create mode 120000 srcpkgs/texlive-latexextra
 create mode 120000 srcpkgs/texlive-latexrecommended
 create mode 120000 srcpkgs/texlive-luatex
 create mode 120000 srcpkgs/texlive-mathscience
 create mode 120000 srcpkgs/texlive-metapost
 create mode 120000 srcpkgs/texlive-music
 create mode 120000 srcpkgs/texlive-pictures
 create mode 120000 srcpkgs/texlive-plaingeneric
 create mode 120000 srcpkgs/texlive-pstricks
 create mode 120000 srcpkgs/texlive-publishers
 create mode 120000 srcpkgs/texlive-xetex

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b4ebd5ba13fdf..f68400d4e9ed59 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -850,22 +850,6 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
- texlive-bibtexextra<=2023.66579_1
- texlive-fontsextra<=2023.66328_1
- texlive-formatsextra<=2023.66186_1
- texlive-games<=2023.66190_1
- texlive-humanities<=2023.65502_1
- texlive-langchinese<=2023.66188_1
- texlive-langcyrillic<=2023.64588_1
- texlive-langextra<=2023.66225_1
- texlive-langgreek<=2023.66513_1
- texlive-langjapanese<=2023.66482_1
- texlive-langkorean<=2023.66513_1
- texlive-latexextra<=2023.66551_1
- texlive-music<=2023.66278_1
- texlive-pictures<=2023.66549_1
- texlive-pstricks<=2023.66115_1
- texlive-publishers<=2023.66550_1
  texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra b/srcpkgs/texlive-bibtexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-bibtexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-binextra b/srcpkgs/texlive-binextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-binextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-context b/srcpkgs/texlive-context
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-context
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 404c1ff4e34d06..2f4e6a212b4dda 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -2,8 +2,8 @@
 pkgname=texlive-core
 version=20250308
 revision=1
-depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
+depends="perl-File-HomeDir perl-Unicode-LineBreak perl-YAML-Tiny"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
@@ -16,18 +16,503 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
  ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+# helper functions taken from Alpine Linux
+# https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/texmf-dist/APKBUILD
+# fixme: cannot inject dependencies, rather must inspect by hand
+
+_tlpdb_get_values() {
+	local pkg
+	local key
+	pkg="$1"
+	key="$2"
+
+	awk \
+		"/^name $pkg\$/,/^$/{if(/^$key /) print substr(\$0, length(\"$key\") + 2)}" \
+		"$_tlpdb"
+}
+
+_tlpdb_write_pkgsnip() {
+	local pkg
+	pkg="$1"
+	local snip
+	snip="$2"
+
+	awk \
+		"/^name $pkg\$/,/^\$/{print \$0}" \
+		"$_tlpdb" > "$snip"
+}
+
+_tlpdb_get_xfiles() {
+	local pkg
+	local type
+	snip="$1"
+	type="$2"
+
+	awk \
+		'/^'"$type"'files size=[0-9]*$/ {flag=1; next} flag && /^ texmf-dist/ {print $1; next} flag && !/^ / {exit}' \
+		"$snip"
+}
+
+_tlpdb_get_docfiles() {
+	_tlpdb_get_xfiles "$1" doc
+}
+
+_tlpdb_get_datafiles() {
+	_tlpdb_get_xfiles "$1" run
+	_tlpdb_get_xfiles "$1" src
+}
+
+_pack_collection() {
+	local collection
+	local deps
+	local pkgsnip
+	pkgsnip="$(mktemp)"
+	collection="$1"
+	deps="$(_tlpdb_get_values "collection-$collection" "depend")"
+
+	for dep in $deps; do
+		case "$dep" in
+		collection-basic)
+			# All subpackages already depend on texlive-core
+			;;
+		collection-*)
+			local actualdep
+			actualdep="texlive-${dep#collection-}"
+			echo "Injecting dependency on $actualdep"
+			depends+=" $actualdep"
+			;;
+		*)
+			echo "Adding $dep"
+			# writing part of DB for current package into temporary file, so
+			# that when parsing metadata from it we do not need to search the
+			# whole DB again.
+			_tlpdb_write_pkgsnip "$dep" "$pkgsnip"
+			local paths
+			paths="$(_tlpdb_get_datafiles "$pkgsnip")"
+			for path in $paths; do
+				mkdir -p ${PKGDESTDIR}/usr/share/$(dirname "$path")
+				mv "$wrksrc/$path" "${PKGDESTDIR}/usr/share/$path"
+			done
+			paths="$(_tlpdb_get_docfiles "$pkgsnip")"
+			for path in $paths; do
+				case "$path" in
+				texmf-dist/doc/man/*.pdf)
+					# all man pages are provided twice, one as PDF and once
+					# as troff. Since they are identical content-wise, we only
+					# pack the smaller troff file
+					;;
+				texmf-dist/doc/man/*.1)
+					#vman "$wrksrc/$path"
+					;;
+				texmf-dist/doc/man/*.5)
+					#vman "$wrksrc/$path"
+					;;
+				*)
+					vdoc "$wrksrc/$path"
+					;;
+				esac
+			done
+			;;
+		esac
+	done
+
+	rm -f "$pkgsnip"
+}
 
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
 
 do_install() {
+	vmkdir usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+
+	_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+	_pack_collection "basic"
+
 	# non-PIE executable found in PIE build
-	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+	# rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+}
 
-	vmkdir usr/share
-	vcopy texmf-dist usr/share
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" documentation"
+	pkg_install() {
+		vmove usr/share/doc/texlive-core
+	}
+}
 
-	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
-	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+texlive-bibtexextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-binextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-context_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsrecommended_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontutils_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-formatsextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-games_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-humanities_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+
+		# fixme: ELF files found in /usr/share
+		rm  ${PKGDESTDIR}/usr/share/doc/texlive-humanities/mod2tex
+	}
+}
+
+texlive-langchinese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcjk_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcyrillic_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langczechslovak_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langenglish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langeuropean_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langfrench_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgerman_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgreek_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langitalian_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langjapanese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langkorean_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langother_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langpolish_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langportuguese_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langspanish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexextra_package() {
+	nostrip=yes
+	depends="perl-File-Which python3-Pygments texlive-core texlive-latexrecommended texlive-pictures"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexrecommended_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-luatex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-mathscience_package() {
+	nostrip=yes
+	depends="texlive-core texlive-fontsrecommended texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-metapost_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-music_package() {
+	nostrip=yes
+	depends="fontforge python3 texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pictures_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-plaingeneric_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pstricks_package() {
+	nostrip=yes
+	depends="texlive-core texlive-plaingeneric"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-publishers_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-xetex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
 }
diff --git a/srcpkgs/texlive-fontsextra b/srcpkgs/texlive-fontsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontsrecommended b/srcpkgs/texlive-fontsrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontutils b/srcpkgs/texlive-fontutils
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontutils
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-formatsextra b/srcpkgs/texlive-formatsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-formatsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-games b/srcpkgs/texlive-games
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-games
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-humanities b/srcpkgs/texlive-humanities
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-humanities
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langarabic b/srcpkgs/texlive-langarabic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langarabic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langchinese b/srcpkgs/texlive-langchinese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langchinese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcjk b/srcpkgs/texlive-langcjk
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcjk
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcyrillic b/srcpkgs/texlive-langcyrillic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcyrillic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langczechslovak b/srcpkgs/texlive-langczechslovak
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langczechslovak
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langenglish b/srcpkgs/texlive-langenglish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langenglish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langeuropean b/srcpkgs/texlive-langeuropean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langeuropean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langfrench b/srcpkgs/texlive-langfrench
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langfrench
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgerman b/srcpkgs/texlive-langgerman
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgerman
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgreek b/srcpkgs/texlive-langgreek
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgreek
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langitalian b/srcpkgs/texlive-langitalian
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langitalian
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langjapanese b/srcpkgs/texlive-langjapanese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langjapanese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langkorean b/srcpkgs/texlive-langkorean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langkorean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langother b/srcpkgs/texlive-langother
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langother
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langpolish b/srcpkgs/texlive-langpolish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langpolish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langportuguese b/srcpkgs/texlive-langportuguese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langportuguese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langspanish b/srcpkgs/texlive-langspanish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langspanish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latex b/srcpkgs/texlive-latex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexextra b/srcpkgs/texlive-latexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexrecommended b/srcpkgs/texlive-latexrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-luatex b/srcpkgs/texlive-luatex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-luatex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-mathscience b/srcpkgs/texlive-mathscience
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-mathscience
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-metapost b/srcpkgs/texlive-metapost
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-metapost
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-music b/srcpkgs/texlive-music
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-music
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pictures b/srcpkgs/texlive-pictures
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pictures
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-plaingeneric b/srcpkgs/texlive-plaingeneric
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-plaingeneric
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pstricks b/srcpkgs/texlive-pstricks
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pstricks
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-publishers b/srcpkgs/texlive-publishers
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-publishers
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-xetex b/srcpkgs/texlive-xetex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-xetex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (26 preceding siblings ...)
  2025-06-18 14:25 ` dkwo
@ 2025-06-18 19:35 ` dkwo
  2025-06-18 19:40 ` dkwo
                   ` (20 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-18 19:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: adapt helpers from Alpine Linux to process collections, still need to
- [ ] doc subpackages
- [ ] fix fmtutils trigger, as `language.{def,dat}` are currently global, including languages that may not be installed
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 101222 bytes --]

From 66f31a1aefda27d9ef257206a4ef73da40d72790 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/5] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From f39fa5b467ce92ca2d3a57796c42fc2520f60782 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/5] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 167 ++++---------
 9 files changed, 51 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..58b82add6506a6 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,7 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +138,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +169,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +213,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +245,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +279,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +295,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +303,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 0b2546d048e6d8d20769ef4961d57247b35a1ee2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Wed, 18 Jun 2025 10:28:20 -0400
Subject: [PATCH 3/5] texlive: nitpick

---
 srcpkgs/texlive/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 58b82add6506a6..b83f168d97f73f 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -95,6 +95,7 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
 # https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 

From a5287ceac3786834f941e5b33353d22acee5d520 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 4/5] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 30 +++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 106 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..404c1ff4e34d06 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,33 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 081af6cc16d6480947767c73e71f69a74cce74b4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 17 Jun 2025 14:52:27 -0400
Subject: [PATCH 5/5] texlive-core: split collections WIP (due to fmtutil
 trigger)

---
 srcpkgs/removed-packages/template |  16 -
 srcpkgs/texlive-bibtexextra       |   1 +
 srcpkgs/texlive-binextra          |   1 +
 srcpkgs/texlive-context           |   1 +
 srcpkgs/texlive-core-doc          |   1 +
 srcpkgs/texlive-core/template     | 512 +++++++++++++++++++++++++++++-
 srcpkgs/texlive-fontsextra        |   1 +
 srcpkgs/texlive-fontsrecommended  |   1 +
 srcpkgs/texlive-fontutils         |   1 +
 srcpkgs/texlive-formatsextra      |   1 +
 srcpkgs/texlive-games             |   1 +
 srcpkgs/texlive-humanities        |   1 +
 srcpkgs/texlive-langarabic        |   1 +
 srcpkgs/texlive-langchinese       |   1 +
 srcpkgs/texlive-langcjk           |   1 +
 srcpkgs/texlive-langcyrillic      |   1 +
 srcpkgs/texlive-langczechslovak   |   1 +
 srcpkgs/texlive-langenglish       |   1 +
 srcpkgs/texlive-langeuropean      |   1 +
 srcpkgs/texlive-langfrench        |   1 +
 srcpkgs/texlive-langgerman        |   1 +
 srcpkgs/texlive-langgreek         |   1 +
 srcpkgs/texlive-langitalian       |   1 +
 srcpkgs/texlive-langjapanese      |   1 +
 srcpkgs/texlive-langkorean        |   1 +
 srcpkgs/texlive-langother         |   1 +
 srcpkgs/texlive-langpolish        |   1 +
 srcpkgs/texlive-langportuguese    |   1 +
 srcpkgs/texlive-langspanish       |   1 +
 srcpkgs/texlive-latex             |   1 +
 srcpkgs/texlive-latexextra        |   1 +
 srcpkgs/texlive-latexrecommended  |   1 +
 srcpkgs/texlive-luatex            |   1 +
 srcpkgs/texlive-mathscience       |   1 +
 srcpkgs/texlive-metapost          |   1 +
 srcpkgs/texlive-music             |   1 +
 srcpkgs/texlive-pictures          |   1 +
 srcpkgs/texlive-plaingeneric      |   1 +
 srcpkgs/texlive-pstricks          |   1 +
 srcpkgs/texlive-publishers        |   1 +
 srcpkgs/texlive-xetex             |   1 +
 41 files changed, 544 insertions(+), 23 deletions(-)
 create mode 120000 srcpkgs/texlive-bibtexextra
 create mode 120000 srcpkgs/texlive-binextra
 create mode 120000 srcpkgs/texlive-context
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 120000 srcpkgs/texlive-fontsextra
 create mode 120000 srcpkgs/texlive-fontsrecommended
 create mode 120000 srcpkgs/texlive-fontutils
 create mode 120000 srcpkgs/texlive-formatsextra
 create mode 120000 srcpkgs/texlive-games
 create mode 120000 srcpkgs/texlive-humanities
 create mode 120000 srcpkgs/texlive-langarabic
 create mode 120000 srcpkgs/texlive-langchinese
 create mode 120000 srcpkgs/texlive-langcjk
 create mode 120000 srcpkgs/texlive-langcyrillic
 create mode 120000 srcpkgs/texlive-langczechslovak
 create mode 120000 srcpkgs/texlive-langenglish
 create mode 120000 srcpkgs/texlive-langeuropean
 create mode 120000 srcpkgs/texlive-langfrench
 create mode 120000 srcpkgs/texlive-langgerman
 create mode 120000 srcpkgs/texlive-langgreek
 create mode 120000 srcpkgs/texlive-langitalian
 create mode 120000 srcpkgs/texlive-langjapanese
 create mode 120000 srcpkgs/texlive-langkorean
 create mode 120000 srcpkgs/texlive-langother
 create mode 120000 srcpkgs/texlive-langpolish
 create mode 120000 srcpkgs/texlive-langportuguese
 create mode 120000 srcpkgs/texlive-langspanish
 create mode 120000 srcpkgs/texlive-latex
 create mode 120000 srcpkgs/texlive-latexextra
 create mode 120000 srcpkgs/texlive-latexrecommended
 create mode 120000 srcpkgs/texlive-luatex
 create mode 120000 srcpkgs/texlive-mathscience
 create mode 120000 srcpkgs/texlive-metapost
 create mode 120000 srcpkgs/texlive-music
 create mode 120000 srcpkgs/texlive-pictures
 create mode 120000 srcpkgs/texlive-plaingeneric
 create mode 120000 srcpkgs/texlive-pstricks
 create mode 120000 srcpkgs/texlive-publishers
 create mode 120000 srcpkgs/texlive-xetex

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b4ebd5ba13fdf..f68400d4e9ed59 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -850,22 +850,6 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
- texlive-bibtexextra<=2023.66579_1
- texlive-fontsextra<=2023.66328_1
- texlive-formatsextra<=2023.66186_1
- texlive-games<=2023.66190_1
- texlive-humanities<=2023.65502_1
- texlive-langchinese<=2023.66188_1
- texlive-langcyrillic<=2023.64588_1
- texlive-langextra<=2023.66225_1
- texlive-langgreek<=2023.66513_1
- texlive-langjapanese<=2023.66482_1
- texlive-langkorean<=2023.66513_1
- texlive-latexextra<=2023.66551_1
- texlive-music<=2023.66278_1
- texlive-pictures<=2023.66549_1
- texlive-pstricks<=2023.66115_1
- texlive-publishers<=2023.66550_1
  texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra b/srcpkgs/texlive-bibtexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-bibtexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-binextra b/srcpkgs/texlive-binextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-binextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-context b/srcpkgs/texlive-context
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-context
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 404c1ff4e34d06..5433f5fd71b381 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -2,7 +2,7 @@
 pkgname=texlive-core
 version=20250308
 revision=1
-depends="fontforge python3 python3-Pygments perl perl-File-Which"
+depends="perl-File-HomeDir perl-Unicode-LineBreak perl-YAML-Tiny"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
@@ -16,18 +16,516 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
  ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+# helper functions taken from Alpine Linux
+# https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/texmf-dist/APKBUILD
+# fixme: cannot inject dependencies, rather must inspect by hand
+
+_tlpdb_get_values() {
+	local pkg
+	local key
+	pkg="$1"
+	key="$2"
+
+	awk \
+		"/^name $pkg\$/,/^$/{if(/^$key /) print substr(\$0, length(\"$key\") + 2)}" \
+		"$_tlpdb"
+}
+
+_tlpdb_write_pkgsnip() {
+	local pkg
+	pkg="$1"
+	local snip
+	snip="$2"
+
+	awk \
+		"/^name $pkg\$/,/^\$/{print \$0}" \
+		"$_tlpdb" > "$snip"
+}
+
+_tlpdb_get_xfiles() {
+	local pkg
+	local type
+	snip="$1"
+	type="$2"
+
+	awk \
+		'/^'"$type"'files size=[0-9]*$/ {flag=1; next} flag && /^ texmf-dist/ {print $1; next} flag && !/^ / {exit}' \
+		"$snip"
+}
+
+_tlpdb_get_docfiles() {
+	_tlpdb_get_xfiles "$1" doc
+}
+
+_tlpdb_get_datafiles() {
+	_tlpdb_get_xfiles "$1" run
+	_tlpdb_get_xfiles "$1" src
+}
+
+_pack_collection() {
+	local collection
+	local deps
+	local pkgsnip
+	pkgsnip="$(mktemp)"
+	collection="$1"
+	deps="$(_tlpdb_get_values "collection-$collection" "depend")"
+
+	for dep in $deps; do
+		case "$dep" in
+		collection-basic)
+			# All subpackages already depend on texlive-core
+			;;
+		collection-*)
+			local actualdep
+			actualdep="texlive-${dep#collection-}"
+			echo "Injecting dependency on $actualdep"
+			depends+=" $actualdep"
+			;;
+		*)
+			echo "Adding $dep"
+			# writing part of DB for current package into temporary file, so
+			# that when parsing metadata from it we do not need to search the
+			# whole DB again.
+			_tlpdb_write_pkgsnip "$dep" "$pkgsnip"
+			local paths
+			paths="$(_tlpdb_get_datafiles "$pkgsnip")"
+			for path in $paths; do
+				mkdir -p ${PKGDESTDIR}/usr/share/$(dirname "$path")
+				mv "$wrksrc/$path" "${PKGDESTDIR}/usr/share/$path"
+			done
+			paths="$(_tlpdb_get_docfiles "$pkgsnip")"
+			for path in $paths; do
+				case "$path" in
+				texmf-dist/doc/man/*.pdf)
+					# all man pages are provided twice, one as PDF and once
+					# as troff. Since they are identical content-wise, we only
+					# pack the smaller troff file
+					;;
+				texmf-dist/doc/man/*.1)
+					# fixme: conflict with texlive
+					#vman "$wrksrc/$path"
+					;;
+				texmf-dist/doc/man/*.5)
+					#vman "$wrksrc/$path"
+					;;
+				*)
+					vdoc "$wrksrc/$path"
+					;;
+				esac
+			done
+			;;
+		esac
+	done
+
+	rm -f "$pkgsnip"
+}
 
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
 
 do_install() {
-	# non-PIE executable found in PIE build
-	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
-
-	vmkdir usr/share
-	vcopy texmf-dist usr/share
-
+	vmkdir usr/share/tlpkg
 	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
 	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+
+	_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+	_pack_collection "basic"
+
+	# fixme: non-PIE executable found in PIE build
+	# rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" documentation and examples"
+	pkg_install() {
+		vmove usr/share/doc/texlive-core
+	}
+}
+
+texlive-bibtexextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+#texlive-bibtexextra-doc_package() {
+#	nostrip=yes
+#	pkg_install() {
+#		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+#		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc) - documentation and examples"
+#		# vmove will not work as it references core, not the parent subpackage
+#		mkdir -p ${PKGDESTDIR}/usr/share/doc
+#		mv ${parent}/usr/share/doc ${PKGDESTDIR}/usr/share/doc
+#	}
+#}
+
+texlive-binextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-context_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsrecommended_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontutils_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-formatsextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-games_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-humanities_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+
+		# fixme: ELF files found in /usr/share
+		rm  ${PKGDESTDIR}/usr/share/doc/texlive-humanities/mod2tex
+	}
+}
+
+texlive-langchinese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcjk_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcyrillic_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langczechslovak_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langenglish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langeuropean_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langfrench_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgerman_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgreek_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langitalian_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langjapanese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langkorean_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langother_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langpolish_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langportuguese_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langspanish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexextra_package() {
+	nostrip=yes
+	depends="perl-File-Which python3-Pygments texlive-core texlive-latexrecommended texlive-pictures"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexrecommended_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-luatex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-mathscience_package() {
+	nostrip=yes
+	depends="texlive-core texlive-fontsrecommended texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-metapost_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-music_package() {
+	nostrip=yes
+	depends="fontforge python3 texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pictures_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-plaingeneric_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pstricks_package() {
+	nostrip=yes
+	depends="texlive-core texlive-plaingeneric"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-publishers_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-xetex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
 }
diff --git a/srcpkgs/texlive-fontsextra b/srcpkgs/texlive-fontsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontsrecommended b/srcpkgs/texlive-fontsrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontutils b/srcpkgs/texlive-fontutils
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontutils
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-formatsextra b/srcpkgs/texlive-formatsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-formatsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-games b/srcpkgs/texlive-games
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-games
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-humanities b/srcpkgs/texlive-humanities
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-humanities
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langarabic b/srcpkgs/texlive-langarabic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langarabic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langchinese b/srcpkgs/texlive-langchinese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langchinese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcjk b/srcpkgs/texlive-langcjk
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcjk
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcyrillic b/srcpkgs/texlive-langcyrillic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcyrillic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langczechslovak b/srcpkgs/texlive-langczechslovak
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langczechslovak
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langenglish b/srcpkgs/texlive-langenglish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langenglish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langeuropean b/srcpkgs/texlive-langeuropean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langeuropean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langfrench b/srcpkgs/texlive-langfrench
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langfrench
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgerman b/srcpkgs/texlive-langgerman
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgerman
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgreek b/srcpkgs/texlive-langgreek
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgreek
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langitalian b/srcpkgs/texlive-langitalian
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langitalian
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langjapanese b/srcpkgs/texlive-langjapanese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langjapanese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langkorean b/srcpkgs/texlive-langkorean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langkorean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langother b/srcpkgs/texlive-langother
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langother
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langpolish b/srcpkgs/texlive-langpolish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langpolish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langportuguese b/srcpkgs/texlive-langportuguese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langportuguese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langspanish b/srcpkgs/texlive-langspanish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langspanish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latex b/srcpkgs/texlive-latex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexextra b/srcpkgs/texlive-latexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexrecommended b/srcpkgs/texlive-latexrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-luatex b/srcpkgs/texlive-luatex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-luatex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-mathscience b/srcpkgs/texlive-mathscience
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-mathscience
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-metapost b/srcpkgs/texlive-metapost
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-metapost
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-music b/srcpkgs/texlive-music
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-music
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pictures b/srcpkgs/texlive-pictures
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pictures
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-plaingeneric b/srcpkgs/texlive-plaingeneric
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-plaingeneric
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pstricks b/srcpkgs/texlive-pstricks
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pstricks
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-publishers b/srcpkgs/texlive-publishers
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-publishers
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-xetex b/srcpkgs/texlive-xetex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-xetex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (27 preceding siblings ...)
  2025-06-18 19:35 ` dkwo
@ 2025-06-18 19:40 ` dkwo
  2025-06-18 19:42 ` dkwo
                   ` (19 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-18 19:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: adapt helpers from Alpine Linux to process collections, still need to
- [ ] doc subpackages
- [ ] fix fmtutils trigger, as `language.{def,dat}` are currently global, including languages that may not be installed
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen What do you think?

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 100577 bytes --]

From 66f31a1aefda27d9ef257206a4ef73da40d72790 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/4] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 7350c60d3f995aab4fd575817cae53af8de300a4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/4] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 168 ++++---------
 9 files changed, 52 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..b83f168d97f73f 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +170,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +214,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +246,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +280,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +296,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +304,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From abb9cdf9bfc65e164eb3423eedeab364ae08d7f7 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/4] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 30 +++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 106 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..404c1ff4e34d06 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,33 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 5742c467dc9965c4761b3edea92957e23d817fa9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 17 Jun 2025 14:52:27 -0400
Subject: [PATCH 4/4] texlive-core: split collections WIP

---
 srcpkgs/removed-packages/template |  16 -
 srcpkgs/texlive-bibtexextra       |   1 +
 srcpkgs/texlive-binextra          |   1 +
 srcpkgs/texlive-context           |   1 +
 srcpkgs/texlive-core-doc          |   1 +
 srcpkgs/texlive-core/template     | 512 +++++++++++++++++++++++++++++-
 srcpkgs/texlive-fontsextra        |   1 +
 srcpkgs/texlive-fontsrecommended  |   1 +
 srcpkgs/texlive-fontutils         |   1 +
 srcpkgs/texlive-formatsextra      |   1 +
 srcpkgs/texlive-games             |   1 +
 srcpkgs/texlive-humanities        |   1 +
 srcpkgs/texlive-langarabic        |   1 +
 srcpkgs/texlive-langchinese       |   1 +
 srcpkgs/texlive-langcjk           |   1 +
 srcpkgs/texlive-langcyrillic      |   1 +
 srcpkgs/texlive-langczechslovak   |   1 +
 srcpkgs/texlive-langenglish       |   1 +
 srcpkgs/texlive-langeuropean      |   1 +
 srcpkgs/texlive-langfrench        |   1 +
 srcpkgs/texlive-langgerman        |   1 +
 srcpkgs/texlive-langgreek         |   1 +
 srcpkgs/texlive-langitalian       |   1 +
 srcpkgs/texlive-langjapanese      |   1 +
 srcpkgs/texlive-langkorean        |   1 +
 srcpkgs/texlive-langother         |   1 +
 srcpkgs/texlive-langpolish        |   1 +
 srcpkgs/texlive-langportuguese    |   1 +
 srcpkgs/texlive-langspanish       |   1 +
 srcpkgs/texlive-latex             |   1 +
 srcpkgs/texlive-latexextra        |   1 +
 srcpkgs/texlive-latexrecommended  |   1 +
 srcpkgs/texlive-luatex            |   1 +
 srcpkgs/texlive-mathscience       |   1 +
 srcpkgs/texlive-metapost          |   1 +
 srcpkgs/texlive-music             |   1 +
 srcpkgs/texlive-pictures          |   1 +
 srcpkgs/texlive-plaingeneric      |   1 +
 srcpkgs/texlive-pstricks          |   1 +
 srcpkgs/texlive-publishers        |   1 +
 srcpkgs/texlive-xetex             |   1 +
 41 files changed, 544 insertions(+), 23 deletions(-)
 create mode 120000 srcpkgs/texlive-bibtexextra
 create mode 120000 srcpkgs/texlive-binextra
 create mode 120000 srcpkgs/texlive-context
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 120000 srcpkgs/texlive-fontsextra
 create mode 120000 srcpkgs/texlive-fontsrecommended
 create mode 120000 srcpkgs/texlive-fontutils
 create mode 120000 srcpkgs/texlive-formatsextra
 create mode 120000 srcpkgs/texlive-games
 create mode 120000 srcpkgs/texlive-humanities
 create mode 120000 srcpkgs/texlive-langarabic
 create mode 120000 srcpkgs/texlive-langchinese
 create mode 120000 srcpkgs/texlive-langcjk
 create mode 120000 srcpkgs/texlive-langcyrillic
 create mode 120000 srcpkgs/texlive-langczechslovak
 create mode 120000 srcpkgs/texlive-langenglish
 create mode 120000 srcpkgs/texlive-langeuropean
 create mode 120000 srcpkgs/texlive-langfrench
 create mode 120000 srcpkgs/texlive-langgerman
 create mode 120000 srcpkgs/texlive-langgreek
 create mode 120000 srcpkgs/texlive-langitalian
 create mode 120000 srcpkgs/texlive-langjapanese
 create mode 120000 srcpkgs/texlive-langkorean
 create mode 120000 srcpkgs/texlive-langother
 create mode 120000 srcpkgs/texlive-langpolish
 create mode 120000 srcpkgs/texlive-langportuguese
 create mode 120000 srcpkgs/texlive-langspanish
 create mode 120000 srcpkgs/texlive-latex
 create mode 120000 srcpkgs/texlive-latexextra
 create mode 120000 srcpkgs/texlive-latexrecommended
 create mode 120000 srcpkgs/texlive-luatex
 create mode 120000 srcpkgs/texlive-mathscience
 create mode 120000 srcpkgs/texlive-metapost
 create mode 120000 srcpkgs/texlive-music
 create mode 120000 srcpkgs/texlive-pictures
 create mode 120000 srcpkgs/texlive-plaingeneric
 create mode 120000 srcpkgs/texlive-pstricks
 create mode 120000 srcpkgs/texlive-publishers
 create mode 120000 srcpkgs/texlive-xetex

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b4ebd5ba13fdf..f68400d4e9ed59 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -850,22 +850,6 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
- texlive-bibtexextra<=2023.66579_1
- texlive-fontsextra<=2023.66328_1
- texlive-formatsextra<=2023.66186_1
- texlive-games<=2023.66190_1
- texlive-humanities<=2023.65502_1
- texlive-langchinese<=2023.66188_1
- texlive-langcyrillic<=2023.64588_1
- texlive-langextra<=2023.66225_1
- texlive-langgreek<=2023.66513_1
- texlive-langjapanese<=2023.66482_1
- texlive-langkorean<=2023.66513_1
- texlive-latexextra<=2023.66551_1
- texlive-music<=2023.66278_1
- texlive-pictures<=2023.66549_1
- texlive-pstricks<=2023.66115_1
- texlive-publishers<=2023.66550_1
  texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra b/srcpkgs/texlive-bibtexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-bibtexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-binextra b/srcpkgs/texlive-binextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-binextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-context b/srcpkgs/texlive-context
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-context
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 404c1ff4e34d06..5433f5fd71b381 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -2,7 +2,7 @@
 pkgname=texlive-core
 version=20250308
 revision=1
-depends="fontforge python3 python3-Pygments perl perl-File-Which"
+depends="perl-File-HomeDir perl-Unicode-LineBreak perl-YAML-Tiny"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
@@ -16,18 +16,516 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
  ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+# helper functions taken from Alpine Linux
+# https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/texmf-dist/APKBUILD
+# fixme: cannot inject dependencies, rather must inspect by hand
+
+_tlpdb_get_values() {
+	local pkg
+	local key
+	pkg="$1"
+	key="$2"
+
+	awk \
+		"/^name $pkg\$/,/^$/{if(/^$key /) print substr(\$0, length(\"$key\") + 2)}" \
+		"$_tlpdb"
+}
+
+_tlpdb_write_pkgsnip() {
+	local pkg
+	pkg="$1"
+	local snip
+	snip="$2"
+
+	awk \
+		"/^name $pkg\$/,/^\$/{print \$0}" \
+		"$_tlpdb" > "$snip"
+}
+
+_tlpdb_get_xfiles() {
+	local pkg
+	local type
+	snip="$1"
+	type="$2"
+
+	awk \
+		'/^'"$type"'files size=[0-9]*$/ {flag=1; next} flag && /^ texmf-dist/ {print $1; next} flag && !/^ / {exit}' \
+		"$snip"
+}
+
+_tlpdb_get_docfiles() {
+	_tlpdb_get_xfiles "$1" doc
+}
+
+_tlpdb_get_datafiles() {
+	_tlpdb_get_xfiles "$1" run
+	_tlpdb_get_xfiles "$1" src
+}
+
+_pack_collection() {
+	local collection
+	local deps
+	local pkgsnip
+	pkgsnip="$(mktemp)"
+	collection="$1"
+	deps="$(_tlpdb_get_values "collection-$collection" "depend")"
+
+	for dep in $deps; do
+		case "$dep" in
+		collection-basic)
+			# All subpackages already depend on texlive-core
+			;;
+		collection-*)
+			local actualdep
+			actualdep="texlive-${dep#collection-}"
+			echo "Injecting dependency on $actualdep"
+			depends+=" $actualdep"
+			;;
+		*)
+			echo "Adding $dep"
+			# writing part of DB for current package into temporary file, so
+			# that when parsing metadata from it we do not need to search the
+			# whole DB again.
+			_tlpdb_write_pkgsnip "$dep" "$pkgsnip"
+			local paths
+			paths="$(_tlpdb_get_datafiles "$pkgsnip")"
+			for path in $paths; do
+				mkdir -p ${PKGDESTDIR}/usr/share/$(dirname "$path")
+				mv "$wrksrc/$path" "${PKGDESTDIR}/usr/share/$path"
+			done
+			paths="$(_tlpdb_get_docfiles "$pkgsnip")"
+			for path in $paths; do
+				case "$path" in
+				texmf-dist/doc/man/*.pdf)
+					# all man pages are provided twice, one as PDF and once
+					# as troff. Since they are identical content-wise, we only
+					# pack the smaller troff file
+					;;
+				texmf-dist/doc/man/*.1)
+					# fixme: conflict with texlive
+					#vman "$wrksrc/$path"
+					;;
+				texmf-dist/doc/man/*.5)
+					#vman "$wrksrc/$path"
+					;;
+				*)
+					vdoc "$wrksrc/$path"
+					;;
+				esac
+			done
+			;;
+		esac
+	done
+
+	rm -f "$pkgsnip"
+}
 
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
 
 do_install() {
-	# non-PIE executable found in PIE build
-	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
-
-	vmkdir usr/share
-	vcopy texmf-dist usr/share
-
+	vmkdir usr/share/tlpkg
 	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
 	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+
+	_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+	_pack_collection "basic"
+
+	# fixme: non-PIE executable found in PIE build
+	# rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" documentation and examples"
+	pkg_install() {
+		vmove usr/share/doc/texlive-core
+	}
+}
+
+texlive-bibtexextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+#texlive-bibtexextra-doc_package() {
+#	nostrip=yes
+#	pkg_install() {
+#		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+#		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc) - documentation and examples"
+#		# vmove will not work as it references core, not the parent subpackage
+#		mkdir -p ${PKGDESTDIR}/usr/share/doc
+#		mv ${parent}/usr/share/doc ${PKGDESTDIR}/usr/share/doc
+#	}
+#}
+
+texlive-binextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-context_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsrecommended_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontutils_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-formatsextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-games_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-humanities_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+
+		# fixme: ELF files found in /usr/share
+		rm  ${PKGDESTDIR}/usr/share/doc/texlive-humanities/mod2tex
+	}
+}
+
+texlive-langchinese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcjk_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcyrillic_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langczechslovak_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langenglish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langeuropean_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langfrench_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgerman_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgreek_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langitalian_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langjapanese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langkorean_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langother_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langpolish_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langportuguese_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langspanish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexextra_package() {
+	nostrip=yes
+	depends="perl-File-Which python3-Pygments texlive-core texlive-latexrecommended texlive-pictures"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexrecommended_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-luatex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-mathscience_package() {
+	nostrip=yes
+	depends="texlive-core texlive-fontsrecommended texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-metapost_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-music_package() {
+	nostrip=yes
+	depends="fontforge python3 texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pictures_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-plaingeneric_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pstricks_package() {
+	nostrip=yes
+	depends="texlive-core texlive-plaingeneric"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-publishers_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-xetex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
 }
diff --git a/srcpkgs/texlive-fontsextra b/srcpkgs/texlive-fontsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontsrecommended b/srcpkgs/texlive-fontsrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontutils b/srcpkgs/texlive-fontutils
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontutils
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-formatsextra b/srcpkgs/texlive-formatsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-formatsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-games b/srcpkgs/texlive-games
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-games
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-humanities b/srcpkgs/texlive-humanities
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-humanities
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langarabic b/srcpkgs/texlive-langarabic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langarabic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langchinese b/srcpkgs/texlive-langchinese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langchinese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcjk b/srcpkgs/texlive-langcjk
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcjk
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcyrillic b/srcpkgs/texlive-langcyrillic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcyrillic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langczechslovak b/srcpkgs/texlive-langczechslovak
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langczechslovak
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langenglish b/srcpkgs/texlive-langenglish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langenglish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langeuropean b/srcpkgs/texlive-langeuropean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langeuropean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langfrench b/srcpkgs/texlive-langfrench
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langfrench
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgerman b/srcpkgs/texlive-langgerman
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgerman
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgreek b/srcpkgs/texlive-langgreek
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgreek
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langitalian b/srcpkgs/texlive-langitalian
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langitalian
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langjapanese b/srcpkgs/texlive-langjapanese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langjapanese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langkorean b/srcpkgs/texlive-langkorean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langkorean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langother b/srcpkgs/texlive-langother
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langother
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langpolish b/srcpkgs/texlive-langpolish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langpolish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langportuguese b/srcpkgs/texlive-langportuguese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langportuguese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langspanish b/srcpkgs/texlive-langspanish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langspanish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latex b/srcpkgs/texlive-latex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexextra b/srcpkgs/texlive-latexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexrecommended b/srcpkgs/texlive-latexrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-luatex b/srcpkgs/texlive-luatex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-luatex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-mathscience b/srcpkgs/texlive-mathscience
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-mathscience
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-metapost b/srcpkgs/texlive-metapost
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-metapost
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-music b/srcpkgs/texlive-music
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-music
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pictures b/srcpkgs/texlive-pictures
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pictures
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-plaingeneric b/srcpkgs/texlive-plaingeneric
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-plaingeneric
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pstricks b/srcpkgs/texlive-pstricks
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pstricks
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-publishers b/srcpkgs/texlive-publishers
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-publishers
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-xetex b/srcpkgs/texlive-xetex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-xetex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (28 preceding siblings ...)
  2025-06-18 19:40 ` dkwo
@ 2025-06-18 19:42 ` dkwo
  2025-06-19 18:06 ` [PR PATCH] [Updated] " dkwo
                   ` (18 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-18 19:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-2985492714

Comment:
I may need some help fixing the fmtutil trigger, now that languages are split.
The problem is that they provide a single file with everything, while we would need per language.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (29 preceding siblings ...)
  2025-06-18 19:42 ` dkwo
@ 2025-06-19 18:06 ` dkwo
  2025-06-19 18:07 ` dkwo
                   ` (17 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-19 18:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: adapt helpers from Alpine Linux to process collections
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen

To do for collections: split configuration files (as e.g. Debian does) and move them to `texmfsysconfig=/etc/texmf`:
- updmap config files: TEXMFSYSCONFIG/updmap.d
- hyphenation-related config files (language.def and language.dat fragments): TEXMFSYSCONFIG/language.d
- fmtutil config files: TEXMFSYSCONFIG/fmt.d, TEXMFSYSCONFIG/fmtutil
and adapt the trigger.

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 112499 bytes --]

From 45e02163fc7244233fb21ce303e789b5b641735d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/6] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 44a818d93c841ec5921157430191a3a0207f5262 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/6] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 168 ++++---------
 9 files changed, 52 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..b83f168d97f73f 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +170,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +214,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +246,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +280,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +296,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +304,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From ee4c97bbd3f092388f19e26b1558c23a5f05ade9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/6] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 30 +++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 106 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..404c1ff4e34d06 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,33 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 4a9935e75483d3d342e57ce5c6bf695d5ab24f7e Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 17 Jun 2025 14:52:27 -0400
Subject: [PATCH 4/6] texlive-core: split collections WIP

---
 srcpkgs/removed-packages/template |  16 -
 srcpkgs/texlive-bibtexextra       |   1 +
 srcpkgs/texlive-binextra          |   1 +
 srcpkgs/texlive-context           |   1 +
 srcpkgs/texlive-core-doc          |   1 +
 srcpkgs/texlive-core/template     | 502 +++++++++++++++++++++++++++++-
 srcpkgs/texlive-fontsextra        |   1 +
 srcpkgs/texlive-fontsrecommended  |   1 +
 srcpkgs/texlive-fontutils         |   1 +
 srcpkgs/texlive-formatsextra      |   1 +
 srcpkgs/texlive-games             |   1 +
 srcpkgs/texlive-humanities        |   1 +
 srcpkgs/texlive-langarabic        |   1 +
 srcpkgs/texlive-langchinese       |   1 +
 srcpkgs/texlive-langcjk           |   1 +
 srcpkgs/texlive-langcyrillic      |   1 +
 srcpkgs/texlive-langczechslovak   |   1 +
 srcpkgs/texlive-langenglish       |   1 +
 srcpkgs/texlive-langeuropean      |   1 +
 srcpkgs/texlive-langfrench        |   1 +
 srcpkgs/texlive-langgerman        |   1 +
 srcpkgs/texlive-langgreek         |   1 +
 srcpkgs/texlive-langitalian       |   1 +
 srcpkgs/texlive-langjapanese      |   1 +
 srcpkgs/texlive-langkorean        |   1 +
 srcpkgs/texlive-langother         |   1 +
 srcpkgs/texlive-langpolish        |   1 +
 srcpkgs/texlive-langportuguese    |   1 +
 srcpkgs/texlive-langspanish       |   1 +
 srcpkgs/texlive-latex             |   1 +
 srcpkgs/texlive-latexextra        |   1 +
 srcpkgs/texlive-latexrecommended  |   1 +
 srcpkgs/texlive-luatex            |   1 +
 srcpkgs/texlive-mathscience       |   1 +
 srcpkgs/texlive-metapost          |   1 +
 srcpkgs/texlive-music             |   1 +
 srcpkgs/texlive-pictures          |   1 +
 srcpkgs/texlive-plaingeneric      |   1 +
 srcpkgs/texlive-pstricks          |   1 +
 srcpkgs/texlive-publishers        |   1 +
 srcpkgs/texlive-xetex             |   1 +
 41 files changed, 534 insertions(+), 23 deletions(-)
 create mode 120000 srcpkgs/texlive-bibtexextra
 create mode 120000 srcpkgs/texlive-binextra
 create mode 120000 srcpkgs/texlive-context
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 120000 srcpkgs/texlive-fontsextra
 create mode 120000 srcpkgs/texlive-fontsrecommended
 create mode 120000 srcpkgs/texlive-fontutils
 create mode 120000 srcpkgs/texlive-formatsextra
 create mode 120000 srcpkgs/texlive-games
 create mode 120000 srcpkgs/texlive-humanities
 create mode 120000 srcpkgs/texlive-langarabic
 create mode 120000 srcpkgs/texlive-langchinese
 create mode 120000 srcpkgs/texlive-langcjk
 create mode 120000 srcpkgs/texlive-langcyrillic
 create mode 120000 srcpkgs/texlive-langczechslovak
 create mode 120000 srcpkgs/texlive-langenglish
 create mode 120000 srcpkgs/texlive-langeuropean
 create mode 120000 srcpkgs/texlive-langfrench
 create mode 120000 srcpkgs/texlive-langgerman
 create mode 120000 srcpkgs/texlive-langgreek
 create mode 120000 srcpkgs/texlive-langitalian
 create mode 120000 srcpkgs/texlive-langjapanese
 create mode 120000 srcpkgs/texlive-langkorean
 create mode 120000 srcpkgs/texlive-langother
 create mode 120000 srcpkgs/texlive-langpolish
 create mode 120000 srcpkgs/texlive-langportuguese
 create mode 120000 srcpkgs/texlive-langspanish
 create mode 120000 srcpkgs/texlive-latex
 create mode 120000 srcpkgs/texlive-latexextra
 create mode 120000 srcpkgs/texlive-latexrecommended
 create mode 120000 srcpkgs/texlive-luatex
 create mode 120000 srcpkgs/texlive-mathscience
 create mode 120000 srcpkgs/texlive-metapost
 create mode 120000 srcpkgs/texlive-music
 create mode 120000 srcpkgs/texlive-pictures
 create mode 120000 srcpkgs/texlive-plaingeneric
 create mode 120000 srcpkgs/texlive-pstricks
 create mode 120000 srcpkgs/texlive-publishers
 create mode 120000 srcpkgs/texlive-xetex

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b4ebd5ba13fdf..f68400d4e9ed59 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -850,22 +850,6 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
- texlive-bibtexextra<=2023.66579_1
- texlive-fontsextra<=2023.66328_1
- texlive-formatsextra<=2023.66186_1
- texlive-games<=2023.66190_1
- texlive-humanities<=2023.65502_1
- texlive-langchinese<=2023.66188_1
- texlive-langcyrillic<=2023.64588_1
- texlive-langextra<=2023.66225_1
- texlive-langgreek<=2023.66513_1
- texlive-langjapanese<=2023.66482_1
- texlive-langkorean<=2023.66513_1
- texlive-latexextra<=2023.66551_1
- texlive-music<=2023.66278_1
- texlive-pictures<=2023.66549_1
- texlive-pstricks<=2023.66115_1
- texlive-publishers<=2023.66550_1
  texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra b/srcpkgs/texlive-bibtexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-bibtexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-binextra b/srcpkgs/texlive-binextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-binextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-context b/srcpkgs/texlive-context
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-context
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 404c1ff4e34d06..f65e40077d6ae4 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -2,7 +2,7 @@
 pkgname=texlive-core
 version=20250308
 revision=1
-depends="fontforge python3 python3-Pygments perl perl-File-Which"
+depends="perl-File-HomeDir perl-Unicode-LineBreak perl-YAML-Tiny"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
@@ -16,18 +16,506 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
  ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+# helper functions taken from Alpine Linux
+# https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/texmf-dist/APKBUILD
+# fixme: cannot inject dependencies, rather must inspect by hand
+
+_tlpdb_get_values() {
+	local pkg
+	local key
+	pkg="$1"
+	key="$2"
+
+	awk \
+		"/^name $pkg\$/,/^$/{if(/^$key /) print substr(\$0, length(\"$key\") + 2)}" \
+		"$_tlpdb"
+}
+
+_tlpdb_write_pkgsnip() {
+	local pkg
+	pkg="$1"
+	local snip
+	snip="$2"
+
+	awk \
+		"/^name $pkg\$/,/^\$/{print \$0}" \
+		"$_tlpdb" > "$snip"
+}
+
+_tlpdb_get_xfiles() {
+	local pkg
+	local type
+	snip="$1"
+	type="$2"
+
+	awk \
+		'/^'"$type"'files size=[0-9]*$/ {flag=1; next} flag && /^ texmf-dist/ {print $1; next} flag && !/^ / {exit}' \
+		"$snip"
+}
+
+_tlpdb_get_docfiles() {
+	_tlpdb_get_xfiles "$1" doc
+}
+
+_tlpdb_get_datafiles() {
+	_tlpdb_get_xfiles "$1" run
+	_tlpdb_get_xfiles "$1" src
+}
+
+_pack_collection() {
+	local collection
+	local deps
+	local pkgsnip
+	pkgsnip="$(mktemp)"
+	collection="$1"
+	deps="$(_tlpdb_get_values "collection-$collection" "depend")"
+
+	for dep in $deps; do
+		case "$dep" in
+		collection-basic)
+			# All subpackages already depend on texlive-core
+			;;
+		collection-*)
+			local actualdep
+			actualdep="texlive-${dep#collection-}"
+			echo "Injecting dependency on $actualdep"
+			depends+=" $actualdep"
+			;;
+		*)
+			echo "Adding $dep"
+			# writing part of DB for current package into temporary file, so
+			# that when parsing metadata from it we do not need to search the
+			# whole DB again.
+			_tlpdb_write_pkgsnip "$dep" "$pkgsnip"
+			local paths
+			paths="$(_tlpdb_get_datafiles "$pkgsnip")"
+			for path in $paths; do
+				mkdir -p ${PKGDESTDIR}/usr/share/$(dirname "$path")
+				mv "$wrksrc/$path" "${PKGDESTDIR}/usr/share/$path"
+			done
+			paths="$(_tlpdb_get_docfiles "$pkgsnip")"
+			for path in $paths; do
+				case "$path" in
+				texmf-dist/doc/man/*.pdf)
+					# all man pages are provided twice, one as PDF and once
+					# as troff. Since they are identical content-wise, we only
+					# pack the smaller troff file
+					;;
+				texmf-dist/doc/man/*.1)
+					# fixme: conflict with texlive
+					#vman "$wrksrc/$path"
+					;;
+				texmf-dist/doc/man/*.5)
+					#vman "$wrksrc/$path"
+					;;
+				*)
+					# fixme: may want doc subpackages
+					#vdoc "$wrksrc/$path"
+					;;
+				esac
+			done
+			;;
+		esac
+	done
+
+	rm -f "$pkgsnip"
+}
 
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
 
 do_install() {
-	# non-PIE executable found in PIE build
-	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
-
-	vmkdir usr/share
-	vcopy texmf-dist usr/share
-
+	vmkdir usr/share/tlpkg
 	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
 	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+
+	_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+	_pack_collection "basic"
+
+	# fixme: non-PIE executable found in PIE build
+	# rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" documentation and examples"
+	pkg_install() {
+		vdoc ${wrksrc}/texmf-dist/doc
+	}
+}
+
+texlive-bibtexextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-binextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-context_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsextra_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsrecommended_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontutils_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-formatsextra_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-games_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-humanities_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+
+		# fixme: ELF files found in /usr/share
+		rm  ${PKGDESTDIR}/usr/share/doc/texlive-humanities/mod2tex
+	}
+}
+
+texlive-langchinese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcjk_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcyrillic_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langczechslovak_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langenglish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langeuropean_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langfrench_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgerman_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgreek_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langitalian_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langjapanese_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langkorean_package() {
+	nostrip=yes
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langother_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langpolish_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langportuguese_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langspanish_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexextra_package() {
+	nostrip=yes
+	depends="perl-File-Which python3-Pygments texlive-core texlive-latexrecommended texlive-pictures"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexrecommended_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-luatex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-mathscience_package() {
+	nostrip=yes
+	depends="texlive-core texlive-fontsrecommended texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-metapost_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-music_package() {
+	nostrip=yes
+	depends="fontforge python3 texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pictures_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-plaingeneric_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pstricks_package() {
+	nostrip=yes
+	depends="texlive-core texlive-plaingeneric"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-publishers_package() {
+	nostrip=yes
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-xetex_package() {
+	nostrip=yes
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
 }
diff --git a/srcpkgs/texlive-fontsextra b/srcpkgs/texlive-fontsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontsrecommended b/srcpkgs/texlive-fontsrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontutils b/srcpkgs/texlive-fontutils
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontutils
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-formatsextra b/srcpkgs/texlive-formatsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-formatsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-games b/srcpkgs/texlive-games
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-games
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-humanities b/srcpkgs/texlive-humanities
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-humanities
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langarabic b/srcpkgs/texlive-langarabic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langarabic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langchinese b/srcpkgs/texlive-langchinese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langchinese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcjk b/srcpkgs/texlive-langcjk
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcjk
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcyrillic b/srcpkgs/texlive-langcyrillic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcyrillic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langczechslovak b/srcpkgs/texlive-langczechslovak
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langczechslovak
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langenglish b/srcpkgs/texlive-langenglish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langenglish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langeuropean b/srcpkgs/texlive-langeuropean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langeuropean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langfrench b/srcpkgs/texlive-langfrench
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langfrench
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgerman b/srcpkgs/texlive-langgerman
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgerman
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgreek b/srcpkgs/texlive-langgreek
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgreek
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langitalian b/srcpkgs/texlive-langitalian
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langitalian
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langjapanese b/srcpkgs/texlive-langjapanese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langjapanese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langkorean b/srcpkgs/texlive-langkorean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langkorean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langother b/srcpkgs/texlive-langother
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langother
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langpolish b/srcpkgs/texlive-langpolish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langpolish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langportuguese b/srcpkgs/texlive-langportuguese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langportuguese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langspanish b/srcpkgs/texlive-langspanish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langspanish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latex b/srcpkgs/texlive-latex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexextra b/srcpkgs/texlive-latexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexrecommended b/srcpkgs/texlive-latexrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-luatex b/srcpkgs/texlive-luatex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-luatex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-mathscience b/srcpkgs/texlive-mathscience
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-mathscience
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-metapost b/srcpkgs/texlive-metapost
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-metapost
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-music b/srcpkgs/texlive-music
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-music
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pictures b/srcpkgs/texlive-pictures
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pictures
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-plaingeneric b/srcpkgs/texlive-plaingeneric
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-plaingeneric
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pstricks b/srcpkgs/texlive-pstricks
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pstricks
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-publishers b/srcpkgs/texlive-publishers
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-publishers
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-xetex b/srcpkgs/texlive-xetex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-xetex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file

From f93023d653bc4a1149f82e0e8958a11242712547 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 19 Jun 2025 12:03:40 -0400
Subject: [PATCH 5/6] core: small change

---
 srcpkgs/texlive-core/template | 94 ++++++++++++++++++-----------------
 1 file changed, 48 insertions(+), 46 deletions(-)

diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f65e40077d6ae4..e0660dbacd22bb 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -16,7 +16,46 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
  ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
-nostrip=yes
+
+subpackages="texlive-bibtexextra
+texlive-binextra
+texlive-context
+texlive-fontsextra
+texlive-fontsrecommended
+texlive-fontutils
+texlive-formatsextra
+texlive-games
+texlive-humanities
+texlive-langarabic
+texlive-langchinese
+texlive-langcjk
+texlive-langcyrillic
+texlive-langczechslovak
+texlive-langenglish
+texlive-langeuropean
+texlive-langfrench
+texlive-langgerman
+texlive-langgreek
+texlive-langitalian
+texlive-langjapanese
+texlive-langkorean
+texlive-langother
+texlive-langpolish
+texlive-langportuguese
+texlive-langspanish
+texlive-latex
+texlive-latexextra
+texlive-latexrecommended
+texlive-luatex
+texlive-mathscience
+texlive-metapost
+texlive-music
+texlive-pictures
+texlive-plaingeneric
+texlive-pstricks
+texlive-publishers
+texlive-xetex
+texlive-core-doc"
 
 # helper functions taken from Alpine Linux
 # https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/texmf-dist/APKBUILD
@@ -112,7 +151,8 @@ _pack_collection() {
 					;;
 				*)
 					# fixme: may want doc subpackages
-					#vdoc "$wrksrc/$path"
+					mkdir -p ${DESTDIR}/usr/share/$(dirname "$path")
+					mv "$wrksrc/$path" "${DESTDIR}/usr/share/$path"
 					;;
 				esac
 			done
@@ -134,21 +174,22 @@ do_install() {
 
 	_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
 	_pack_collection "basic"
-
-	# fixme: non-PIE executable found in PIE build
-	# rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
 }
 
 texlive-core-doc_package() {
 	nostrip=yes
 	short_desc+=" documentation and examples"
 	pkg_install() {
-		vdoc ${wrksrc}/texmf-dist/doc
+		# fixme: ELF files found in /usr/share
+		rm -f usr/share/texmf-dist/doc/texlive-humanities/mod2tex
+		# fixme: non-PIE executable found in PIE build
+		rm -f usr/share/texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+		vmove usr/share/texmf-dist/doc
 	}
 }
 
 texlive-bibtexextra_package() {
-	nostrip=yes
 	depends="texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -158,7 +199,6 @@ texlive-bibtexextra_package() {
 }
 
 texlive-binextra_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -168,7 +208,6 @@ texlive-binextra_package() {
 }
 
 texlive-context_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -178,7 +217,6 @@ texlive-context_package() {
 }
 
 texlive-fontsextra_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -188,7 +226,6 @@ texlive-fontsextra_package() {
 }
 
 texlive-fontsrecommended_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -198,7 +235,6 @@ texlive-fontsrecommended_package() {
 }
 
 texlive-fontutils_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -208,7 +244,6 @@ texlive-fontutils_package() {
 }
 
 texlive-formatsextra_package() {
-	nostrip=yes
 	depends="texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -218,7 +253,6 @@ texlive-formatsextra_package() {
 }
 
 texlive-games_package() {
-	nostrip=yes
 	depends="texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -228,20 +262,15 @@ texlive-games_package() {
 }
 
 texlive-humanities_package() {
-	nostrip=yes
 	depends="texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
 		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
 		_pack_collection "${pkgname:8}"
-
-		# fixme: ELF files found in /usr/share
-		rm  ${PKGDESTDIR}/usr/share/doc/texlive-humanities/mod2tex
 	}
 }
 
 texlive-langchinese_package() {
-	nostrip=yes
 	depends="texlive-core texlive-langcjk"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -251,7 +280,6 @@ texlive-langchinese_package() {
 }
 
 texlive-langcjk_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -261,7 +289,6 @@ texlive-langcjk_package() {
 }
 
 texlive-langcyrillic_package() {
-	nostrip=yes
 	depends="texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -271,7 +298,6 @@ texlive-langcyrillic_package() {
 }
 
 texlive-langczechslovak_package() {
-	nostrip=yes
 	depends="texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -281,7 +307,6 @@ texlive-langczechslovak_package() {
 }
 
 texlive-langenglish_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -291,7 +316,6 @@ texlive-langenglish_package() {
 }
 
 texlive-langeuropean_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -301,7 +325,6 @@ texlive-langeuropean_package() {
 }
 
 texlive-langfrench_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -311,7 +334,6 @@ texlive-langfrench_package() {
 }
 
 texlive-langgerman_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -321,7 +343,6 @@ texlive-langgerman_package() {
 }
 
 texlive-langgreek_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -331,7 +352,6 @@ texlive-langgreek_package() {
 }
 
 texlive-langitalian_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -341,7 +361,6 @@ texlive-langitalian_package() {
 }
 
 texlive-langjapanese_package() {
-	nostrip=yes
 	depends="texlive-core texlive-langcjk"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -351,7 +370,6 @@ texlive-langjapanese_package() {
 }
 
 texlive-langkorean_package() {
-	nostrip=yes
 	depends="texlive-core texlive-langcjk"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -361,7 +379,6 @@ texlive-langkorean_package() {
 }
 
 texlive-langother_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -371,7 +388,6 @@ texlive-langother_package() {
 }
 
 texlive-langpolish_package() {
-	nostrip=yes
 	depends="texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -381,7 +397,6 @@ texlive-langpolish_package() {
 }
 
 texlive-langportuguese_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -391,7 +406,6 @@ texlive-langportuguese_package() {
 }
 
 texlive-langspanish_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -401,7 +415,6 @@ texlive-langspanish_package() {
 }
 
 texlive-latex_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -411,7 +424,6 @@ texlive-latex_package() {
 }
 
 texlive-latexextra_package() {
-	nostrip=yes
 	depends="perl-File-Which python3-Pygments texlive-core texlive-latexrecommended texlive-pictures"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -421,7 +433,6 @@ texlive-latexextra_package() {
 }
 
 texlive-latexrecommended_package() {
-	nostrip=yes
 	depends="texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -431,7 +442,6 @@ texlive-latexrecommended_package() {
 }
 
 texlive-luatex_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -441,7 +451,6 @@ texlive-luatex_package() {
 }
 
 texlive-mathscience_package() {
-	nostrip=yes
 	depends="texlive-core texlive-fontsrecommended texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -451,7 +460,6 @@ texlive-mathscience_package() {
 }
 
 texlive-metapost_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -461,7 +469,6 @@ texlive-metapost_package() {
 }
 
 texlive-music_package() {
-	nostrip=yes
 	depends="fontforge python3 texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -471,7 +478,6 @@ texlive-music_package() {
 }
 
 texlive-pictures_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -481,7 +487,6 @@ texlive-pictures_package() {
 }
 
 texlive-plaingeneric_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -491,7 +496,6 @@ texlive-plaingeneric_package() {
 }
 
 texlive-pstricks_package() {
-	nostrip=yes
 	depends="texlive-core texlive-plaingeneric"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -501,7 +505,6 @@ texlive-pstricks_package() {
 }
 
 texlive-publishers_package() {
-	nostrip=yes
 	depends="texlive-core texlive-latex"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
@@ -511,7 +514,6 @@ texlive-publishers_package() {
 }
 
 texlive-xetex_package() {
-	nostrip=yes
 	depends="texlive-core"
 	pkg_install() {
 		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb

From 39c75d249daf5dc92c62c75c35abf4e818e6ab14 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 19 Jun 2025 13:12:03 -0400
Subject: [PATCH 6/6] core

---
 srcpkgs/texlive-core/template | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index e0660dbacd22bb..7e20e3b8eaa0cf 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -17,6 +17,7 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
 
+# docs need to come last
 subpackages="texlive-bibtexextra
 texlive-binextra
 texlive-context
@@ -177,11 +178,8 @@ do_install() {
 }
 
 texlive-core-doc_package() {
-	nostrip=yes
 	short_desc+=" documentation and examples"
 	pkg_install() {
-		# fixme: ELF files found in /usr/share
-		rm -f usr/share/texmf-dist/doc/texlive-humanities/mod2tex
 		# fixme: non-PIE executable found in PIE build
 		rm -f usr/share/texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
 
@@ -270,6 +268,15 @@ texlive-humanities_package() {
 	}
 }
 
+texlive-langarabic_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
 texlive-langchinese_package() {
 	depends="texlive-core texlive-langcjk"
 	pkg_install() {

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (30 preceding siblings ...)
  2025-06-19 18:06 ` [PR PATCH] [Updated] " dkwo
@ 2025-06-19 18:07 ` dkwo
  2025-06-19 18:28 ` dkwo
                   ` (16 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-19 18:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: adapt helpers from Alpine Linux to process collections
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen

To do for collections: split configuration files (as e.g. Debian does) and move them to `texmfsysconfig=/etc/texmf`:
- updmap config files: TEXMFSYSCONFIG/updmap.d
- hyphenation-related config files (language.def and language.dat fragments): TEXMFSYSCONFIG/language.d
- fmtutil config files: TEXMFSYSCONFIG/fmt.d, TEXMFSYSCONFIG/fmtutil
and adapt the trigger.

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 100651 bytes --]

From 45e02163fc7244233fb21ce303e789b5b641735d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/4] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 44a818d93c841ec5921157430191a3a0207f5262 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/4] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 168 ++++---------
 9 files changed, 52 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..b83f168d97f73f 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +170,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +214,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +246,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +280,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +296,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +304,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From ee4c97bbd3f092388f19e26b1558c23a5f05ade9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/4] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 30 +++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 106 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..404c1ff4e34d06 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,33 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 0bc4afa8a98c9ca40026b02b53c92fa552307a06 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 17 Jun 2025 14:52:27 -0400
Subject: [PATCH 4/4] texlive-core: split collections WIP

---
 srcpkgs/removed-packages/template |  16 -
 srcpkgs/texlive-bibtexextra       |   1 +
 srcpkgs/texlive-binextra          |   1 +
 srcpkgs/texlive-context           |   1 +
 srcpkgs/texlive-core-doc          |   1 +
 srcpkgs/texlive-core/template     | 511 +++++++++++++++++++++++++++++-
 srcpkgs/texlive-fontsextra        |   1 +
 srcpkgs/texlive-fontsrecommended  |   1 +
 srcpkgs/texlive-fontutils         |   1 +
 srcpkgs/texlive-formatsextra      |   1 +
 srcpkgs/texlive-games             |   1 +
 srcpkgs/texlive-humanities        |   1 +
 srcpkgs/texlive-langarabic        |   1 +
 srcpkgs/texlive-langchinese       |   1 +
 srcpkgs/texlive-langcjk           |   1 +
 srcpkgs/texlive-langcyrillic      |   1 +
 srcpkgs/texlive-langczechslovak   |   1 +
 srcpkgs/texlive-langenglish       |   1 +
 srcpkgs/texlive-langeuropean      |   1 +
 srcpkgs/texlive-langfrench        |   1 +
 srcpkgs/texlive-langgerman        |   1 +
 srcpkgs/texlive-langgreek         |   1 +
 srcpkgs/texlive-langitalian       |   1 +
 srcpkgs/texlive-langjapanese      |   1 +
 srcpkgs/texlive-langkorean        |   1 +
 srcpkgs/texlive-langother         |   1 +
 srcpkgs/texlive-langpolish        |   1 +
 srcpkgs/texlive-langportuguese    |   1 +
 srcpkgs/texlive-langspanish       |   1 +
 srcpkgs/texlive-latex             |   1 +
 srcpkgs/texlive-latexextra        |   1 +
 srcpkgs/texlive-latexrecommended  |   1 +
 srcpkgs/texlive-luatex            |   1 +
 srcpkgs/texlive-mathscience       |   1 +
 srcpkgs/texlive-metapost          |   1 +
 srcpkgs/texlive-music             |   1 +
 srcpkgs/texlive-pictures          |   1 +
 srcpkgs/texlive-plaingeneric      |   1 +
 srcpkgs/texlive-pstricks          |   1 +
 srcpkgs/texlive-publishers        |   1 +
 srcpkgs/texlive-xetex             |   1 +
 41 files changed, 543 insertions(+), 23 deletions(-)
 create mode 120000 srcpkgs/texlive-bibtexextra
 create mode 120000 srcpkgs/texlive-binextra
 create mode 120000 srcpkgs/texlive-context
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 120000 srcpkgs/texlive-fontsextra
 create mode 120000 srcpkgs/texlive-fontsrecommended
 create mode 120000 srcpkgs/texlive-fontutils
 create mode 120000 srcpkgs/texlive-formatsextra
 create mode 120000 srcpkgs/texlive-games
 create mode 120000 srcpkgs/texlive-humanities
 create mode 120000 srcpkgs/texlive-langarabic
 create mode 120000 srcpkgs/texlive-langchinese
 create mode 120000 srcpkgs/texlive-langcjk
 create mode 120000 srcpkgs/texlive-langcyrillic
 create mode 120000 srcpkgs/texlive-langczechslovak
 create mode 120000 srcpkgs/texlive-langenglish
 create mode 120000 srcpkgs/texlive-langeuropean
 create mode 120000 srcpkgs/texlive-langfrench
 create mode 120000 srcpkgs/texlive-langgerman
 create mode 120000 srcpkgs/texlive-langgreek
 create mode 120000 srcpkgs/texlive-langitalian
 create mode 120000 srcpkgs/texlive-langjapanese
 create mode 120000 srcpkgs/texlive-langkorean
 create mode 120000 srcpkgs/texlive-langother
 create mode 120000 srcpkgs/texlive-langpolish
 create mode 120000 srcpkgs/texlive-langportuguese
 create mode 120000 srcpkgs/texlive-langspanish
 create mode 120000 srcpkgs/texlive-latex
 create mode 120000 srcpkgs/texlive-latexextra
 create mode 120000 srcpkgs/texlive-latexrecommended
 create mode 120000 srcpkgs/texlive-luatex
 create mode 120000 srcpkgs/texlive-mathscience
 create mode 120000 srcpkgs/texlive-metapost
 create mode 120000 srcpkgs/texlive-music
 create mode 120000 srcpkgs/texlive-pictures
 create mode 120000 srcpkgs/texlive-plaingeneric
 create mode 120000 srcpkgs/texlive-pstricks
 create mode 120000 srcpkgs/texlive-publishers
 create mode 120000 srcpkgs/texlive-xetex

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b4ebd5ba13fdf..f68400d4e9ed59 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -850,22 +850,6 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
- texlive-bibtexextra<=2023.66579_1
- texlive-fontsextra<=2023.66328_1
- texlive-formatsextra<=2023.66186_1
- texlive-games<=2023.66190_1
- texlive-humanities<=2023.65502_1
- texlive-langchinese<=2023.66188_1
- texlive-langcyrillic<=2023.64588_1
- texlive-langextra<=2023.66225_1
- texlive-langgreek<=2023.66513_1
- texlive-langjapanese<=2023.66482_1
- texlive-langkorean<=2023.66513_1
- texlive-latexextra<=2023.66551_1
- texlive-music<=2023.66278_1
- texlive-pictures<=2023.66549_1
- texlive-pstricks<=2023.66115_1
- texlive-publishers<=2023.66550_1
  texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra b/srcpkgs/texlive-bibtexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-bibtexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-binextra b/srcpkgs/texlive-binextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-binextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-context b/srcpkgs/texlive-context
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-context
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 404c1ff4e34d06..7d720588884883 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -2,7 +2,7 @@
 pkgname=texlive-core
 version=20250308
 revision=1
-depends="fontforge python3 python3-Pygments perl perl-File-Which"
+depends="perl-File-HomeDir perl-Unicode-LineBreak perl-YAML-Tiny"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
@@ -17,17 +17,514 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
 
+# docs need to come last
+subpackages="texlive-bibtexextra
+texlive-binextra
+texlive-context
+texlive-fontsextra
+texlive-fontsrecommended
+texlive-fontutils
+texlive-formatsextra
+texlive-games
+texlive-humanities
+texlive-langarabic
+texlive-langchinese
+texlive-langcjk
+texlive-langcyrillic
+texlive-langczechslovak
+texlive-langenglish
+texlive-langeuropean
+texlive-langfrench
+texlive-langgerman
+texlive-langgreek
+texlive-langitalian
+texlive-langjapanese
+texlive-langkorean
+texlive-langother
+texlive-langpolish
+texlive-langportuguese
+texlive-langspanish
+texlive-latex
+texlive-latexextra
+texlive-latexrecommended
+texlive-luatex
+texlive-mathscience
+texlive-metapost
+texlive-music
+texlive-pictures
+texlive-plaingeneric
+texlive-pstricks
+texlive-publishers
+texlive-xetex
+texlive-core-doc"
+
+# helper functions taken from Alpine Linux
+# https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/texmf-dist/APKBUILD
+# fixme: cannot inject dependencies, rather must inspect by hand
+
+_tlpdb_get_values() {
+	local pkg
+	local key
+	pkg="$1"
+	key="$2"
+
+	awk \
+		"/^name $pkg\$/,/^$/{if(/^$key /) print substr(\$0, length(\"$key\") + 2)}" \
+		"$_tlpdb"
+}
+
+_tlpdb_write_pkgsnip() {
+	local pkg
+	pkg="$1"
+	local snip
+	snip="$2"
+
+	awk \
+		"/^name $pkg\$/,/^\$/{print \$0}" \
+		"$_tlpdb" > "$snip"
+}
+
+_tlpdb_get_xfiles() {
+	local pkg
+	local type
+	snip="$1"
+	type="$2"
+
+	awk \
+		'/^'"$type"'files size=[0-9]*$/ {flag=1; next} flag && /^ texmf-dist/ {print $1; next} flag && !/^ / {exit}' \
+		"$snip"
+}
+
+_tlpdb_get_docfiles() {
+	_tlpdb_get_xfiles "$1" doc
+}
+
+_tlpdb_get_datafiles() {
+	_tlpdb_get_xfiles "$1" run
+	_tlpdb_get_xfiles "$1" src
+}
+
+_pack_collection() {
+	local collection
+	local deps
+	local pkgsnip
+	pkgsnip="$(mktemp)"
+	collection="$1"
+	deps="$(_tlpdb_get_values "collection-$collection" "depend")"
+
+	for dep in $deps; do
+		case "$dep" in
+		collection-basic)
+			# All subpackages already depend on texlive-core
+			;;
+		collection-*)
+			local actualdep
+			actualdep="texlive-${dep#collection-}"
+			echo "Injecting dependency on $actualdep"
+			depends+=" $actualdep"
+			;;
+		*)
+			echo "Adding $dep"
+			# writing part of DB for current package into temporary file, so
+			# that when parsing metadata from it we do not need to search the
+			# whole DB again.
+			_tlpdb_write_pkgsnip "$dep" "$pkgsnip"
+			local paths
+			paths="$(_tlpdb_get_datafiles "$pkgsnip")"
+			for path in $paths; do
+				mkdir -p ${PKGDESTDIR}/usr/share/$(dirname "$path")
+				mv "$wrksrc/$path" "${PKGDESTDIR}/usr/share/$path"
+			done
+			paths="$(_tlpdb_get_docfiles "$pkgsnip")"
+			for path in $paths; do
+				case "$path" in
+				texmf-dist/doc/man/*.pdf)
+					# all man pages are provided twice, one as PDF and once
+					# as troff. Since they are identical content-wise, we only
+					# pack the smaller troff file
+					;;
+				texmf-dist/doc/man/*.1)
+					# fixme: conflict with texlive
+					#vman "$wrksrc/$path"
+					;;
+				texmf-dist/doc/man/*.5)
+					#vman "$wrksrc/$path"
+					;;
+				*)
+					# fixme: may want doc subpackages
+					mkdir -p ${DESTDIR}/usr/share/$(dirname "$path")
+					mv "$wrksrc/$path" "${DESTDIR}/usr/share/$path"
+					;;
+				esac
+			done
+			;;
+		esac
+	done
+
+	rm -f "$pkgsnip"
+}
+
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
 
 do_install() {
-	# non-PIE executable found in PIE build
-	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
-
-	vmkdir usr/share
-	vcopy texmf-dist usr/share
-
+	vmkdir usr/share/tlpkg
 	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
 	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+
+	_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+	_pack_collection "basic"
+}
+
+texlive-core-doc_package() {
+	short_desc+=" documentation and examples"
+	pkg_install() {
+		vmove usr/share/texmf-dist/doc
+
+		# fixme: non-PIE executable found in PIE build
+		rm -f ${PKGDESTDIR}/usr/share/texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+	}
+}
+
+texlive-bibtexextra_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-binextra_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-context_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsextra_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsrecommended_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontutils_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-formatsextra_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-games_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-humanities_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langarabic_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langchinese_package() {
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcjk_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcyrillic_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langczechslovak_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langenglish_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langeuropean_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langfrench_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgerman_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgreek_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langitalian_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langjapanese_package() {
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langkorean_package() {
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langother_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langpolish_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langportuguese_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langspanish_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latex_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexextra_package() {
+	depends="perl-File-Which python3-Pygments texlive-core texlive-latexrecommended texlive-pictures"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexrecommended_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-luatex_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-mathscience_package() {
+	depends="texlive-core texlive-fontsrecommended texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-metapost_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-music_package() {
+	depends="fontforge python3 texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pictures_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-plaingeneric_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pstricks_package() {
+	depends="texlive-core texlive-plaingeneric"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-publishers_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-xetex_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
 }
diff --git a/srcpkgs/texlive-fontsextra b/srcpkgs/texlive-fontsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontsrecommended b/srcpkgs/texlive-fontsrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontutils b/srcpkgs/texlive-fontutils
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontutils
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-formatsextra b/srcpkgs/texlive-formatsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-formatsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-games b/srcpkgs/texlive-games
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-games
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-humanities b/srcpkgs/texlive-humanities
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-humanities
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langarabic b/srcpkgs/texlive-langarabic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langarabic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langchinese b/srcpkgs/texlive-langchinese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langchinese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcjk b/srcpkgs/texlive-langcjk
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcjk
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcyrillic b/srcpkgs/texlive-langcyrillic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcyrillic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langczechslovak b/srcpkgs/texlive-langczechslovak
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langczechslovak
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langenglish b/srcpkgs/texlive-langenglish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langenglish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langeuropean b/srcpkgs/texlive-langeuropean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langeuropean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langfrench b/srcpkgs/texlive-langfrench
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langfrench
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgerman b/srcpkgs/texlive-langgerman
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgerman
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgreek b/srcpkgs/texlive-langgreek
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgreek
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langitalian b/srcpkgs/texlive-langitalian
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langitalian
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langjapanese b/srcpkgs/texlive-langjapanese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langjapanese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langkorean b/srcpkgs/texlive-langkorean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langkorean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langother b/srcpkgs/texlive-langother
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langother
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langpolish b/srcpkgs/texlive-langpolish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langpolish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langportuguese b/srcpkgs/texlive-langportuguese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langportuguese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langspanish b/srcpkgs/texlive-langspanish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langspanish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latex b/srcpkgs/texlive-latex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexextra b/srcpkgs/texlive-latexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexrecommended b/srcpkgs/texlive-latexrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-luatex b/srcpkgs/texlive-luatex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-luatex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-mathscience b/srcpkgs/texlive-mathscience
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-mathscience
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-metapost b/srcpkgs/texlive-metapost
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-metapost
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-music b/srcpkgs/texlive-music
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-music
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pictures b/srcpkgs/texlive-pictures
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pictures
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-plaingeneric b/srcpkgs/texlive-plaingeneric
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-plaingeneric
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pstricks b/srcpkgs/texlive-pstricks
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pstricks
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-publishers b/srcpkgs/texlive-publishers
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-publishers
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-xetex b/srcpkgs/texlive-xetex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-xetex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (31 preceding siblings ...)
  2025-06-19 18:07 ` dkwo
@ 2025-06-19 18:28 ` dkwo
  2025-07-10 22:21 ` dkwo
                   ` (15 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-06-19 18:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: adapt helpers from Alpine Linux to process collections
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen

To do for collections: split configuration files (as e.g. Debian does) and move them to `texmfsysconfig=/etc/texmf`:
- updmap config files: TEXMFSYSCONFIG/updmap.d
- hyphenation-related config files (language.def and language.dat fragments): TEXMFSYSCONFIG/language.d
- fmtutil config files: TEXMFSYSCONFIG/fmt.d, TEXMFSYSCONFIG/fmtutil
and adapt the trigger.

A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 102836 bytes --]

From 45e02163fc7244233fb21ce303e789b5b641735d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/5] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 44a818d93c841ec5921157430191a3a0207f5262 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/5] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 168 ++++---------
 9 files changed, 52 insertions(+), 637 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..b83f168d97f73f 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,41 +170,15 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
 		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
@@ -278,10 +214,6 @@ texlive-LuaTeX_package() {
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -314,7 +246,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +280,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +296,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +304,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From ee4c97bbd3f092388f19e26b1558c23a5f05ade9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/5] texlive-core: switch to upstream texmf-dist, drop subpkgs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 30 +++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 20 files changed, 106 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ed0ef16aa627d0..6b4ebd5ba13fdf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250612
+version=0.1.20250616
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -850,6 +850,23 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..404c1ff4e34d06 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,33 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+# may want https://svn.tug.org:8369/texlive/branches/branch2025/Master/
+# or https://git.texlive.info/texlive/
+# as it includes critical post-release patches
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

From 0bc4afa8a98c9ca40026b02b53c92fa552307a06 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 17 Jun 2025 14:52:27 -0400
Subject: [PATCH 4/5] texlive-core: split collections WIP

---
 srcpkgs/removed-packages/template |  16 -
 srcpkgs/texlive-bibtexextra       |   1 +
 srcpkgs/texlive-binextra          |   1 +
 srcpkgs/texlive-context           |   1 +
 srcpkgs/texlive-core-doc          |   1 +
 srcpkgs/texlive-core/template     | 511 +++++++++++++++++++++++++++++-
 srcpkgs/texlive-fontsextra        |   1 +
 srcpkgs/texlive-fontsrecommended  |   1 +
 srcpkgs/texlive-fontutils         |   1 +
 srcpkgs/texlive-formatsextra      |   1 +
 srcpkgs/texlive-games             |   1 +
 srcpkgs/texlive-humanities        |   1 +
 srcpkgs/texlive-langarabic        |   1 +
 srcpkgs/texlive-langchinese       |   1 +
 srcpkgs/texlive-langcjk           |   1 +
 srcpkgs/texlive-langcyrillic      |   1 +
 srcpkgs/texlive-langczechslovak   |   1 +
 srcpkgs/texlive-langenglish       |   1 +
 srcpkgs/texlive-langeuropean      |   1 +
 srcpkgs/texlive-langfrench        |   1 +
 srcpkgs/texlive-langgerman        |   1 +
 srcpkgs/texlive-langgreek         |   1 +
 srcpkgs/texlive-langitalian       |   1 +
 srcpkgs/texlive-langjapanese      |   1 +
 srcpkgs/texlive-langkorean        |   1 +
 srcpkgs/texlive-langother         |   1 +
 srcpkgs/texlive-langpolish        |   1 +
 srcpkgs/texlive-langportuguese    |   1 +
 srcpkgs/texlive-langspanish       |   1 +
 srcpkgs/texlive-latex             |   1 +
 srcpkgs/texlive-latexextra        |   1 +
 srcpkgs/texlive-latexrecommended  |   1 +
 srcpkgs/texlive-luatex            |   1 +
 srcpkgs/texlive-mathscience       |   1 +
 srcpkgs/texlive-metapost          |   1 +
 srcpkgs/texlive-music             |   1 +
 srcpkgs/texlive-pictures          |   1 +
 srcpkgs/texlive-plaingeneric      |   1 +
 srcpkgs/texlive-pstricks          |   1 +
 srcpkgs/texlive-publishers        |   1 +
 srcpkgs/texlive-xetex             |   1 +
 41 files changed, 543 insertions(+), 23 deletions(-)
 create mode 120000 srcpkgs/texlive-bibtexextra
 create mode 120000 srcpkgs/texlive-binextra
 create mode 120000 srcpkgs/texlive-context
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 120000 srcpkgs/texlive-fontsextra
 create mode 120000 srcpkgs/texlive-fontsrecommended
 create mode 120000 srcpkgs/texlive-fontutils
 create mode 120000 srcpkgs/texlive-formatsextra
 create mode 120000 srcpkgs/texlive-games
 create mode 120000 srcpkgs/texlive-humanities
 create mode 120000 srcpkgs/texlive-langarabic
 create mode 120000 srcpkgs/texlive-langchinese
 create mode 120000 srcpkgs/texlive-langcjk
 create mode 120000 srcpkgs/texlive-langcyrillic
 create mode 120000 srcpkgs/texlive-langczechslovak
 create mode 120000 srcpkgs/texlive-langenglish
 create mode 120000 srcpkgs/texlive-langeuropean
 create mode 120000 srcpkgs/texlive-langfrench
 create mode 120000 srcpkgs/texlive-langgerman
 create mode 120000 srcpkgs/texlive-langgreek
 create mode 120000 srcpkgs/texlive-langitalian
 create mode 120000 srcpkgs/texlive-langjapanese
 create mode 120000 srcpkgs/texlive-langkorean
 create mode 120000 srcpkgs/texlive-langother
 create mode 120000 srcpkgs/texlive-langpolish
 create mode 120000 srcpkgs/texlive-langportuguese
 create mode 120000 srcpkgs/texlive-langspanish
 create mode 120000 srcpkgs/texlive-latex
 create mode 120000 srcpkgs/texlive-latexextra
 create mode 120000 srcpkgs/texlive-latexrecommended
 create mode 120000 srcpkgs/texlive-luatex
 create mode 120000 srcpkgs/texlive-mathscience
 create mode 120000 srcpkgs/texlive-metapost
 create mode 120000 srcpkgs/texlive-music
 create mode 120000 srcpkgs/texlive-pictures
 create mode 120000 srcpkgs/texlive-plaingeneric
 create mode 120000 srcpkgs/texlive-pstricks
 create mode 120000 srcpkgs/texlive-publishers
 create mode 120000 srcpkgs/texlive-xetex

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b4ebd5ba13fdf..f68400d4e9ed59 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -850,22 +850,6 @@ replaces="
  tepl-devel<=6.8.0_2
  tepl<=6.8.0_2
  terminal_markdown_viewer<=1.6.3_4
- texlive-bibtexextra<=2023.66579_1
- texlive-fontsextra<=2023.66328_1
- texlive-formatsextra<=2023.66186_1
- texlive-games<=2023.66190_1
- texlive-humanities<=2023.65502_1
- texlive-langchinese<=2023.66188_1
- texlive-langcyrillic<=2023.64588_1
- texlive-langextra<=2023.66225_1
- texlive-langgreek<=2023.66513_1
- texlive-langjapanese<=2023.66482_1
- texlive-langkorean<=2023.66513_1
- texlive-latexextra<=2023.66551_1
- texlive-music<=2023.66278_1
- texlive-pictures<=2023.66549_1
- texlive-pstricks<=2023.66115_1
- texlive-publishers<=2023.66550_1
  texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra b/srcpkgs/texlive-bibtexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-bibtexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-binextra b/srcpkgs/texlive-binextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-binextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-context b/srcpkgs/texlive-context
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-context
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index 404c1ff4e34d06..7d720588884883 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -2,7 +2,7 @@
 pkgname=texlive-core
 version=20250308
 revision=1
-depends="fontforge python3 python3-Pygments perl perl-File-Which"
+depends="perl-File-HomeDir perl-Unicode-LineBreak perl-YAML-Tiny"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
@@ -17,17 +17,514 @@ checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
 python_version=3
 make_dirs="/var/lib/texmf 0755 root root"
 
+# docs need to come last
+subpackages="texlive-bibtexextra
+texlive-binextra
+texlive-context
+texlive-fontsextra
+texlive-fontsrecommended
+texlive-fontutils
+texlive-formatsextra
+texlive-games
+texlive-humanities
+texlive-langarabic
+texlive-langchinese
+texlive-langcjk
+texlive-langcyrillic
+texlive-langczechslovak
+texlive-langenglish
+texlive-langeuropean
+texlive-langfrench
+texlive-langgerman
+texlive-langgreek
+texlive-langitalian
+texlive-langjapanese
+texlive-langkorean
+texlive-langother
+texlive-langpolish
+texlive-langportuguese
+texlive-langspanish
+texlive-latex
+texlive-latexextra
+texlive-latexrecommended
+texlive-luatex
+texlive-mathscience
+texlive-metapost
+texlive-music
+texlive-pictures
+texlive-plaingeneric
+texlive-pstricks
+texlive-publishers
+texlive-xetex
+texlive-core-doc"
+
+# helper functions taken from Alpine Linux
+# https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/texmf-dist/APKBUILD
+# fixme: cannot inject dependencies, rather must inspect by hand
+
+_tlpdb_get_values() {
+	local pkg
+	local key
+	pkg="$1"
+	key="$2"
+
+	awk \
+		"/^name $pkg\$/,/^$/{if(/^$key /) print substr(\$0, length(\"$key\") + 2)}" \
+		"$_tlpdb"
+}
+
+_tlpdb_write_pkgsnip() {
+	local pkg
+	pkg="$1"
+	local snip
+	snip="$2"
+
+	awk \
+		"/^name $pkg\$/,/^\$/{print \$0}" \
+		"$_tlpdb" > "$snip"
+}
+
+_tlpdb_get_xfiles() {
+	local pkg
+	local type
+	snip="$1"
+	type="$2"
+
+	awk \
+		'/^'"$type"'files size=[0-9]*$/ {flag=1; next} flag && /^ texmf-dist/ {print $1; next} flag && !/^ / {exit}' \
+		"$snip"
+}
+
+_tlpdb_get_docfiles() {
+	_tlpdb_get_xfiles "$1" doc
+}
+
+_tlpdb_get_datafiles() {
+	_tlpdb_get_xfiles "$1" run
+	_tlpdb_get_xfiles "$1" src
+}
+
+_pack_collection() {
+	local collection
+	local deps
+	local pkgsnip
+	pkgsnip="$(mktemp)"
+	collection="$1"
+	deps="$(_tlpdb_get_values "collection-$collection" "depend")"
+
+	for dep in $deps; do
+		case "$dep" in
+		collection-basic)
+			# All subpackages already depend on texlive-core
+			;;
+		collection-*)
+			local actualdep
+			actualdep="texlive-${dep#collection-}"
+			echo "Injecting dependency on $actualdep"
+			depends+=" $actualdep"
+			;;
+		*)
+			echo "Adding $dep"
+			# writing part of DB for current package into temporary file, so
+			# that when parsing metadata from it we do not need to search the
+			# whole DB again.
+			_tlpdb_write_pkgsnip "$dep" "$pkgsnip"
+			local paths
+			paths="$(_tlpdb_get_datafiles "$pkgsnip")"
+			for path in $paths; do
+				mkdir -p ${PKGDESTDIR}/usr/share/$(dirname "$path")
+				mv "$wrksrc/$path" "${PKGDESTDIR}/usr/share/$path"
+			done
+			paths="$(_tlpdb_get_docfiles "$pkgsnip")"
+			for path in $paths; do
+				case "$path" in
+				texmf-dist/doc/man/*.pdf)
+					# all man pages are provided twice, one as PDF and once
+					# as troff. Since they are identical content-wise, we only
+					# pack the smaller troff file
+					;;
+				texmf-dist/doc/man/*.1)
+					# fixme: conflict with texlive
+					#vman "$wrksrc/$path"
+					;;
+				texmf-dist/doc/man/*.5)
+					#vman "$wrksrc/$path"
+					;;
+				*)
+					# fixme: may want doc subpackages
+					mkdir -p ${DESTDIR}/usr/share/$(dirname "$path")
+					mv "$wrksrc/$path" "${DESTDIR}/usr/share/$path"
+					;;
+				esac
+			done
+			;;
+		esac
+	done
+
+	rm -f "$pkgsnip"
+}
+
 post_extract() {
 	mv texlive-${version}-texmf/* .
 }
 
 do_install() {
-	# non-PIE executable found in PIE build
-	rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
-
-	vmkdir usr/share
-	vcopy texmf-dist usr/share
-
+	vmkdir usr/share/tlpkg
 	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
 	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+
+	_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+	_pack_collection "basic"
+}
+
+texlive-core-doc_package() {
+	short_desc+=" documentation and examples"
+	pkg_install() {
+		vmove usr/share/texmf-dist/doc
+
+		# fixme: non-PIE executable found in PIE build
+		rm -f ${PKGDESTDIR}/usr/share/texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+	}
+}
+
+texlive-bibtexextra_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-binextra_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-context_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsextra_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontsrecommended_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-fontutils_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-formatsextra_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-games_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-humanities_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langarabic_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langchinese_package() {
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcjk_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langcyrillic_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langczechslovak_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langenglish_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langeuropean_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langfrench_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgerman_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langgreek_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langitalian_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langjapanese_package() {
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langkorean_package() {
+	depends="texlive-core texlive-langcjk"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langother_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langpolish_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langportuguese_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-langspanish_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latex_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexextra_package() {
+	depends="perl-File-Which python3-Pygments texlive-core texlive-latexrecommended texlive-pictures"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-latexrecommended_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-luatex_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-mathscience_package() {
+	depends="texlive-core texlive-fontsrecommended texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-metapost_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-music_package() {
+	depends="fontforge python3 texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pictures_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-plaingeneric_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-pstricks_package() {
+	depends="texlive-core texlive-plaingeneric"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-publishers_package() {
+	depends="texlive-core texlive-latex"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
+}
+
+texlive-xetex_package() {
+	depends="texlive-core"
+	pkg_install() {
+		_tlpdb=${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb
+		short_desc="Tex Live - $(_tlpdb_get_values collection-${pkgname:8} shortdesc)"
+		_pack_collection "${pkgname:8}"
+	}
 }
diff --git a/srcpkgs/texlive-fontsextra b/srcpkgs/texlive-fontsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontsrecommended b/srcpkgs/texlive-fontsrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontsrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-fontutils b/srcpkgs/texlive-fontutils
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-fontutils
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-formatsextra b/srcpkgs/texlive-formatsextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-formatsextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-games b/srcpkgs/texlive-games
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-games
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-humanities b/srcpkgs/texlive-humanities
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-humanities
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langarabic b/srcpkgs/texlive-langarabic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langarabic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langchinese b/srcpkgs/texlive-langchinese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langchinese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcjk b/srcpkgs/texlive-langcjk
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcjk
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langcyrillic b/srcpkgs/texlive-langcyrillic
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langcyrillic
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langczechslovak b/srcpkgs/texlive-langczechslovak
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langczechslovak
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langenglish b/srcpkgs/texlive-langenglish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langenglish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langeuropean b/srcpkgs/texlive-langeuropean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langeuropean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langfrench b/srcpkgs/texlive-langfrench
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langfrench
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgerman b/srcpkgs/texlive-langgerman
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgerman
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langgreek b/srcpkgs/texlive-langgreek
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langgreek
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langitalian b/srcpkgs/texlive-langitalian
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langitalian
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langjapanese b/srcpkgs/texlive-langjapanese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langjapanese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langkorean b/srcpkgs/texlive-langkorean
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langkorean
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langother b/srcpkgs/texlive-langother
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langother
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langpolish b/srcpkgs/texlive-langpolish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langpolish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langportuguese b/srcpkgs/texlive-langportuguese
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langportuguese
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-langspanish b/srcpkgs/texlive-langspanish
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-langspanish
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latex b/srcpkgs/texlive-latex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexextra b/srcpkgs/texlive-latexextra
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexextra
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-latexrecommended b/srcpkgs/texlive-latexrecommended
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-latexrecommended
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-luatex b/srcpkgs/texlive-luatex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-luatex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-mathscience b/srcpkgs/texlive-mathscience
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-mathscience
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-metapost b/srcpkgs/texlive-metapost
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-metapost
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-music b/srcpkgs/texlive-music
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-music
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pictures b/srcpkgs/texlive-pictures
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pictures
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-plaingeneric b/srcpkgs/texlive-plaingeneric
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-plaingeneric
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-pstricks b/srcpkgs/texlive-pstricks
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-pstricks
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-publishers b/srcpkgs/texlive-publishers
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-publishers
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-xetex b/srcpkgs/texlive-xetex
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-xetex
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file

From f19e01852d41274fb0437839d6bac3b2fc3860d5 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 19 Jun 2025 14:26:48 -0400
Subject: [PATCH 5/5] texlive: add depends on dist

---
 srcpkgs/texlive/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index b83f168d97f73f..550790f52acc91 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -74,7 +74,7 @@ makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
 depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
- texlive-latexmk latexindent"
+ texlive-latexmk latexindent texlive-latex"
 checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
@@ -176,7 +176,7 @@ post_install() {
 }
 
 texlive-XeTeX_package() {
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} texlive-fontsrecommended texlive-xetex"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
 		vmove usr/bin/xetex
@@ -199,7 +199,7 @@ texlive-dvi_package() {
 }
 
 texlive-LuaTeX_package() {
-	depends="${sourcepkg}>=${version}_${revision} bash"
+	depends="${sourcepkg}>=${version}_${revision} bash texlive-fontsrecommended texlive-fontutils texlive-luatex"
 	short_desc+=" - extended pdfTeX using Lua"
 	pkg_install() {
 		if [ "$build_option_luajit" ] ; then
@@ -287,7 +287,7 @@ texlive-BibTeX_package() {
 
 texlive-ConTeXt_package() {
 	metapackage=yes
-	short_desc+=" (transitional package)"
+	short_desc+=" (transitional package) texlive-context"
 	depends="texlive>=${version}_${revision}"
 }
 
@@ -308,7 +308,7 @@ texlive-latexmk_package() {
 }
 
 latexindent_package() {
-	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny texlive-binextra"
 	short_desc="Script to add indentation to LaTeX files"
 	pkg_install() {
 		vmove usr/bin/latexindent

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (32 preceding siblings ...)
  2025-06-19 18:28 ` dkwo
@ 2025-07-10 22:21 ` dkwo
  2025-07-10 22:21 ` dkwo
                   ` (14 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-07-10 22:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: drop subpackages, only one doc for now
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen

I postpone this to later: To adapt helpers (e.g. from Alpine Linux) to process collections, we would need to split configuration files (e.g. Debian moves them to `TEXMFSYSCONFIG=/etc/texmf`) and adapt our triggers:
- updmap config files: `updmap.d`
- hyphenation-related config files (language.def and language.dat fragments): `language.d`
- fmtutil config files: `fmt.d,fmtutil`


A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 72760 bytes --]

From de014a42e1fba245f101c1bfdb176f2e0eab92e6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From fb5bd2af0b304190413a9d3f92121533dce6bd73 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 180 +++++---------
 9 files changed, 56 insertions(+), 645 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..b9b2c842cdda5b 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,44 +170,18 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} texlive-dvi"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
-		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
+		vmove usr/bin/xelatex
 	}
 }
 
@@ -273,23 +209,15 @@ texlive-LuaTeX_package() {
 			done
 		fi
 		for i in checkcites cllualatex cluttex diadia digestif getmapdl l3build luafindfont luahbtex \
-				 luaotfload-tool luatex lwarpmk m-tx \
-				 makeglossaries-lite mflua mflua-nowin musixflx musixtex pmxchords \
+				 lualatex luaotfload-tool luatex lwarpmk m-tx \
+				 makeglossaries-lite mflua mflua-nowin musixflx musixtex optex pmxchords \
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
 		vmove "usr/lib/libtexlua*.so.*"
-		for cmd in dvilualatex dviluatex optex ; do
-			ln -s luatex "${PKGDESTDIR}/usr/bin/${cmd}"
-		done
-		ln -s luahbtex "${PKGDESTDIR}/usr/bin/lualatex"
 	}
 }
 
@@ -314,7 +242,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +276,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +292,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +300,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 4c44beb3fbb62516178c227a160e0ea898656f32 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist, drop
 subpkgs, split docs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 srcpkgs/texlive-core-doc                      |  1 +
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 39 ++++++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 21 files changed, 116 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 48a0523b93d119..88f959730764eb 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250630
+version=0.1.20250710
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -856,6 +856,23 @@ replaces="
  text-engine<=0.1.1_1
  text-engine-devel<=0.1.1_1
  text-engine-demo<=0.1.1_1
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..9d269be72e5fc7 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,42 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm -f texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+
+	rm -f usr/share/texmf-dist/ls-R
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" - documentation"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/share/texmf-dist/doc
+	}
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (33 preceding siblings ...)
  2025-07-10 22:21 ` dkwo
@ 2025-07-10 22:21 ` dkwo
  2025-07-10 22:51 ` [PR PATCH] [Updated] " dkwo
                   ` (13 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-07-10 22:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-3059316942

Comment:
Packaging collections has the extra complication of dealing with hyphenation, fmt and similar files, which are now split. For now, I go back to one single package, and just split the docs. I also resolved the conflicts in texlive.
Once we find a proper way to deal with collections (e.g. using Alpine's functions, which however still requires a way to deal with those files), we can go back to split collections if we want.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (34 preceding siblings ...)
  2025-07-10 22:21 ` dkwo
@ 2025-07-10 22:51 ` dkwo
  2025-10-11  2:01 ` github-actions
                   ` (12 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-07-10 22:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: drop subpackages, only one doc for now
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen

I postpone this to later: To adapt helpers (e.g. from Alpine Linux) to process collections, we would need to split configuration files (e.g. Debian moves them to `TEXMFSYSCONFIG=/etc/texmf`) and adapt our triggers:
- updmap config files: `updmap.d`
- hyphenation-related config files (language.def and language.dat fragments): `language.d`
- fmtutil config files: `fmt.d,fmtutil`


A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 72750 bytes --]

From de014a42e1fba245f101c1bfdb176f2e0eab92e6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From fb5bd2af0b304190413a9d3f92121533dce6bd73 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 180 +++++---------
 9 files changed, 56 insertions(+), 645 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..b9b2c842cdda5b 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,44 +170,18 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} texlive-dvi"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
-		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
+		vmove usr/bin/xelatex
 	}
 }
 
@@ -273,23 +209,15 @@ texlive-LuaTeX_package() {
 			done
 		fi
 		for i in checkcites cllualatex cluttex diadia digestif getmapdl l3build luafindfont luahbtex \
-				 luaotfload-tool luatex lwarpmk m-tx \
-				 makeglossaries-lite mflua mflua-nowin musixflx musixtex pmxchords \
+				 lualatex luaotfload-tool luatex lwarpmk m-tx \
+				 makeglossaries-lite mflua mflua-nowin musixflx musixtex optex pmxchords \
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
 		vmove "usr/lib/libtexlua*.so.*"
-		for cmd in dvilualatex dviluatex optex ; do
-			ln -s luatex "${PKGDESTDIR}/usr/bin/${cmd}"
-		done
-		ln -s luahbtex "${PKGDESTDIR}/usr/bin/lualatex"
 	}
 }
 
@@ -314,7 +242,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +276,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +292,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +300,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 3da77dc9d38687666708179908a6d638d6222cd5 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist, drop
 subpkgs, split docs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 srcpkgs/texlive-core-doc                      |  1 +
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 39 ++++++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 21 files changed, 116 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 48a0523b93d119..88f959730764eb 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20250630
+version=0.1.20250710
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -856,6 +856,23 @@ replaces="
  text-engine<=0.1.1_1
  text-engine-devel<=0.1.1_1
  text-engine-demo<=0.1.1_1
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
  tomahawk-devel<=0.8.4_25
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..798a0362dac911 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,42 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm -f texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	rm -f texmf-dist/ls-R
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" - documentation"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/share/texmf-dist/doc
+	}
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (35 preceding siblings ...)
  2025-07-10 22:51 ` [PR PATCH] [Updated] " dkwo
@ 2025-10-11  2:01 ` github-actions
  2025-10-14  3:04 ` [PR PATCH] [Updated] " dkwo
                   ` (11 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: github-actions @ 2025-10-11  2:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-3392739579

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (36 preceding siblings ...)
  2025-10-11  2:01 ` github-actions
@ 2025-10-14  3:04 ` dkwo
  2025-10-14  3:08 ` dkwo
                   ` (10 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-10-14  3:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: drop subpackages, only one doc for now
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen

I postpone this to later: To adapt helpers (e.g. from Alpine Linux) to process collections, we would need to split configuration files (e.g. Debian moves them to `TEXMFSYSCONFIG=/etc/texmf`) and adapt our triggers:
- updmap config files: `updmap.d`
- hyphenation-related config files (language.def and language.dat fragments): `language.d`
- fmtutil config files: `fmt.d,fmtutil`


A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 72851 bytes --]

From 713d42677314b6129add06fe7fe7f331dc3eb0d2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 753b951a7305892464c67ec928d4805944c7aad9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 182 +++++---------
 9 files changed, 57 insertions(+), 646 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..4aafcfcf335ab0 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core>=${version}_${revision} xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
-maintainer="fosslinux <fosslinux@aussies.space>"
+maintainer="dkwo <npiazza@disroot.org>, fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,44 +170,18 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} texlive-dvi"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
-		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
+		vmove usr/bin/xelatex
 	}
 }
 
@@ -273,23 +209,15 @@ texlive-LuaTeX_package() {
 			done
 		fi
 		for i in checkcites cllualatex cluttex diadia digestif getmapdl l3build luafindfont luahbtex \
-				 luaotfload-tool luatex lwarpmk m-tx \
-				 makeglossaries-lite mflua mflua-nowin musixflx musixtex pmxchords \
+				 lualatex luaotfload-tool luatex lwarpmk m-tx \
+				 makeglossaries-lite mflua mflua-nowin musixflx musixtex optex pmxchords \
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
 		vmove "usr/lib/libtexlua*.so.*"
-		for cmd in dvilualatex dviluatex optex ; do
-			ln -s luatex "${PKGDESTDIR}/usr/bin/${cmd}"
-		done
-		ln -s luahbtex "${PKGDESTDIR}/usr/bin/lualatex"
 	}
 }
 
@@ -314,7 +242,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +276,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +292,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +300,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 6cac6f9f3861bfa19382e909375b77890421e11f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist, drop
 subpkgs, split docs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 srcpkgs/texlive-core-doc                      |  1 +
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 39 ++++++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 21 files changed, 116 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 53c8350a677ccb..c6640691aa99c8 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20251009
+version=0.1.20251013
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -903,6 +903,23 @@ replaces="
  text-engine<=0.1.1_1
  text-engine-devel<=0.1.1_1
  text-engine-demo<=0.1.1_1
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  threadweaver<=5.116.0_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..d7489ad64f117e
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = $TEXMFROOT/texmf-local
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..798a0362dac911 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,42 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm -f texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	rm -f texmf-dist/ls-R
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" - documentation"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/share/texmf-dist/doc
+	}
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (37 preceding siblings ...)
  2025-10-14  3:04 ` [PR PATCH] [Updated] " dkwo
@ 2025-10-14  3:08 ` dkwo
  2025-10-14 10:58 ` [PR REVIEW] " leahneukirchen
                   ` (9 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-10-14  3:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-3399943803

Comment:
This is ready to review, I have been using it for a while.
@leahneukirchen Now that arXiv is also on texlive 2025, it may be a good time to update.
@fosslinux I partially took your offer, and added myself to the maintainers string.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR REVIEW] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (38 preceding siblings ...)
  2025-10-14  3:08 ` dkwo
@ 2025-10-14 10:58 ` leahneukirchen
  2025-10-15  3:19 ` [PR PATCH] [Updated] " dkwo
                   ` (8 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: leahneukirchen @ 2025-10-14 10:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

New review comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#discussion_r2428738653

Comment:
This should be /usr/local/share/texmf/

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (39 preceding siblings ...)
  2025-10-14 10:58 ` [PR REVIEW] " leahneukirchen
@ 2025-10-15  3:19 ` dkwo
  2025-10-15  3:21 ` [PR REVIEW] " dkwo
                   ` (7 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-10-15  3:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: drop subpackages, only one doc for now
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen

I postpone this to later: To adapt helpers (e.g. from Alpine Linux) to process collections, we would need to split configuration files (e.g. Debian moves them to `TEXMFSYSCONFIG=/etc/texmf`) and adapt our triggers:
- updmap config files: `updmap.d`
- hyphenation-related config files (language.def and language.dat fragments): `language.d`
- fmtutil config files: `fmt.d,fmtutil`


A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 72851 bytes --]

From baeffe935ba7c36db38a4661571bc65030027122 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..72760e91e20cdf 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -53,4 +53,4 @@ license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
 distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 48ebac4d8f6f6c81b9d8a34a7a40e792f475724a Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 182 +++++---------
 9 files changed, 57 insertions(+), 646 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..4aafcfcf335ab0 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core>=${version}_${revision} xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
-maintainer="fosslinux <fosslinux@aussies.space>"
+maintainer="dkwo <npiazza@disroot.org>, fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,44 +170,18 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} texlive-dvi"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
-		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
+		vmove usr/bin/xelatex
 	}
 }
 
@@ -273,23 +209,15 @@ texlive-LuaTeX_package() {
 			done
 		fi
 		for i in checkcites cllualatex cluttex diadia digestif getmapdl l3build luafindfont luahbtex \
-				 luaotfload-tool luatex lwarpmk m-tx \
-				 makeglossaries-lite mflua mflua-nowin musixflx musixtex pmxchords \
+				 lualatex luaotfload-tool luatex lwarpmk m-tx \
+				 makeglossaries-lite mflua mflua-nowin musixflx musixtex optex pmxchords \
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
 		vmove "usr/lib/libtexlua*.so.*"
-		for cmd in dvilualatex dviluatex optex ; do
-			ln -s luatex "${PKGDESTDIR}/usr/bin/${cmd}"
-		done
-		ln -s luahbtex "${PKGDESTDIR}/usr/bin/lualatex"
 	}
 }
 
@@ -314,7 +242,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +276,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +292,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +300,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From 746e0c04150daab9dd2763da627f6e201f7cb115 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist, drop
 subpkgs, split docs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 srcpkgs/texlive-core-doc                      |  1 +
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 39 ++++++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 21 files changed, 116 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 12cd90a880c8c6..52bed7564da3dd 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20251014
+version=0.1.20251015
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -905,6 +905,23 @@ replaces="
  text-engine<=0.1.1_1
  text-engine-devel<=0.1.1_1
  text-engine-demo<=0.1.1_1
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  threadweaver<=5.116.0_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..02591313226f0f
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = /usr/local/share/texmf
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..798a0362dac911 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,42 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm -f texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	rm -f texmf-dist/ls-R
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" - documentation"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/share/texmf-dist/doc
+	}
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PR REVIEW] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (40 preceding siblings ...)
  2025-10-15  3:19 ` [PR PATCH] [Updated] " dkwo
@ 2025-10-15  3:21 ` dkwo
  2025-10-21  8:01 ` [PR PATCH] [Updated] " dkwo
                   ` (6 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-10-15  3:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#discussion_r2431004675

Comment:
Changed, thanks!

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (41 preceding siblings ...)
  2025-10-15  3:21 ` [PR REVIEW] " dkwo
@ 2025-10-21  8:01 ` dkwo
  2026-01-20  2:14 ` github-actions
                   ` (5 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2025-10-21  8:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: drop subpackages, only one doc for now
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen

I postpone this to later: To adapt helpers (e.g. from Alpine Linux) to process collections, we would need to split configuration files (e.g. Debian moves them to `TEXMFSYSCONFIG=/etc/texmf`) and adapt our triggers:
- updmap config files: `updmap.d`
- hyphenation-related config files (language.def and language.dat fragments): `language.d`
- fmtutil config files: `fmt.d,fmtutil`


A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 72978 bytes --]

From 662792cfaa65a780dfcf54fc6eb77cfd52172675 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..ebfa40ddc09586 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -52,5 +52,5 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
-distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+distfiles="https://github.com/plk/biber/archive/refs/tags/v${version}.tar.gz"
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 52f71636111326964845b69d15bdd3979ba5323b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 182 +++++---------
 9 files changed, 57 insertions(+), 646 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..4aafcfcf335ab0 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core>=${version}_${revision} xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
-maintainer="fosslinux <fosslinux@aussies.space>"
+maintainer="dkwo <npiazza@disroot.org>, fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,44 +170,18 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} texlive-dvi"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
-		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
+		vmove usr/bin/xelatex
 	}
 }
 
@@ -273,23 +209,15 @@ texlive-LuaTeX_package() {
 			done
 		fi
 		for i in checkcites cllualatex cluttex diadia digestif getmapdl l3build luafindfont luahbtex \
-				 luaotfload-tool luatex lwarpmk m-tx \
-				 makeglossaries-lite mflua mflua-nowin musixflx musixtex pmxchords \
+				 lualatex luaotfload-tool luatex lwarpmk m-tx \
+				 makeglossaries-lite mflua mflua-nowin musixflx musixtex optex pmxchords \
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
 		vmove "usr/lib/libtexlua*.so.*"
-		for cmd in dvilualatex dviluatex optex ; do
-			ln -s luatex "${PKGDESTDIR}/usr/bin/${cmd}"
-		done
-		ln -s luahbtex "${PKGDESTDIR}/usr/bin/lualatex"
 	}
 }
 
@@ -314,7 +242,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +276,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +292,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +300,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From f2e6e4b19b20bad0d24ede0a718907680a54e4ba Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist, drop
 subpkgs, split docs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 srcpkgs/texlive-core-doc                      |  1 +
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 39 ++++++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 21 files changed, 116 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fc3eb4a864305f..37af0ada8df387 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20251014
+version=0.1.20251015
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -905,6 +905,23 @@ replaces="
  text-engine<=0.1.1_1
  text-engine-devel<=0.1.1_1
  text-engine-demo<=0.1.1_1
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  threadweaver<=5.116.0_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..02591313226f0f
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = /usr/local/share/texmf
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..798a0362dac911 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,42 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm -f texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	rm -f texmf-dist/ls-R
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" - documentation"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/share/texmf-dist/doc
+	}
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (42 preceding siblings ...)
  2025-10-21  8:01 ` [PR PATCH] [Updated] " dkwo
@ 2026-01-20  2:14 ` github-actions
  2026-01-20  2:29 ` [PR PATCH] [Updated] " dkwo
                   ` (4 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: github-actions @ 2026-01-20  2:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-3770714853

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Updated] Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (43 preceding siblings ...)
  2026-01-20  2:14 ` github-actions
@ 2026-01-20  2:29 ` dkwo
  2026-01-20  2:31 ` dkwo
                   ` (3 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2026-01-20  2:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages tl2025
https://github.com/void-linux/void-packages/pull/55038

Texlive 2025
- I tested the changes in this PR: yes. I can compile latex documents just fine, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive-core`: drop subpackages, only one doc for now
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

cc: @fosslinux @tornaria @leahneukirchen

I postpone this to later: To adapt helpers (e.g. from Alpine Linux) to process collections, we would need to split configuration files (e.g. Debian moves them to `TEXMFSYSCONFIG=/etc/texmf`) and adapt our triggers:
- updmap config files: `updmap.d`
- hyphenation-related config files (language.def and language.dat fragments): `language.d`
- fmtutil config files: `fmt.d,fmtutil`


A patch file from https://github.com/void-linux/void-packages/pull/55038.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tl2025-55038.patch --]
[-- Type: text/x-diff, Size: 72968 bytes --]

From e732fdabf2d096b93a5758ca7eceeee9cbf6e8d1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 11 Apr 2025 09:55:54 -0400
Subject: [PATCH 1/3] biber: update to 2.20

---
 srcpkgs/biber/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index 63ba6c98e0d4e6..ebfa40ddc09586 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,6 +1,6 @@
 # Template file for 'biber'
 pkgname=biber
-version=2.19
+version=2.20
 revision=1
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
@@ -52,5 +52,5 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="Artistic-2.0"
 homepage="http://biblatex-biber.sourceforge.net"
 changelog="https://raw.githubusercontent.com/plk/biber/dev/Changes"
-distfiles="https://github.com/plk/biber/archive/v${version}.tar.gz"
-checksum=1c1266bc8adb1637c4c59e23c47d919c5a38da4e53544a3c22c21de4a68fc9fe
+distfiles="https://github.com/plk/biber/archive/refs/tags/v${version}.tar.gz"
+checksum=19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9

From 1b9884ad8ec658ddbd4c2d856b9b3c2eed24b610 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 13:38:15 -0400
Subject: [PATCH 2/3] texlive: update to 2025, simplify cross

---
 srcpkgs/latexindent                           |   1 +
 .../aarch64-Fix-exit-stub-patching.patch      | 231 ------------------
 .../aarch64-register-allocation-bug-fix.patch |  29 ---
 srcpkgs/texlive/files/remove-himktables.patch |  13 -
 srcpkgs/texlive/files/tlmgr                   |   2 -
 srcpkgs/texlive/patches/cross-luajit.patch    | 124 ----------
 .../patches/relax-zlib-version-check.patch    |  26 --
 srcpkgs/texlive/patches/tlmgr.patch           |  95 -------
 srcpkgs/texlive/template                      | 182 +++++---------
 9 files changed, 57 insertions(+), 646 deletions(-)
 create mode 120000 srcpkgs/latexindent
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
 delete mode 100644 srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
 delete mode 100644 srcpkgs/texlive/files/remove-himktables.patch
 delete mode 100644 srcpkgs/texlive/files/tlmgr
 delete mode 100644 srcpkgs/texlive/patches/cross-luajit.patch
 delete mode 100644 srcpkgs/texlive/patches/relax-zlib-version-check.patch
 delete mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/latexindent b/srcpkgs/latexindent
new file mode 120000
index 00000000000000..c6cca627ba9088
--- /dev/null
+++ b/srcpkgs/latexindent
@@ -0,0 +1 @@
+texlive
\ No newline at end of file
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
deleted file mode 100644
index 487a1cd1ca7876..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-Fix-exit-stub-patching.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-commit 9da06535092d6d9dec442641a26c64bce5574322
-Author: Mike Pall <mike>
-Date:   Sun Jun 24 14:08:59 2018 +0200
-
-    ARM64: Fix exit stub patching.
-    
-    Contributed by Javier Guerra Giraldez.
-
-diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
-index cbb186d3..baafa21a 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -56,11 +56,11 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
-     asm_mclimit(as);
-   /* 1: str lr,[sp]; bl ->vm_exit_handler; movz w0,traceno; bl <1; bl <1; ... */
-   for (i = nexits-1; (int32_t)i >= 0; i--)
--    *--mxp = A64I_LE(A64I_BL|((-3-i)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_MOVZw|A64F_U16(as->T->traceno));
-+    *--mxp = A64I_LE(A64I_BL | A64F_S26(-3-i));
-+  *--mxp = A64I_LE(A64I_MOVZw | A64F_U16(as->T->traceno));
-   mxp--;
--  *mxp = A64I_LE(A64I_BL|(((MCode *)(void *)lj_vm_exit_handler-mxp)&0x03ffffffu));
--  *--mxp = A64I_LE(A64I_STRx|A64F_D(RID_LR)|A64F_N(RID_SP));
-+  *mxp = A64I_LE(A64I_BL | A64F_S26(((MCode *)(void *)lj_vm_exit_handler-mxp)));
-+  *--mxp = A64I_LE(A64I_STRx | A64F_D(RID_LR) | A64F_N(RID_SP));
-   as->mctop = mxp;
- }
- 
-@@ -77,7 +77,7 @@ static void asm_guardcc(ASMState *as, A64CC cc)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cond_branch(as, cc^1, p-1);
-     return;
-   }
-@@ -91,7 +91,7 @@ static void asm_guardtnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_tnb(as, ai^0x01000000u, r, bit, p-1);
-     return;
-   }
-@@ -105,7 +105,7 @@ static void asm_guardcnb(ASMState *as, A64Ins ai, Reg r)
-   MCode *p = as->mcp;
-   if (LJ_UNLIKELY(p == as->invmcp)) {
-     as->loopinv = 1;
--    *p = A64I_B | ((target-p) & 0x03ffffffu);
-+    *p = A64I_B | A64F_S26(target-p);
-     emit_cnb(as, ai^0x01000000u, r, p-1);
-     return;
-   }
-@@ -1850,7 +1850,7 @@ static void asm_loop_fixup(ASMState *as)
-     p[-2] |= ((uint32_t)delta & mask) << 5;
-   } else {
-     ptrdiff_t delta = target - (p - 1);
--    p[-1] = A64I_B | ((uint32_t)(delta) & 0x03ffffffu);
-+    p[-1] = A64I_B | A64F_S26(delta);
-   }
- }
- 
-@@ -1919,7 +1919,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
-   }
-   /* Patch exit branch. */
-   target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
--  p[-1] = A64I_B | (((target-p)+1)&0x03ffffffu);
-+  p[-1] = A64I_B | A64F_S26((target-p)+1);
- }
- 
- /* Prepare tail of code. */
-@@ -1982,40 +1982,50 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
- {
-   MCode *p = T->mcode;
-   MCode *pe = (MCode *)((char *)p + T->szmcode);
--  MCode *cstart = NULL, *cend = p;
-+  MCode *cstart = NULL;
-   MCode *mcarea = lj_mcode_patch(J, p, 0);
-   MCode *px = exitstub_trace_addr(T, exitno);
-+  /* Note: this assumes a trace exit is only ever patched once. */
-   for (; p < pe; p++) {
-     /* Look for exitstub branch, replace with branch to target. */
-+    ptrdiff_t delta = target - p;
-     MCode ins = A64I_LE(*p);
-     if ((ins & 0xff000000u) == 0x54000000u &&
- 	((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch bcc exitstub. */
--      *p = A64I_LE((ins & 0xff00001fu) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch bcc, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0xfc000000u) == 0x14000000u &&
- 	       ((ins ^ (px-p)) & 0x03ffffffu) == 0) {
--      /* Patch b exitstub. */
--      *p = A64I_LE((ins & 0xfc000000u) | ((target-p) & 0x03ffffffu));
--      cend = p+1;
-+      /* Patch b. */
-+      lua_assert(A64F_S_OK(delta, 26));
-+      *p = A64I_LE((ins & 0xfc000000u) | A64F_S26(delta));
-       if (!cstart) cstart = p;
-     } else if ((ins & 0x7e000000u) == 0x34000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x00ffffe0u) == 0) {
--      /* Patch cbz/cbnz exitstub. */
--      *p = A64I_LE((ins & 0xff00001f) | (((target-p)<<5) & 0x00ffffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch cbz/cbnz, if within range. */
-+      if (A64F_S_OK(delta, 19)) {
-+	*p = A64I_LE((ins & 0xff00001fu) | A64F_S19(delta));
-+	if (!cstart) cstart = p;
-+      }
-     } else if ((ins & 0x7e000000u) == 0x36000000u &&
- 	       ((ins ^ ((px-p)<<5)) & 0x0007ffe0u) == 0) {
--      /* Patch tbz/tbnz exitstub. */
--      *p = A64I_LE((ins & 0xfff8001fu) | (((target-p)<<5) & 0x0007ffe0u));
--      cend = p+1;
--      if (!cstart) cstart = p;
-+      /* Patch tbz/tbnz, if within range. */
-+      if (A64F_S_OK(delta, 14)) {
-+	*p = A64I_LE((ins & 0xfff8001fu) | A64F_S14(delta));
-+	if (!cstart) cstart = p;
-+      }
-     }
-   }
--  lua_assert(cstart != NULL);
--  lj_mcode_sync(cstart, cend);
-+  {  /* Always patch long-range branch in exit stub itself. */
-+    ptrdiff_t delta = target - px;
-+    lua_assert(A64F_S_OK(delta, 26));
-+    *px = A64I_B | A64F_S26(delta);
-+    if (!cstart) cstart = px;
-+  }
-+  lj_mcode_sync(cstart, px+1);
-   lj_mcode_patch(J, mcarea, 1);
- }
- 
-diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
-index 6da4c7d4..1001b1d8 100644
---- a/src/lj_emit_arm64.h
-+++ b/src/lj_emit_arm64.h
-@@ -241,7 +241,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
- #define mcpofs(as, k) \
-   ((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
- #define checkmcpofs(as, k) \
--  ((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
-+  (A64F_S_OK(mcpofs(as, k)>>2, 19))
- 
- static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow);
- 
-@@ -312,7 +312,7 @@ static void emit_cond_branch(ASMState *as, A64CC cond, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = A64I_BCC | A64F_S19(delta) | cond;
- }
- 
-@@ -320,24 +320,24 @@ static void emit_branch(ASMState *as, A64Ins ai, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x02000000) >> 26) == 0);
--  *p = ai | ((uint32_t)delta & 0x03ffffffu);
-+  lua_assert(A64F_S_OK(delta, 26));
-+  *p = ai | A64F_S26(delta);
- }
- 
- static void emit_tnb(ASMState *as, A64Ins ai, Reg r, uint32_t bit, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(bit < 63 && ((delta + 0x2000) >> 14) == 0);
-+  lua_assert(bit < 63 && A64F_S_OK(delta, 14));
-   if (bit > 31) ai |= A64I_X;
--  *p = ai | A64F_BIT(bit & 31) | A64F_S14((uint32_t)delta & 0x3fffu) | r;
-+  *p = ai | A64F_BIT(bit & 31) | A64F_S14(delta) | r;
- }
- 
- static void emit_cnb(ASMState *as, A64Ins ai, Reg r, MCode *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = target - p;
--  lua_assert(((delta + 0x40000) >> 19) == 0);
-+  lua_assert(A64F_S_OK(delta, 19));
-   *p = ai | A64F_S19(delta) | r;
- }
- 
-@@ -347,8 +347,8 @@ static void emit_call(ASMState *as, void *target)
- {
-   MCode *p = --as->mcp;
-   ptrdiff_t delta = (char *)target - (char *)p;
--  if ((((delta>>2) + 0x02000000) >> 26) == 0) {
--    *p = A64I_BL | ((uint32_t)(delta>>2) & 0x03ffffffu);
-+  if (A64F_S_OK(delta>>2, 26)) {
-+    *p = A64I_BL | A64F_S26(delta>>2);
-   } else {  /* Target out of range: need indirect call. But don't use R0-R7. */
-     Reg r = ra_allock(as, i64ptr(target),
- 		      RSET_RANGE(RID_X8, RID_MAX_GPR)-RSET_FIXED);
-diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
-index 520023ae..a207a2ba 100644
---- a/src/lj_target_arm64.h
-+++ b/src/lj_target_arm64.h
-@@ -132,9 +132,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_IMMR(x)	((x) << 16)
- #define A64F_U16(x)	((x) << 5)
- #define A64F_U12(x)	((x) << 10)
--#define A64F_S26(x)	(x)
-+#define A64F_S26(x)	(((uint32_t)(x) & 0x03ffffffu))
- #define A64F_S19(x)	(((uint32_t)(x) & 0x7ffffu) << 5)
--#define A64F_S14(x)	((x) << 5)
-+#define A64F_S14(x)	(((uint32_t)(x) & 0x3fffu) << 5)
- #define A64F_S9(x)	((x) << 12)
- #define A64F_BIT(x)	((x) << 19)
- #define A64F_SH(sh, x)	(((sh) << 22) | ((x) << 10))
-@@ -145,6 +145,9 @@ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
- #define A64F_LSL16(x)	(((x) / 16) << 21)
- #define A64F_BSH(sh)	((sh) << 10)
- 
-+/* Check for valid field range. */
-+#define A64F_S_OK(x, b)	((((x) + (1 << (b-1))) >> (b)) == 0)
-+
- typedef enum A64Ins {
-   A64I_S = 0x20000000,
-   A64I_X = 0x80000000,
diff --git a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch b/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
deleted file mode 100644
index c30264786755f3..00000000000000
--- a/srcpkgs/texlive/files/luajit-patches/aarch64-register-allocation-bug-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Jason Teplitz <jason@tensyr.com>
-Date: Mon, 9 Oct 2017 23:03:09 +0000
-Subject: Fix register allocation bug in arm64
-
----
- src/lj_asm_arm64.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git src/lj_asm_arm64.h src/lj_asm_arm64.h
-index 8fd92e7..549f8a6 100644
---- a/src/lj_asm_arm64.h
-+++ b/src/lj_asm_arm64.h
-@@ -871,7 +871,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   int bigofs = !emit_checkofs(A64I_LDRx, ofs);
-   RegSet allow = RSET_GPR;
-   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
--  Reg node = ra_alloc1(as, ir->op1, allow);
-+  Reg node = ra_alloc1(as, ir->op1, ra_hasreg(dest) ? rset_clear(allow, dest) : allow);
-   Reg key = ra_scratch(as, rset_clear(allow, node));
-   Reg idx = node;
-   uint64_t k;
-@@ -879,7 +879,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
-   rset_clear(allow, key);
-   if (bigofs) {
-     idx = dest;
--    rset_clear(allow, dest);
-     kofs = (int32_t)offsetof(Node, key);
-   } else if (ra_hasreg(dest)) {
-     emit_opk(as, A64I_ADDx, dest, node, ofs, allow);
diff --git a/srcpkgs/texlive/files/remove-himktables.patch b/srcpkgs/texlive/files/remove-himktables.patch
deleted file mode 100644
index 5ae3edb97223d0..00000000000000
--- a/srcpkgs/texlive/files/remove-himktables.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/texk/web2c/Makefile.in	2023-12-19 16:13:41.579311491 +1100
-+++ b/texk/web2c/Makefile.in	2023-12-19 16:14:01.587311491 +1100
-@@ -22095,10 +22095,6 @@
- hitex-tangle: ctangle$(EXEEXT) hitexdir/hitex.w tangle-sh
- 	$(hi_ctangle_sh) hitex
- 
--# Generating hitables.c using himktables.
--hitables.c: himktables$(EXEEXT)
--	./himktables$(EXEEXT) > $@ || { rm -f hitables.c; exit 1; }
--
- # hitex, histretch, and hishrink all need (at least) some 
- # of the sources generated from hiformat.w.
- #
diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
deleted file mode 100644
index ab49facd2d87e4..00000000000000
--- a/srcpkgs/texlive/files/tlmgr
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/cross-luajit.patch b/srcpkgs/texlive/patches/cross-luajit.patch
deleted file mode 100644
index 79afc24bc42d42..00000000000000
--- a/srcpkgs/texlive/patches/cross-luajit.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/libs/luajit/native/Makefile.in	2018-09-07 06:40:04.000000000 +1000
-+++ b/libs/luajit/native/Makefile.in.new	2020-06-07 16:10:40.445000000 +1000
-@@ -154,6 +154,8 @@
- am__v_CC_1 = 
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-+HOSTCCLD = $(HOSTCC)
-+HOSTLINK = $(HOSTCCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD    " $@;
-@@ -413,7 +415,7 @@
- 
- buildvm$(EXEEXT): $(buildvm_OBJECTS) $(buildvm_DEPENDENCIES) $(EXTRA_buildvm_DEPENDENCIES) 
- 	@rm -f buildvm$(EXEEXT)
--	$(AM_V_CCLD)$(LINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
-+	$(AM_V_CCLD)$(HOSTLINK) $(buildvm_OBJECTS) $(buildvm_LDADD) $(LIBS)
- @LUAJIT_TREE@/src/host/minilua-minilua.$(OBJEXT):  \
- 	@LUAJIT_TREE@/src/host/$(am__dirstamp) \
- 	@LUAJIT_TREE@/src/host/$(DEPDIR)/$(am__dirstamp)
-@@ -459,74 +461,74 @@
- @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.o: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.o `test -f '@LUAJIT_TREE@/src/host/buildvm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm.obj: @LUAJIT_TREE@/src/host/buildvm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.o `test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_asm.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj: @LUAJIT_TREE@/src/host/buildvm_asm.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_asm.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_asm.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_asm.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_asm.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_asm.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_asm.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.o `test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_fold.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj: @LUAJIT_TREE@/src/host/buildvm_fold.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_fold.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_fold.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_fold.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_fold.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_fold.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_fold.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.o `test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_lib.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj: @LUAJIT_TREE@/src/host/buildvm_lib.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_lib.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_lib.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_lib.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_lib.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_lib.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_lib.c'; fi`
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.o `test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/buildvm_peobj.c
- 
- @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj: @LUAJIT_TREE@/src/host/buildvm_peobj.c
--@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_TRUE@	$(AM_V_CC)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Tpo @LUAJIT_TREE@/src/host/$(DEPDIR)/buildvm-buildvm_peobj.Po
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='@LUAJIT_TREE@/src/host/buildvm_peobj.c' object='@LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj' libtool=no @AMDEPBACKSLASH@
- @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
--@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
-+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(buildvm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/host/buildvm-buildvm_peobj.obj `if test -f '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/host/buildvm_peobj.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/host/buildvm_peobj.c'; fi`
- 
- @LUAJIT_TREE@/src/host/minilua-minilua.o: @LUAJIT_TREE@/src/host/minilua.c
- @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minilua_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/host/minilua-minilua.o -MD -MP -MF @LUAJIT_TREE@/src/host/$(DEPDIR)/minilua-minilua.Tpo -c -o @LUAJIT_TREE@/src/host/minilua-minilua.o `test -f '@LUAJIT_TREE@/src/host/minilua.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/host/minilua.c
-@@ -914,7 +922,7 @@
- $(buildvm_OBJECTS): buildvm_arch.h
- 
- buildvm_arch.h: minilua$(EXEEXT) $(LUAJIT_TREE)/dynasm/dynasm.lua
--	$(AM_V_GEN)./minilua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
-+	lua $(srcdir)/$(LUAJIT_TREE)/dynasm/dynasm.lua \
- 	  `cat ../dynasm_flags` \
- 	  -o $@ $(srcdir)/$(LUAJIT_TREE)/src/vm_$(DASM_ARCH).dasc
- 
diff --git a/srcpkgs/texlive/patches/relax-zlib-version-check.patch b/srcpkgs/texlive/patches/relax-zlib-version-check.patch
deleted file mode 100644
index b5973c103c7561..00000000000000
--- a/srcpkgs/texlive/patches/relax-zlib-version-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f53490d88387bbfe6c7d482089d9a597b257cf0 Mon Sep 17 00:00:00 2001
-From: Luigi Scarso <luigi.scarso@gmail.com>
-Date: Tue, 21 Nov 2023 11:17:29 +0100
-Subject: [PATCH] relax zlib version check to just checking the major version,
- since (it turns out) zlib 1.3 is compatible with 1.2 (K. Berry).
-
----
- texk/web2c/luatexdir/ChangeLog           | 9 +++++++++
- texk/web2c/luatexdir/luatex_svnversion.h | 2 +-
- texk/web2c/luatexdir/luazlib/lzlib.c     | 2 +-
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/texk/web2c/luatexdir/luazlib/lzlib.c b/texk/web2c/luatexdir/luazlib/lzlib.c
-index e61f92d58..ea123e541 100644
---- a/texk/web2c/luatexdir/luazlib/lzlib.c
-+++ b/texk/web2c/luatexdir/luazlib/lzlib.c
-@@ -546,7 +546,7 @@ LUALIB_API int luaopen_zlib(lua_State *L)
- 
-     /* make sure header and library version are consistent */
-     const char* version = zlibVersion();
--    if (strncmp(version, ZLIB_VERSION, 4))
-+    if (strncmp(version, ZLIB_VERSION, 2))
-     {
-         lua_pushfstring(L, "zlib library version does not match - header: %s, library: %s", ZLIB_VERSION, version);
-         lua_error(L);
--- 
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
deleted file mode 100644
index af78c42f08c1a5..00000000000000
--- a/srcpkgs/texlive/patches/tlmgr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-03-09 08:31:49.000000000 +1100
-+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl	2023-12-18 22:20:18.634173357 +1100
-@@ -13,7 +13,7 @@
- my $tlmgrrevision;
- my $tlmgrversion;
- my $prg;
--my $bindir;
-+my $bindir = '/usr/bin';
- if ($svnrev =~ m/: ([0-9]+) /) {
-   $tlmgrrevision = $1;
- } else {
-@@ -44,43 +44,12 @@
- 
- BEGIN {
-   $^W = 1;
--  # make subprograms (including kpsewhich) have the right path:
--  my $kpsewhichname;
--  if ($^O =~ /^MSWin/i) {
--    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
--    $Master = __FILE__;
--    $Master =~ s!\\!/!g;
--    $Master =~ s![^/]*$!../../..!
--      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
--    $bindir = "$Master/bin/windows";
--    $kpsewhichname = "kpsewhich.exe";
--    # path already set by wrapper batchfile
--  } else {
--    $Master = __FILE__;
--    $Master =~ s,/*[^/]*$,,;
--    $bindir = $Master;
--    $Master = "$Master/../..";
--    # make subprograms (including kpsewhich) have the right path:
--    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
--    $kpsewhichname = "kpsewhich";
--  }
--  if (-r "$bindir/$kpsewhichname") {
--    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
--    chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
--  }
--
--  # if we have no directory in which to find our modules,
--  # no point in going on.
--  if (! $Master) {
--    die ("Could not determine directory of tlmgr executable, "
--         . "maybe shared library woes?\nCheck for error messages above");
--  }
--
-+  $Master = "/usr/share/texmf-dist";
-   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
- 
-   # make Perl find our packages first:
-   unshift (@INC, "$Master/tlpkg");
--  unshift (@INC, "$Master/texmf-dist/scripts/texlive");
-+  unshift (@INC, "$Master/scripts/texlive");
- }
- 
- use Cwd qw/abs_path/;
-@@ -622,6 +591,13 @@
-     tldie("$prg: Try --help if you need it.\n");
-   }
- 
-+  # automatically switch to user mode, and warn
-+  if (!$opts{"usermode"} && $action ne "init-usertree") {
-+    $opts{"usermode"} = 1;
-+    print "(running on Void Linux, switching to user mode!)\n";
-+    print "(see https://docs.voidlinux.org/config/texlive.html)\n";
-+  }
-+
-   #
-   # the main tree we will be working on
-   $::maintree = $Master;
-@@ -6260,7 +6236,9 @@
- # sets up the user tree for tlmgr in user mode
- sub action_init_usertree {
-   # init_local_db but do not die if localtlpdb is not found!
--  init_local_db(2);
-+  # we don't ship tlpdb for system files, so don't even
-+  # try to initialize it.
-+  # init_local_db(2);
-   my $tlpdb = TeXLive::TLPDB->new;
-   my $usertree;
-   if ($opts{"usertree"}) {
-@@ -6900,7 +6878,11 @@
-     if ($should_i_die == 2) {
-       return undef;
-     } else {
--      die("cannot setup TLPDB in $::maintree");
-+      if ($opts{'usermode'}) {
-+        die("$prg: user mode not initialized, please read https://docs.voidlinux.org/config/texlive.html!\n");
-+      } else {
-+        die("cannot setup TLPDB in $::maintree");
-+      }
-     }
-   }
-   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index 6bad88c6b10b70..4aafcfcf335ab0 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,33 +1,38 @@
 # Template file for 'texlive'
 pkgname=texlive
-version=20230313
+version=20250308
 revision=1
+_year=${version%${version#????}}
 build_wrksrc="build"
 build_style=gnu-configure
 configure_script="../configure"
 configure_args="
+ --prefix=/usr
+ --sysconfdir=/etc
+ --datarootdir=/usr/share
+ --datadir=/usr/share
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
  --enable-biber
+ --enable-dvipng
+ --enable-dvipsk
  --enable-epsfwin
  --enable-ipc
+ --enable-luahbtex
  --enable-luajittex
  --enable-luajithbtex
- --enable-mfluajit
- --enable-mfluajit-nowin
  --enable-luatex
- --enable-luahbtex
  --enable-mflua
  --enable-mfluajit
  --enable-mfluajit-nowin
  --enable-mftalkwin
+ --enable-ps2eps
+ --enable-psutils
  --enable-regiswin
  --enable-shared
  --enable-tektronixwin
  --enable-unitermwin
  --enable-xetex
- --enable-dvipng
- --enable-dvipsk
- --enable-ps2eps
- --enable-psutils
  --disable-bibtex-x
  --disable-chktex
  --disable-cjkutils
@@ -47,13 +52,13 @@ configure_args="
  --disable-vlna
  --disable-xindy
  --disable-xpdfopen
- --with-ps=gs
  --with-banner-add=/VoidLinux
+ --with-ps=gs
  --with-system-cairo
  --with-system-freetype2
  --with-system-gd
- --with-system-graphite2
  --with-system-gmp
+ --with-system-graphite2
  --with-system-harfbuzz
  --with-system-icu
  --with-system-libpaper
@@ -68,16 +73,18 @@ hostmakedepends="pkg-config perl lua52-BitOp texinfo libXaw-devel"
 makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  pixman-devel libteckit-devel zlib-devel zziplib-devel libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core texlive-latexmk xbps-triggers"
+depends="dialog ghostscript perl-Tk texlive-core>=${version}_${revision} xbps-triggers
+ texlive-latexmk latexindent"
+checkdepends="diffutils"
 short_desc="TeX Live"
-maintainer="fosslinux <fosslinux@aussies.space>"
+maintainer="dkwo <npiazza@disroot.org>, fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive/"
-distfiles="ftp://tug.org/texlive/historic/2023/texlive-${version}-source.tar.xz"
-checksum=3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
+distfiles="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${_year}/texlive-${version}-source.tar.xz"
+checksum=fffdb1a3d143c177a4398a2229a40d6a88f18098e5f6dcfd57648c9f2417490f
 python_version=3
 # Virtual package cares only about year part of version
-provides="tex-${version%${version#????}}_1"
+provides="tex-${_year}_1"
 
 if [ "$CROSS_BUILD" ] ; then
 	# Tangle is required for cross compile
@@ -88,6 +95,8 @@ case "$XBPS_TARGET_MACHINE" in
 	mips*) broken="cannot find libraries" ;;
 esac
 
+# fixme: use system luajit when that option is available
+# https://tug.org/pipermail/tex-live/2025-January/051045.html
 build_options="luajit"
 
 _luajit_host_cc="cc"
@@ -130,77 +139,30 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 export DASM_ARCH
 
-post_extract() {
-	mkdir -p "${build_wrksrc}"
-	cp -rf texk/web2c "${build_wrksrc}/web2c-host"
-}
-
-post_patch() {
-	pushd "${wrksrc}/libs/luajit/LuaJIT-src"
-
-	# Apply all LuaJIT patches first
-	for i in ${FILESDIR}/luajit-patches/*.patch ; do
-		msg_normal "patching: $(basename ${i})\n"
-		patch -sNp1 -i ${i}
-	done
-
-	popd
-}
-
-pre_build() {
-	if [ -n "$build_option_luajit" ] ; then
-		export HOST_CC="${_luajit_host_cc}"
-		export HOSTCC="${_luajit_host_cc}"
-		if [ -n "$CROSS_BUILD" ] ; then
-			# LuaJIT configure script does not cross compile correctly
-			local _cflags=$CFLAGS
-			local _ldflags=$LDFLAGS
-			unset CFLAGS LDFLAGS
-			mkdir -p "${wrksrc}/build/libs/luajit/native"
-			cd "${wrksrc}/build/libs/luajit/native"
-			PREFIX=/usr HOST_LUA=lua5.2 HOST_CFLAGS="$XBPS_CFLAGS" \
-			HOST_LDFLAGS="$XBPS_LDFLAGS" TARGET_CFLAGS="${_cflags}" \
-			TARGET_LDFLAGS="${_ldflags}" CROSS="${XBPS_CROSS_TRIPLET}-" \
-				../../../../libs/luajit/native/configure \
-					--build=${XBPS_TRIPLET} \
-					--host=${XBPS_CROSS_TRIPLET} \
-					--target=${XBPS_CROSS_TRIPLET}
-			CFLAGS="${_cflags}"
-			LDFLAGS="${_ldflags}"
-			# Replace configure script with dummy script
-			cd "${wrksrc}"
-			cat > libs/luajit/native/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
-		fi
+if [ -n "$build_option_luajit" ] ; then
+	export HOST_CC="${_luajit_host_cc}"
+	if [ -n "$CROSS_BUILD" ] ; then
+		export HOST_CFLAGS="${XBPS_CFLAGS}"
+		export CROSS="${XBPS_CROSS_TRIPLET}-"
 	fi
+fi
 
-	# web2c should not be cross
-	mkdir -p "${wrksrc}/build/texk/web2c/web2c"
-	cd "${wrksrc}/build/texk/web2c/web2c"
-	unset CC CXX
-	CFLAGS="$XBPS_CFLAGS" LDFLAGS="$XBPS_LDFLAGS" RANLIB=ranlib \
-		../../../../texk/web2c/web2c/configure
-
-	# Replace configure script with dummy script
-	cd "${wrksrc}"
-	cat > texk/web2c/web2c/configure << EOF
-#!/bin/sh
-printf "already complete\\n"
-EOF
+post_extract() {
+	mkdir -p "${build_wrksrc}"
 
-	# himktables needs to be built on host
-	if [ -n "${CROSS_BUILD}" ]; then
-		cd "${wrksrc}/build/texk/web2c"
-		ctangle ../../../texk/web2c/hitexdir/hiformat.w
-		gcc -o himktables himktables.c
-		./himktables > hitables.c
-		patch -d "${wrksrc}" -Np1 -i ${FILESDIR}/remove-himktables.patch
+	# https://tug.org/pipermail/tlbuild/2025q1/005635.html
+	if [ -n "$CROSS_BUILD" ] ; then
+		sed -i 's|\./himktables\$(EXEEXT)|#\./himktables\$(EXEEXT)|' texk/web2c/Makefile.in
+		cp texk/web2c/hitexdir/hitables.c texk/web2c/hitables.c
 	fi
 }
 
 post_install() {
+	# trick from Alpine
+	# export PATH="${DESTDIR}/usr/bin:$PATH"
+	export LD_LIBRARY_PATH="${DESTDIR}/usr/lib:$LD_LIBRARY_PATH"
+	make DESTDIR=${DESTDIR} texlinks
+
 	# These tools are still useful for a texlive workflow, but are modified
 	# psutils and conflict with psutils; rename them to have a tl- prefix
 	for f in extractres includeres psbook psjoin psnup psresize psselect \
@@ -208,44 +170,18 @@ post_install() {
 		mv "${DESTDIR}/usr/share/man/man1/"{,tl-}"${f}.1"
 		mv "${DESTDIR}/usr/bin/"{,tl-}"${f}"
 	done
-	cp -rf ${wrksrc}/texk/tests/TeXLive \
-		"${DESTDIR}/usr/share/texmf-dist/scripts/texlive"
-	sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \
-		"${DESTDIR}/usr/share/texmf-dist/web2c/texmf.cnf"
-	# Remove files provided by other texlive-* packages
-	while IFS=' ' read -r f p ; do
-		if [ "$p" = "$pkgname" ] && ! [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			msg_error "$pkgver: missing file $f\n"
-		elif [ "$p" != "$pkgname" ] && [ -e "${DESTDIR}/usr/share/texmf-dist/${f}" ]; then
-			echo "removed $f"
-			mkdir -p ${DESTDIR}/usr/share/texlive/removed
-			echo "$f" >> ${DESTDIR}/usr/share/texlive/removed/$pkgname.txt
-			rm -f "${DESTDIR}/usr/share/texmf-dist/$f"
-		fi
-	done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt"
-	for cmd in amstex cslatex csplain eplain etex jadetex latex mex llatex \
-				mltex mllatex pdfetex pdfcslatex pdfcsplain pdfjadetex \
-				pdflatex pdfmex pdfxmltex texsis utf8mex xmltex ; do
-		ln -s pdftex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	for cmd in lollipop ; do
-		ln -s tex "${DESTDIR}/usr/bin/${cmd}"
-	done
-	ln -s eptex "${DESTDIR}/usr/bin/platex"
-	ln -s euptex "${DESTDIR}/usr/bin/uplatex"
-	# Create tlmgr smallscript
-	rm -f "${DESTDIR}/usr/bin/tlmgr"
-	vbin "${FILESDIR}/tlmgr"
+
+	rm -rf ${DESTDIR}/usr/share/texmf-dist
+	rm -f ${DESTDIR}/usr/bin/tlmgr
 }
 
 texlive-XeTeX_package() {
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="${sourcepkg}>=${version}_${revision} texlive-dvi"
 	short_desc+=" - engine supporting modern typography"
 	pkg_install() {
-		vmove usr/share/texmf-dist/scripts/texlive-extra/xe*.sh
 		vmove usr/bin/xetex
 		vmove usr/share/man/man1/xe*.1
-		ln -s xetex "${PKGDESTDIR}/usr/bin/xelatex"
+		vmove usr/bin/xelatex
 	}
 }
 
@@ -273,23 +209,15 @@ texlive-LuaTeX_package() {
 			done
 		fi
 		for i in checkcites cllualatex cluttex diadia digestif getmapdl l3build luafindfont luahbtex \
-				 luaotfload-tool luatex lwarpmk m-tx \
-				 makeglossaries-lite mflua mflua-nowin musixflx musixtex pmxchords \
+				 lualatex luaotfload-tool luatex lwarpmk m-tx \
+				 makeglossaries-lite mflua mflua-nowin musixflx musixtex optex pmxchords \
 				 ptex2pdf texlua texluac xindex ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in checkcites cluttex diadia digestif getmap glossaries/makeglossaries-lite.lua \
-				 l3build luafindfont luaotfload lwarp m-tx musixtex pmxchords ptex2pdf xindex ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		for i in luatex texlua texluac ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
 		vmove "usr/lib/libtexlua*.so.*"
-		for cmd in dvilualatex dviluatex optex ; do
-			ln -s luatex "${PKGDESTDIR}/usr/bin/${cmd}"
-		done
-		ln -s luahbtex "${PKGDESTDIR}/usr/bin/lualatex"
 	}
 }
 
@@ -314,7 +242,6 @@ texlive-Xdvi_package() {
 		for i in xdvi xdvi-xaw xdvipdfmx ; do
 			vmove "usr/bin/${i}"
 		done
-		vmove usr/share/texmf-dist/xdvi
 		for i in xdvi xdvipdfmx ; do
 			vmove "usr/share/man/man1/${i}.1"
 		done
@@ -349,9 +276,6 @@ texlive-BibTeX_package() {
 		for i in bbl2bib ctanbib ; do
 			vmove "usr/bin/${i}"
 		done
-		for i in bib2gls bibcop bibexport ; do
-			vmove "usr/share/texmf-dist/scripts/${i}"
-		done
 		vmove usr/bin/bib*
 		vmove usr/share/man/man1/bibtex.1
 	}
@@ -368,7 +292,6 @@ texlive-PythonTeX_package() {
 	short_desc+=" - executing Python in LaTeX"
 	pkg_install() {
 		vmove usr/bin/*pythontex
-		vmove usr/share/texmf-dist/scripts/pythontex
 	}
 }
 
@@ -377,6 +300,13 @@ texlive-latexmk_package() {
 	short_desc+=" - script for compiling the correct number of times"
 	pkg_install() {
 		vmove usr/bin/latexmk
-		vmove usr/share/texmf-dist/scripts/latexmk
+	}
+}
+
+latexindent_package() {
+	depends="perl perl-File-HomeDir perl-Tk perl-Unicode-LineBreak perl-YAML-Tiny"
+	short_desc="Script to add indentation to LaTeX files"
+	pkg_install() {
+		vmove usr/bin/latexindent
 	}
 }

From dedce877c1e2b8cde392d83a45cf2dc6e0ff9912 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 10 Apr 2025 14:55:24 -0400
Subject: [PATCH 3/3] texlive-core: switch to upstream texmf-dist, drop
 subpkgs, split docs

---
 srcpkgs/removed-packages/template             | 19 +++++-
 srcpkgs/texlive-bibtexextra/template          | 12 ----
 srcpkgs/texlive-core-doc                      |  1 +
 .../texlive-core/patches/0001-texmfcnf.patch  | 62 +++++++++++++++++++
 srcpkgs/texlive-core/template                 | 39 ++++++++++--
 srcpkgs/texlive-fontsextra/template           | 12 ----
 srcpkgs/texlive-formatsextra/template         | 12 ----
 srcpkgs/texlive-games/template                | 12 ----
 srcpkgs/texlive-humanities/template           | 12 ----
 srcpkgs/texlive-langchinese/template          | 12 ----
 srcpkgs/texlive-langcyrillic/template         | 12 ----
 srcpkgs/texlive-langextra/template            | 12 ----
 srcpkgs/texlive-langgreek/template            | 12 ----
 srcpkgs/texlive-langjapanese/template         | 12 ----
 srcpkgs/texlive-langkorean/template           | 12 ----
 srcpkgs/texlive-latexextra/template           | 12 ----
 srcpkgs/texlive-music/template                | 12 ----
 srcpkgs/texlive-pictures/template             | 12 ----
 srcpkgs/texlive-pstricks/template             | 12 ----
 srcpkgs/texlive-publishers/template           | 11 ----
 srcpkgs/texlive-science/template              | 12 ----
 21 files changed, 116 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/texlive-bibtexextra/template
 create mode 120000 srcpkgs/texlive-core-doc
 create mode 100644 srcpkgs/texlive-core/patches/0001-texmfcnf.patch
 delete mode 100644 srcpkgs/texlive-fontsextra/template
 delete mode 100644 srcpkgs/texlive-formatsextra/template
 delete mode 100644 srcpkgs/texlive-games/template
 delete mode 100644 srcpkgs/texlive-humanities/template
 delete mode 100644 srcpkgs/texlive-langchinese/template
 delete mode 100644 srcpkgs/texlive-langcyrillic/template
 delete mode 100644 srcpkgs/texlive-langextra/template
 delete mode 100644 srcpkgs/texlive-langgreek/template
 delete mode 100644 srcpkgs/texlive-langjapanese/template
 delete mode 100644 srcpkgs/texlive-langkorean/template
 delete mode 100644 srcpkgs/texlive-latexextra/template
 delete mode 100644 srcpkgs/texlive-music/template
 delete mode 100644 srcpkgs/texlive-pictures/template
 delete mode 100644 srcpkgs/texlive-pstricks/template
 delete mode 100644 srcpkgs/texlive-publishers/template
 delete mode 100644 srcpkgs/texlive-science/template

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 87069d7ff7bdd3..d2f9ea00675a89 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20260111
+version=0.1.20260120
 revision=1
 metapackage=yes
 short_desc="Uninstalls packages removed from repository"
@@ -952,6 +952,23 @@ replaces="
  text-engine-devel<=0.1.1_1
  text-engine<=0.1.1_1
  thefuck<=3.32_5
+ texlive-bibtexextra<=2023.66579_1
+ texlive-fontsextra<=2023.66328_1
+ texlive-formatsextra<=2023.66186_1
+ texlive-games<=2023.66190_1
+ texlive-humanities<=2023.65502_1
+ texlive-langchinese<=2023.66188_1
+ texlive-langcyrillic<=2023.64588_1
+ texlive-langextra<=2023.66225_1
+ texlive-langgreek<=2023.66513_1
+ texlive-langjapanese<=2023.66482_1
+ texlive-langkorean<=2023.66513_1
+ texlive-latexextra<=2023.66551_1
+ texlive-music<=2023.66278_1
+ texlive-pictures<=2023.66549_1
+ texlive-pstricks<=2023.66115_1
+ texlive-publishers<=2023.66550_1
+ texlive-science<=2023.66461_1
  threadweaver<=5.116.0_1
  tilp2<=1.18_2
  tlsdate<=0.0.13_16
diff --git a/srcpkgs/texlive-bibtexextra/template b/srcpkgs/texlive-bibtexextra/template
deleted file mode 100644
index ff62911eeb9939..00000000000000
--- a/srcpkgs/texlive-bibtexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-bibtexextra'
-pkgname=texlive-bibtexextra
-version=2023.66579
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional BibTeX styles and bibliography databases"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b2b0b90abb0c0a9eef5366cf0968f7e58ee84c1be688c36d751dd0577c872a3c
diff --git a/srcpkgs/texlive-core-doc b/srcpkgs/texlive-core-doc
new file mode 120000
index 00000000000000..dcb81fde0f7722
--- /dev/null
+++ b/srcpkgs/texlive-core-doc
@@ -0,0 +1 @@
+texlive-core
\ No newline at end of file
diff --git a/srcpkgs/texlive-core/patches/0001-texmfcnf.patch b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
new file mode 100644
index 00000000000000..02591313226f0f
--- /dev/null
+++ b/srcpkgs/texlive-core/patches/0001-texmfcnf.patch
@@ -0,0 +1,62 @@
+Provide correct paths in texmf.cnf
+--- a/texmf-dist/web2c/texmf.cnf	2024-04-03 14:06:43.529075088 +0200
++++ b/texmf-dist/web2c/texmf.cnf	2024-04-03 14:08:25.001809298 +0200
+@@ -59,7 +59,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = /usr/share
+ 
+ % The various texmf trees used by TeX Live, follow.
+ % They must must all have the TDS directory structure (https://tug.org/tds).
+@@ -72,13 +72,13 @@
+ TEXMFMAIN = $TEXMFDIST
+ 
+ % Local additions to the distribution trees.
+-TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
++TEXMFLOCAL = /usr/local/share/texmf
+ 
+ % TEXMFSYSVAR, where *-sys store cached runtime data.
+-TEXMFSYSVAR = $TEXMFROOT/texmf-var
++TEXMFSYSVAR = /var/lib/texmf
+ 
+ % TEXMFSYSCONFIG, where *-sys store configuration data.
+-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
++TEXMFSYSCONFIG = /etc/texmf
+ 
+ % Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
+ % more than one per-user tree, set this to a list of directories in
+@@ -87,10 +87,10 @@
+ TEXMFHOME = ~/texmf
+ 
+ % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+-TEXMFVAR = ~/.texlive2025/texmf-var
++TEXMFVAR = ~/.texlive/texmf-var
+ 
+ % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+-TEXMFCONFIG = ~/.texlive2025/texmf-config
++TEXMFCONFIG = ~/.texlive/texmf-config
+ 
+ % This is the value manipulated by tlmgr's auxtrees subcommand in the
+ % root texmf.cnf. Kpathsea warns about a literally empty string for a
+@@ -396,7 +396,7 @@
+ % OSFONTDIR is to provide a convenient hook for allowing TeX to find
+ % fonts installed on the system (outside of TeX).  An empty default
+ % value would add "//" to the search paths, so we give it a dummy value.
+-OSFONTDIR = /please/set/osfontdir/in/the/environment
++OSFONTDIR = /usr/share/fonts
+ 
+ % PostScript Type 1 outline fonts.
+ T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+@@ -451,8 +451,8 @@
+ % For xdvi to find mime.types and .mailcap, if they do not exist in
+ % ~.  These are single directories, not paths.
+ % (But the default mime.types, at least, may well suffice.)
+-MIMELIBDIR = $TEXMFROOT/etc
+-MAILCAPLIBDIR = $TEXMFROOT/etc
++MIMELIBDIR = /etc
++MAILCAPLIBDIR = /etc
+ 
+ % Default settings for the fontconfig library as used by the Windows
+ % versions of xetex/xdvipdfmx.  Not used by xetex itself on Unixish systems,
diff --git a/srcpkgs/texlive-core/template b/srcpkgs/texlive-core/template
index f8a93e76beb9de..798a0362dac911 100644
--- a/srcpkgs/texlive-core/template
+++ b/srcpkgs/texlive-core/template
@@ -1,11 +1,42 @@
 # Template file for 'texlive-core'
 pkgname=texlive-core
-version=2023.66587
+version=20250308
 revision=1
-build_style="texmf"
+depends="fontforge python3 python3-Pygments perl perl-File-Which"
 short_desc="TeX Live - core texmf distribution"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"
 homepage="https://tug.org/texlive"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff
+distfiles="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-texmf.tar.xz
+ https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${version:0:4}/texlive-${version}-extra.tar.xz"
+checksum="08dcda7430bf0d2f6ebb326f1e197e1473d3f7cc0984a2adb7236df45316c7cf
+ ea69cfecbc9b138acbc45476e8cb4d9357f5e4e45fd12b3bf9ceabbebd7669d2"
+python_version=3
+make_dirs="/var/lib/texmf 0755 root root"
+nostrip=yes
+
+post_extract() {
+	mv texlive-${version}-texmf/* .
+}
+
+do_install() {
+	# non-PIE executable found in PIE build
+	rm -f texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
+
+	rm -f texmf-dist/ls-R
+
+	vmkdir usr/share
+	vcopy texmf-dist usr/share
+
+	vinstall ${wrksrc}/texlive-${version}-extra/tlpkg/texlive.tlpdb 0644 usr/share/tlpkg
+	vcopy ${wrksrc}/texlive-${version}-extra/tlpkg/TeXLive usr/share/tlpkg
+}
+
+texlive-core-doc_package() {
+	nostrip=yes
+	short_desc+=" - documentation"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/share/texmf-dist/doc
+	}
+}
diff --git a/srcpkgs/texlive-fontsextra/template b/srcpkgs/texlive-fontsextra/template
deleted file mode 100644
index 75095b60cceb2e..00000000000000
--- a/srcpkgs/texlive-fontsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-fontsextra'
-pkgname=texlive-fontsextra
-version=2023.66328
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - All sorts of extra fonts"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c5e32f213ec81a5e85f36437d401331b49a1338dacdc2fe8bb27f9f0fbaf2e36
diff --git a/srcpkgs/texlive-formatsextra/template b/srcpkgs/texlive-formatsextra/template
deleted file mode 100644
index a26144b087b5e9..00000000000000
--- a/srcpkgs/texlive-formatsextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-formatsextra'
-pkgname=texlive-formatsextra
-version=2023.66186
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Collection of extra TeX 'formats'"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6
diff --git a/srcpkgs/texlive-games/template b/srcpkgs/texlive-games/template
deleted file mode 100644
index f73f47547f8705..00000000000000
--- a/srcpkgs/texlive-games/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-games'
-pkgname=texlive-games
-version=2023.66190
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting board games"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=d5c87bdc6445260c947e1585f117efd6ef3c400af03af422939478c4237aee44
diff --git a/srcpkgs/texlive-humanities/template b/srcpkgs/texlive-humanities/template
deleted file mode 100644
index eb2f7ae79a744b..00000000000000
--- a/srcpkgs/texlive-humanities/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-humanities'
-pkgname=texlive-humanities
-version=2023.65502
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra texlive-pictures"
-short_desc="TeX Live - Packages for humanities, law, linguistics, etc"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=c0b0e4be08cc4fb46206e6769b48f9418ec73a11c556efb8249931d6222d94ef
diff --git a/srcpkgs/texlive-langchinese/template b/srcpkgs/texlive-langchinese/template
deleted file mode 100644
index fdcd78cd5c2d18..00000000000000
--- a/srcpkgs/texlive-langchinese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langchinese'
-pkgname=texlive-langchinese
-version=2023.66188
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Chinese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=a08c5c2d7a2eaece4d8f68eedeec64eb44b70255c84087df66679f6a59f649a0
diff --git a/srcpkgs/texlive-langcyrillic/template b/srcpkgs/texlive-langcyrillic/template
deleted file mode 100644
index 85aa1defe41c62..00000000000000
--- a/srcpkgs/texlive-langcyrillic/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langcyrillic'
-pkgname=texlive-langcyrillic
-version=2023.64588
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Cyrillic text"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=b22a0759b1e28fb0f9c2e155d9cecec23649d08e33f42adf52bc1efb04630336
diff --git a/srcpkgs/texlive-langextra/template b/srcpkgs/texlive-langextra/template
deleted file mode 100644
index 09b0d9bf227160..00000000000000
--- a/srcpkgs/texlive-langextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langextra'
-pkgname=texlive-langextra
-version=2023.66225
-revision=1
-build_style="texmf"
-depends="texlive-core texlive-latexextra"
-short_desc="TeX Live - Packages for a bunch of extra languages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=635a2a266c01b16660421bfd5dbf5e6f11ce40d0dd63c17e0a07a637f645c1ff
diff --git a/srcpkgs/texlive-langgreek/template b/srcpkgs/texlive-langgreek/template
deleted file mode 100644
index 5df3a177468ea7..00000000000000
--- a/srcpkgs/texlive-langgreek/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langgreek'
-pkgname=texlive-langgreek
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Greek"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=fdf44664219be6288278466c927c8f0c8eec42c0a733555c2c56c34f890813a0
diff --git a/srcpkgs/texlive-langjapanese/template b/srcpkgs/texlive-langjapanese/template
deleted file mode 100644
index d21163ed900b90..00000000000000
--- a/srcpkgs/texlive-langjapanese/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langjapanese'
-pkgname=texlive-langjapanese
-version=2023.66482
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Japanese"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=f9c23022dfdecb662a2097cc6d495ad07b55e74adb9751e0f96d363b27eddc90
diff --git a/srcpkgs/texlive-langkorean/template b/srcpkgs/texlive-langkorean/template
deleted file mode 100644
index 017f2443a6488b..00000000000000
--- a/srcpkgs/texlive-langkorean/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-langkorean'
-pkgname=texlive-langkorean
-version=2023.66513
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Fonts and macro packages for typesetting Korean"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9837b0b47bf33d383247c1243f0e203753d0d20038cba5b5c071028af7b9af4d
diff --git a/srcpkgs/texlive-latexextra/template b/srcpkgs/texlive-latexextra/template
deleted file mode 100644
index 9f6a24d04b3d34..00000000000000
--- a/srcpkgs/texlive-latexextra/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-latexextra'
-pkgname=texlive-latexextra
-version=2023.66551
-revision=1
-build_style="texmf"
-depends="perl-File-Which python3-Pygments texlive-core texlive-pictures"
-short_desc="TeX Live - Collection of LaTeX addon packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95
diff --git a/srcpkgs/texlive-music/template b/srcpkgs/texlive-music/template
deleted file mode 100644
index e278a0b851b46d..00000000000000
--- a/srcpkgs/texlive-music/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-music'
-pkgname=texlive-music
-version=2023.66278
-revision=1
-build_style="texmf"
-depends="fontforge python3 texlive-core"
-short_desc="TeX Live - Music typesetting packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=83df527875cd6bb77941868f35cdc0b7b7300f25c1644fe702ded855e7f492f9
diff --git a/srcpkgs/texlive-pictures/template b/srcpkgs/texlive-pictures/template
deleted file mode 100644
index 9674677a47a0b4..00000000000000
--- a/srcpkgs/texlive-pictures/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pictures'
-pkgname=texlive-pictures
-version=2023.66549
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Packages for drawing graphics"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=63ff117823e8e9d23e456fc753343ca1a83224de4ad0481acf5be81e2888de0e
diff --git a/srcpkgs/texlive-pstricks/template b/srcpkgs/texlive-pstricks/template
deleted file mode 100644
index e2f1c0f8edbb1d..00000000000000
--- a/srcpkgs/texlive-pstricks/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-pstricks'
-pkgname=texlive-pstricks
-version=2023.66115
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Additional PSTricks packages"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=3b0359f4e7f2efee4b96990813fe6b087f8178923e80fcb8c3d3eeaf5c8a7baf
diff --git a/srcpkgs/texlive-publishers/template b/srcpkgs/texlive-publishers/template
deleted file mode 100644
index 2a9677a20075e7..00000000000000
--- a/srcpkgs/texlive-publishers/template
+++ /dev/null
@@ -1,11 +0,0 @@
-# Template file for 'texlive-publishers'
-pkgname=texlive-publishers
-version=2023.66550
-revision=1
-build_style="texmf"
-short_desc="TeX Live - Classes and packages for certain publishers"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=52f9d38288dcaabfd67f0cb07fb8a48f2c709ff80e5085b298a2cedc9af88588
diff --git a/srcpkgs/texlive-science/template b/srcpkgs/texlive-science/template
deleted file mode 100644
index 951d4cba6adc73..00000000000000
--- a/srcpkgs/texlive-science/template
+++ /dev/null
@@ -1,12 +0,0 @@
-# Template file for 'texlive-science'
-pkgname=texlive-science
-version=2023.66461
-revision=1
-build_style="texmf"
-depends="texlive-core"
-short_desc="TeX Live - Typesetting for mathematics and science disciplines"
-maintainer="fosslinux <fosslinux@aussies.space>"
-license="GPL-2.0-or-later"
-homepage="https://tug.org/texlive/"
-distfiles="https://sources.archlinux.org/other/texlive/${pkgname}-${version}-src.zip"
-checksum=9c5e36cdc932007bb151bd61bacdc216d1d1d682758555a4d6e0e85c51005098

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (44 preceding siblings ...)
  2026-01-20  2:29 ` [PR PATCH] [Updated] " dkwo
@ 2026-01-20  2:31 ` dkwo
  2026-01-20 13:06 ` [PR PATCH] [Merged]: " leahneukirchen
                   ` (2 subsequent siblings)
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2026-01-20  2:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-3770747149

Comment:
Any other obstructions to merge this?

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PR PATCH] [Merged]: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (45 preceding siblings ...)
  2026-01-20  2:31 ` dkwo
@ 2026-01-20 13:06 ` leahneukirchen
  2026-01-20 15:11 ` leahneukirchen
  2026-01-22  6:55 ` dkwo
  48 siblings, 0 replies; 50+ messages in thread
From: leahneukirchen @ 2026-01-20 13:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

There's a merged pull request on the void-packages repository

Texlive 2025
https://github.com/void-linux/void-packages/pull/55038

Description:
- I tested the changes in this PR: yes. I can compile latex documents, and all tests pass in chroot.
- built natively for `aarch64-glibc`, `x86_64-glibc`
- cross compiled for `x86_64-glibc`
- `texlive`: remove `tlmgr` as everything is packaged via `xbps`, and split `latexindent` subpkg.
- fixed the use of `texdoc`

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (46 preceding siblings ...)
  2026-01-20 13:06 ` [PR PATCH] [Merged]: " leahneukirchen
@ 2026-01-20 15:11 ` leahneukirchen
  2026-01-22  6:55 ` dkwo
  48 siblings, 0 replies; 50+ messages in thread
From: leahneukirchen @ 2026-01-20 15:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-3773371988

Comment:
@dkwo please fix the fallout...

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: Texlive 2025
  2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
                   ` (47 preceding siblings ...)
  2026-01-20 15:11 ` leahneukirchen
@ 2026-01-22  6:55 ` dkwo
  48 siblings, 0 replies; 50+ messages in thread
From: dkwo @ 2026-01-22  6:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/55038#issuecomment-3782840062

Comment:
@leahneukirchen please see https://github.com/void-linux/void-packages/pull/58574

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2026-01-22  6:55 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-11 20:41 [PR PATCH] Texlive 2025 dkwo
2025-04-11 21:53 ` leahneukirchen
2025-04-16 14:16 ` dkwo
2025-04-16 14:26 ` leahneukirchen
2025-04-16 14:34 ` dkwo
2025-04-16 14:48 ` [PR PATCH] [Updated] " dkwo
2025-04-16 18:19 ` dkwo
2025-04-16 20:25 ` dkwo
2025-04-22 18:23 ` dkwo
2025-04-22 18:23 ` dkwo
2025-04-22 18:25 ` [PR PATCH] [Updated] " dkwo
2025-04-22 18:29 ` dkwo
2025-04-25 18:43 ` dkwo
2025-04-28 14:19 ` dkwo
2025-04-28 20:44 ` dkwo
2025-04-28 20:47 ` dkwo
2025-04-30 17:40 ` [PR PATCH] [Updated] " dkwo
2025-06-03  8:08 ` fosslinux
2025-06-16 14:22 ` [PR PATCH] [Updated] " dkwo
2025-06-16 14:23 ` dkwo
2025-06-16 14:55 ` [PR PATCH] [Updated] " dkwo
2025-06-16 15:12 ` dkwo
2025-06-16 15:47 ` dkwo
2025-06-17 18:55 ` dkwo
2025-06-17 22:00 ` dkwo
2025-06-17 22:11 ` [PR PATCH] [Updated] " dkwo
2025-06-17 22:16 ` dkwo
2025-06-18 14:25 ` dkwo
2025-06-18 19:35 ` dkwo
2025-06-18 19:40 ` dkwo
2025-06-18 19:42 ` dkwo
2025-06-19 18:06 ` [PR PATCH] [Updated] " dkwo
2025-06-19 18:07 ` dkwo
2025-06-19 18:28 ` dkwo
2025-07-10 22:21 ` dkwo
2025-07-10 22:21 ` dkwo
2025-07-10 22:51 ` [PR PATCH] [Updated] " dkwo
2025-10-11  2:01 ` github-actions
2025-10-14  3:04 ` [PR PATCH] [Updated] " dkwo
2025-10-14  3:08 ` dkwo
2025-10-14 10:58 ` [PR REVIEW] " leahneukirchen
2025-10-15  3:19 ` [PR PATCH] [Updated] " dkwo
2025-10-15  3:21 ` [PR REVIEW] " dkwo
2025-10-21  8:01 ` [PR PATCH] [Updated] " dkwo
2026-01-20  2:14 ` github-actions
2026-01-20  2:29 ` [PR PATCH] [Updated] " dkwo
2026-01-20  2:31 ` dkwo
2026-01-20 13:06 ` [PR PATCH] [Merged]: " leahneukirchen
2026-01-20 15:11 ` leahneukirchen
2026-01-22  6:55 ` dkwo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).