PKGBUILD 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. # Maintainer (arch): Rémy Oudompheng <remy@archlinux.org>
  2. # Contributor: André Silva <emulatorman@hyperbola.info>
  3. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  4. # Contributor: Michał Masłowski <mtjm@mtjm.eu>
  5. # Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
  6. _pkgname=texlive-core-libre
  7. pkgname=texlive-core
  8. pkgver=2023.66587
  9. _revnr=${pkgver#2023.}
  10. pkgrel=2
  11. pkgrel+=.par1
  12. pkgdesc="TeX Live core distribution"
  13. pkgdesc+=", without nonfree add-on packages (Parabola rebranded)"
  14. license=('GPL')
  15. arch=(any)
  16. depends=('texlive-bin' 'perl')
  17. makedepends=('subversion')
  18. optdepends=(
  19. 'dialog: for texconfig'
  20. 'ghostscript: for epstopdf, epspdf and other ConTeXt tools'
  21. 'java-runtime: for utilities like arara, texplate'
  22. 'perl-tk: for texdoctk'
  23. 'psutils: to manipulate the output of dvips'
  24. 'python: for de-macro, dviasm, pythontex'
  25. 'ruby: for old ConTeXT MkII and epspdf'
  26. 't1utils: can be useful when installing Type1 fonts'
  27. 'wdiff: for texdiff'
  28. )
  29. groups=('texlive-most')
  30. conflicts=('tetex' 'texlive-latex3' 'pdfjam'
  31. 'texlive-genericextra'
  32. 'texlive-plainextra')
  33. provides=('tetex' 'texlive-latex3' 'pdfjam'
  34. 'texlive-genericextra'
  35. 'texlive-plainextra')
  36. replaces=('tetex' 'texlive-latex3' 'pdfjam'
  37. 'texlive-genericextra'
  38. 'texlive-plainextra')
  39. url='http://tug.org/texlive/'
  40. mksource=("https://sources.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip")
  41. mksha256sums=('2cdaf356d89351e61152243f1192a5e000a9586c67b873737f01878a3e5724ff')
  42. noextract=("$pkgname-$pkgver-src.zip")
  43. source=("https://repo.parabola.nu/other/$_pkgname/$_pkgname-$pkgver-src.tar.xz"{,.sig}
  44. "$pkgname.maps"
  45. "$pkgname.fmts"
  46. "texlive-man::svn://tug.org/texlive/tags/texlive-2023.0/Master/texmf-dist/doc/man#revision=${_revnr}"
  47. "mktexlsr.hook"
  48. "mktexlsr.script"
  49. "texlive-updmap.hook"
  50. "texlive-updmap.script"
  51. "texlive-fmtutil.hook"
  52. "texlive-fmtutil.script"
  53. "texmf.cnf"
  54. "texmfcnf.lua"
  55. "09-texlive-fonts.conf")
  56. install=texlive.install
  57. backup=(etc/texmf/web2c/texmf.cnf \
  58. etc/texmf/chktex/chktexrc \
  59. etc/texmf/dvipdfmx/dvipdfmx.cfg \
  60. etc/texmf/dvips/config/config.ps \
  61. etc/texmf/tex/generic/config/language.dat \
  62. etc/texmf/tex/generic/config/language.def \
  63. etc/texmf/tex/generic/tex-ini-files/pdftexconfig.tex \
  64. etc/texmf/ttf2pk/ttf2pk.cfg \
  65. etc/texmf/web2c/fmtutil.cnf \
  66. etc/texmf/web2c/mktex.cnf \
  67. etc/texmf/xdvi/XDvi)
  68. sha256sums=('ec1b572a3fd372410bf3465eb7687889072213976213c67a7f11f1ee5f22917c'
  69. 'SKIP'
  70. 'bbed1c20c91daca967e344505b9dd4e502569365709ce6b87be5510c2ebb98ef'
  71. '7da46b34158b7fd997e494adaffdc5778617706680ba8124343d9973c2b1e965'
  72. 'SKIP'
  73. 'c76f01fe2a42e5860f7d0b2f16a4fc09101e1a14ea7488985e914cda749f1a21'
  74. '05afeae62a5d4c9de79c838c9636e2aefe9ad1d6b787fed4e5930c13baf60eba'
  75. '2141c0842668fb937fd21ca2fae39b642c9665656e404a0d4ee7bdc477bf51fe'
  76. 'ee6e76192a5ad880a2152cd7900b86c8465239fb228045a2f8360b0d7a449f4a'
  77. 'b641550fe7727422b6964d505db7dbc35b3680a9d47b8d97ac550828bdb9bac7'
  78. 'f96e9f815fa0a4b85e677f2a9215d9106b8abe46eceb3f3e36a6c76eda3e4a85'
  79. '387c123ab6efe9c51ab7eeb9c20a0cbe6c3b94887d717ca3da2e15b66dc963f8'
  80. '0b6c3ee516608ce04d7133db52cadfa1be5d885b3f82bb39dc5897b213847e0d'
  81. '5e79c40cf3ab93348fc89e97890198601767ea2c8fea89ea76088c17a2b35962')
  82. validpgpkeys=('1B8C5E87702444D3D825CC8086ED62396D5DBA58' # Omar Vega Ramos
  83. '38D33EF29A7691134357648733466E12EC7BA943' # Isaac David
  84. '3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40' # bill-auger
  85. 'BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin
  86. mksource() {
  87. mkdir $pkgname-$pkgver
  88. pushd $pkgname-$pkgver
  89. bsdtar xfv ../$pkgname-$pkgver-src.zip
  90. # remove nonfree packages
  91. # MeX licensed packages
  92. rm -v {cc-pl,cs,mex,pl}.tar.xz
  93. # public domain, will be relicensed
  94. rm -v context-{account,algorithmic,letter,ruby}.tar.xz
  95. # no specific free license
  96. rm -v euro-ce.tar.xz
  97. popd
  98. }
  99. prepare() {
  100. cd "$srcdir/$pkgname-$pkgver"
  101. echo -n " --> extracting all packages... "
  102. for p in *.tar.xz; do
  103. bsdtar -xf $p
  104. done
  105. echo "done"
  106. rm -rf source doc
  107. # remove nonfree packages references from updmap.cfg
  108. sed -i '/ccpl.map/d' texmf-dist/web2c/updmap.cfg
  109. sed -i '/cs-charter.map/d' texmf-dist/web2c/updmap.cfg
  110. sed -i '/csfonts.map/d' texmf-dist/web2c/updmap.cfg
  111. sed -i '/plother.map/d' texmf-dist/web2c/updmap.cfg
  112. sed -i '/pltext.map/d' texmf-dist/web2c/updmap.cfg
  113. # remove nonfree packages references from texlive-core.maps
  114. sed -i '/ccpl.map/d' $srcdir/$pkgname.maps
  115. sed -i '/cs-charter.map/d' $srcdir/$pkgname.maps
  116. sed -i '/csfonts.map/d' $srcdir/$pkgname.maps
  117. sed -i '/plother.map/d' $srcdir/$pkgname.maps
  118. sed -i '/pltext.map/d' $srcdir/$pkgname.maps
  119. # remove nonfree packages references from fmtutil.cnf
  120. sed -i '/cslatex/d' texmf-dist/web2c/fmtutil.cnf
  121. sed -i '/csplain/d' texmf-dist/web2c/fmtutil.cnf
  122. sed -i '/from mex/d' texmf-dist/web2c/fmtutil.cnf
  123. sed -i '/mexconf.tex/d' texmf-dist/web2c/fmtutil.cnf
  124. # remove nonfree packages references from package list
  125. sed -ri '/^(cc-pl|cs|mex|pl|context-(account|algorithmic|fixme|games|letter|ruby)|euro-ce) /d' CONTENTS
  126. }
  127. package() {
  128. cd "$srcdir/$pkgname-$pkgver"
  129. # Install packages.
  130. install -m755 -d "$pkgdir"/var/lib/texmf/arch/installedpkgs
  131. sed -i '/^#/d' CONTENTS
  132. install -m644 CONTENTS "$pkgdir"/var/lib/texmf/arch/installedpkgs/${pkgname}_${_revnr}.pkgs
  133. install -m644 "$srcdir"/$pkgname.maps "$pkgdir"/var/lib/texmf/arch/installedpkgs/
  134. install -m644 "$srcdir"/$pkgname.fmts "$pkgdir"/var/lib/texmf/arch/installedpkgs/
  135. install -m755 -d "$pkgdir"/usr/share
  136. wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && [[ $d != texlive-man ]] && echo $d; done) || true
  137. for dir in $wanteddirs; do
  138. find $dir -type d -exec install -d -m755 "$pkgdir"/usr/share/texmf-dist/'{}' \;
  139. find $dir -type f -exec install -m644 '{}' "$pkgdir"/usr/share/texmf-dist/'{}' \;
  140. done
  141. find texmf-dist -type d -exec install -d -m755 "$pkgdir"/usr/share/'{}' \;
  142. find texmf-dist -type f -exec install -m644 '{}' "$pkgdir"/usr/share/'{}' \;
  143. find texmf-dist -type f -executable -exec chmod 755 "$pkgdir"/usr/share/'{}' \;
  144. #############################################################
  145. ### install texmf tree
  146. echo "--> installing the /etc/texmf tree"
  147. install -d -m755 "$pkgdir"/etc/texmf/web2c
  148. install -d -m755 "$pkgdir"/etc/texmf/chktex
  149. install -d -m755 "$pkgdir"/etc/texmf/dvips/config
  150. install -d -m755 "$pkgdir"/etc/texmf/dvipdfmx
  151. install -d -m755 "$pkgdir"/etc/texmf/tex/generic/config
  152. install -d -m755 "$pkgdir"/etc/texmf/tex/generic/tex-ini-files
  153. install -d -m755 "$pkgdir"/etc/texmf/ttf2pk
  154. install -d -m755 "$pkgdir"/etc/texmf/xdvi
  155. install -d -m755 "$pkgdir"/usr/share/fontconfig/conf.avail
  156. install -m644 "$srcdir"/09-texlive-fonts.conf \
  157. "$pkgdir"/usr/share/fontconfig/conf.avail/
  158. # Remove manpages (already in texlive-bin).
  159. rm -rf "$pkgdir"/usr/share/texmf-dist/doc/man
  160. # copy config files to $TEXMFCONFIG tree
  161. cp -a "$pkgdir"/usr/share/texmf-dist/chktex/chktexrc \
  162. "$pkgdir"/etc/texmf/chktex/
  163. cp -a "$pkgdir"/usr/share/texmf-dist/web2c/mktex.cnf \
  164. "$pkgdir"/etc/texmf/web2c/
  165. cp -a "$pkgdir"/usr/share/texmf-dist/web2c/updmap-hdr.cfg \
  166. "$pkgdir"/etc/texmf/web2c/
  167. cp -a "$pkgdir"/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf \
  168. "$pkgdir"/etc/texmf/web2c/fmtutil.cnf
  169. cp -a "$pkgdir"/usr/share/texmf-dist/dvips/config/config.ps \
  170. "$pkgdir"/etc/texmf/dvips/config/
  171. cp -a "$pkgdir"/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg \
  172. "$pkgdir"/etc/texmf/dvipdfmx/
  173. cp -a "$pkgdir"/usr/share/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex \
  174. "$pkgdir"/etc/texmf/tex/generic/tex-ini-files/
  175. cp -a "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.dat \
  176. "$pkgdir"/etc/texmf/tex/generic/config/
  177. cp -a "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.def \
  178. "$pkgdir"/etc/texmf/tex/generic/config/
  179. cp -a "$pkgdir"/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg \
  180. "$pkgdir"/etc/texmf/ttf2pk/
  181. cp -a "$pkgdir"/usr/share/texmf-dist/xdvi/XDvi \
  182. "$pkgdir"/etc/texmf/xdvi/
  183. # remove TL specific warnings in the language.{dat,def} files:
  184. sed -i -e '/DO NOT EDIT/,+3 d' "$pkgdir"/etc/texmf/tex/generic/config/language.*
  185. # replace upstream texmf.cnf with ours
  186. rm -f "$pkgdir"/usr/share/texmf-dist/web2c/texmf.cnf
  187. install -m644 "$srcdir"/texmf.cnf "$pkgdir"/etc/texmf/web2c/texmf.cnf
  188. # since the location of texmf.cnf is hard-wired to be under /usr/share/texmf/web2c
  189. # we make a symlink from /etc/texmf/web2c/texmf.cnf to the latter
  190. ln -sf /etc/texmf/web2c/texmf.cnf "$pkgdir"/usr/share/texmf-dist/web2c/texmf.cnf
  191. # replace upstream texmfcnf.lua with ours
  192. install -m644 "$srcdir"/texmfcnf.lua "$pkgdir"/usr/share/texmf-dist/web2c/texmfcnf.lua
  193. # install Perl libraries
  194. mv "$pkgdir"/usr/share/texmf-dist/tlpkg "$pkgdir"/usr/share
  195. rm -rf "$pkgdir"/usr/share/tlpkg/tlpobj
  196. ## install pacman hooks
  197. install -D -m644 ${srcdir}/mktexlsr.hook "$pkgdir/usr/share/libalpm/hooks/mktexlsr.hook"
  198. install -D -m644 ${srcdir}/texlive-updmap.hook "$pkgdir/usr/share/libalpm/hooks/texlive-updmap.hook"
  199. install -D -m644 ${srcdir}/texlive-fmtutil.hook "$pkgdir/usr/share/libalpm/hooks/texlive-fmtutil.hook"
  200. install -D -m755 ${srcdir}/mktexlsr.script "$pkgdir/usr/share/libalpm/scripts/mktexlsr"
  201. install -D -m755 ${srcdir}/texlive-updmap.script "$pkgdir/usr/share/libalpm/scripts/texlive-updmap"
  202. install -D -m755 ${srcdir}/texlive-fmtutil.script "$pkgdir/usr/share/libalpm/scripts/texlive-fmtutil"
  203. # remove upstream updmap.cfg: it contains too many maps.
  204. rm "${pkgdir}/usr/share/texmf-dist/web2c/updmap.cfg"
  205. # remove upstream fmtutil.cnf: it will be autogenerated
  206. rm "${pkgdir}/usr/share/texmf-dist/web2c/fmtutil.cnf"
  207. # more cleanup
  208. rm -rf "$pkgdir/usr/share/texmf-dist/scripts/context/stubs/mswin/"
  209. # link programs from /usr/share/texmf-dist/scripts
  210. # texaccents is a SNOBOL program and will not be linked
  211. _linked_scripts="
  212. a2ping/a2ping.pl
  213. accfonts/mkt1font
  214. accfonts/vpl2ovp
  215. accfonts/vpl2vpl
  216. adhocfilelist/adhocfilelist.sh
  217. albatross/albatross.sh
  218. arara/arara.sh
  219. attachfile2/pdfatfi.pl
  220. bundledoc/arlatex
  221. bundledoc/bundledoc
  222. checkcites/checkcites.lua
  223. checklistings/checklistings.sh
  224. chklref/chklref.pl
  225. chktex/chkweb.sh
  226. chktex/deweb.pl
  227. cjk-gs-integrate/cjk-gs-integrate.pl
  228. clojure-pamphlet/pamphletangler
  229. cluttex/cluttex.lua
  230. context/perl/mptopdf.pl
  231. ctan-o-mat/ctan-o-mat.pl
  232. ctanbib/ctanbib
  233. ctanify/ctanify
  234. ctanupload/ctanupload.pl
  235. de-macro/de-macro
  236. dosepsbin/dosepsbin.pl
  237. digestif/digestif.texlua
  238. dtxgen/dtxgen
  239. dviasm/dviasm.py
  240. dviinfox/dviinfox.pl
  241. epstopdf/epstopdf.pl
  242. findhyph/findhyph
  243. fontools/afm2afm
  244. fontools/autoinst
  245. fontools/ot2kpx
  246. fragmaster/fragmaster.pl
  247. git-latexdiff/git-latexdiff
  248. installfont/installfont-tl
  249. jfmutil/jfmutil.pl
  250. ketcindy/ketcindy.sh
  251. latex-git-log/latex-git-log
  252. latex-papersize/latex-papersize.py
  253. latex2man/latex2man
  254. latex2nemeth/latex2nemeth
  255. latexdiff/latexdiff-vc.pl
  256. latexdiff/latexdiff.pl
  257. latexdiff/latexrevise.pl
  258. latexfileversion/latexfileversion
  259. latexindent/latexindent.pl
  260. latexmk/latexmk.pl
  261. latexpand/latexpand
  262. light-latex-make/llmk.lua
  263. ltxfileinfo/ltxfileinfo
  264. ltximg/ltximg.pl
  265. luafindfont/luafindfont.lua
  266. luaotfload/luaotfload-tool.lua
  267. lwarp/lwarpmk.lua
  268. make4ht/make4ht
  269. match_parens/match_parens
  270. mf2pt1/mf2pt1.pl
  271. mkjobtexmf/mkjobtexmf.pl
  272. optexcount/optexcount
  273. pdfbook2/pdfbook2
  274. pdfcrop/pdfcrop.pl
  275. pdfjam/pdfjam
  276. pdflatexpicscale/pdflatexpicscale.pl
  277. pdftex-quiet/pdftex-quiet
  278. pdfxup/pdfxup
  279. pfarrei/a5toa4.tlu
  280. pfarrei/pfarrei.tlu
  281. pkfix-helper/pkfix-helper
  282. pkfix/pkfix.pl
  283. ps2eps/ps2eps.pl
  284. purifyeps/purifyeps
  285. pythontex/depythontex.py
  286. pythontex/pythontex.py
  287. simpdftex/simpdftex
  288. spix/spix.py
  289. srcredact/srcredact.pl
  290. sty2dtx/sty2dtx.pl
  291. tex4ebook/tex4ebook
  292. tex4ht/ht.sh
  293. tex4ht/htcontext.sh
  294. tex4ht/htlatex.sh
  295. tex4ht/htmex.sh
  296. tex4ht/httex.sh
  297. tex4ht/httexi.sh
  298. tex4ht/htxelatex.sh
  299. tex4ht/htxetex.sh
  300. tex4ht/mk4ht.pl
  301. tex4ht/xhlatex.sh
  302. texcount/texcount.pl
  303. texdef/texdef.pl
  304. texdiff/texdiff
  305. texdirflatten/texdirflatten
  306. texdoc/texdoc.tlu
  307. texdoctk/texdoctk.pl
  308. texfot/texfot.pl
  309. texlive-extra/allcm.sh
  310. texlive-extra/allneeded.sh
  311. texlive-extra/dvi2fax.sh
  312. texlive-extra/dvired.sh
  313. texlive-extra/e2pall.pl
  314. texlive-extra/fontinst.sh
  315. texlive-extra/kpsetool.sh
  316. texlive-extra/kpsewhere.sh
  317. texlive-extra/ps2frag.sh
  318. texlive-extra/pslatex.sh
  319. texlive-extra/texconfig-dialog.sh
  320. texlive-extra/texconfig-sys.sh
  321. texlive-extra/texconfig.sh
  322. texlive-extra/texlinks.sh
  323. texlive-extra/xelatex-unsafe.sh
  324. texlive-extra/xetex-unsafe.sh
  325. texlive/fmtutil-sys.sh
  326. texlive/fmtutil-user.sh
  327. texlive/fmtutil.pl
  328. texlive/mktexlsr
  329. texlive/mktexmf
  330. texlive/mktexpk
  331. texlive/mktextfm
  332. texlive/rungs.lua
  333. texlive/updmap-sys.sh
  334. texlive/updmap-user.sh
  335. texlive/updmap.pl
  336. texliveonfly/texliveonfly.py
  337. texloganalyser/texloganalyser
  338. texlogfilter/texlogfilter
  339. texlogsieve/texlogsieve
  340. texplate/texplate.sh
  341. thumbpdf/thumbpdf.pl
  342. typeoutfileinfo/typeoutfileinfo.sh
  343. xindex/xindex.lua
  344. xindy/texindy.pl
  345. xindy/xindy.pl
  346. "
  347. install -m755 -d "$pkgdir/usr/bin"
  348. install -m755 -d "$pkgdir/usr/share/man/man1"
  349. for _script in ${_linked_scripts}; do
  350. _scriptbase=$(basename $_script)
  351. _scriptbase=${_scriptbase%.*}
  352. ln -s /usr/share/texmf-dist/scripts/${_script} "${pkgdir}/usr/bin/${_scriptbase}"
  353. if [[ -f "$srcdir/texlive-man/man1/${_scriptbase}.1" ]]; then
  354. install -m644 "$srcdir/texlive-man/man1/${_scriptbase}.1" "${pkgdir}/usr/share/man/man1/"
  355. fi
  356. done
  357. ln -s /usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh "${pkgdir}/usr/bin/listings-ext.sh"
  358. # additional symlinks
  359. ln -s allcm "${pkgdir}"/usr/bin/allec
  360. ln -s cluttex "${pkgdir}"/usr/bin/cllualatex
  361. ln -s cluttex "${pkgdir}"/usr/bin/clxelatex
  362. ln -s epstopdf "${pkgdir}"/usr/bin/repstopdf
  363. ln -s fmtutil "${pkgdir}"/usr/bin/mktexfmt
  364. ln -s kpsetool "${pkgdir}"/usr/bin/kpsepath
  365. ln -s kpsetool "${pkgdir}"/usr/bin/kpsexpand
  366. ln -s luaotfload-tool "${pkgdir}"/usr/bin/mkluatexfontdb
  367. ln -s mktexlsr "${pkgdir}"/usr/bin/texhash
  368. ln -s pdfcrop "${pkgdir}"/usr/bin/rpdfcrop
  369. ln -s texdef "${pkgdir}"/usr/bin/latexdef
  370. for _scriptbase in allec kpsepath kpsexpand mktexfmt texhash; do
  371. install -m644 "$srcdir/texlive-man/man1/${_scriptbase}.1" "${pkgdir}/usr/share/man/man1/"
  372. done
  373. }