PKGBUILDs/extra/texlive-bin/PKGBUILD

159 lines
5.5 KiB
Bash
Raw Normal View History

2023-06-03 19:14:05 +00:00
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Rémy Oudompheng <remy@archlinux.org>
2011-09-17 17:37:29 +00:00
# Contributor: francois <francois.archlinux.org>
2011-02-07 14:55:51 +00:00
2011-12-24 08:09:03 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2013-08-03 21:15:44 +00:00
# -fPIC for v6 and v7
# --disable-xindy, remove xindy stuff, segfaults with clisp
# --disable-cxx-runtime-hack
2016-08-05 13:02:06 +00:00
# drop clisp and ffcall makedepends
2011-02-07 14:55:51 +00:00
2023-06-03 19:14:05 +00:00
pkgname=(texlive-bin libsynctex)
_rev=66984
pkgver=2023.$_rev
2023-06-17 00:25:46 +00:00
pkgrel=7
2023-06-03 19:14:05 +00:00
license=(GPL)
arch=(x86_64)
makedepends=(git cairo pixman graphite t1lib gd libsigsegv zziplib libpng libjpeg freetype2
icu harfbuzz-icu mpfr potrace libpaper perl libxcrypt subversion)
2019-08-23 13:03:38 +00:00
url='https://tug.org/texlive/'
2023-06-03 19:14:05 +00:00
_commit=871c7a2856d70e1a9703d1f72f0587b9995dba5f # tags/texlive-2023.0
source=(git+https://github.com/Tex-Live/texlive-source.git#commit=$_commit
svn://tug.org/texlive/tags/texlive-2023.0/Master/tlpkg#revision=$_rev
2023-06-05 23:50:13 +00:00
ptex-debug-print.patch
context-luatex-1.17.patch)
2023-03-29 12:39:01 +00:00
sha256sums=('SKIP'
2023-06-03 19:14:05 +00:00
'SKIP'
2023-06-05 23:50:13 +00:00
'aa838f09003c62c2efb5770a8de66f99b409df049fbd65098d80fd1957d06c50'
'a56838d19c3bd820781693b5a2e058e1a22378b37ea199bac426d97fcc420920')
2017-07-17 23:37:12 +00:00
prepare() {
2023-06-03 19:14:05 +00:00
cd texlive-source
# bibtex-x needs kpathsea flags
sed -i '/AC_SEARCH_LIBS/a KPSE_KPATHSEA_FLAGS' texk/bibtex-x/configure.ac
(cd texk/bibtex-x && autoreconf)
# t4ht expects to be un /usr/share/texmf/bin/t4ht (FS#27251)
sed -i s/SELFAUTOPARENT/TEXMFROOT/ texk/tex4htk/t4ht.c
# remove spurious ptex "guessed encoding" print
2023-06-05 23:50:13 +00:00
patch -p1 -i ../ptex-debug-print.patch
# update context to work with luatex 1.17
patch -p1 -i ../context-luatex-1.17.patch
2017-07-17 23:37:12 +00:00
}
2011-05-08 18:02:30 +00:00
2011-02-07 14:55:51 +00:00
build() {
2023-06-03 19:14:05 +00:00
cd texlive-source
mkdir -p build
cd build
ax_cv_c_float_words_bigendian=no \
../configure --prefix=/usr -C \
--sysconfdir=/etc \
--datarootdir=/usr/share \
--datadir=/usr/share \
--mandir=/usr/share/man \
--disable-cxx-runtime-hack \
--disable-native-texlive-build \
--with-banner-add="/Arch Linux" \
--disable-multiplatform \
--disable-dialog \
--disable-psutils \
--disable-t1utils \
--disable-bibtexu \
--disable-dvisvgm \
--disable-xz \
--enable-shared \
--disable-static \
--with-system-zlib \
--with-system-zziplib \
--with-system-pnglib \
--with-system-ncurses \
--with-system-t1lib \
--with-system-gd \
--with-system-freetype2 \
--with-system-pixman \
--with-system-cairo \
--with-system-harfbuzz \
--with-system-graphite \
--with-system-icu \
--with-system-gmp \
--with-system-mpfr \
--with-system-potrace \
--with-system-libpaper \
--with-freetype2-libdir=/usr/lib \
--with-freetype2-include=/usr/include/freetype2 \
--with-xdvi-x-toolkit=xaw \
--disable-dump-share \
2023-06-17 00:25:46 +00:00
--enable-aleph \
2023-06-03 19:14:05 +00:00
--enable-luatex \
--with-clisp-runtime=default \
--disable-xindy --disable-xindy-rules --disable-xindy-docs
make
2011-02-07 14:55:51 +00:00
}
2016-02-05 13:55:22 +00:00
package_libsynctex() {
2023-06-03 19:14:05 +00:00
pkgdesc='Library for synchronization between TeX files and resulting file'
depends=(glibc zlib)
2016-02-05 13:55:22 +00:00
2023-06-03 19:14:05 +00:00
cd texlive-source/build
make -C texk/web2c DESTDIR="$pkgdir" \
install-data-am install-libLTLIBRARIES
2022-04-29 12:39:32 +00:00
2023-06-03 19:14:05 +00:00
rm "$pkgdir"/usr/share/man/man1/hi*.*
2016-02-05 13:55:22 +00:00
}
package_texlive-bin() {
2023-06-03 19:14:05 +00:00
pkgdesc='TeX Live binaries'
depends=(cairo pixman graphite t1lib gd poppler libsigsegv zziplib libpng libjpeg freetype2 libxcrypt
harfbuzz-icu mpfr potrace libpaper libsynctex)
provides=(lcdf-typetools kpathsea)
optdepends=('ed: for texconfig'
'dialog: for texconfig'
'biber: for bibliography processing'
'ghostscript: for epstopdf, epspdf and other ConTeXt tools'
'java-runtime: for utilities like arara, texplate, pdfannotextractor'
'perl-tk: for texdoctk'
'psutils: to manipulate the output of dvips'
'python: for de-macro, dviasm, pythontex'
'python-pygments: for pygmentex'
'ruby: for old ConTeXT MkII and epspdf'
't1utils: can be useful when installing Type1 fonts'
'wdiff: for texdiff'
'fontforge: for scripts from the lilyglyphs package'
'perl-yaml-tiny: for latexindent'
'perl-file-homedir: for latexindent')
cd texlive-source
# fixes for xindy
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|" '{}' \;
cd build
make DESTDIR="$pkgdir" texmf="$pkgdir"/usr/share/texmf install
LD_LIBRARY_PATH="$pkgdir"/usr/lib \
make DESTDIR="$pkgdir" texlinks
# install old ConTeXt stubs
cd "$srcdir"/texlive-source
for _stub in `ls texk/texlive/linked_scripts/context/stubs/unix`; do
install -m755 texk/texlive/linked_scripts/context/stubs/unix/$_stub "$pkgdir"/usr/bin/$_stub
done
# install tlpkg files needed by 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 stuff included in texlive-core
2023-06-08 00:03:25 +00:00
rm -r "$pkgdir"/usr/share/texmf-dist/{bibtex,chktex,dvipdfmx,dvips,fonts,hbf2gf,scripts,texconfig,ttf2pk,web2c,xdvi}
2023-06-03 19:14:05 +00:00
# docs are provided in texlive-doc
rm -r "$pkgdir"/usr/share/texmf-dist/doc
# remove libsynctex
rm "$pkgdir"/usr/include/synctex/*
rm "$pkgdir"/usr/lib/libsynctex.*
rm "$pkgdir"/usr/lib/pkgconfig/synctex.pc
rm "$pkgdir"/usr/share/man/man*/synctex.*
2016-02-05 13:55:22 +00:00
}