-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild-pdftex.sh
executable file
·63 lines (54 loc) · 1.66 KB
/
build-pdftex.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# script to build pdftex from a subset of TeX Live sources
set -e
set -x
topDir=$(cd $(dirname $0) && pwd)
pdftexDir=$topDir/src/texk/web2c/pdftexdir
if [ ! -d $pdftexDir ]; then
echo "$pdftexDir not found"
exit -1
fi
CFG_OPTS="\
--enable-native-texlive-build \
--enable-cxx-runtime-hack \
--disable-shared \
--disable-largefile \
--without-x \
--disable-all-pkgs \
--disable-ptex \
--enable-pdftex \
"
## workaround to disable system libraries; --enable-native-texlive-build should do that but somehow it didn't
DISABLE_SYSTEM_LIBS="\
--without-system-freetype \
--without-system-freetype2 \
--without-system-gd \
--without-system-graphite \
--without-system-icu \
--without-system-kpathsea \
--without-system-libpng \
--without-system-ptexenc \
--without-system-t1lib \
--without-system-teckit \
--without-system-xpdf \
--without-system-zlib \
"
CFG_OPTS="$CFG_OPTS $DISABLE_SYSTEM_LIBS"
buildDir=$(pwd)/build-pdftex
rm -rf $buildDir && mkdir $buildDir && cd $buildDir
export CONFIG_SHELL=/bin/bash
$topDir/src/configure $CFG_OPTS "$@" 2>&1 | tee configure.log
# try to find gnu make; we may need it
MAKE=make
if make -v 2>&1| grep "GNU Make" >/dev/null; then
echo "Your make is a GNU-make; I will use that"
elif gmake -v >/dev/null 2>&1; then
MAKE=gmake
echo "You have a GNU-make installed as gmake; I will use that"
else
echo "I can't find a GNU-make; I'll try to use make and hope that works."
echo "If it doesn't, please install GNU-make."
fi
$MAKE | tee make.log
(cd $buildDir/texk/web2c; $MAKE pdftex) 2>&1 | tee -a make.log
ls -l $buildDir/texk/web2c/pdftex