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=ccb6338507149edf2772bfccb9933b72761f4cc4 # svn://tug.org/texlive/trunk/Build/source@58686
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
35 ../configure --prefix=/usr -C \
37 --datarootdir=/usr/share \
38 --datadir=/usr/share \
39 --mandir=/usr/share/man \
40 --disable-native-texlive-build \
41 --with-banner-add="/Arch Linux" \
42 --disable-multiplatform \
51 --with-system-zziplib \
52 --with-system-pnglib \
53 --with-system-ncurses \
56 --with-system-freetype2 \
57 --with-system-pixman \
59 --with-system-harfbuzz \
60 --with-system-graphite \
64 --with-system-potrace \
65 --with-system-libpaper \
66 --with-freetype2-libdir=/usr/lib \
67 --with-freetype2-include=/usr/include/freetype2 \
68 --with-xdvi-x-toolkit=xaw \
69 --disable-dump-share \
72 --with-clisp-runtime=default \
73 --enable-xindy --disable-xindy-rules --disable-xindy-docs
74 #############################################################
76 echo "-------------------------------------------------------"
77 echo "--> Building the whole beast ..."
78 echo "-------------------------------------------------------"
82 package_libsynctex() {
83 pkgdesc='Library for synchronization between TeX files and resulting file'
84 depends=('glibc' 'zlib')
86 cd "${srcdir}/texlive-source/Work"
87 make -C texk/web2c DESTDIR="${pkgdir}" \
88 install-data-am install-libLTLIBRARIES
91 package_texlive-bin() {
92 pkgdesc="TeX Live binaries"
93 depends=('cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler'
94 'libsigsegv' 'zziplib' 'libpng' 'libjpeg' 'freetype2' 'libxcrypt'
95 'icu' 'harfbuzz' 'harfbuzz-icu' 'gmp' 'mpfr' 'potrace' 'libpaper'
97 provides=('lcdf-typetools' 'kpathsea' 'xindy')
98 optdepends=('ed: for texconfig'
99 'biber: for bibliography processing')
102 cd "$srcdir/texlive-source"
104 #############################################################
107 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|" '{}' \;
109 echo "-------------------------------------------------------"
110 echo "--> Proceeding with make install ..."
111 echo "-------------------------------------------------------"
113 make DESTDIR="${pkgdir}" texmf="$pkgdir"/usr/share/texmf install
114 rm -rf "${pkgdir}"/usr/{texmf,share/texmf-dist}
116 ## symlink engines by hand. texlinks has moved to texlive-core...
117 mkdir -p "${pkgdir}"/usr/bin
118 ln -s eptex "${pkgdir}"/usr/bin/platex
119 ln -s euptex "${pkgdir}"/usr/bin/uplatex
120 ln -s luatex "${pkgdir}"/usr/bin/dvilualatex
121 ln -s luatex "${pkgdir}"/usr/bin/dviluatex
122 ln -s luahbtex "${pkgdir}"/usr/bin/lualatex
123 ln -s pdftex "${pkgdir}"/usr/bin/amstex
124 ln -s pdftex "${pkgdir}"/usr/bin/cslatex
125 ln -s pdftex "${pkgdir}"/usr/bin/csplain
126 ln -s pdftex "${pkgdir}"/usr/bin/eplain
127 ln -s pdftex "${pkgdir}"/usr/bin/etex
128 ln -s pdftex "${pkgdir}"/usr/bin/jadetex
129 ln -s pdftex "${pkgdir}"/usr/bin/latex
130 ln -s tex "${pkgdir}"/usr/bin/lollipop
131 ln -s pdftex "${pkgdir}"/usr/bin/mex
132 ln -s pdftex "${pkgdir}"/usr/bin/mllatex
133 ln -s pdftex "${pkgdir}"/usr/bin/mltex
134 ln -s pdftex "${pkgdir}"/usr/bin/pdfetex
135 ln -s pdftex "${pkgdir}"/usr/bin/pdfcslatex
136 ln -s pdftex "${pkgdir}"/usr/bin/pdfcsplain
137 ln -s pdftex "${pkgdir}"/usr/bin/pdfjadetex
138 ln -s pdftex "${pkgdir}"/usr/bin/pdflatex
139 ln -s pdftex "${pkgdir}"/usr/bin/pdfmex
140 ln -s pdftex "${pkgdir}"/usr/bin/pdfxmltex
141 ln -s pdftex "${pkgdir}"/usr/bin/texsis
142 ln -s pdftex "${pkgdir}"/usr/bin/utf8mex
143 ln -s pdftex "${pkgdir}"/usr/bin/xmltex
144 ln -s xetex "${pkgdir}"/usr/bin/xelatex
146 #############################################################
147 # remove dangling symlinks
148 _bibtexextra_scripts="
314 _games_scripts="rubikrotation"
315 _humanities_scripts="diadia"
316 _langcyrillic_scripts="rubibtex rumakeindex"
317 _langextra_scripts="ebong"
318 _langgreek_scripts="mkgrkindex"
319 _langjapanese_scripts="convbkmk ptex2pdf
320 kanji-fontmap-creator
322 kanji-config-updmap-sys
323 kanji-config-updmap-user
325 _langkorean_scripts="jamo-normalize komkindex ttf2kotexfont"
326 _latexextra_scripts="
329 hyperxmp-add-bytecount
343 _music_scripts="lily-glyph-commands lily-image-commands lily-rebuild-pdfs
358 _pstricks_scripts="pedigree pst2pdf"
359 _science_scripts="pygmentex ulqda"
361 ${_bibtexextra_scripts} \
364 ${_htmlxml_scripts} \
365 ${_humanities_scripts} \
366 ${_langcyrillic_scripts} \
367 ${_langextra_scripts} \
368 ${_langgreek_scripts} \
369 ${_langjapanese_scripts} \
370 ${_langkorean_scripts} \
371 ${_latexextra_scripts} \
373 ${_pictures_scripts} \
374 ${_pstricks_scripts} \
375 ${_science_scripts} \
377 ! readlink -e "$pkgdir"/usr/bin/$s && rm "$pkgdir"/usr/bin/$s
379 ###################################################################
382 rm -f "$pkgdir"/usr/include/synctex/*
383 rm -f "$pkgdir"/usr/lib/libsynctex.*
384 rm -f "$pkgdir"/usr/lib/pkgconfig/synctex.pc
385 rm -f "$pkgdir"/usr/share/man/man*/synctex.*