# Contributor: Marian Buschsieweke # Maintainer: Marian Buschsieweke pkgname=texmf-dist _core=2023.66587 _bibtexextra=2023.66579 _fontsextra=2023.66328 _formatsextra=2023.66186 _games=2023.66190 _humanities=2023.65502 _langchinese=2023.66188 _langcyrillic=2023.64588 _langextra=2023.66225 _langgreek=2023.66513 _langjapanese=2023.66482 _langkorean=2023.66513 _latexextra=2023.66551 _music=2023.66278 _pictures=2023.66549 _pstricks=2023.66115 _publishers=2023.66550 _science=2023.66461 pkgver=$_core pkgrel=1 pkgdesc="TeX Live texmf core distribution" url="https://tug.org/texlive/" # texlive arch="noarch !s390x !ppc64le !riscv64" license="LPPL-1.0 LPPL-1.1 LPPL-1.2 LPPL-1.3a LPPL-1.3c GPL-2.0-only" makedepends="unzip xz" subpackages=" $pkgname-most $pkgname-lang $pkgname-full $pkgname-bibtexextra $pkgname-fontsextra $pkgname-formatsextra $pkgname-games $pkgname-humanities $pkgname-langchinese $pkgname-langcyrillic $pkgname-langextra $pkgname-langgreek $pkgname-langjapanese $pkgname-langkorean $pkgname-latexextra $pkgname-music $pkgname-pictures $pkgname-pstricks $pkgname-publishers $pkgname-science " source=" https://sources.archlinux.org/other/texlive/texlive-core-$_core-src.zip https://sources.archlinux.org/other/texlive/texlive-bibtexextra-$_bibtexextra-src.zip https://sources.archlinux.org/other/texlive/texlive-fontsextra-$_fontsextra-src.zip https://sources.archlinux.org/other/texlive/texlive-formatsextra-$_formatsextra-src.zip https://sources.archlinux.org/other/texlive/texlive-games-$_games-src.zip https://sources.archlinux.org/other/texlive/texlive-humanities-$_humanities-src.zip https://sources.archlinux.org/other/texlive/texlive-langchinese-$_langchinese-src.zip https://sources.archlinux.org/other/texlive/texlive-langcyrillic-$_langcyrillic-src.zip https://sources.archlinux.org/other/texlive/texlive-langextra-$_langextra-src.zip https://sources.archlinux.org/other/texlive/texlive-langgreek-$_langgreek-src.zip https://sources.archlinux.org/other/texlive/texlive-langjapanese-$_langjapanese-src.zip https://sources.archlinux.org/other/texlive/texlive-langkorean-$_langkorean-src.zip https://sources.archlinux.org/other/texlive/texlive-latexextra-$_latexextra-src.zip https://sources.archlinux.org/other/texlive/texlive-music-$_music-src.zip https://sources.archlinux.org/other/texlive/texlive-pictures-$_pictures-src.zip https://sources.archlinux.org/other/texlive/texlive-pstricks-$_pstricks-src.zip https://sources.archlinux.org/other/texlive/texlive-publishers-$_publishers-src.zip https://sources.archlinux.org/other/texlive/texlive-science-$_science-src.zip " # This is a data only package; no unit tests to run options="!check" unpack() { # Prevent unpacking by overwriting the unpack() function, but still verify integrity verify return 0 } build() { return 0 } package() { # Packages are packed in .tar.xz archives, which in turn are bundled into a # zip. We will unzip each bundle into pkgs-packed and untar all packages of # that bundle into pkgs-unpacked. Since some packages are expected to # be unpacked into /usr/share and others into /usr/shared/texmf-dist, this # will create a mess. We will later copy all folders beginning with texmf # into /usr/share, and merge every remaining file into # /usr/share/texmf-dist to clean up this mess. mkdir -p "$pkgdir/usr/share/" mkdir -p "$srcdir/pkgs-packed" mkdir -p "$srcdir/pkgs-unpacked" cd "$srcdir/pkgs-packed" unzip "$srcdir/texlive-core-$_core-src.zip" > /dev/null cd "$srcdir/pkgs-unpacked" find "$srcdir/pkgs-packed" -name '*.tar.xz' -exec tar -xf {} \; find . -maxdepth 1 -name 'texmf*' -exec mv {} "$pkgdir/usr/share/" \; find . -type d -mindepth 1 -exec mkdir -p "$pkgdir/usr/share/texmf-dist/"{} \; find . -type f -exec mv {} "$pkgdir/usr/share/texmf-dist/"{} \; # Fix paths sed -i -e 's:^\(TEXMFROOT *= *\)$SELFAUTOPARENT$:\1/usr/share:g' \ "$pkgdir"/usr/share/texmf-dist/web2c/texmf.cnf sed -i -e 's:\$TEXMFROOT/tlpkg:\$TEXMFROOT/texmf-dist/tlpkg:g' \ "$pkgdir"/usr/share/texmf-dist/scripts/texlive/updmap.pl \ "$pkgdir"/usr/share/texmf-dist/scripts/texlive/fmtutil.pl \ # Remove tlmgr, users should use apk to manage packages rm "$pkgdir"/usr/share/texmf-dist/scripts/texlive/tlmgr.pl rm "$pkgdir"/usr/share/texmf-dist/scripts/texlive/tlmgrgui.pl rm -rf "$srcdir/pkgs-packed" "$srcdir/pkgs-unpacked" } pack_subpkg() { local our_pkgver="$1" # See comment in package(), same applies here mkdir -p "$subpkgdir/usr/share/" mkdir -p "$srcdir/pkgs-packed" mkdir -p "$srcdir/pkgs-unpacked" cd "$srcdir/pkgs-packed" unzip "$srcdir/texlive-${subpkgname#texmf-dist-}-$our_pkgver-src.zip" > /dev/null cd "$srcdir/pkgs-unpacked" find "$srcdir/pkgs-packed" -name '*.tar.xz' -exec tar -xf {} \; find . -maxdepth 1 -name 'texmf*' -exec mv {} "$subpkgdir/usr/share/" \; find . -type d -mindepth 1 -exec mkdir -p "$subpkgdir/usr/share/texmf-dist/"{} \; find . -type f -exec mv {} "$subpkgdir/usr/share/texmf-dist/"{} \; rm -rf "$srcdir/pkgs-packed" "$srcdir/pkgs-unpacked" } most() { pkgdesc="TeX Live texmf distribution including most packages" depends=" $pkgname $pkgname-bibtexextra $pkgname-fontsextra $pkgname-formatsextra $pkgname-games $pkgname-humanities $pkgname-latexextra $pkgname-music $pkgname-pictures $pkgname-pstricks $pkgname-publishers $pkgname-science " mkdir -p "$subpkgdir" } lang() { pkgdesc="TeX Live texmf distribution: Additional languages" depends=" $pkgname $pkgname-langchinese $pkgname-langcyrillic $pkgname-langextra $pkgname-langgreek $pkgname-langjapanese $pkgname-langkorean " mkdir -p "$subpkgdir" } full() { pkgdesc="Full TeX Live texmf distribution" depends="$pkgname-most $pkgname-lang" mkdir -p "$subpkgdir" } bibtexextra() { pkgdesc="TeX Live texmf distribution: Additional BibTeX styles and bibliography DBs" pack_subpkg "$_bibtexextra" } fontsextra() { pkgdesc="TeX Live texmf distribution: Additional fonts" pack_subpkg "$_fontsextra" } formatsextra() { pkgdesc="TeX Live texmf distribution: Additional TeX formats" pack_subpkg "$_formatsextra" } games() { pkgdesc="TeX Live texmf distribution: Typesetting board games including chess" pack_subpkg "$_games" } humanities() { pkgdesc="TeX Live texmf distribution: Packages for humanities, law, linguistics, ..." pack_subpkg "$_humanities" } langchinese() { pkgdesc="TeX Live texmf distribution: Support for Chinese" pack_subpkg "$_langchinese" } langcyrillic() { pkgdesc="TeX Live texmf distribution: Support for Cyrillic languages" pack_subpkg "$_langcyrillic" } langextra() { pkgdesc="TeX Live texmf distribution: Additional languages" pack_subpkg "$_langextra" } langgreek() { pkgdesc="TeX Live texmf distribution: Support for Greek" pack_subpkg "$_langgreek" } langjapanese() { pkgdesc="TeX Live texmf distribution: Support for Japanese" pack_subpkg "$_langjapanese" } langkorean() { pkgdesc="TeX Live texmf distribution: Support for Korean" pack_subpkg "$_langkorean" } latexextra() { pkgdesc="TeX Live texmf distribution: Add-onpackages for LaTeX" pack_subpkg "$_latexextra" } music() { pkgdesc="TeX Live texmf distribution: Music typesetting packages" pack_subpkg "$_music" } pictures() { pkgdesc="TeX Live texmf distribution: Packages for drawing graphics" pack_subpkg "$_pictures" } pstricks() { pkgdesc="TeX Live texmf distribution: Additional PSTricks packages" pack_subpkg "$_pstricks" } publishers() { pkgdesc="TeX Live texmf distribution: LaTeX packages for specific publishers" pack_subpkg "$_publishers" } science() { pkgdesc="TeX Live texmf distribution: Typesetting for math and sciences" pack_subpkg "$_science" } sha512sums=" fb18fd9724916619f09e81eaca2f5cf123473f4ae3e7ed2390beb727455bcc3f4390839c8d2c5c97002c060c444df4c851b618a0c4bffdf288eae60648c7343b texlive-core-2023.66587-src.zip 70a469a59164005465b4ea515c52006432404d794d7044fc59cc1b0c7f39a3e0031824d949fe9dcbb0e2b92feddc5dce731ee863f3b197a36158137fd63bcf8b texlive-bibtexextra-2023.66579-src.zip ab72184311b8d095d01fe2090953fb594ac9b9a31f7812bc3655afc5a6e856804ad4ab228ba6d80184e40ecab5a9d0107460ef9935fdc09e303c0efde5b0c194 texlive-fontsextra-2023.66328-src.zip 81b6cf3545f4b5409e2208ba2bf95f64b635b23313702505450158373d53931556ba2c4b6bd27821093a81ef7bb9bcfbb52ab7ca2f3da6eaa7029551155fd634 texlive-formatsextra-2023.66186-src.zip a7c93a6ff10070b5e0ee8b56b293397c51b066813e539cc87c1a0b20a0ec2bdbfc1e3d3ba0f5377affb7efed5b063e15cc0f960b360a49d6c995de848df3cd0d texlive-games-2023.66190-src.zip 26e6a56504aa6a4c014b11c36f02dd61ccd1df40f38f425fd5c765a32c713f80f5eeec727c203f3868bb4d2881c10e1c1fe2f4ede2e47d25184bdca93bc913dc texlive-humanities-2023.65502-src.zip 66e887f3cec9d6eba8c0e7537bef6b63dbcbf44414edf16c47d82343a852a67c7fac341a58ccd26394d3c16936607307269baa3410d87cc1853e7ca29924257b texlive-langchinese-2023.66188-src.zip 6eb0aa67b4eceb872c4cffcde3f916c5785ab2bfff0fd54859c7e729103361e8178511bac124396eaeed1cb2e52fa6d843fa1768cad739a3845472eb2d6a9ca6 texlive-langcyrillic-2023.64588-src.zip c0b54f37cfb5f0f8eda3ee1b42e11f454bdda54e7c14019580b48589500cf37d2f0051ad41c4ef62821be6758de5f6ebcf38fdf027b2fe1e981ffd894e7a25d9 texlive-langextra-2023.66225-src.zip d181272d20d1b73239e4c7d36e247b0af9c5b51db651d43df4eef61f22e9ad7bd68c68f83136af88d9fd5f1e062572175b8ef0b72fe4db5142673b261c13aed7 texlive-langgreek-2023.66513-src.zip 7d1ab0619fae4e0c7f8cf498c6641948b26b7ce5a338f2e01cc1ace4f3bd030a108c530fd6d5363f1a9f65c8e33483bc9663375ecbac3f3d170f9213d57b807d texlive-langjapanese-2023.66482-src.zip 9c002fcfd0e2b14a5ba0f3c00a23dadd52f0a26c6cee6f200ad9a8dd1cec2366c6238899d21c63c3a38c36bf17022b8f7cfe2398a08588299e6b522f50c2b12c texlive-langkorean-2023.66513-src.zip 6a298ed27fc8b831b3a8db1e7333169d40ea48ba4f5b4d7f336945e703abd70238f3bb7cbe7516dca9e1de176ad9c13561f8e091ab6b1a28b898d316ae423dde texlive-latexextra-2023.66551-src.zip d59a097985d3751feb05a5055a5f13af4a17fb3345d44a80bf4b4ec81e978ff373498e2a28703b4150f0ea2dc62d5f4735d00e6752b9ac8dfa03109c977b2192 texlive-music-2023.66278-src.zip ea437a896e9912727cf3978161c362d0396aedb5dcf75e30c8db6c610b2d4108ef8b70a6b28d67efc017b08b7d23d5c0e03ed2513a81f3f46850ad9f3a45fd6a texlive-pictures-2023.66549-src.zip 2e0011cdbc16e8ab04c77ec3ebd172da6d0a82c604520d503d9f5bc4ed557a6217a7272db933c0fcca5f2b09a505911a8187f29e85396b58267134afc30df315 texlive-pstricks-2023.66115-src.zip 733c9ef04df60742d552c520be3f42242e81ff391ad91013ef64f57fe9e81d4b172b8e99169a7fb6f7c3efae51b609aa970a899efb962ac23b32a9b7e6f14771 texlive-publishers-2023.66550-src.zip b123f5556bac6d609e61696b5a228267a6e559c774a89e3147d405f340a65618c0e448246b9aba6609732f7169769addbfb251f3a73c2285e3ba3b2e519e075e texlive-science-2023.66461-src.zip "