Skip to content

Instantly share code, notes, and snippets.

@h20y6m
Created August 26, 2023 09:40
Show Gist options
  • Save h20y6m/1d11834d925fd1d0f45f3a28ac19b293 to your computer and use it in GitHub Desktop.
Save h20y6m/1d11834d925fd1d0f45f3a28ac19b293 to your computer and use it in GitHub Desktop.
#!/bin/sh -x
# Ubuntu 22.04 LTS on WSL2, TeX Live 2023
#
# sudo apt install build-essential libexpat1-dev libfontconfig-dev libicu-dev libteckit-dev libgraphite2-dev libmpfr-dev libzzip-dev libgmp-dev libcairo2-dev libpixman-1-dev libgd-dev libfreetype-dev libpng-dev zlib1g-dev
NPTEX_WORK=`pwd`
NPTEX_SRCDIR=./texlive-source
NPTEX_TEXMFROOT=`kpsewhich -var-value=TEXMFROOT`
## build
cd $NPTEX_SRCDIR && mkdir -p Work && cd Work
../Build --no-clean \
--disable-all-pkgs \
--disable-native-texlive-build \
--enable-web2c \
--disable-tex \
--disable-eptex \
--enable-euptex \
--disable-aleph \
--disable-hitex \
--disable-pdftex \
--disable-luatex \
--disable-luajittex \
--disable-luahbtex \
--disable-luajithbtex \
--disable-mp \
--disable-pmp \
--disable-upmp \
--enable-xetex \
--enable-nptex \
--disable-mf \
--disable-mf-nowin \
--disable-mflua \
--disable-mfluajit \
--disable-web-progs \
--enable-dvipdfm-x \
--without-system-harfbuzz \
--with-system-icu \
--with-system-teckit \
--with-system-graphite2 \
--with-system-mpfr \
--with-system-zziplib \
--with-system-gmp \
--with-system-cairo \
--with-system-pixman \
--with-system-gd \
--with-system-freetype2 \
--with-system-libpng \
--without-system-libpaper \
--with-system-zlib \
--without-system-ptexenc \
--without-system-kpathsea \
--with-gnu-ld \
--without-x
cd $NPTEX_WORK
## mkfmt
NPTEX_TEXMFCNF="$NPTEX_SRCDIR/texk/web2c/nptexdir/texmf:$NPTEX_TEXMFROOT:$NPTEX_TEXMFROOT/texmf-dist/web2c"
NPTEX_TEXMFDOTDIR=".:$NPTEX_SRCDIR/texk/web2c/nptexdir/texmf"
NPTEX_EXEC="eval TEXMFROOT=\"$NPTEX_TEXMFROOT\" TEXMFCNF=\"$NPTEX_TEXMFCNF\" TEXMFDOTDIR=\"$NPTEX_TEXMFDOTDIRf\" $NPTEX_SRCDIR/inst/bin/nptex"
$NPTEX_EXEC -progname=nptex -jobname=nptex -ini *nptex.ini
$NPTEX_EXEC -progname=nplatex -jobname=nplatex -ini -etex nplatex.ini
$NPTEX_EXEC -progname=nplatex-dev -jobname=nplatex-dev -ini -etex nplatex.ini
## test
NPTEX_NPTEX="$NPTEX_EXEC -progname=nptex -fmt=nptex"
NPTEX_NPLATEX="$NPTEX_EXEC -progname=nplatex -fmt=nplatex"
NPTEX_NPLATEXDEV="$NPTEX_EXEC -progname=nplatex-dev -fmt=nplatex-dev"
$NPTEX_NPTEX $NPTEX_SRCDIR/texk/web2c/nptexdir/test01.tex
$NPTEX_NPLATEX $NPTEX_SRCDIR/texk/web2c/nptexdir/test02.tex
$NPTEX_NPLATEX $NPTEX_SRCDIR/texk/web2c/nptexdir/test03.tex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment