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=0d0bb3a2401e8825b4987eee51e8ef469eb8c3fc # tags/texlive-2023.0
15 source=("git+https://github.com/Tex-Live/texlive-source.git#commit=${_commit}"
16 "ptex-debug-print.patch")
18 'aa838f09003c62c2efb5770a8de66f99b409df049fbd65098d80fd1957d06c50')
21 cd "$srcdir/texlive-source"
23 # bibtex-x needs kpathsea flags
24 sed -i '/AC_SEARCH_LIBS/a KPSE_KPATHSEA_FLAGS' texk/bibtex-x/configure.ac
25 (cd texk/bibtex-x && autoreconf)
26 # t4ht expects to be un /usr/share/texmf/bin/t4ht (FS#27251)
27 sed -i s/SELFAUTOPARENT/TEXMFROOT/ texk/tex4htk/t4ht.c
28 # remove spurious ptex "guessed encoding" print
29 patch -Np1 -i "${srcdir}/ptex-debug-print.patch"
33 cd "$srcdir/texlive-source"
35 #############################################################
39 echo "--> Initial configuration..."
40 # we use temporary prefix to avoid messing the existing
41 # $pkgdir/usr/share/texmf tree
43 # Preset float endianness to avoid a crash in cairo configure
44 # with recent toolchains. We are not building cairo anyway.
45 ax_cv_c_float_words_bigendian=no \
46 ../configure --prefix=/usr -C \
48 --datarootdir=/usr/share \
49 --datadir=/usr/share \
50 --mandir=/usr/share/man \
51 --disable-native-texlive-build \
52 --with-banner-add="/Arch Linux" \
53 --disable-multiplatform \
62 --with-system-zziplib \
63 --with-system-pnglib \
64 --with-system-ncurses \
67 --with-system-freetype2 \
68 --with-system-pixman \
70 --with-system-harfbuzz \
71 --with-system-graphite \
75 --with-system-potrace \
76 --with-system-libpaper \
77 --with-freetype2-libdir=/usr/lib \
78 --with-freetype2-include=/usr/include/freetype2 \
79 --with-xdvi-x-toolkit=xaw \
80 --disable-dump-share \
83 --with-clisp-runtime=default \
84 --enable-xindy --disable-xindy-rules --disable-xindy-docs
85 #############################################################
87 echo "-------------------------------------------------------"
88 echo "--> Building the whole beast ..."
89 echo "-------------------------------------------------------"
93 package_libsynctex() {
94 pkgdesc='Library for synchronization between TeX files and resulting file'
95 depends=('glibc' 'zlib')
97 cd "${srcdir}/texlive-source/Work"
98 make -C texk/web2c DESTDIR="${pkgdir}" \
99 install-data-am install-libLTLIBRARIES
101 rm -f "$pkgdir"/usr/share/man/man1/hi*.*
104 package_texlive-bin() {
105 pkgdesc="TeX Live binaries"
106 depends=('cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler' 'ffcall'
107 'libsigsegv' 'zziplib' 'libpng' 'libjpeg' 'freetype2' 'libxcrypt'
108 'icu' 'harfbuzz' 'harfbuzz-icu' 'gmp' 'mpfr' 'potrace' 'libpaper'
110 provides=('lcdf-typetools' 'kpathsea' 'xindy')
111 optdepends=('ed: for texconfig'
112 'biber: for bibliography processing')
114 cd "$srcdir/texlive-source"
116 #############################################################
119 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|" '{}' \;
121 echo "-------------------------------------------------------"
122 echo "--> Proceeding with make install ..."
123 echo "-------------------------------------------------------"
125 make DESTDIR="${pkgdir}" texmf="$pkgdir"/usr/share/texmf install
126 rm -rf "${pkgdir}"/usr/{texmf,share/texmf-dist}
128 ## symlink engines by hand. texlinks has moved to texlive-core...
129 mkdir -p "${pkgdir}"/usr/bin
130 ln -s eptex "${pkgdir}"/usr/bin/platex
131 ln -s euptex "${pkgdir}"/usr/bin/uplatex
132 ln -s luatex "${pkgdir}"/usr/bin/dvilualatex
133 ln -s luatex "${pkgdir}"/usr/bin/dviluatex
134 ln -s luahbtex "${pkgdir}"/usr/bin/lualatex
135 ln -s pdftex "${pkgdir}"/usr/bin/amstex
136 ln -s pdftex "${pkgdir}"/usr/bin/cslatex
137 ln -s pdftex "${pkgdir}"/usr/bin/csplain
138 ln -s pdftex "${pkgdir}"/usr/bin/eplain
139 ln -s pdftex "${pkgdir}"/usr/bin/etex
140 ln -s pdftex "${pkgdir}"/usr/bin/jadetex
141 ln -s pdftex "${pkgdir}"/usr/bin/latex
142 ln -s tex "${pkgdir}"/usr/bin/lollipop
143 ln -s pdftex "${pkgdir}"/usr/bin/mex
144 ln -s pdftex "${pkgdir}"/usr/bin/mllatex
145 ln -s pdftex "${pkgdir}"/usr/bin/mltex
146 ln -s pdftex "${pkgdir}"/usr/bin/pdfetex
147 ln -s pdftex "${pkgdir}"/usr/bin/pdfcslatex
148 ln -s pdftex "${pkgdir}"/usr/bin/pdfcsplain
149 ln -s pdftex "${pkgdir}"/usr/bin/pdfjadetex
150 ln -s pdftex "${pkgdir}"/usr/bin/pdflatex
151 ln -s pdftex "${pkgdir}"/usr/bin/pdfmex
152 ln -s pdftex "${pkgdir}"/usr/bin/pdfxmltex
153 ln -s pdftex "${pkgdir}"/usr/bin/texsis
154 ln -s pdftex "${pkgdir}"/usr/bin/utf8mex
155 ln -s pdftex "${pkgdir}"/usr/bin/xmltex
156 ln -s xetex "${pkgdir}"/usr/bin/xelatex
158 #############################################################
159 # remove dangling symlinks
160 _bibtexextra_scripts="
329 _games_scripts="rubikrotation"
330 _humanities_scripts="diadia"
331 _langcyrillic_scripts="rubibtex rumakeindex"
332 _langextra_scripts="ebong"
333 _langgreek_scripts="mkgrkindex"
334 _langjapanese_scripts="convbkmk ptex2pdf
335 kanji-fontmap-creator
337 kanji-config-updmap-sys
338 kanji-config-updmap-user
340 _langkorean_scripts="jamo-normalize komkindex ttf2kotexfont"
341 _latexextra_scripts="
344 hyperxmp-add-bytecount
360 _music_scripts="lily-glyph-commands lily-image-commands lily-rebuild-pdfs
375 _pstricks_scripts="pedigree pst2pdf"
376 _science_scripts="pygmentex ulqda"
378 ${_bibtexextra_scripts} \
381 ${_htmlxml_scripts} \
382 ${_humanities_scripts} \
383 ${_langcyrillic_scripts} \
384 ${_langextra_scripts} \
385 ${_langgreek_scripts} \
386 ${_langjapanese_scripts} \
387 ${_langkorean_scripts} \
388 ${_latexextra_scripts} \
390 ${_pictures_scripts} \
391 ${_pstricks_scripts} \
392 ${_science_scripts} \
394 ! readlink -e "$pkgdir"/usr/bin/$s && rm "$pkgdir"/usr/bin/$s
395 if [[ -f "$pkgdir/usr/share/man/man1/${s%.*}.1" ]]; then
396 rm -vf "$pkgdir/usr/share/man/man1/${s%.*}.1"
399 ###################################################################
401 # Install old ConTeXt stubs
402 cd "$srcdir/texlive-source"
403 for stub in context contextjit luatools mtxrun mtxrunjit texexec texmfstart; do
404 install -m755 texk/texlive/linked_scripts/context/stubs/unix/"$stub" "$pkgdir/usr/bin/$stub"
408 rm -f "$pkgdir"/usr/include/synctex/*
409 rm -f "$pkgdir"/usr/lib/libsynctex.*
410 rm -f "$pkgdir"/usr/lib/pkgconfig/synctex.pc
411 rm -f "$pkgdir"/usr/share/man/man*/synctex.*