archrelease: copy trunk to extra-x86_64
[arch-packages.git] / texlive-bin / repos / extra-x86_64 / PKGBUILD
blobad96398e95735dca91dea59f038786b0819264b9
1 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
2 # Contributor: francois <francois.archlinux.org>
4 pkgname=('texlive-bin' 'libsynctex')
5 pkgver=2021.59745
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=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}")
16 sha256sums=('SKIP')
18 prepare() {
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
25 build() {
26    cd "$srcdir/texlive-source"
28    #############################################################
29    ### configure
30    mkdir -p Work
31    cd Work
32    echo "--> Initial configuration..."
33    # we use temporary prefix to avoid messing the existing
34    # $pkgdir/usr/share/texmf tree
35    #
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 \
40      --sysconfdir=/etc \
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 \
47      --disable-dialog \
48      --disable-psutils \
49      --disable-t1utils \
50      --disable-bibtexu \
51      --disable-xz \
52      --enable-shared \
53      --disable-static \
54      --with-system-zlib \
55      --with-system-zziplib \
56      --with-system-pnglib \
57      --with-system-ncurses \
58      --with-system-t1lib \
59      --with-system-gd \
60      --with-system-freetype2 \
61      --with-system-pixman \
62      --with-system-cairo \
63      --with-system-harfbuzz \
64      --with-system-graphite \
65      --with-system-icu \
66      --with-system-gmp \
67      --with-system-mpfr \
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 \
74      --disable-aleph \
75      --enable-luatex \
76      --with-clisp-runtime=default \
77      --enable-xindy --disable-xindy-rules --disable-xindy-docs
78    #############################################################
79    ### make
80    echo "-------------------------------------------------------"
81    echo "--> Building the whole beast ..."
82    echo "-------------------------------------------------------"
83    make
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'
100             'libsynctex')
101    provides=('lcdf-typetools' 'kpathsea' 'xindy')
102    optdepends=('ed: for texconfig'
103                'biber: for bibliography processing')
104    options=('!strip')
106    cd "$srcdir/texlive-source"
108    #############################################################
109    ### install
110    # fixes for xindy
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 "-------------------------------------------------------"
116    cd Work
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="
153 bbl2bib
154 bib2gls
155 bibdoiadd
156 bibexport
157 bibmradd
158 biburl2doi
159 bibzbladd
160 convertgls2bib
161 listbib
162 ltx2crossrefxml
163 multibibliography
164 urlbst
166    _core_scripts="
167 a2ping
168 a5toa4
169 adhocfilelist
170 afm2afm
171 albatross
172 allcm
173 allec
174 allneeded
175 arara
176 arlatex
177 autoinst
178 bundledoc
179 checkcites
180 checklistings
181 chklref
182 chkweb
183 cjk-gs-integrate
184 cluttex
185 cllualatex
186 clxelatex
187 context
188 contextjit
189 ctanbib
190 ctanify
191 ctanupload
192 ctan-o-mat
193 de-macro
194 depythontex
195 deweb
196 dosepsbin
197 dtxgen
198 dvi2fax
199 dviasm
200 dviinfox
201 dvired
202 e2pall
203 epstopdf
204 findhyph
205 fmtutil
206 fmtutil-sys
207 fmtutil-user
208 fontinst
209 fragmaster
210 git-latexdiff
212 htcontext
213 htlatex
214 htmex
215 httex
216 httexi
217 htxelatex
218 htxetex
219 installfont-tl
220 jfmutil
221 ketcindy
222 kpsepath
223 kpsetool
224 kpsewhere
225 kpsexpand
226 latex-git-log
227 latex-papersize
228 latex2man
229 latex2nemeth
230 latexdef
231 latexdiff
232 latexdiff-vc
233 latexfileversion
234 latexindent
235 latexmk
236 latexpand
237 latexrevise
238 listings-ext.sh
239 llmk
240 ltxfileinfo
241 ltximg
242 luaotfload-tool
243 luatools
244 lwarpmk
245 make4ht
246 match_parens
247 mf2pt1
248 mk4ht
249 mkjobtexmf
250 mkt1font
251 mktexfmt
252 mktexlsr
253 mktexmf
254 mktexpk
255 mktextfm
256 mptopdf
257 mtxrun
258 mtxrunjit
259 ot2kpx
260 pamphletangler
261 pdfatfi
262 pdfbook2
263 pdfcrop
264 pdfjam
265 pdflatexpicscale
266 pdftex-quiet
267 pdfxup
268 pfarrei
269 pkfix
270 pkfix-helper
271 ps2eps
272 ps2frag
273 pslatex
274 purifyeps
275 pythontex
276 repstopdf
277 rpdfcrop
278 rungs
279 simpdftex
280 spix
281 srcredact
282 sty2dtx
283 tex4ebook
284 texconfig
285 texconfig-dialog
286 texconfig-sys
287 texcount
288 texdef
289 texdiff
290 texdirflatten
291 texdoc
292 texdoctk
293 texexec
294 texfot
295 texhash
296 texindy
297 texlinks
298 texliveonfly
299 texloganalyser
300 texmfstart
301 texosquery
302 texosquery-jre5
303 texosquery-jre8
304 texplate
305 thumbpdf
306 tlcockpit
307 tlshell
308 typeoutfileinfo
309 updmap
310 updmap-sys
311 updmap-user
312 vpl2ovp
313 vpl2vpl
314 xhlatex
315 xindex
316 xindy
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
325 kanji-config-updmap
326 kanji-config-updmap-sys
327 kanji-config-updmap-user
329    _langkorean_scripts="jamo-normalize komkindex ttf2kotexfont"
330    _latexextra_scripts="
331 authorindex
332 exceltex
333 hyperxmp-add-bytecount
334 l3build
335 makedtx
336 makeglossaries
337 makeglossaries-lite
338 pdfannotextractor
339 perltex
340 ps4pdf
341 splitindex
342 svn-multi
344 webquiz
345 wordcount
346 yplan"
347    _music_scripts="lily-glyph-commands lily-image-commands lily-rebuild-pdfs
348 m-tx
349 musixtex
350 musixflx
351 pmxchords"
352    _pictures_scripts="
353 cachepic
354 epspdf
355 epspdftk
356 fig4latex
357 getmapdl
358 mathspic
359 mkpic
360 pn2pdf
361 tikztosvg"
362    _pstricks_scripts="pedigree pst2pdf"
363    _science_scripts="pygmentex ulqda"
364    for s in \
365         ${_bibtexextra_scripts} \
366         ${_core_scripts}        \
367         ${_games_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} \
376         ${_music_scripts}      \
377         ${_pictures_scripts}   \
378         ${_pstricks_scripts}   \
379         ${_science_scripts}    \
380         tlmgr; do
381        ! readlink -e "$pkgdir"/usr/bin/$s && rm "$pkgdir"/usr/bin/$s
382    done
383    ###################################################################
385    # remove libsynctex
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.*