diff options
author | Erich Eckner <git@eckner.net> | 2020-03-09 14:21:05 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-03-09 14:21:05 +0100 |
commit | 222c4bfa09eaf1b2581936c6cae5239094f5b23f (patch) | |
tree | 57694db8b34d25e684d6fd428944b1203478921a /portsToCome/texlive/Pkgfile | |
parent | 30a71190a77f0d2abfeaf433c166eeb7a1dc11cf (diff) | |
download | crux-ports-222c4bfa09eaf1b2581936c6cae5239094f5b23f.tar.xz |
updated texlive
Diffstat (limited to 'portsToCome/texlive/Pkgfile')
-rw-r--r-- | portsToCome/texlive/Pkgfile | 129 |
1 files changed, 96 insertions, 33 deletions
diff --git a/portsToCome/texlive/Pkgfile b/portsToCome/texlive/Pkgfile index e4e314f..3ba7d54 100644 --- a/portsToCome/texlive/Pkgfile +++ b/portsToCome/texlive/Pkgfile @@ -1,17 +1,20 @@ # Description: TeX distribution for UNIX compatible systems. # URL: http://www.tug.org/tetex/ -# Maintainer: Erich Eckner, crux at eckner dot net -# Contributor: John Vogel, jvogel4 at stny dot rr dot com -# Depends on: clisp ghostscript icu libgd libmpfr poppler xorg-libxaw xorg-libxi zziplib +# Maintainer: +# Depends on: clisp icu libgd poppler t1lib util-linux xorg-libxi zziplib ghostscript + +# a more opt friendly approach +# you still need to install contrib/zziplib name=texlive version=20190410 -release=1 +release=10 source=(ftp://tug.org/historic/systems/texlive/${version:0:4}/$name-$version-texmf.tar.xz ftp://tug.org/historic/systems/texlive/${version:0:4}/$name-$version-source.tar.xz http://download.savannah.gnu.org/releases/texi2html/texi2html-5.0.tar.bz2 - support-system-poppler-0.76.-01.patch - reinstate-setting-HAVE_LIBGS-for-non-TL-builds.patch) + support-system-poppler-0.79.patch + reinstate-setting-HAVE_LIBGS-for-non-TL-builds.patch + tabu.sty.diff) build() { # remove broken symlinks @@ -29,9 +32,9 @@ build() { -exec chmod 644 {} \; # fix build with poppler >= 0.76 (upstream patch, cherry-picked from git-svn) - patch -Np1 -i $SRC/support-system-poppler-0.76.-01.patch - cp -pv texk/web2c/pdftexdir/pdftoepdf{-poppler0.76.0,}.cc - cp -pv texk/web2c/pdftexdir/pdftosrc{-poppler0.76.0,}.cc + patch -Np1 -i $SRC/support-system-poppler-0.79.patch + cp -pv texk/web2c/pdftexdir/pdftoepdf{-poppler0.79.0,}.cc + cp -pv texk/web2c/pdftexdir/pdftosrc{-poppler0.79.0,}.cc # fix libgs linking issue with dvisvgm (upstream patch, cherry-picked from git-svn) patch -Np1 -i $SRC/reinstate-setting-HAVE_LIBGS-for-non-TL-builds.patch @@ -39,46 +42,76 @@ build() { sed -i 's/SELFAUTOPARENT/TEXMFROOT/' texk/tex4htk/t4ht.c 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 - # taken from archs texlive-bin PKGBUILD - # https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/texlive-bin - # line 116 - 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|" '{}' \; export TEXMFCNF="" export KPATHSEA_WARNING=0 + # prevent compiling Xdvi with libXp + sed -i 's|-lXp ||' texk/xdvik/configure + mkdir build cd build - # consider disabling parts that conflict with other ports, like psutils - # some options included seem to be the default, remove them? - # (--disable-multiplatform, enable-largefile, ...) - # what is required to enable xindy? is it worth the trouble? - # # no idea about xindy, never really needed it until now and I am not sure what the benefits are. - # # I have to say though that I like to keep this beast at least a bit slim .footprint-wise, so if it's not needed right now, I wouldn't bother - # # I went ahead and tried to cluster everything to make it a bit more readable - # # also I attempt to provide a working xindy and luatex env ../configure \ --prefix=/usr \ --with-banner-add=" $(crux)" \ --with-clisp-runtime=system \ - --enable-{libtool-hack,luatex,shared,xindy} \ - --with-system-{cairo,freetype2,gd,gmp,icu,libpng,mpfr,ncurses,pixman,poppler,t1lib,xpdf,zlib,zziplib} \ + --enable-{gc=system,libtool-hack,luatex,pdftex,shared,tex,texlive,tex-synctex,web2c,xindy} \ + --with-system-{gd,gmp,mpfr,ncurses,pixman,poppler,t1lib,xpdf,zlib,zziplib} \ --with-x \ --with-xdvi-x-toolkit=xaw \ - --disable-{bibtexu,debug,dialog,missing,native-texlive-build,psutils,static,xindy-doc,xindy-rules} + --disable-{aleph,luajit,mflua,native-texlive-build,xetex,xindy-docs,xindy-rules} make - make DESTDIR=$PKG install + # taken from archs texlive-bin PKGBUILD + # https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/texlive-bin + # line 116 + # doesn't work + #find utils/xindy -name Makefile -exec sed -i -e "s|^prefix =.\+$|prefix = $PKG/usr|" \ + # -e "s|^mandir =.\+$|mandir = \${prefix}/share/man|" -e "s|^datadir =.\+$|datadir = \${datarootdir}/texmf-dist|" \ + # -e "s|^docdir =.\+$|docdir = \${datadir}/doc/xindy|" '{}' \; + make DESTDIR=$PKG install-strip cd .. perl_sitelib=$(perl -V:sitelib | sed -e "s|sitelib=[']\(.*\)['].*$|\1|") install -d $PKG/$perl_sitelib/TeXLive install texk/tests/TeXLive/TL{Config,Utils}.pm $PKG/$perl_sitelib/TeXLive + # configure fmtutil + sed \ + -e 's/^aleph/#! aleph/g' \ + -e 's/^lamed/#! lamed/g' \ + -e 's/^amstex/#! amstex/g' \ + -e 's/^cont-en xetex/#! cont-en xetex/g' \ + -e 's/^pdfcs/#! pdfcs/g' \ + -e 's/^luacs/#! luacs/g' \ + -e 's/^pdfcs/#! pdfcs/g' \ + -e 's/^csplain/#! csplain/g' \ + -e 's/^eplain/#! eplain/g' \ + -e 's/^pdfjadetex/#! pdfjadetex/g' \ + -e 's/^jadetex/#! jadetex/g' \ + -e 's/^luajittex/#! luajittex/g' \ + -e 's/^mf/#! mf/g' \ + -e 's/^pdfmex/#! pdfmex/g' \ + -e 's/^utf8mex/#! utf8mex/g' \ + -e 's/^mex/#! mex/g' \ + -e 's/^mllatex/#! mllatex/g' \ + -e 's/^mltex/#! mltex/g' \ + -e 's/^mptopdf/#! mptopdf/g' \ + -e 's/^platex/#! platex/g' \ + -e 's/^eptex/#! eptex/g' \ + -e 's/^ptex/#! ptex/g' \ + -e 's/^texsis/#! texsis/g' \ + -e 's/^euptex/#! euptex/g' \ + -e 's/^uplatex/#! uplatex/g' \ + -e 's/^uptex/#! uptex/g' \ + -e 's/^xelatex/#! xelatex/g' \ + -e 's/^xetex/#! xetex/g' \ + -e 's/^cslatex/#! cslatex/g' \ + -e 's/^lollipop/#! lollipop/g' \ + -i $PKG/usr/share/texmf-dist/web2c/fmtutil.cnf + # Create symlinks PATH="$PKG/usr/bin:$PATH" LD_LIBRARY_PATH+="$PKG/usr/lib:$LD_LIBRARY_PATH" \ texlinks -f $PKG/usr/share/texmf-dist/web2c/fmtutil.cnf $PKG/usr/bin @@ -86,27 +119,57 @@ build() { cd $SRC/$name-$version-texmf # 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 - + sed -i \ + -e 's|TEXMFROOT = .*|TEXMFROOT = $SELFAUTODIR/share|g' \ + -e 's|TEXMFLOCAL = .*|TEXMFLOCAL = $TEXMFROOT/texmf-local|g' \ + -e 's|^OSFONTDIR.*|OSFONTDIR = ~/.fonts:/usr/share/fonts|' \ + texmf-dist/web2c/texmf.cnf + + # maybe this can be worked around by unpacking texmf-dist directly to $PKG/usr/share? + # although this works fine and doesn't draw much performance on my end 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! + ## 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-* + # taken from slackwares SlackBuild + # http://slackbuilds.org/slackbuilds/14.2/office/texlive/texlive.SlackBuild + # line 175 + # disable obsolete aleph/lamed/cslatex/pdfcslatex + #sed -i \ + # -e 's|^aleph|#! aleph|' \ + # -e 's|^lamed|#! lamed|' \ + # -e 's|^cslatex|#! cslatex|' \ + # -e 's|^pdfcslatex|#! pdfcslatex|' \ + # $PKG/usr/share/texmf-dist/web2c/fmtutil.cnf + + # make ConTeXt work, and remove unused settings + sed -i \ + -e 's|selfautoparent:|/usr/share/|g' \ + -e 's|\(TEXMFLOCAL[ ]*=[ ]*\)[^,]*|\1"/usr/share/texmf-local"|' \ + -e '/selfautodir/d' \ + -e '/texmflocal/d' \ + $PKG/usr/share/texmf-dist/web2c/texmfcnf.lua + cd $SRC/texi2html-* ./configure --prefix=/usr - make make install DESTDIR=$PKG + # final clean up rm -r $PKG/usr/share/{info,locale,texmf-dist/doc} rm -r $PKG/usr/bin/tlmgr rm -r $PKG/usr/share/texmf-dist/scripts/texlive/tlmgr{,gui}.pl find $PKG/usr/share/texmf-dist \ -regex '.*/\(COPYING\|README\|AUTHORS\|INSTALL\|ChangeLog\|NEWS\|TODO\).*' \ -exec rm '{}' \+ + # strip .la files + rm -f $PKG/usr/lib/*.la + # patch tabu.sty from https://github.com/tabu-fixed/tabu to fix + # breakage when compiling doxygen: + ( cd $PKG/usr/share/texmf-dist/tex/latex/tabu + cat $SRC/tabu.sty.diff | patch -p1 --verbose || exit 1 + ) } |