PKGBUILD 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. # Maintainer (arch): Antonio Rojas <arojas@archlinux.org>
  2. # Maintainer (arch): Caleb Maclennan <caleb@alerque.com>
  3. # Contributor: Rémy Oudompheng <remy@archlinux.org>
  4. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  5. # Contributor: André Silva <emulatorman@hyperbola.info>
  6. # Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
  7. # Contributor: Michał Masłowski <mtjm@mtjm.eu>
  8. # Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
  9. # Contributor: bill-auger <bill-auger@programmer.net>
  10. # parabola changes and rationale:
  11. # - remove non-free add-on packages
  12. pkgbase=texlive-texmf
  13. pkgname=(texlive-doc texlive-meta)
  14. # generate collections with ./list-collections
  15. _collections=( basic bibtexextra binextra context fontsextra fontsrecommended fontutils formatsextra games humanities langarabic langchinese langcjk langcyrillic langczechslovak langenglish langeuropean langfrench langgerman langgreek langitalian langjapanese langkorean langother langpolish langportuguese langspanish latex latexextra latexrecommended luatex mathscience metapost music pictures plaingeneric pstricks publishers xetex )
  16. for _coll in ${_collections[@]}; do
  17. pkgname+=(texlive-$_coll)
  18. done
  19. _rev=70897
  20. pkgver=2024.2
  21. pkgrel=3
  22. pkgdesc='TeX Live - '
  23. license=(GPL)
  24. arch=(any)
  25. depends=(texlive-bin)
  26. makedepends=(subversion)
  27. url='https://tug.org/texlive/'
  28. source=(svn://tug.org/texlive/tags/texlive-$pkgver/Master/texmf-dist#revision=$_rev
  29. svn://tug.org/texlive/tags/texlive-$pkgver/Master/tlpkg#revision=$_rev
  30. svn://tug.org/texlive/tags/texlive-$pkgver/Master/bin/x86_64-linux#revision=$_rev
  31. 09-texlive-fonts.conf
  32. texmf.cnf.patch
  33. texmfcnf.lua.patch
  34. 70-mktexlsr.hook
  35. 71-texlive-language.hook
  36. texlive-language.script
  37. 72-texlive-fmtutil.hook
  38. texlive-fmtutil.script
  39. 73-texlive-updmap.hook
  40. texlive-updmap.script
  41. 80-mtxrun.hook
  42. mtxrun.script
  43. https://github.com/rrthomas/pdfjam/commit/f9b86dcf.patch)
  44. sha256sums=('SKIP'
  45. 'SKIP'
  46. 'SKIP'
  47. '5e79c40cf3ab93348fc89e97890198601767ea2c8fea89ea76088c17a2b35962'
  48. '204245fb6f72091c72ad78727ce970a9d03795ef6cab35b9e5d7cf69630ed171'
  49. '13932156d6c46cd8d2c19d92f574d92a7aa461928fce793fc06835714b768bc9'
  50. '95f6540c49b11f1ece8010d76b53ca90efd61e1831530562bfcde4350f6c1db1'
  51. 'e6d399faee55ba461cf7e617f2369f5c516de292b28afc6665c9e3fe2b821973'
  52. 'c64c2a6371e94b0f67799c0ac84ea74d8edbc181b26672aa15b8132ec5fbabc3'
  53. '9b99f197c71149b03355f7c24ee1e07f54a1262bb030756fe660b9aa715a184f'
  54. 'f96e9f815fa0a4b85e677f2a9215d9106b8abe46eceb3f3e36a6c76eda3e4a85'
  55. '2141c0842668fb937fd21ca2fae39b642c9665656e404a0d4ee7bdc477bf51fe'
  56. 'ee6e76192a5ad880a2152cd7900b86c8465239fb228045a2f8360b0d7a449f4a'
  57. 'f6bb67db32d37ca15eba88bd15d8b9882c61915f98bc8d7c3c21a66c8cf8f019'
  58. '98b730e917281227e29077ba5689ad78baee0af3859b55966b2604c6a85f1305'
  59. '5f027b8a2492d89a04c2083c0628ff2305b2646412a1e7bdf79a498b98d08d6a')
  60. options=(!strip) # Nothing to strip, save packaging time
  61. ## parabola mksource over-rides ##
  62. # _N_MKSOURCES=3 # number of sources=() to be isolated for mksource
  63. # _N_MKKEYS=0 # number of validpgpkeys=() to be isolated for mksource
  64. # mksource=( ${source[*]: 0:${_N_MKSOURCES}} )
  65. # mksha256sums=( ${sha256sums[*]: 0:${_N_MKSOURCES}} )
  66. # mkvalidpgpkeys=( ${validpgpkeys[*]:0:${_N_MKKEYS}} )
  67. # source=( https://repo.parabola.nu/other/${pkgbase}/${pkgbase}-${pkgver}-src.tar.xz{,.sig}
  68. # ${source[*]:${_N_MKSOURCES}} )
  69. # sha256sums=( '0' # libre source-ball
  70. # 'SKIP'
  71. # ${sha256sums[*]:${_N_MKSOURCES}} )
  72. # validpgpkeys=( '3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40' # bill-auger
  73. # ${validpgpkeys[*]:${_N_MKKEYS}} )
  74. # mksource() {
  75. prepare() { # WIP: this should be mksource() - it is just easier for WIP without mksource
  76. # when done, un-comment the 'parabola mksource over-rides' above also
  77. # licensing reviews: https://labs.parabola.nu/issues/2698
  78. # texlive licensing epic: https://labs.parabola.nu/issues/972
  79. # original evaluation: https://wiki.parabola.nu/TeXLive_freedom_verification
  80. ## texlive-basic (formerly texlive-core) ##
  81. # MeX/Knuth license
  82. rm -rf texmf-dist/tex/mex/
  83. # WIP: verified? i suppose - we could not locate these in the new code-base
  84. # rm -v {cc-pl,cs,mex,pl}.tar.xz
  85. # WIP: verified -
  86. # context-account is PD
  87. # context-algorithmic is GPL v3 or later
  88. # context-letter is GPL
  89. # context-ruby is PD
  90. # rm -v context-{account,algorithmic,letter,ruby}.tar.xz
  91. # WIP: verified - euro-ce is Modified BSD3
  92. # rm -v euro-ce.tar.xz
  93. # WIP: the original mksource() ended here - the remainder was in prepare();
  94. # but it should not be if it was deleting non-free files
  95. # also some was from other PKGBUILDs absorbed by this one
  96. # 'texlive-fontsextra' and 'texlive-latexextra'
  97. ## texlive-fontsextra ##
  98. # WIP: verified - ogham is PD
  99. # remove nonfree packages
  100. # rm -v ogham.tar.xz
  101. ## texlive-latexextra ##
  102. # WIP: these rm commands are yet to be verified to still be necessary
  103. # remove nonfree packages
  104. # no specific free license
  105. rm -v {authoraftertitle,clock,fnpara}.tar.xz
  106. # nonfree license (CC BY-NC)
  107. rm -v axessibility.tar.xz
  108. ## texlive-basic (formerly texlive-core) ##
  109. # WIP: this code is not needed - just here as a reminder
  110. # none of these are tarballs now - they are flat files in the code-base
  111. # cd "$srcdir/$pkgname-$pkgver"
  112. # echo -n " --> extracting all packages... "
  113. # for p in *.tar.xz; do
  114. # bsdtar -xf $p
  115. # done
  116. # echo "done"
  117. # rm -rf source doc
  118. # WIP: these 14 sed commands are yet to be verified to still be necessary
  119. # remove nonfree packages references from updmap.cfg
  120. sed -i '/ccpl.map/d' texmf-dist/web2c/updmap.cfg
  121. sed -i '/cs-charter.map/d' texmf-dist/web2c/updmap.cfg
  122. sed -i '/csfonts.map/d' texmf-dist/web2c/updmap.cfg
  123. sed -i '/plother.map/d' texmf-dist/web2c/updmap.cfg
  124. sed -i '/pltext.map/d' texmf-dist/web2c/updmap.cfg
  125. # remove nonfree packages references from texlive-core.maps
  126. sed -i '/ccpl.map/d' $srcdir/$pkgname.maps
  127. sed -i '/cs-charter.map/d' $srcdir/$pkgname.maps
  128. sed -i '/csfonts.map/d' $srcdir/$pkgname.maps
  129. sed -i '/plother.map/d' $srcdir/$pkgname.maps
  130. sed -i '/pltext.map/d' $srcdir/$pkgname.maps
  131. # remove nonfree packages references from fmtutil.cnf
  132. sed -i '/cslatex/d' texmf-dist/web2c/fmtutil.cnf
  133. sed -i '/csplain/d' texmf-dist/web2c/fmtutil.cnf
  134. sed -i '/from mex/d' texmf-dist/web2c/fmtutil.cnf
  135. sed -i '/mexconf.tex/d' texmf-dist/web2c/fmtutil.cnf
  136. # WIP: verified partially
  137. # the following `sed` command has been reduced according to the findings above
  138. # however, the previous PKGBUILD did not delete context-fixme or context-games above
  139. # remove nonfree packages references from package list
  140. sed -ri '/^(context-(fixme|games)) /d' CONTENTS
  141. ## texlive-fontsextra ##
  142. # WIP: verified - ogham is PD
  143. # remove nonfree packages references from package list
  144. # sed -ri '/^ogham /d' CONTENTS
  145. ## texlive-latexextra ##
  146. # WIP: this sed command is yet to be verified to still be necessary
  147. # remove nonfree packages references from package list
  148. sed -ri '/^(axessibility|authoraftertitle|fnpara) /d' CONTENTS
  149. # } # WIP: this is where mksource() should end - un-comment this and prepare() below when done
  150. cd "${srcdir}" # and delete this
  151. # WIP: END LIBRE PATCHING
  152. # prepare() {
  153. # Fix --paper option in pdfjam
  154. patch -d texmf-dist/scripts/pdfjam -p2 < f9b86dcf.patch
  155. # Customize configuration
  156. patch -d texmf-dist/web2c -p0 < texmf.cnf.patch
  157. patch -d texmf-dist/web2c -p0 < texmfcnf.lua.patch
  158. # Copy files where format and maps will be extracted from
  159. cp texmf-dist/web2c/{fmtutil.cnf,updmap.cfg,texmf.cnf} .
  160. cp texmf-dist/tex/generic/config/language.{dat,dat.lua,def} .
  161. # Split files per package
  162. for _coll in ${_collections[@]}; do
  163. echo -ne "splitting collection ${_coll}"
  164. # extract description
  165. _desc=`sed -e "0,/^name collection-${_coll}$/d;/^$/Q" tlpkg/texlive.tlpdb | sed -ne 's|^shortdesc ||p'`
  166. echo $_desc > pkgdesc-$_coll
  167. # extract depends
  168. _pkgs=`sed -e "0,/^name collection-${_coll}$/d;/^$/Q" tlpkg/texlive.tlpdb | sed -ne 's|^depend ||p'`
  169. _prog=0
  170. _total=`echo $_pkgs | wc -w`
  171. for _pkg in $_pkgs; do
  172. _prog=$(($_prog+1))
  173. echo -ne "\rsplitting collection ${_coll} ($_prog/$_total)"
  174. # collection depends are added as dependencies
  175. if [[ $_pkg == collection-* ]]; then
  176. echo ${_pkg/collection-/texlive-} >> depends-$_coll
  177. else
  178. echo $_pkg >> packages-$_coll
  179. # move files to the corresponding subdir
  180. _split=`sed -e "0,/^name ${_pkg}$/d;/^$/Q" tlpkg/texlive.tlpdb`
  181. _files=`echo "$_split" | sed -e "0,/^runfiles/d;/^[a-z]/Q" | grep texmf-dist` || true
  182. for _file in $_files; do
  183. # some modules include docs in runfiles
  184. [[ $_file == texmf-dist/doc/* ]] && continue
  185. mkdir -p texlive-$_coll/$(dirname $_file)
  186. mv $_file texlive-$_coll/$(dirname $_file)
  187. done
  188. # extract formats
  189. _fmts=`echo "$_split" | grep "execute AddFormat"` || true
  190. if [[ ! -z "$_fmts" ]]; then
  191. echo "$_fmts" | while read -r _fmt; do
  192. _name=`echo $_fmt | sed 's|.* name=\(\S*\).*|\1|'`
  193. _engine=`echo $_fmt | sed 's|.* engine=\(\S*\).*|\1|'`
  194. grep -E "(^| )$_name $_engine" fmtutil.cnf >> $_coll.fmts
  195. done
  196. fi
  197. # extract maps
  198. _maps=`echo "$_split" | grep -E "execute add(Kanji|Mixed|)Map"` || true
  199. if [[ ! -z "$_maps" ]]; then
  200. echo "$_maps" | while read -r _map; do
  201. grep "${_map/execute add/}" updmap.cfg >> $_coll.maps
  202. done
  203. fi
  204. # extract hyphen rules
  205. _langs=`echo "$_split" | grep "execute AddHyphen"` || true
  206. if [[ ! -z "$_langs" ]]; then
  207. sed -e "0,/from ${_pkg}:/d;/\%/Q" language.dat >> $_coll.dat
  208. sed -re "0,/from ${_pkg}:/d;/(^--|^})/Q" language.dat.lua >> $_coll.dat.lua
  209. sed -e "0,/from ${_pkg}:/d;/\%/Q" language.def >> $_coll.def
  210. fi
  211. # extract linked scripts
  212. if [[ ${_pkg} != psutils && "$_split" == *${_pkg}.ARCH* ]]; then
  213. _links=`sed -e "0,/^name ${_pkg}.x86_64-linux$/d;/^$/Q" tlpkg/texlive.tlpdb | grep "bin/x86_64-linux" | sed -e 's|bin/x86_64-linux||g'`
  214. for _link in $_links; do
  215. if [[ $(readlink -m x86_64-linux/$_link) == */scripts/* ]]; then
  216. mkdir -p ${_coll}-bin
  217. cp -P x86_64-linux/$_link ${_coll}-bin
  218. ln -sfn "$(readlink ${_coll}-bin/$_link | sed 's|..\/..|..\/share|')" ${_coll}-bin/$_link
  219. fi
  220. done
  221. fi
  222. fi
  223. done
  224. echo
  225. done
  226. }
  227. _package() {
  228. pkgdesc+="`cat pkgdesc-$1`"
  229. [[ -s depends-$1 ]] && depends+=(`cat depends-$1`)
  230. # jadetex depends on ulem and marvosym
  231. [[ $1 == formatsextra ]] && depends+=(texlive-plaingeneric texlive-fontsrecommended texlive-latexrecommended)
  232. [[ $1 == xetex ]] && depends+=(texlive-latex)
  233. [[ $1 == latex || $1 == binextra ]] && depends+=(dvisvgm)
  234. [[ $1 == context ]] && optdepends+=('luametatex: LuaMetaTeX engine')
  235. [[ $1 == fontutils ]] && optdepends+=('ghostscript: for epstopdf')
  236. [[ $1 == pictures ]] && optdepends+=('ghostscript: for epspdf')
  237. [[ $1 == latexextra ]] && optdepends+=('java-runtime: for pdfannotextractor'
  238. 'python-pygments: for pygmentex')
  239. [[ $1 == music ]] && optdepends+=('fontforge: for scripts from the lilyglyphs package')
  240. if [[ $1 == basic ]]; then
  241. depends+=(perl) # needed by fmtutil which runs from install hook
  242. optdepends+=('perl-tk: for the tlmgr GUI'
  243. 'biber: for bibliography processing')
  244. conflicts=(texlive-core)
  245. provides=(texlive-core)
  246. replaces=(texlive-core)
  247. fi
  248. if [[ $1 == binextra ]]; then
  249. optdepends+=('ed: for texconfig'
  250. 'dialog: for texconfig'
  251. 'java-runtime: for utilities like arara, texplate'
  252. 'perl-tk: for texdoctk'
  253. 'perl-yaml-tiny: for latexindent'
  254. 'perl-file-homedir: for latexindent'
  255. 'perl-ipc-system-simple: for latex-git-log'
  256. 'python: for de-macro, dviasm, pythontex'
  257. 'texlive-latexrecommended: for pdfjam'
  258. 'wdiff: for texdiff')
  259. conflicts=(git-latexdiff)
  260. provides=(git-latexdiff)
  261. replaces=(git-latexdiff)
  262. fi
  263. if [[ $1 == mathscience ]]; then
  264. conflicts=(texlive-science)
  265. provides=(texlive-science)
  266. replaces=(texlive-science)
  267. fi
  268. if [[ $1 == langother ]]; then
  269. conflicts=(texlive-langextra)
  270. provides=(texlive-langextra)
  271. replaces=(texlive-langextra)
  272. fi
  273. if [[ $1 == lang* ]]; then
  274. groups=(texlive-lang)
  275. else
  276. groups=(texlive)
  277. fi
  278. for _pkg in `cat packages-$1`; do
  279. [[ ! ${_collections[@]} =~ (^| )$_pkg($| ) ]] && provides+=(texlive-$_pkg)
  280. done
  281. mkdir -p "$pkgdir"/usr/share
  282. mv texlive-$1/texmf-dist "$pkgdir"/usr/share
  283. [[ -d $1-bin ]] && mv $1-bin "$pkgdir"/usr/bin
  284. [[ -s $1.fmts ]] && install -Dm644 $1.fmts -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
  285. [[ -s $1.maps ]] && install -Dm644 $1.maps -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
  286. [[ -s $1.dat ]] && install -Dm644 $1.dat -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
  287. [[ -s $1.dat.lua ]] && install -Dm644 $1.dat.lua -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
  288. [[ -s $1.def ]] && install -Dm644 $1.def -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
  289. if [[ $1 == basic ]]; then
  290. backup=(etc/texmf/dvipdfmx/dvipdfmx.cfg
  291. etc/texmf/dvips/config/config.ps
  292. etc/texmf/tex/generic/tex-ini-files/pdftexconfig.tex
  293. etc/texmf/web2c/fmtutil.cnf
  294. etc/texmf/web2c/mktex.cnf
  295. etc/texmf/web2c/texmf.cnf
  296. etc/texmf/web2c/updmap-hdr.cfg
  297. etc/texmf/xdvi/XDvi)
  298. install -Dm644 09-texlive-fonts.conf -t "$pkgdir"/usr/share/fontconfig/conf.avail/
  299. # install pacman hooks
  300. install -Dm644 7*.hook -t "$pkgdir"/usr/share/libalpm/hooks/
  301. install -Dm755 texlive-fmtutil.script "$pkgdir"/usr/share/libalpm/scripts/texlive-fmtutil
  302. install -Dm755 texlive-language.script "$pkgdir"/usr/share/libalpm/scripts/texlive-language
  303. install -Dm755 texlive-updmap.script "$pkgdir"/usr/share/libalpm/scripts/texlive-updmap
  304. # install tlpkg files needed by tlmgr and texconfig
  305. install -Dm644 "$srcdir"/tlpkg/TeXLive/* -t "$pkgdir"/usr/share/perl5/vendor_perl/TeXLive/
  306. install -Dm644 "$srcdir"/tlpkg/texlive.tlpdb -t "$pkgdir"/usr/share/tlpkg
  307. install -Dm644 "$srcdir"/tlpkg/installer/config.guess -t "$pkgdir"/usr/share/tlpkg/installer
  308. # remove files that will be autogenerated
  309. rm "$pkgdir"/usr/share/texmf-dist/web2c/updmap.cfg
  310. rm "$pkgdir"/usr/share/texmf-dist/web2c/fmtutil.cnf
  311. rm "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.{dat,dat.lua,def}
  312. # copy config files to $TEXMFCONFIG tree
  313. install -Dm644 "$pkgdir"/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg -t "$pkgdir"/etc/texmf/dvipdfmx/
  314. install -Dm644 "$pkgdir"/usr/share/texmf-dist/dvips/config/config.ps -t "$pkgdir"/etc/texmf/dvips/config/
  315. install -Dm644 "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.us "$pkgdir"/etc/texmf/tex/generic/config/language.dat
  316. install -Dm644 "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.us.lua "$pkgdir"/etc/texmf/tex/generic/config/language.dat.lua
  317. echo "}" >> "$pkgdir"/etc/texmf/tex/generic/config/language.dat.lua
  318. install -Dm644 "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.us.def "$pkgdir"/etc/texmf/tex/generic/config/language.def
  319. echo "\uselanguage {USenglish} %%% This MUST be the last line of the file." >> "$pkgdir"/etc/texmf/tex/generic/config/language.def
  320. install -Dm644 "$pkgdir"/usr/share/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex -t "$pkgdir"/etc/texmf/tex/generic/tex-ini-files/
  321. install -Dm644 "$pkgdir"/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf "$pkgdir"/etc/texmf/web2c/fmtutil.cnf
  322. install -Dm644 "$pkgdir"/usr/share/texmf-dist/web2c/mktex.cnf -t "$pkgdir"/etc/texmf/web2c/
  323. install -Dm644 "$pkgdir"/usr/share/texmf-dist/web2c/texmf.cnf -t "$pkgdir"/etc/texmf/web2c/
  324. install -Dm644 "$pkgdir"/usr/share/texmf-dist/web2c/updmap-hdr.cfg -t "$pkgdir"/etc/texmf/web2c/
  325. install -Dm644 "$pkgdir"/usr/share/texmf-dist/xdvi/XDvi -t "$pkgdir"/etc/texmf/xdvi/
  326. fi
  327. if [[ $1 == binextra ]]; then
  328. backup=(etc/texmf/chktex/chktexrc)
  329. # copy config files to $TEXMFCONFIG tree
  330. install -Dm644 "$pkgdir"/usr/share/texmf-dist/chktex/chktexrc -t "$pkgdir"/etc/texmf/chktex/
  331. # install zsh completions
  332. mkdir -p "$pkgdir"/usr/share/zsh/site-functions
  333. TEXMFCNF="$srcdir" \
  334. "$pkgdir"/usr/bin/texdoc --print-completion zsh > "$pkgdir"/usr/share/zsh/site-functions/_texdoc 2>/dev/null
  335. fi
  336. if [[ $1 == context ]]; then
  337. # install pacman hooks
  338. install -Dm644 80-mtxrun.hook -t "$pkgdir"/usr/share/libalpm/hooks/
  339. install -Dm755 mtxrun.script "$pkgdir"/usr/share/libalpm/scripts/mtxrun
  340. # set executable bit
  341. chmod +x "$pkgdir"/usr/share/texmf-dist/scripts/context/lua/context.lua
  342. chmod +x "$pkgdir"/usr/share/texmf-dist/scripts/context/lua/mtxrun.lua
  343. fi
  344. if [[ $1 == fontutils ]]; then
  345. backup=(etc/texmf/ttf2pk/ttf2pk.cfg)
  346. # copy config files to $TEXMFCONFIG tree
  347. install -Dm644 "$pkgdir"/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg -t "$pkgdir"/etc/texmf/ttf2pk/
  348. fi
  349. }
  350. for _coll in ${_collections[@]}; do
  351. eval "package_texlive-$_coll() {
  352. _package $_coll
  353. }"
  354. done
  355. package_texlive-doc() {
  356. pkgdesc+='documentation'
  357. mkdir -p "$pkgdir"/usr/share/doc
  358. mv texmf-dist/doc/{info,man} "$pkgdir"/usr/share
  359. mv texmf-dist/doc "$pkgdir"/usr/share/doc/texlive
  360. # Symlink so texdoc can find it
  361. mkdir -p "$pkgdir"/usr/share/texmf-dist
  362. ln -s /usr/share/doc/texlive "$pkgdir"/usr/share/texmf-dist/doc
  363. # Fix conflicts with asymptote, psutils, dvisvgm, t1utils
  364. rm "$pkgdir"/usr/share/info/asy-faq.info
  365. rm "$pkgdir"/usr/share/man/man1/{asy,dvisvgm,epsffit,extractres,includeres,psbook,psjoin,psnup,psresize,psselect,pstops,psutils,t1ascii,t1asm,t1binary,t1disasm,t1mac,t1unmac}.1
  366. rm -f "$pkgdir"/usr/share/man{,/man*}/{Makefile,*.pdf}
  367. }
  368. package_texlive-meta() {
  369. pkgdesc='Metapackage to install Tex Live'
  370. for _coll in ${_collections[@]}; do
  371. [[ $_coll != lang* ]] && depends+=(texlive-$_coll)
  372. done
  373. }