OCaml 4.14.0 rebuild
[arch-packages.git] / texlive-bin / trunk / PKGBUILD
blobc5ae40ce42482cb92fad283c7f1626b7c9dbe897
1 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
2 # Contributor: francois <francois.archlinux.org>
4 pkgname=('texlive-bin' 'libsynctex')
5 pkgver=2022.62885
6 pkgrel=1
7 license=('GPL')
8 arch=('x86_64')
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=f398692b64d6462c35939ec9489694d0828edee5 # svn://tug.org/texlive/tags/texlive-2022.0/Build/source@62885
15 source=("git+https://github.com/Tex-Live/texlive-source.git#commit=${_commit}")
16 sha256sums=('SKIP')
18 prepare() {
19     cd "$srcdir/texlive-source"
21     # bibtex-x needs kpathsea flags
22     sed -i '/AC_SEARCH_LIBS/a KPSE_KPATHSEA_FLAGS' texk/bibtex-x/configure.ac
23     (cd texk/bibtex-x && autoreconf)
24     # t4ht expects to be un /usr/share/texmf/bin/t4ht (FS#27251)
25     sed -i s/SELFAUTOPARENT/TEXMFROOT/ texk/tex4htk/t4ht.c
28 build() {
29    cd "$srcdir/texlive-source"
31    #############################################################
32    ### configure
33    mkdir -p Work
34    cd Work
35    echo "--> Initial configuration..."
36    # we use temporary prefix to avoid messing the existing
37    # $pkgdir/usr/share/texmf tree
38    #
39    # Preset float endianness to avoid a crash in cairo configure
40    # with recent toolchains. We are not building cairo anyway.
41    ax_cv_c_float_words_bigendian=no \
42      ../configure --prefix=/usr -C \
43      --sysconfdir=/etc \
44      --datarootdir=/usr/share \
45      --datadir=/usr/share \
46      --mandir=/usr/share/man \
47      --disable-native-texlive-build \
48      --with-banner-add="/Arch Linux" \
49      --disable-multiplatform \
50      --disable-dialog \
51      --disable-psutils \
52      --disable-t1utils \
53      --disable-bibtexu \
54      --disable-xz \
55      --enable-shared \
56      --disable-static \
57      --with-system-zlib \
58      --with-system-zziplib \
59      --with-system-pnglib \
60      --with-system-ncurses \
61      --with-system-t1lib \
62      --with-system-gd \
63      --with-system-freetype2 \
64      --with-system-pixman \
65      --with-system-cairo \
66      --with-system-harfbuzz \
67      --with-system-graphite \
68      --with-system-icu \
69      --with-system-gmp \
70      --with-system-mpfr \
71      --with-system-potrace \
72      --with-system-libpaper \
73      --with-freetype2-libdir=/usr/lib \
74      --with-freetype2-include=/usr/include/freetype2 \
75      --with-xdvi-x-toolkit=xaw \
76      --disable-dump-share \
77      --disable-aleph \
78      --enable-luatex \
79      --with-clisp-runtime=default \
80      --enable-xindy --disable-xindy-rules --disable-xindy-docs
81    #############################################################
82    ### make
83    echo "-------------------------------------------------------"
84    echo "--> Building the whole beast ..."
85    echo "-------------------------------------------------------"
86    make
89 package_libsynctex() {
90     pkgdesc='Library for synchronization between TeX files and resulting file'
91     depends=('glibc' 'zlib')
93     cd "${srcdir}/texlive-source/Work"
94     make -C texk/web2c DESTDIR="${pkgdir}" \
95         install-data-am install-libLTLIBRARIES
97     rm -f "$pkgdir"/usr/share/man/man1/hi*.*
100 package_texlive-bin() {
101    pkgdesc="TeX Live binaries"
102    depends=('cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler' 'ffcall'
103             'libsigsegv' 'zziplib' 'libpng' 'libjpeg' 'freetype2' 'libxcrypt'
104             'icu' 'harfbuzz' 'harfbuzz-icu' 'gmp' 'mpfr' 'potrace' 'libpaper'
105             'libsynctex')
106    provides=('lcdf-typetools' 'kpathsea' 'xindy')
107    optdepends=('ed: for texconfig'
108                'biber: for bibliography processing')
109    options=('!strip')
111    cd "$srcdir/texlive-source"
113    #############################################################
114    ### install
115    # fixes for xindy
116    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|" '{}' \;
118    echo "-------------------------------------------------------"
119    echo "--> Proceeding with make install ..."
120    echo "-------------------------------------------------------"
121    cd Work
122    make DESTDIR="${pkgdir}" texmf="$pkgdir"/usr/share/texmf install
123    rm -rf "${pkgdir}"/usr/{texmf,share/texmf-dist}
125    ## symlink engines by hand. texlinks has moved to texlive-core...
126    mkdir -p "${pkgdir}"/usr/bin
127    ln -s eptex "${pkgdir}"/usr/bin/platex
128    ln -s euptex "${pkgdir}"/usr/bin/uplatex
129    ln -s luatex "${pkgdir}"/usr/bin/dvilualatex
130    ln -s luatex "${pkgdir}"/usr/bin/dviluatex
131    ln -s luahbtex "${pkgdir}"/usr/bin/lualatex
132    ln -s pdftex "${pkgdir}"/usr/bin/amstex
133    ln -s pdftex "${pkgdir}"/usr/bin/cslatex
134    ln -s pdftex "${pkgdir}"/usr/bin/csplain
135    ln -s pdftex "${pkgdir}"/usr/bin/eplain
136    ln -s pdftex "${pkgdir}"/usr/bin/etex
137    ln -s pdftex "${pkgdir}"/usr/bin/jadetex
138    ln -s pdftex "${pkgdir}"/usr/bin/latex
139    ln -s tex "${pkgdir}"/usr/bin/lollipop
140    ln -s pdftex "${pkgdir}"/usr/bin/mex
141    ln -s pdftex "${pkgdir}"/usr/bin/mllatex
142    ln -s pdftex "${pkgdir}"/usr/bin/mltex
143    ln -s pdftex "${pkgdir}"/usr/bin/pdfetex
144    ln -s pdftex "${pkgdir}"/usr/bin/pdfcslatex
145    ln -s pdftex "${pkgdir}"/usr/bin/pdfcsplain
146    ln -s pdftex "${pkgdir}"/usr/bin/pdfjadetex
147    ln -s pdftex "${pkgdir}"/usr/bin/pdflatex
148    ln -s pdftex "${pkgdir}"/usr/bin/pdfmex
149    ln -s pdftex "${pkgdir}"/usr/bin/pdfxmltex
150    ln -s pdftex "${pkgdir}"/usr/bin/texsis
151    ln -s pdftex "${pkgdir}"/usr/bin/utf8mex
152    ln -s pdftex "${pkgdir}"/usr/bin/xmltex
153    ln -s xetex "${pkgdir}"/usr/bin/xelatex
155    #############################################################
156    # remove dangling symlinks
157    _bibtexextra_scripts="
158 bbl2bib
159 bib2gls
160 bibdoiadd
161 bibexport
162 bibmradd
163 biburl2doi
164 bibzbladd
165 citeproc
166 convertgls2bib
167 listbib
168 ltx2crossrefxml
169 multibibliography
170 urlbst
172    _core_scripts="
173 a2ping
174 a5toa4
175 adhocfilelist
176 afm2afm
177 albatross
178 allcm
179 allec
180 allneeded
181 arara
182 arlatex
183 autoinst
184 bundledoc
185 checkcites
186 checklistings
187 chklref
188 chkweb
189 cjk-gs-integrate
190 cluttex
191 cllualatex
192 clxelatex
193 context
194 contextjit
195 ctanbib
196 ctanify
197 ctanupload
198 ctan-o-mat
199 de-macro
200 depythontex
201 deweb
202 dosepsbin
203 dtxgen
204 dvi2fax
205 dviasm
206 dviinfox
207 dvired
208 e2pall
209 epstopdf
210 findhyph
211 fmtutil
212 fmtutil-sys
213 fmtutil-user
214 fontinst
215 fragmaster
216 git-latexdiff
218 htcontext
219 htlatex
220 htmex
221 httex
222 httexi
223 htxelatex
224 htxetex
225 installfont-tl
226 jfmutil
227 ketcindy
228 kpsepath
229 kpsetool
230 kpsewhere
231 kpsexpand
232 latex-git-log
233 latex-papersize
234 latex2man
235 latex2nemeth
236 latexdef
237 latexdiff
238 latexdiff-vc
239 latexfileversion
240 latexindent
241 latexmk
242 latexpand
243 latexrevise
244 listings-ext.sh
245 llmk
246 ltxfileinfo
247 ltximg
248 luafindfont
249 luaotfload-tool
250 luatools
251 lwarpmk
252 make4ht
253 match_parens
254 mf2pt1
255 mk4ht
256 mkjobtexmf
257 mkt1font
258 mktexfmt
259 mktexlsr
260 mktexmf
261 mktexpk
262 mktextfm
263 mptopdf
264 mtxrun
265 mtxrunjit
266 optexcount
267 ot2kpx
268 pamphletangler
269 pdfatfi
270 pdfbook2
271 pdfcrop
272 pdfjam
273 pdflatexpicscale
274 pdftex-quiet
275 pdfxup
276 pfarrei
277 pkfix
278 pkfix-helper
279 ps2eps
280 ps2frag
281 pslatex
282 purifyeps
283 pythontex
284 repstopdf
285 rpdfcrop
286 rungs
287 simpdftex
288 spix
289 srcredact
290 sty2dtx
291 tex4ebook
292 texconfig
293 texconfig-dialog
294 texconfig-sys
295 texcount
296 texdef
297 texdiff
298 texdirflatten
299 texdoc
300 texdoctk
301 texexec
302 texfot
303 texhash
304 texindy
305 texlinks
306 texliveonfly
307 texloganalyser
308 texlogfilter
309 texlogsieve
310 texmfstart
311 texosquery
312 texosquery-jre5
313 texosquery-jre8
314 texplate
315 thumbpdf
316 tlcockpit
317 tlshell
318 typeoutfileinfo
319 updmap
320 updmap-sys
321 updmap-user
322 vpl2ovp
323 vpl2vpl
324 xelatex-unsafe
325 xetex-unsafe
326 xhlatex
327 xindex
328 xindy
330    _games_scripts="rubikrotation"
331    _humanities_scripts="diadia"
332    _langcyrillic_scripts="rubibtex rumakeindex"
333    _langextra_scripts="ebong"
334    _langgreek_scripts="mkgrkindex"
335    _langjapanese_scripts="convbkmk ptex2pdf
336 kanji-fontmap-creator
337 kanji-config-updmap
338 kanji-config-updmap-sys
339 kanji-config-updmap-user
341    _langkorean_scripts="jamo-normalize komkindex ttf2kotexfont"
342    _latexextra_scripts="
343 authorindex
344 exceltex
345 hyperxmp-add-bytecount
346 l3build
347 makedtx
348 makeglossaries
349 makeglossaries-lite
350 pdfannotextractor
351 perltex
352 ps4pdf
353 splitindex
354 svn-multi
356 webquiz
357 wordcount
358 yplan"
359    _music_scripts="lily-glyph-commands lily-image-commands lily-rebuild-pdfs
360 m-tx
361 musixtex
362 musixflx
363 pmxchords"
364    _pictures_scripts="
365 cachepic
366 epspdf
367 epspdftk
368 fig4latex
369 getmapdl
370 mathspic
371 mkpic
372 pn2pdf
373 tikztosvg"
374    _pstricks_scripts="pedigree pst2pdf"
375    _science_scripts="pygmentex ulqda"
376    for s in \
377         ${_bibtexextra_scripts} \
378         ${_core_scripts}        \
379         ${_games_scripts}       \
380         ${_htmlxml_scripts}     \
381         ${_humanities_scripts}   \
382         ${_langcyrillic_scripts} \
383         ${_langextra_scripts}    \
384         ${_langgreek_scripts}    \
385         ${_langjapanese_scripts} \
386         ${_langkorean_scripts} \
387         ${_latexextra_scripts} \
388         ${_music_scripts}      \
389         ${_pictures_scripts}   \
390         ${_pstricks_scripts}   \
391         ${_science_scripts}    \
392         tlmgr; do
393        ! readlink -e "$pkgdir"/usr/bin/$s && rm "$pkgdir"/usr/bin/$s
394        if [[ -f "$pkgdir/usr/share/man/man1/${s%.*}.1" ]]; then
395            rm -vf "$pkgdir/usr/share/man/man1/${s%.*}.1"
396        fi
397    done
398    ###################################################################
400    # remove libsynctex
401    rm -f "$pkgdir"/usr/include/synctex/*
402    rm -f "$pkgdir"/usr/lib/libsynctex.*
403    rm -f "$pkgdir"/usr/lib/pkgconfig/synctex.pc
404    rm -f "$pkgdir"/usr/share/man/man*/synctex.*