1 # Maintainer: Bernhard Walle <bernhard.walle@gmx.de>
2 # based on "texlive-bin" from francois at archlinux dot org
5 pkgname=texlive-bin-motif
8 pkgdesc="TeX Live binaries, xdvi built with Motif instead of xaw"
10 arch=('i686' 'x86_64')
11 depends=('gcc-libs' 't1lib' 'gd' 'libsigsegv' 'openmotif')
12 optdepends=('psutils' 't1utils' 'perl')
13 makedepends=('clisp' 'ffcall' 'lzma-utils')
14 conflicts=('texlive-omega' 'texlive-bin')
15 options=('!makeflags' '!libtool')
16 url='http://tug.org/texlive/'
17 source=('texmf.cnf' 'ftp://tug.org/texlive/historic/2008/texlive-20080816-source.tar.lzma' \
18 'ftp://ftp.archlinux.org/other/texlive/texlive-bin-2008-texmf.tar.lzma')
19 provides=('texlive-bin')
20 backup=(usr/share/texmf/web2c/texmf.cnf \
21 usr/share/texmf-config/web2c/mktex.cnf \
22 usr/share/texmf-config/web2c/updmap.cfg \
23 usr/share/texmf-config/web2c/fmtutil.cfg \
24 usr/share/texmf-config/tex/generic/config/language.dat \
25 usr/share/texmf-config/tex/generic/config/pdftexconfig.tex \
26 usr/share/texmf-config/ttf2pk/ttf2pk.cfg \
27 usr/share/texmf-config/dvips/config/config.ps \
28 usr/share/texmf-config/dvipdfm/dvipdfmx.cfg \
29 usr/share/texmf-config/dvipdfm/config/config \
30 usr/share/texmf-config/xdvi/XDvi)
31 md5sums=('4293b402c535002a65a3ecf62253d567'
32 '554287c3e458da776edd684506048d45'
33 'bac8aee05595fb80fcae8e864ba063f6')
36 if [ "${CARCH}" = "x86_64" ]; then
37 export CFLAGS="${CFLAGS} -fPIC"
38 export CXXFLAGS="${CXXFLAGS} -fPIC"
40 lzma --force -dc texlive-bin-2008-texmf.tar.lzma | tar xf - || return 1
41 install -m755 -d $startdir/pkg/usr/share || return 1
42 find texmf -type d -exec install -d -m755 $startdir/pkg/usr/share/'{}' \; || return 1
43 find texmf -type f -exec install -m644 '{}' $startdir/pkg/usr/share/'{}' \; || return 1
44 lzma --force -dc texlive-20080816-source.tar.lzma | tar xf - || return 1
45 cd texlive-20080816-source || return 1
46 # This trick is for avoiding exiting when latex is not available,
47 # since we do not build the xindy documentation anyway:
48 sed -i~ 's|latex="no"|latex="yes"|' utils/xindy/configure || return 1
49 test ! -d Work && mkdir Work
51 echo "--> Here we go with configure..."
52 ../configure --prefix=/usr \
53 --datarootdir=$startdir/pkg/usr/share \
54 --datadir=$startdir/pkg/usr/share \
55 --disable-multiplatform --without-dialog \
56 --without-psutils --without-texinfo --without-t1utils \
57 --with-system-zlib --with-system-pnglib \
58 --with-system-ncurses --with-system-t1lib \
59 --with-system-gd --with-fontconfig=/usr/lib \
60 --with-system-freetype2 --with-freetype2-libdir=/usr/lib \
61 --with-freetype2-include=/usr/include/freetype2 \
62 --with-xdvi-x-toolkit=motif --with-cxx-runtime-hack \
63 --without-omega --without-aleph --without-graphite || return 1
64 ### FIXME these fixes should be temporary: send patch upstream
65 find utils/xindy -name Makefile -exec sed -i -e "s|^prefix =.\+$|prefix = $startdir/pkg/usr|" '{}' \; || return 1
66 # we skip that, coz it requires an almost full texlive installation for compilation of the documentation:
67 sed -i -e "s|^MAKE_RULES = make-rules|MAKE_RULES = ''|" -e "s|^DOCS = doc|DOCS = ''|" utils/xindy/Makefile || return 1
68 #############################################################
69 echo "-------------------------------------------------------"
70 echo "--> ... and now we build the whole beast"
72 #############################################################
73 echo "-------------------------------------------------------"
74 echo "--> ... proceeding with make install"
75 install -d -m755 $startdir/pkg/usr/share/man/man5
76 make prefix=$startdir/pkg/usr texmf=$startdir/pkg/usr/share/texmf install || return 1
77 echo "-------------------------------------------------------"
78 echo "--> ...fixing wrong symlinks to scripts under /usr/bin/"
79 for f in $startdir/pkg/usr/bin/* ; do
81 target=`ls -l "$f" | sed 's/^.\+ -> //'`
82 if [[ "$target" == ..* ]]; then
83 newtarget=`echo $target | sed -e 's|../|/usr/share/|'`
86 test -f $startdir/pkg/$newtarget && chmod a+x $startdir/pkg/$newtarget
91 #############################################################
94 # remove tlmgr from PATH
95 rm -f $startdir/pkg/usr/bin/tlmgr
97 for d in $startdir/pkg/usr/texmf/scripts/*; do
99 test ! -d $startdir/pkg/usr/share/texmf/scripts/$dname && mv $d $startdir/pkg/usr/share/texmf/scripts/
101 rm -rf $startdir/pkg/usr/{texmf,texmf-dist}
102 # most man files went to two different places:
104 # remove pdf versions of manpages:
105 rm -f $startdir/pkg/usr/share/texmf/man/man$i/*.pdf
106 for f in $startdir/pkg/usr/share/texmf/doc/man/man$i/*; do
108 if [[ ! -f $startdir/pkg/usr/share/man/man$i/$bf ]]; then
109 mv -f $f $startdir/pkg/usr/share/man/man$i/
113 # remove extra documentation:
114 rm -rf $startdir/pkg/usr/share/texmf/doc/
115 # those files are also in base, but "make install" duplicated them here:
116 rm -rf $startdir/pkg/usr/share/texmf/bibtex/
117 #TODO leave info files ?
118 rm -rf $startdir/pkg/usr/share/{info,doc}
119 # remove files that belong to texinfo
120 for f in info infokey install-info makeinfo texi2dvi pdftexi2dvi texi2pdf texindex; do
121 rm -f $startdir/pkg/usr/share/man/man1/$f.1
123 for f in texinfo info ; do
124 rm -f $startdir/pkg/usr/share/man/man5/$f.5
126 # remove files that belong to t1utils
127 for f in t1ascii t1asm t1binary t1disasm t1mac t1unmac; do
128 rm -f $startdir/pkg/usr/share/man/man1/$f.1
130 # remove files that belong to psutils
131 for f in epsffit extractres fixdlsrps fixfmps fixmacps fixpsditps fixpspps fixscribeps fixtpps fixwfwps fixwpps fixwwps getafm includeres psbook psmerge psnup psresize psselect pstops; do
132 rm -f $startdir/pkg/usr/share/man/man1/$f.1
134 # remove man files that belong to omega/aleph
135 for f in omega lambda odvicopy odvips odvitype ofm2opl opl2ofm otp2ocp outocp ovf2ovp ovp2ovf oxdvi ; do
136 rm -f $startdir/pkg/usr/share/man/man1/$f.1
138 # replace upstream texmf.cnf with ours
139 rm -f $startdir/pkg/usr/share/texmf/web2c/texmf.cnf
140 install -m644 $startdir/src/texmf.cnf $startdir/pkg/usr/share/texmf/web2c/texmf.cnf
141 ## remove omega and aleph from fmtutil.cnf
142 sed -i -e '/omega/d' -e '/aleph/d' $startdir/pkg/usr/share/texmf/web2c/fmtutil.cnf || return 1
143 ###################################################################
144 # copy config files to texmf-config tree
145 install -d -m755 $startdir/pkg/usr/share/texmf-config/web2c
146 install -d -m755 $startdir/pkg/usr/share/texmf-config/dvips/config
147 install -d -m755 $startdir/pkg/usr/share/texmf-config/dvipdfm/config
148 install -d -m755 $startdir/pkg/usr/share/texmf-config/dvipdfmx
149 install -d -m755 $startdir/pkg/usr/share/texmf-config/tex/generic/config
150 install -d -m755 $startdir/pkg/usr/share/texmf-config/xdvi
151 cp -a $startdir/pkg/usr/share/texmf/web2c/mktex.cnf \
152 $startdir/pkg/usr/share/texmf-config/web2c/
153 cp -a $startdir/pkg/usr/share/texmf/web2c/updmap.cfg \
154 $startdir/pkg/usr/share/texmf-config/web2c/
155 cp -a $startdir/pkg/usr/share/texmf/web2c/fmtutil.cnf \
156 $startdir/pkg/usr/share/texmf-config/web2c/
157 cp -a $startdir/pkg/usr/share/texmf/dvips/config/config.ps \
158 $startdir/pkg/usr/share/texmf-config/dvips/config/
159 cp -a $startdir/pkg/usr/share/texmf/dvipdfm/config/config \
160 $startdir/pkg/usr/share/texmf-config/dvipdfm/config/
161 cp -a $startdir/pkg/usr/share/texmf/dvipdfmx/dvipdfmx.cfg \
162 $startdir/pkg/usr/share/texmf-config/dvipdfmx/
163 cp -a $startdir/pkg/usr/share/texmf/tex/generic/config/pdftexconfig.tex \
164 $startdir/pkg/usr/share/texmf-config/tex/generic/config/
165 cp -a $startdir/pkg/usr/share/texmf/tex/generic/config/language.dat \
166 $startdir/pkg/usr/share/texmf-config/tex/generic/config/
167 cp -a $startdir/pkg/usr/share/texmf/xdvi/XDvi \
168 $startdir/pkg/usr/share/texmf-config/xdvi/
170 sed -i '/^\(Map\|MixedMap\)/d' $startdir/pkg/usr/share/texmf-config/web2c/updmap.cfg
171 sed -i '/^#! \(Map\|MixedMap\)/d' $startdir/pkg/usr/share/texmf-config/web2c/updmap.cfg
172 # fix hard-coded paths in /usr/bin/xindy
173 sed -i "s|'/.\+/pkg/usr|'/usr|" $startdir/pkg/usr/bin/xindy