Skip to content

Commit e2582c1

Browse files
puneetsharma21jiridanek
authored andcommitted
install TeX Live runtime via profile for ppc64le
Signed-off-by: puneetsharma21 <[email protected]>
1 parent 12e58dc commit e2582c1

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

jupyter/utils/install_texlive.sh

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,58 @@ set -euxo pipefail
44
ARCH=$(uname -m)
55

66
if [[ "$ARCH" == "ppc64le" ]]; then
7-
echo "Installing TeX Live from source for $ARCH"
8-
9-
# Download and extract source
10-
wget https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/texlive-20250308-source.tar.xz
11-
tar -xf texlive-20250308-source.tar.xz
12-
cd texlive-20250308-source
7+
echo "Installing TeX Live from source for $ARCH..."
138

149
# Install build dependencies
1510
dnf install -y gcc-toolset-13 perl make libX11-devel libXt-devel \
1611
zlib-devel freetype-devel libpng-devel ncurses-devel \
1712
gd-devel libtool wget tar xz bison flex libXaw-devel
1813

14+
# Step 1: Download and extract the TeX Live source
15+
wget https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/texlive-20250308-source.tar.xz
16+
tar -xf texlive-20250308-source.tar.xz
17+
cd texlive-20250308-source
18+
19+
# Enable newer GCC toolchain
1920
source /opt/rh/gcc-toolset-13/enable
2021

21-
# Create build directory
22+
# Create build directory and build
2223
mkdir ../texlive-build
2324
cd ../texlive-build
24-
25-
# Configure, build, install
2625
../texlive-20250308-source/configure --prefix=/usr/local/texlive
2726
make -j"$(nproc)"
2827
make install
2928

3029
# Symlink for pdflatex
3130
cd /usr/local/texlive/bin/powerpc64le-unknown-linux-gnu
32-
ln -s pdftex pdflatex
31+
ln -sf pdftex pdflatex
3332

34-
# Cleanup TeX source to reduce image size
33+
# Cleanup sources to reduce image size
3534
rm -rf /texlive-20250308-source /texlive-build
3635

37-
export PATH="/usr/local/texlive/bin/powerpc64le-unknown-linux-gnu:$PATH"
36+
# Step 2: Run TeX Live installer for runtime tree setup
37+
cd /
38+
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
39+
tar -xzf install-tl-unx.tar.gz
40+
cd install-tl-2*/
41+
42+
# Create a custom install profile
43+
TEXLIVE_INSTALL_PREFIX="/usr/local/texlive"
44+
cat <<EOF > texlive.profile
45+
selected_scheme scheme-small
46+
TEXDIR $TEXLIVE_INSTALL_PREFIX
47+
TEXMFCONFIG ~/.texlive2025/texmf-config
48+
TEXMFVAR ~/.texlive2025/texmf-var
49+
option_doc 0
50+
option_src 0
51+
EOF
52+
53+
./install-tl --profile=texlive.profile --custom-bin=$TEXLIVE_INSTALL_PREFIX/bin/powerpc64le-unknown-linux-gnu
54+
55+
# Set up environment
56+
export PATH="$TEXLIVE_INSTALL_PREFIX/bin/powerpc64le-unknown-linux-gnu:$PATH"
3857
pdflatex --version
58+
tlmgr --version
3959

4060
elif [[ "$ARCH" == "x86_64" ]]; then
4161
# tex live installation

0 commit comments

Comments
 (0)