1 | #!/bin/bash |
---|
2 | |
---|
3 | ### tetex ### |
---|
4 | |
---|
5 | cd ${SRC} |
---|
6 | LOG=tetex-blfs.log |
---|
7 | |
---|
8 | SELF=`basename ${0}` |
---|
9 | set_buildenv |
---|
10 | set_libdirname |
---|
11 | setup_multiarch |
---|
12 | if [ ! "${libdirname}" = "lib" ]; then |
---|
13 | extra_conf="--libdir=/usr/${libdirname}" |
---|
14 | fi |
---|
15 | |
---|
16 | unpack_tarball tetex-src-${TETEX_VER} |
---|
17 | #save pkgdir |
---|
18 | OLD_PKGDIR=${PKGDIR} |
---|
19 | mkdir -p /usr/share/texmf |
---|
20 | cd /usr/share/texmf |
---|
21 | ( |
---|
22 | umask 0 |
---|
23 | umask |
---|
24 | unpack_tarball tetex-texmf-${TETEX_VER} |
---|
25 | unpack_tarball tetex-texmfsrc-${TETEX_VER} |
---|
26 | ) |
---|
27 | |
---|
28 | umask |
---|
29 | PKGDIR=${OLD_PKGDIR} |
---|
30 | |
---|
31 | cd ${SRC}/${PKGDIR} |
---|
32 | |
---|
33 | case ${TETEX_VER} in |
---|
34 | 2.0.2 ) |
---|
35 | apply_patch tetex-src-2.0.2-flex-1 |
---|
36 | apply_patch tetex-src-2.0.2-remove_readlink-1 |
---|
37 | ;; |
---|
38 | esac |
---|
39 | |
---|
40 | # Additional config if t1lib, gd were built previously |
---|
41 | if [ -f /usr/${libdirname}/libt1.a ]; then |
---|
42 | extra_conf="${extra_conf} --with-system-t1lib" |
---|
43 | fi |
---|
44 | |
---|
45 | if [ -f /usr/${libdirname}/libgd.a ]; then |
---|
46 | extra_conf="${extra_conf} --with-system-gd" |
---|
47 | fi |
---|
48 | |
---|
49 | # Added LDFLAGS to appease libtool w gdlib |
---|
50 | max_log_init tetex ${TETEX_VER} "blfs (shared)" ${CONFLOGS} ${LOG} |
---|
51 | CC="${CC-gcc} ${ARCH_CFLAGS}" \ |
---|
52 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \ |
---|
53 | CFLAGS="${TGT_CFLAGS}" \ |
---|
54 | CXXFLAGS="${TGT_CFLAGS}" \ |
---|
55 | LDFLAGS="-L/usr/${libdirname}" \ |
---|
56 | ./configure --prefix=/usr \ |
---|
57 | --with-system-ncurses --with-system-zlib \ |
---|
58 | --with-system-pnglib --without-texinfo \ |
---|
59 | --exec-prefix=/usr --bindir=/usr/bin ${extra_conf} \ |
---|
60 | >> ${LOGFILE} 2>&1 && |
---|
61 | echo " o Configure OK" && |
---|
62 | |
---|
63 | # TODO: check whether we should use make world or make all. |
---|
64 | # 2.0.2 instructions were make world |
---|
65 | min_log_init ${BUILDLOGS} && |
---|
66 | make all \ |
---|
67 | >> ${LOGFILE} 2>&1 && |
---|
68 | echo " o Build OK" || barf |
---|
69 | |
---|
70 | min_log_init ${INSTLOGS} && |
---|
71 | make install \ |
---|
72 | >> ${LOGFILE} 2>&1 && |
---|
73 | echo " o Install OK" || barf |
---|
74 | |
---|
75 | texconfig dvips paper a4 |
---|
76 | texconfig font rw |
---|