opt/texlive/Pkgfile

113 lines
3.3 KiB
Plaintext
Raw Normal View History

# Description: TeX distribution for UNIX compatible systems.
2014-07-08 21:04:31 +02:00
# URL: http://www.tug.org/tetex/
# Maintainer: Thomas Penteker, tek at serverop dot de
# Depends on: clisp icu libgd poppler t1lib util-linux xorg-libxi ghostscript
name=texlive
2018-09-08 23:26:04 +02:00
version=20180414
2014-07-08 21:04:31 +02:00
release=1
2015-08-19 18:35:20 +02:00
source=(ftp://tug.org/historic/systems/texlive/${version:0:4}/$name-$version-texmf.tar.xz
2016-10-02 23:37:12 +02:00
ftp://tug.org/historic/systems/texlive/${version:0:4}/$name-$version-source.tar.xz
2018-03-30 02:54:14 +02:00
http://download.savannah.gnu.org/releases/texi2html/texi2html-5.0.tar.bz2
2018-09-08 23:26:04 +02:00
texlive-poppler-0.64.patch)
build() {
2017-06-30 19:33:31 +02:00
cd $name-$version-source
2014-07-08 21:04:31 +02:00
chmod -R a-s $SRC
find $SRC \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
2018-09-08 23:26:04 +02:00
# Fix build with poppler 0.64 (thanks to BLFS)
patch -Np1 < $SRC/texlive-poppler-0.64.patch
(
cd texk/web2c/pdftexdir \
&& mv -v pdftoepdf{-newpoppler,}.cc \
&& mv -v pdftosrc{-newpoppler,}.cc
)
2018-03-30 02:54:14 +02:00
2014-07-08 21:04:31 +02:00
# Fix some paths
sed -i 's|TEXMFROOT = .*|TEXMFROOT = $SELFAUTODIR/share|g' texk/kpathsea/texmf.cnf
sed -i 's|TEXMFLOCAL = .*|TEXMFLOCAL = $TEXMFROOT/texmf-local|g' texk/kpathsea/texmf.cnf
export TEXMFCNF=""
export KPATHSEA_WARNING=0
mkdir build
cd build
2018-09-08 23:26:04 +02:00
CONFIG_SHELL=/bin/bash \
2014-07-08 21:04:31 +02:00
../configure \
--prefix=/usr \
--with-banner-add=" $(crux)" \
--disable-native-texlive-build \
2018-09-08 23:26:04 +02:00
--disable-multiplatform \
--disable-debug \
2014-07-08 21:04:31 +02:00
--disable-missing \
--disable-static \
2018-09-08 23:26:04 +02:00
--enable-shared \
--enable-largefile \
2014-07-08 21:04:31 +02:00
--with-x \
2018-09-08 23:26:04 +02:00
--with-xdvi-x-toolkit=xaw \
2014-07-08 21:04:31 +02:00
--disable-xindy \
2018-09-08 23:26:04 +02:00
--disable-xindy-docs \
--disable-xindy-rules \
2014-07-08 21:04:31 +02:00
--with-clisp-runtime=system \
--with-system-poppler \
2015-08-19 18:35:20 +02:00
--with-system-cairo \
--with-system-pixman \
2014-07-08 21:04:31 +02:00
--with-system-xpdf \
--with-system-ncurses \
--with-system-zlib \
--with-system-libpng \
--with-system-t1lib \
--with-system-gd \
2015-08-19 18:35:20 +02:00
--with-system-freetype2 \
--with-system-gmp \
--with-system-mpfr \
--with-system-icu
2014-07-08 21:04:31 +02:00
2018-09-08 23:26:04 +02:00
make
2014-07-08 21:04:31 +02:00
make DESTDIR=$PKG install
2015-08-19 18:35:20 +02:00
2014-07-08 21:04:31 +02:00
cd ..
2018-09-08 23:26:04 +02:00
PERLVER="$(perl -v |sed -nre '2{s/^.*\(v(5\.[0-9]+).*\).*$/\1/;p}')"
install -d $PKG/usr/lib/perl5/site_perl/${PERLVER}/TeXLive
install texk/tests/TeXLive/TL{Config,Utils}.pm $PKG/usr/lib/perl5/site_perl/${PERLVER}/TeXLive
2015-08-19 18:35:20 +02:00
2014-07-08 21:04:31 +02:00
# Create symlinks
2018-09-08 23:26:04 +02:00
PATH="$PKG/usr/bin:$PATH" LD_LIBRARY_PATH="$PKG/usr/lib:$LD_LIBRARY_PATH" \
2014-07-08 21:04:31 +02:00
texlinks -f $PKG/usr/share/texmf-dist/web2c/fmtutil.cnf $PKG/usr/bin
2017-06-30 19:33:31 +02:00
cd $SRC/$name-$version-texmf
2014-07-08 21:04:31 +02:00
# Fix some paths
sed -i 's|TEXMFROOT = .*|TEXMFROOT = $SELFAUTODIR/share|g' texmf-dist/web2c/texmf.cnf
sed -i 's|TEXMFLOCAL = .*|TEXMFLOCAL = $TEXMFROOT/texmf-local|g' texmf-dist/web2c/texmf.cnf
mv $PKG/usr/share/texmf-dist $PKG/usr/share/texmf-dist.tmp
mv texmf-dist $PKG/usr/share
# sub-optimal but better than copying texmf-dist!
cp -a $PKG/usr/share/texmf-dist.tmp/* $PKG/usr/share/texmf-dist
rm -r $PKG/usr/share/texmf-dist.tmp
cd $SRC/texi2html-*
./configure --prefix=/usr
2014-07-08 21:04:31 +02:00
make
2018-09-08 23:26:04 +02:00
make DESTDIR=$PKG install
2014-07-08 21:04:31 +02:00
rm -r $PKG/usr/share/{info,locale}
rm -r $PKG/usr/share/texmf-dist/doc
find $PKG/usr/share/texmf-dist \
-regex '.*/\(COPYING\|README\|AUTHORS\|INSTALL\|ChangeLog\|NEWS\|TODO\).*' \
-delete
}