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