File tree Expand file tree Collapse file tree 3 files changed +38
-4
lines changed Expand file tree Collapse file tree 3 files changed +38
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,18 @@ UNAME_TO_GOARCH["ppc64le"]="ppc64le"
9
9
UNAME_TO_GOARCH[" s390x" ]=" s390x"
10
10
11
11
ARCH=" ${UNAME_TO_GOARCH[$(uname -m)]} "
12
+ if [[ -z " ${ARCH:- } " ]]; then
13
+ echo " Unsupported architecture: $( uname -m) " >&2
14
+ exit 1
15
+ fi
16
+
17
+ # Skip PDF export installation for s390x architecture
18
+ if [[ " $( uname -m) " == " s390x" ]]; then
19
+ echo " PDF export functionality is not supported on s390x architecture. Skipping installation."
20
+ exit 0
21
+ fi
22
+
23
+ ARCH=$( uname -m)
12
24
13
25
if [[ " $ARCH " == " ppc64le" ]]; then
14
26
# Install Pandoc from source
@@ -25,7 +37,13 @@ if [[ "$ARCH" == "ppc64le" ]]; then
25
37
git submodule update --init --recursive
26
38
27
39
cabal update
40
+
41
+ # Build the CLI tool (not the top-level library package)
28
42
cd pandoc-cli
43
+
44
+ # Clean previous builds
45
+ cabal clean
46
+
29
47
cabal build -j" $( nproc) "
30
48
mkdir -p /usr/local/pandoc/bin
31
49
cabal install \
@@ -38,6 +56,7 @@ if [[ "$ARCH" == "ppc64le" ]]; then
38
56
dnf remove -y cabal-install ghc gmp-devel
39
57
dnf clean all && rm -rf /var/cache/dnf
40
58
59
+ # Verify installation
41
60
/usr/local/pandoc/bin/pandoc --version
42
61
43
62
elif [[ " $ARCH " == " amd64" ]]; then
Original file line number Diff line number Diff line change @@ -65,11 +65,13 @@ if [[ "$ARCH" == "ppc64le" ]]; then
65
65
66
66
# Set version
67
67
PANDOC_VERSION=3.7.0.2
68
+
68
69
cd /tmp
69
70
git clone --recurse-submodules https://github.com/jgm/pandoc.git
70
71
cd pandoc
71
72
git checkout ${PANDOC_VERSION}
72
73
git submodule update --init --recursive
74
+
73
75
cabal update
74
76
75
77
# Build the CLI tool (not the top-level library package)
@@ -85,6 +87,7 @@ if [[ "$ARCH" == "ppc64le" ]]; then
85
87
rm -rf ~ /.cabal ~ /.ghc /tmp/pandoc
86
88
dnf remove -y cabal-install ghc gmp-devel
87
89
dnf clean all && rm -rf /var/cache/dnf
90
+
88
91
# Verify installation
89
92
/usr/local/bin/pandoc --version
90
93
@@ -98,7 +101,7 @@ if [[ "$ARCH" == "x86_64" ]]; then
98
101
cd install-tl-2*
99
102
perl ./install-tl --no-interaction --scheme=scheme-small --texdir=/usr/local/texlive
100
103
mv /usr/local/texlive/bin/" $( uname -m) -linux" /usr/local/texlive/bin/linux
101
- cd /usr/local/texlive/bin/linux
104
+ cd /usr/local/texlive/bin/linux
102
105
./tlmgr install tcolorbox pdfcol adjustbox titling enumitem soul ucs collection-fontsrecommended
103
106
104
107
# pandoc installation
@@ -108,4 +111,3 @@ cd /usr/local/texlive/bin/linux
108
111
rm -f /tmp/pandoc.tar.gz
109
112
110
113
fi
111
-
Original file line number Diff line number Diff line change @@ -9,6 +9,18 @@ UNAME_TO_GOARCH["ppc64le"]="ppc64le"
9
9
UNAME_TO_GOARCH[" s390x" ]=" s390x"
10
10
11
11
ARCH=" ${UNAME_TO_GOARCH[$(uname -m)]} "
12
+ if [[ -z " ${ARCH:- } " ]]; then
13
+ echo " Unsupported architecture: $( uname -m) " >&2
14
+ exit 1
15
+ fi
16
+
17
+ # Skip PDF export installation for s390x architecture
18
+ if [[ " $( uname -m) " == " s390x" ]]; then
19
+ echo " PDF export functionality is not supported on s390x architecture. Skipping installation."
20
+ exit 0
21
+ fi
22
+
23
+ ARCH=$( uname -m)
12
24
13
25
if [[ " $ARCH " == " ppc64le" ]]; then
14
26
echo " Installing TeX Live from source for $ARCH ..."
@@ -29,13 +41,15 @@ if [[ "$ARCH" == "ppc64le" ]]; then
29
41
# Create build directory and build
30
42
mkdir ../texlive-build
31
43
cd ../texlive-build
44
+
45
+ # Configure, build, install
32
46
../texlive-20250308-source/configure --prefix=/usr/local/texlive
33
47
make -j" $( nproc) "
34
48
make install
35
49
36
50
# Symlink for pdflatex
37
51
ln -sf pdftex /usr/local/texlive/bin/powerpc64le-unknown-linux-gnu/pdflatex
38
-
52
+
39
53
# Cleanup sources to reduce image size
40
54
rm -rf /texlive-20250308-source /texlive-build
41
55
86
100
exit 1
87
101
88
102
fi
89
-
You can’t perform that action at this time.
0 commit comments