123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- # Maintainer (arch): Antonio Rojas <arojas@archlinux.org>
- # Maintainer (arch): Caleb Maclennan <caleb@alerque.com>
- # Contributor: Rémy Oudompheng <remy@archlinux.org>
- # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
- # Contributor: André Silva <emulatorman@hyperbola.info>
- # Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
- # Contributor: Michał Masłowski <mtjm@mtjm.eu>
- # Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
- # Contributor: bill-auger <bill-auger@programmer.net>
- # parabola changes and rationale:
- # - remove non-free add-on packages
- pkgbase=texlive-texmf
- pkgname=(texlive-doc texlive-meta)
- # generate collections with ./list-collections
- _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 )
- for _coll in ${_collections[@]}; do
- pkgname+=(texlive-$_coll)
- done
- _rev=70897
- pkgver=2024.2
- pkgrel=3
- pkgdesc='TeX Live - '
- license=(GPL)
- arch=(any)
- depends=(texlive-bin)
- makedepends=(subversion)
- url='https://tug.org/texlive/'
- source=(svn://tug.org/texlive/tags/texlive-$pkgver/Master/texmf-dist#revision=$_rev
- svn://tug.org/texlive/tags/texlive-$pkgver/Master/tlpkg#revision=$_rev
- svn://tug.org/texlive/tags/texlive-$pkgver/Master/bin/x86_64-linux#revision=$_rev
- 09-texlive-fonts.conf
- texmf.cnf.patch
- texmfcnf.lua.patch
- 70-mktexlsr.hook
- 71-texlive-language.hook
- texlive-language.script
- 72-texlive-fmtutil.hook
- texlive-fmtutil.script
- 73-texlive-updmap.hook
- texlive-updmap.script
- 80-mtxrun.hook
- mtxrun.script
- https://github.com/rrthomas/pdfjam/commit/f9b86dcf.patch)
- sha256sums=('SKIP'
- 'SKIP'
- 'SKIP'
- '5e79c40cf3ab93348fc89e97890198601767ea2c8fea89ea76088c17a2b35962'
- '204245fb6f72091c72ad78727ce970a9d03795ef6cab35b9e5d7cf69630ed171'
- '13932156d6c46cd8d2c19d92f574d92a7aa461928fce793fc06835714b768bc9'
- '95f6540c49b11f1ece8010d76b53ca90efd61e1831530562bfcde4350f6c1db1'
- 'e6d399faee55ba461cf7e617f2369f5c516de292b28afc6665c9e3fe2b821973'
- 'c64c2a6371e94b0f67799c0ac84ea74d8edbc181b26672aa15b8132ec5fbabc3'
- '9b99f197c71149b03355f7c24ee1e07f54a1262bb030756fe660b9aa715a184f'
- 'f96e9f815fa0a4b85e677f2a9215d9106b8abe46eceb3f3e36a6c76eda3e4a85'
- '2141c0842668fb937fd21ca2fae39b642c9665656e404a0d4ee7bdc477bf51fe'
- 'ee6e76192a5ad880a2152cd7900b86c8465239fb228045a2f8360b0d7a449f4a'
- 'f6bb67db32d37ca15eba88bd15d8b9882c61915f98bc8d7c3c21a66c8cf8f019'
- '98b730e917281227e29077ba5689ad78baee0af3859b55966b2604c6a85f1305'
- '5f027b8a2492d89a04c2083c0628ff2305b2646412a1e7bdf79a498b98d08d6a')
- options=(!strip) # Nothing to strip, save packaging time
- ## parabola mksource over-rides ##
- # _N_MKSOURCES=3 # number of sources=() to be isolated for mksource
- # _N_MKKEYS=0 # number of validpgpkeys=() to be isolated for mksource
- # mksource=( ${source[*]: 0:${_N_MKSOURCES}} )
- # mksha256sums=( ${sha256sums[*]: 0:${_N_MKSOURCES}} )
- # mkvalidpgpkeys=( ${validpgpkeys[*]:0:${_N_MKKEYS}} )
- # source=( https://repo.parabola.nu/other/${pkgbase}/${pkgbase}-${pkgver}-src.tar.xz{,.sig}
- # ${source[*]:${_N_MKSOURCES}} )
- # sha256sums=( '0' # libre source-ball
- # 'SKIP'
- # ${sha256sums[*]:${_N_MKSOURCES}} )
- # validpgpkeys=( '3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40' # bill-auger
- # ${validpgpkeys[*]:${_N_MKKEYS}} )
- # mksource() {
- prepare() { # WIP: this should be mksource() - it is just easier for WIP without mksource
- # when done, un-comment the 'parabola mksource over-rides' above also
- # licensing reviews: https://labs.parabola.nu/issues/2698
- # texlive licensing epic: https://labs.parabola.nu/issues/972
- # original evaluation: https://wiki.parabola.nu/TeXLive_freedom_verification
- ## texlive-basic (formerly texlive-core) ##
- # MeX/Knuth license
- rm -rf texmf-dist/tex/mex/
- # WIP: verified? i suppose - we could not locate these in the new code-base
- # rm -v {cc-pl,cs,mex,pl}.tar.xz
- # WIP: verified -
- # context-account is PD
- # context-algorithmic is GPL v3 or later
- # context-letter is GPL
- # context-ruby is PD
- # rm -v context-{account,algorithmic,letter,ruby}.tar.xz
- # WIP: verified - euro-ce is Modified BSD3
- # rm -v euro-ce.tar.xz
- # WIP: the original mksource() ended here - the remainder was in prepare();
- # but it should not be if it was deleting non-free files
- # also some was from other PKGBUILDs absorbed by this one
- # 'texlive-fontsextra' and 'texlive-latexextra'
- ## texlive-fontsextra ##
- # WIP: verified - ogham is PD
- # remove nonfree packages
- # rm -v ogham.tar.xz
- ## texlive-latexextra ##
- # WIP: these rm commands are yet to be verified to still be necessary
- # remove nonfree packages
- # no specific free license
- rm -v {authoraftertitle,clock,fnpara}.tar.xz
- # nonfree license (CC BY-NC)
- rm -v axessibility.tar.xz
- ## texlive-basic (formerly texlive-core) ##
- # WIP: this code is not needed - just here as a reminder
- # none of these are tarballs now - they are flat files in the code-base
- # cd "$srcdir/$pkgname-$pkgver"
- # echo -n " --> extracting all packages... "
- # for p in *.tar.xz; do
- # bsdtar -xf $p
- # done
- # echo "done"
- # rm -rf source doc
- # WIP: these 14 sed commands are yet to be verified to still be necessary
- # remove nonfree packages references from updmap.cfg
- sed -i '/ccpl.map/d' texmf-dist/web2c/updmap.cfg
- sed -i '/cs-charter.map/d' texmf-dist/web2c/updmap.cfg
- sed -i '/csfonts.map/d' texmf-dist/web2c/updmap.cfg
- sed -i '/plother.map/d' texmf-dist/web2c/updmap.cfg
- sed -i '/pltext.map/d' texmf-dist/web2c/updmap.cfg
- # remove nonfree packages references from texlive-core.maps
- sed -i '/ccpl.map/d' $srcdir/$pkgname.maps
- sed -i '/cs-charter.map/d' $srcdir/$pkgname.maps
- sed -i '/csfonts.map/d' $srcdir/$pkgname.maps
- sed -i '/plother.map/d' $srcdir/$pkgname.maps
- sed -i '/pltext.map/d' $srcdir/$pkgname.maps
- # remove nonfree packages references from fmtutil.cnf
- sed -i '/cslatex/d' texmf-dist/web2c/fmtutil.cnf
- sed -i '/csplain/d' texmf-dist/web2c/fmtutil.cnf
- sed -i '/from mex/d' texmf-dist/web2c/fmtutil.cnf
- sed -i '/mexconf.tex/d' texmf-dist/web2c/fmtutil.cnf
- # WIP: verified partially
- # the following `sed` command has been reduced according to the findings above
- # however, the previous PKGBUILD did not delete context-fixme or context-games above
- # remove nonfree packages references from package list
- sed -ri '/^(context-(fixme|games)) /d' CONTENTS
- ## texlive-fontsextra ##
- # WIP: verified - ogham is PD
- # remove nonfree packages references from package list
- # sed -ri '/^ogham /d' CONTENTS
- ## texlive-latexextra ##
- # WIP: this sed command is yet to be verified to still be necessary
- # remove nonfree packages references from package list
- sed -ri '/^(axessibility|authoraftertitle|fnpara) /d' CONTENTS
- # } # WIP: this is where mksource() should end - un-comment this and prepare() below when done
- cd "${srcdir}" # and delete this
- # WIP: END LIBRE PATCHING
- # prepare() {
- # Fix --paper option in pdfjam
- patch -d texmf-dist/scripts/pdfjam -p2 < f9b86dcf.patch
- # Customize configuration
- patch -d texmf-dist/web2c -p0 < texmf.cnf.patch
- patch -d texmf-dist/web2c -p0 < texmfcnf.lua.patch
- # Copy files where format and maps will be extracted from
- cp texmf-dist/web2c/{fmtutil.cnf,updmap.cfg,texmf.cnf} .
- cp texmf-dist/tex/generic/config/language.{dat,dat.lua,def} .
-
- # Split files per package
- for _coll in ${_collections[@]}; do
- echo -ne "splitting collection ${_coll}"
- # extract description
- _desc=`sed -e "0,/^name collection-${_coll}$/d;/^$/Q" tlpkg/texlive.tlpdb | sed -ne 's|^shortdesc ||p'`
- echo $_desc > pkgdesc-$_coll
- # extract depends
- _pkgs=`sed -e "0,/^name collection-${_coll}$/d;/^$/Q" tlpkg/texlive.tlpdb | sed -ne 's|^depend ||p'`
- _prog=0
- _total=`echo $_pkgs | wc -w`
- for _pkg in $_pkgs; do
- _prog=$(($_prog+1))
- echo -ne "\rsplitting collection ${_coll} ($_prog/$_total)"
- # collection depends are added as dependencies
- if [[ $_pkg == collection-* ]]; then
- echo ${_pkg/collection-/texlive-} >> depends-$_coll
- else
- echo $_pkg >> packages-$_coll
- # move files to the corresponding subdir
- _split=`sed -e "0,/^name ${_pkg}$/d;/^$/Q" tlpkg/texlive.tlpdb`
- _files=`echo "$_split" | sed -e "0,/^runfiles/d;/^[a-z]/Q" | grep texmf-dist` || true
- for _file in $_files; do
- # some modules include docs in runfiles
- [[ $_file == texmf-dist/doc/* ]] && continue
- mkdir -p texlive-$_coll/$(dirname $_file)
- mv $_file texlive-$_coll/$(dirname $_file)
- done
- # extract formats
- _fmts=`echo "$_split" | grep "execute AddFormat"` || true
- if [[ ! -z "$_fmts" ]]; then
- echo "$_fmts" | while read -r _fmt; do
- _name=`echo $_fmt | sed 's|.* name=\(\S*\).*|\1|'`
- _engine=`echo $_fmt | sed 's|.* engine=\(\S*\).*|\1|'`
- grep -E "(^| )$_name $_engine" fmtutil.cnf >> $_coll.fmts
- done
- fi
- # extract maps
- _maps=`echo "$_split" | grep -E "execute add(Kanji|Mixed|)Map"` || true
- if [[ ! -z "$_maps" ]]; then
- echo "$_maps" | while read -r _map; do
- grep "${_map/execute add/}" updmap.cfg >> $_coll.maps
- done
- fi
- # extract hyphen rules
- _langs=`echo "$_split" | grep "execute AddHyphen"` || true
- if [[ ! -z "$_langs" ]]; then
- sed -e "0,/from ${_pkg}:/d;/\%/Q" language.dat >> $_coll.dat
- sed -re "0,/from ${_pkg}:/d;/(^--|^})/Q" language.dat.lua >> $_coll.dat.lua
- sed -e "0,/from ${_pkg}:/d;/\%/Q" language.def >> $_coll.def
- fi
- # extract linked scripts
- if [[ ${_pkg} != psutils && "$_split" == *${_pkg}.ARCH* ]]; then
- _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'`
- for _link in $_links; do
- if [[ $(readlink -m x86_64-linux/$_link) == */scripts/* ]]; then
- mkdir -p ${_coll}-bin
- cp -P x86_64-linux/$_link ${_coll}-bin
- ln -sfn "$(readlink ${_coll}-bin/$_link | sed 's|..\/..|..\/share|')" ${_coll}-bin/$_link
- fi
- done
- fi
- fi
- done
- echo
- done
- }
- _package() {
- pkgdesc+="`cat pkgdesc-$1`"
- [[ -s depends-$1 ]] && depends+=(`cat depends-$1`)
- # jadetex depends on ulem and marvosym
- [[ $1 == formatsextra ]] && depends+=(texlive-plaingeneric texlive-fontsrecommended texlive-latexrecommended)
- [[ $1 == xetex ]] && depends+=(texlive-latex)
- [[ $1 == latex || $1 == binextra ]] && depends+=(dvisvgm)
- [[ $1 == context ]] && optdepends+=('luametatex: LuaMetaTeX engine')
- [[ $1 == fontutils ]] && optdepends+=('ghostscript: for epstopdf')
- [[ $1 == pictures ]] && optdepends+=('ghostscript: for epspdf')
- [[ $1 == latexextra ]] && optdepends+=('java-runtime: for pdfannotextractor'
- 'python-pygments: for pygmentex')
- [[ $1 == music ]] && optdepends+=('fontforge: for scripts from the lilyglyphs package')
- if [[ $1 == basic ]]; then
- depends+=(perl) # needed by fmtutil which runs from install hook
- optdepends+=('perl-tk: for the tlmgr GUI'
- 'biber: for bibliography processing')
- conflicts=(texlive-core)
- provides=(texlive-core)
- replaces=(texlive-core)
- fi
- if [[ $1 == binextra ]]; then
- optdepends+=('ed: for texconfig'
- 'dialog: for texconfig'
- 'java-runtime: for utilities like arara, texplate'
- 'perl-tk: for texdoctk'
- 'perl-yaml-tiny: for latexindent'
- 'perl-file-homedir: for latexindent'
- 'perl-ipc-system-simple: for latex-git-log'
- 'python: for de-macro, dviasm, pythontex'
- 'texlive-latexrecommended: for pdfjam'
- 'wdiff: for texdiff')
- conflicts=(git-latexdiff)
- provides=(git-latexdiff)
- replaces=(git-latexdiff)
- fi
- if [[ $1 == mathscience ]]; then
- conflicts=(texlive-science)
- provides=(texlive-science)
- replaces=(texlive-science)
- fi
- if [[ $1 == langother ]]; then
- conflicts=(texlive-langextra)
- provides=(texlive-langextra)
- replaces=(texlive-langextra)
- fi
- if [[ $1 == lang* ]]; then
- groups=(texlive-lang)
- else
- groups=(texlive)
- fi
- for _pkg in `cat packages-$1`; do
- [[ ! ${_collections[@]} =~ (^| )$_pkg($| ) ]] && provides+=(texlive-$_pkg)
- done
- mkdir -p "$pkgdir"/usr/share
- mv texlive-$1/texmf-dist "$pkgdir"/usr/share
-
- [[ -d $1-bin ]] && mv $1-bin "$pkgdir"/usr/bin
- [[ -s $1.fmts ]] && install -Dm644 $1.fmts -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
- [[ -s $1.maps ]] && install -Dm644 $1.maps -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
- [[ -s $1.dat ]] && install -Dm644 $1.dat -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
- [[ -s $1.dat.lua ]] && install -Dm644 $1.dat.lua -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
- [[ -s $1.def ]] && install -Dm644 $1.def -t "$pkgdir"/var/lib/texmf/arch/installedpkgs
-
- if [[ $1 == basic ]]; then
- backup=(etc/texmf/dvipdfmx/dvipdfmx.cfg
- etc/texmf/dvips/config/config.ps
- etc/texmf/tex/generic/tex-ini-files/pdftexconfig.tex
- etc/texmf/web2c/fmtutil.cnf
- etc/texmf/web2c/mktex.cnf
- etc/texmf/web2c/texmf.cnf
- etc/texmf/web2c/updmap-hdr.cfg
- etc/texmf/xdvi/XDvi)
- install -Dm644 09-texlive-fonts.conf -t "$pkgdir"/usr/share/fontconfig/conf.avail/
- # install pacman hooks
- install -Dm644 7*.hook -t "$pkgdir"/usr/share/libalpm/hooks/
- install -Dm755 texlive-fmtutil.script "$pkgdir"/usr/share/libalpm/scripts/texlive-fmtutil
- install -Dm755 texlive-language.script "$pkgdir"/usr/share/libalpm/scripts/texlive-language
- install -Dm755 texlive-updmap.script "$pkgdir"/usr/share/libalpm/scripts/texlive-updmap
- # install tlpkg files needed by tlmgr and texconfig
- install -Dm644 "$srcdir"/tlpkg/TeXLive/* -t "$pkgdir"/usr/share/perl5/vendor_perl/TeXLive/
- install -Dm644 "$srcdir"/tlpkg/texlive.tlpdb -t "$pkgdir"/usr/share/tlpkg
- install -Dm644 "$srcdir"/tlpkg/installer/config.guess -t "$pkgdir"/usr/share/tlpkg/installer
- # remove files that will be autogenerated
- rm "$pkgdir"/usr/share/texmf-dist/web2c/updmap.cfg
- rm "$pkgdir"/usr/share/texmf-dist/web2c/fmtutil.cnf
- rm "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.{dat,dat.lua,def}
- # copy config files to $TEXMFCONFIG tree
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg -t "$pkgdir"/etc/texmf/dvipdfmx/
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/dvips/config/config.ps -t "$pkgdir"/etc/texmf/dvips/config/
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.us "$pkgdir"/etc/texmf/tex/generic/config/language.dat
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.us.lua "$pkgdir"/etc/texmf/tex/generic/config/language.dat.lua
- echo "}" >> "$pkgdir"/etc/texmf/tex/generic/config/language.dat.lua
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/tex/generic/config/language.us.def "$pkgdir"/etc/texmf/tex/generic/config/language.def
- echo "\uselanguage {USenglish} %%% This MUST be the last line of the file." >> "$pkgdir"/etc/texmf/tex/generic/config/language.def
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex -t "$pkgdir"/etc/texmf/tex/generic/tex-ini-files/
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf "$pkgdir"/etc/texmf/web2c/fmtutil.cnf
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/web2c/mktex.cnf -t "$pkgdir"/etc/texmf/web2c/
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/web2c/texmf.cnf -t "$pkgdir"/etc/texmf/web2c/
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/web2c/updmap-hdr.cfg -t "$pkgdir"/etc/texmf/web2c/
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/xdvi/XDvi -t "$pkgdir"/etc/texmf/xdvi/
- fi
- if [[ $1 == binextra ]]; then
- backup=(etc/texmf/chktex/chktexrc)
- # copy config files to $TEXMFCONFIG tree
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/chktex/chktexrc -t "$pkgdir"/etc/texmf/chktex/
- # install zsh completions
- mkdir -p "$pkgdir"/usr/share/zsh/site-functions
- TEXMFCNF="$srcdir" \
- "$pkgdir"/usr/bin/texdoc --print-completion zsh > "$pkgdir"/usr/share/zsh/site-functions/_texdoc 2>/dev/null
- fi
- if [[ $1 == context ]]; then
- # install pacman hooks
- install -Dm644 80-mtxrun.hook -t "$pkgdir"/usr/share/libalpm/hooks/
- install -Dm755 mtxrun.script "$pkgdir"/usr/share/libalpm/scripts/mtxrun
- # set executable bit
- chmod +x "$pkgdir"/usr/share/texmf-dist/scripts/context/lua/context.lua
- chmod +x "$pkgdir"/usr/share/texmf-dist/scripts/context/lua/mtxrun.lua
- fi
- if [[ $1 == fontutils ]]; then
- backup=(etc/texmf/ttf2pk/ttf2pk.cfg)
- # copy config files to $TEXMFCONFIG tree
- install -Dm644 "$pkgdir"/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg -t "$pkgdir"/etc/texmf/ttf2pk/
- fi
- }
-
- for _coll in ${_collections[@]}; do
- eval "package_texlive-$_coll() {
- _package $_coll
- }"
- done
- package_texlive-doc() {
- pkgdesc+='documentation'
- mkdir -p "$pkgdir"/usr/share/doc
- mv texmf-dist/doc/{info,man} "$pkgdir"/usr/share
- mv texmf-dist/doc "$pkgdir"/usr/share/doc/texlive
- # Symlink so texdoc can find it
- mkdir -p "$pkgdir"/usr/share/texmf-dist
- ln -s /usr/share/doc/texlive "$pkgdir"/usr/share/texmf-dist/doc
- # Fix conflicts with asymptote, psutils, dvisvgm, t1utils
- rm "$pkgdir"/usr/share/info/asy-faq.info
- 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
- rm -f "$pkgdir"/usr/share/man{,/man*}/{Makefile,*.pdf}
- }
-
- package_texlive-meta() {
- pkgdesc='Metapackage to install Tex Live'
- for _coll in ${_collections[@]}; do
- [[ $_coll != lang* ]] && depends+=(texlive-$_coll)
- done
- }
|