# ConTeXt Packaging Scripts
# https://github.com/gucci-on-fleek/context-packaging
# SPDX-License-Identifier: CC0-1.0+
# SPDX-FileCopyrightText: 2025 Max Chernoff


#########################
### ConTeXt MkIV/MkXL ###
#########################

package context

# LuaMetaTeX is required for the "context"/"mtxrun" scripts, so even if you're
# only using ConTeXt MkIV, you still need LuaMetaTeX. The LuaMetaTeX binaries
# are contained in platform-specific "context.ARCH" packages, which we cannot
# depend upon here. Regardless, tlmgr will handle this correctly, so we don't
# need to do anything here.

# LuaTeX is required for ConTeXt MkIV, but ConTeXt MkXL/LMTX only requires
# LuaMetaTeX. The "context" package includes both MkIV and MkXL, but since MkXL
# is the default, it is possible for users to never use MkIV (and therefore
# LuaTeX).
soft luatex  # Contains the LuaTeX engine binaries

# Latin Modern (.otf) is the default and fallback font for ConTeXt, so it is
# required in nearly all cases.
hard lm       # lm*.otf
hard lm-math  # latinmodern-math.otf

# ConTeXt uses DejaVu Mono (.ttf) for various tracing functions, so it generally
# needs to be installed.
hard dejavu

# The ConTeXt distribution installs the following fonts by default, so it is
# generally expected that any ConTeXt installation will include them.
soft almfixed         # almfixed.otf
soft antt             # AntykwaTorunska*.otf
soft cm-unicode       # cmuntt.otf
soft concmath-otf     # Concrete-Math*.otf
soft ebgaramond       # EBGaramond*.otf, Garamond-Math.otf
soft erewhon          # Erewhon*.otf
soft euler-math       # Euler-Math.otf
soft fontawesome      # FontAwesome.otf
soft gentium-sil      # Gentium*Plus*.ttf
soft iwona            # Iwona*.otf
soft kpfonts-otf      # Kp*.otf
soft kurier           # Kurier*.otf
soft libertinus-fonts # Libertinus*.otf
soft marvosym         # marvosym.ttf
soft plex             # IBMPlex*.otf
soft poltawski        # antpolt*.otf
soft stix2-otf        # STIXTwo*.otf
soft tex-gyre         # texgyre*.otf
soft tex-gyre-math    # texgyre*math.otf
soft xcharter         # XCharter*.otf
soft xits             # XITS*.otf


####################
### ConTeXt MkII ###
####################

package context-legacy

# The "texexec" and "texmfstart" runner scripts internally call "mtxrun", so
# we must have the main ConTeXt package installed in order to use ConTeXt MkII.
hard context

# ConTeXt MkII uses pdfTeX by default, but can also use XeTeX if requested.
hard pdftex
soft xetex

# Some of the core .mkii files have been moved to the "mptopdf" package,
# meaning that ConTeXt MkII will not work without it.
hard mptopdf

# Once again, Latin Modern is the default font for ConTeXt MkII.
hard lm  # lm*.pfm, etc.

# The current TeX Live "texlive.tlpdb" file says that the following fonts are
# required for ConTeXt MkII. I'm guessing that _required_ is an overstatement,
# but it's best to be safe and include them anyways.
hard amsfonts     # cm*.pfb, cm*.tfm, etc.
hard ly1          # texnansi.enc
hard manfnt-font  # manfnt.*
hard mflogo-font  # logo*.pfb, logo*.tfm, etc.
hard stmaryrd     # stmary*.pfb, stmary*.tfm, etc.

# There are some other fonts that would be good to have for ConTeXt MkII, but
# there isn't a clear list anywhere, so we'll just include a few arbitrarily
# chosen ones.
soft dejavu    # DejaVu*.pfb, DejaVu*.tfm, etc.
soft tex-gyre  # q*.pfb, q*.tfm, etc.


########################
### ConTeXt Non-Free ###
########################

package context-nonfree

# The "context-nonfree" contains Non-Free additions for both MkIV/MkXL and MkII.
# We'll arbitrarily decide that everyone who wants this package will for sure
# want MkIV/MkXL, and only maybe want MkII.
hard context
soft context-legacy


###############
### mptopdf ###
###############

package mptopdf

# No dependencies are required; we're just mentioning it here to be explicit.


#################################
### TeX Live "context" Scheme ###
#################################

package scheme-context

# Core packages
hard context
hard context-legacy

# In order to ensure that the TeX Live "context" scheme contains all packages
# and fonts distributed with the ConTeXt standalone distribution, this section
# is automatically generated by the packaging scripts.
hard almfixed
hard antt
hard circuitikz
hard cm-unicode
hard concmath-otf
hard context
hard context-animation
hard context-calendar-examples
hard context-collating-marks
hard context-cyrillicnumbers
hard context-filter
hard context-gnuplot
hard context-handlecsv
hard context-letter
hard context-mathsets
hard context-pocketdiary
hard context-simpleslides
hard context-squares
hard context-sudoku
hard context-transliterator
hard context-vim
hard context-visualcounter
hard dejavu
hard ebgaramond
hard erewhon
hard erewhon-math
hard euler-math
hard fontawesome
hard garamond-math
hard iwona
hard kpfonts-otf
hard kurier
hard libertinus-fonts
hard lm
hard lm-math
hard lua-widow-control
hard marvosym
hard oldstandard
hard pgf
hard pgfplots
hard plex
hard poltawski
hard tex-gyre
hard tex-gyre-math
hard xcharter
hard xcharter-math
hard xits