1 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
2 # Contributor: francois <francois.archlinux.org>
4 pkgname=('texlive-bin' 'libsynctex')
9 makedepends=('git' 'cairo' 'pixman' 'graphite' 't1lib' 'gd'
10 'libsigsegv' 'zziplib' 'libpng' 'libjpeg' 'freetype2'
11 'icu' 'harfbuzz' 'harfbuzz-icu' 'gmp' 'mpfr' 'potrace' 'libpaper'
12 'perl' 'clisp' 'ffcall' 'libxcrypt')
13 url='https://tug.org/texlive/'
14 _commit=7eaec95e244515fe11445111c0aaa1349de6790d # svn://tug.org/texlive/tags/texlive-2021.3/Build/source@59745
15 source=("git+https://github.com/Tex-Live/texlive-source.git#commit=${_commit}")
19 cd "$srcdir/texlive-source"
21 # t4ht expects to be un /usr/share/texmf/bin/t4ht (FS#27251)
22 sed -i s/SELFAUTOPARENT/TEXMFROOT/ texk/tex4htk/t4ht.c
26 cd "$srcdir/texlive-source"
28 #############################################################
32 echo "--> Initial configuration..."
33 # we use temporary prefix to avoid messing the existing
34 # $pkgdir/usr/share/texmf tree
36 # Preset float endianness to avoid a crash in cairo configure
37 # with recent toolchains. We are not building cairo anyway.
38 ax_cv_c_float_words_bigendian=no \
39 ../configure --prefix=/usr -C \
41 --datarootdir=/usr/share \
42 --datadir=/usr/share \
43 --mandir=/usr/share/man \
44 --disable-native-texlive-build \
45 --with-banner-add="/Arch Linux" \
46 --disable-multiplatform \
55 --with-system-zziplib \
56 --with-system-pnglib \
57 --with-system-ncurses \
60 --with-system-freetype2 \
61 --with-system-pixman \
63 --with-system-harfbuzz \
64 --with-system-graphite \
68 --with-system-potrace \
69 --with-system-libpaper \
70 --with-freetype2-libdir=/usr/lib \
71 --with-freetype2-include=/usr/include/freetype2 \
72 --with-xdvi-x-toolkit=xaw \
73 --disable-dump-share \
76 --with-clisp-runtime=default \
77 --enable-xindy --disable-xindy-rules --disable-xindy-docs
78 #############################################################
80 echo "-------------------------------------------------------"
81 echo "--> Building the whole beast ..."
82 echo "-------------------------------------------------------"
86 package_libsynctex() {
87 pkgdesc='Library for synchronization between TeX files and resulting file'
88 depends=('glibc' 'zlib')
90 cd "${srcdir}/texlive-source/Work"
91 make -C texk/web2c DESTDIR="${pkgdir}" \
92 install-data-am install-libLTLIBRARIES
95 package_texlive-bin() {
96 pkgdesc="TeX Live binaries"
97 depends=('cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler'
98 'libsigsegv' 'zziplib' 'libpng' 'libjpeg' 'freetype2' 'libxcrypt'
99 'icu' 'harfbuzz' 'harfbuzz-icu' 'gmp' 'mpfr' 'potrace' 'libpaper'
101 provides=('lcdf-typetools' 'kpathsea' 'xindy')
102 optdepends=('ed: for texconfig'
103 'biber: for bibliography processing')
106 cd "$srcdir/texlive-source"
108 #############################################################
111 find utils/xindy -name Makefile -exec sed -i -e "s|^prefix =.\+$|prefix = $pkgdir/usr|" -e "s|^mandir =.\+$|mandir = \${prefix}/share/man|" -e "s|^datadir =.\+$|datadir = \${datarootdir}/texmf|" -e "s|^docdir =.\+$|docdir = \${datadir}/doc/xindy|" '{}' \;
113 echo "-------------------------------------------------------"
114 echo "--> Proceeding with make install ..."
115 echo "-------------------------------------------------------"
117 make DESTDIR="${pkgdir}" texmf="$pkgdir"/usr/share/texmf install
118 rm -rf "${pkgdir}"/usr/{texmf,share/texmf-dist}
120 ## symlink engines by hand. texlinks has moved to texlive-core...
121 mkdir -p "${pkgdir}"/usr/bin
122 ln -s eptex "${pkgdir}"/usr/bin/platex
123 ln -s euptex "${pkgdir}"/usr/bin/uplatex
124 ln -s luatex "${pkgdir}"/usr/bin/dvilualatex
125 ln -s luatex "${pkgdir}"/usr/bin/dviluatex
126 ln -s luahbtex "${pkgdir}"/usr/bin/lualatex
127 ln -s pdftex "${pkgdir}"/usr/bin/amstex
128 ln -s pdftex "${pkgdir}"/usr/bin/cslatex
129 ln -s pdftex "${pkgdir}"/usr/bin/csplain
130 ln -s pdftex "${pkgdir}"/usr/bin/eplain
131 ln -s pdftex "${pkgdir}"/usr/bin/etex
132 ln -s pdftex "${pkgdir}"/usr/bin/jadetex
133 ln -s pdftex "${pkgdir}"/usr/bin/latex
134 ln -s tex "${pkgdir}"/usr/bin/lollipop
135 ln -s pdftex "${pkgdir}"/usr/bin/mex
136 ln -s pdftex "${pkgdir}"/usr/bin/mllatex
137 ln -s pdftex "${pkgdir}"/usr/bin/mltex
138 ln -s pdftex "${pkgdir}"/usr/bin/pdfetex
139 ln -s pdftex "${pkgdir}"/usr/bin/pdfcslatex
140 ln -s pdftex "${pkgdir}"/usr/bin/pdfcsplain
141 ln -s pdftex "${pkgdir}"/usr/bin/pdfjadetex
142 ln -s pdftex "${pkgdir}"/usr/bin/pdflatex
143 ln -s pdftex "${pkgdir}"/usr/bin/pdfmex
144 ln -s pdftex "${pkgdir}"/usr/bin/pdfxmltex
145 ln -s pdftex "${pkgdir}"/usr/bin/texsis
146 ln -s pdftex "${pkgdir}"/usr/bin/utf8mex
147 ln -s pdftex "${pkgdir}"/usr/bin/xmltex
148 ln -s xetex "${pkgdir}"/usr/bin/xelatex
150 #############################################################
151 # remove dangling symlinks
152 _bibtexextra_scripts="
318 _games_scripts="rubikrotation"
319 _humanities_scripts="diadia"
320 _langcyrillic_scripts="rubibtex rumakeindex"
321 _langextra_scripts="ebong"
322 _langgreek_scripts="mkgrkindex"
323 _langjapanese_scripts="convbkmk ptex2pdf
324 kanji-fontmap-creator
326 kanji-config-updmap-sys
327 kanji-config-updmap-user
329 _langkorean_scripts="jamo-normalize komkindex ttf2kotexfont"
330 _latexextra_scripts="
333 hyperxmp-add-bytecount
347 _music_scripts="lily-glyph-commands lily-image-commands lily-rebuild-pdfs
362 _pstricks_scripts="pedigree pst2pdf"
363 _science_scripts="pygmentex ulqda"
365 ${_bibtexextra_scripts} \
368 ${_htmlxml_scripts} \
369 ${_humanities_scripts} \
370 ${_langcyrillic_scripts} \
371 ${_langextra_scripts} \
372 ${_langgreek_scripts} \
373 ${_langjapanese_scripts} \
374 ${_langkorean_scripts} \
375 ${_latexextra_scripts} \
377 ${_pictures_scripts} \
378 ${_pstricks_scripts} \
379 ${_science_scripts} \
381 ! readlink -e "$pkgdir"/usr/bin/$s && rm "$pkgdir"/usr/bin/$s
383 ###################################################################
386 rm -f "$pkgdir"/usr/include/synctex/*
387 rm -f "$pkgdir"/usr/lib/libsynctex.*
388 rm -f "$pkgdir"/usr/lib/pkgconfig/synctex.pc
389 rm -f "$pkgdir"/usr/share/man/man*/synctex.*