PKGBUILD 9.6 KB

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