mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 14:47:15 +08:00
298 lines
11 KiB
Bash
298 lines
11 KiB
Bash
# $Id: PKGBUILD 78264 2010-04-20 07:28:39Z pierre $
|
|
# Maintainer: francois at archlinux dot org
|
|
|
|
pkgname=texlive-bin
|
|
pkgver=2009.5
|
|
pkgrel=1
|
|
pkgdesc="TeX Live binaries"
|
|
license=('GPL')
|
|
arch=('i686' 'x86_64')
|
|
depends=('t1lib' 'gd' 'libsigsegv' 'poppler')
|
|
makedepends=('clisp' 'ffcall')
|
|
options=('!makeflags' '!libtool')
|
|
url='http://tug.org/texlive/'
|
|
source=('texmf.cnf'
|
|
'ftp://ftp.archlinux.org/other/texlive/texlive-bin-source-20100112.tar.xz'
|
|
'ftp://ftp.archlinux.org/other/texlive/texlive-bin-texmf-20100112.tar.xz'
|
|
'http://foundry.supelec.fr/gf/download/frsrelease/364/1424/luatex-beta-0.50.0.tar.bz2'
|
|
'fix-fontforge-encoding.patch'
|
|
'luatex-0.50-poppler.patch' libpng14.patch)
|
|
md5sums=('04aff1501d9a8418903dd7342b6db87f' 'bed5410ff12bb62da1064b306af0baa2'\
|
|
'8c4eb9b70a3abc86339c285b01439e1f' '125a21f67ff54440606660306106d331'\
|
|
'bfb9716aa00c86c08cd31e5b32edeb98' 'c5c12aa500e54286b30db0dbb28d4e81'\
|
|
'20135b3f569477a58fbdd96b6b498943')
|
|
sha1sums=('98806c7e48db2da9ac9092d1e729b3bf316408df' 'f1b2557d00bb557a752509e71ca87b6020db3e5f'\
|
|
'5eef8f36bc3d8007cdf08fccfe38954fae9c619a' '9fd23438c546b27e6be725bb900cd083fa5b2056'\
|
|
'5301263529702ccfda0adb3706f461888dea22eb' 'e7a3110fa13a232b85305a01444aae11cf672956'\
|
|
'985c574fbf7d9d5cc7fcfa08d5ffeda70f34fbbf')
|
|
backup=(usr/share/texmf/web2c/texmf.cnf \
|
|
usr/share/texmf-config/web2c/mktex.cnf \
|
|
usr/share/texmf-config/web2c/updmap.cfg \
|
|
usr/share/texmf-config/web2c/fmtutil.cfg \
|
|
usr/share/texmf-config/tex/generic/config/language.dat \
|
|
usr/share/texmf-config/tex/generic/config/pdftexconfig.tex \
|
|
usr/share/texmf-config/ttf2pk/ttf2pk.cfg \
|
|
usr/share/texmf-config/dvips/config/config.ps \
|
|
usr/share/texmf-config/dvipdfm/dvipdfmx.cfg \
|
|
usr/share/texmf-config/dvipdfm/config/config \
|
|
usr/share/texmf-config/xdvi/XDvi)
|
|
build() {
|
|
if [ "${CARCH}" = "x86_64" ]; then
|
|
export CFLAGS="${CFLAGS} -fPIC"
|
|
export CXXFLAGS="${CXXFLAGS} -fPIC"
|
|
fi
|
|
|
|
cd $srcdir
|
|
|
|
patch -p0 < libpng14.patch || return 1
|
|
|
|
install -m755 -d $pkgdir/usr/share || return 1
|
|
cp -r texmf $pkgdir/usr/share/ || return 1
|
|
|
|
### provisory: we configure and build luatex 0.50 separately, because
|
|
# it is needed for latest ConTeXT in texlive-core, but it fails to build
|
|
# when integrated in the texlive build tree
|
|
cd luatex-beta-0.50.0 || return 1
|
|
patch -p0 -i ../fix-fontforge-encoding.patch || return 1
|
|
patch -p1 -i ../luatex-0.50-poppler.patch || return 1
|
|
mkdir build || return 1
|
|
cd build || return 1
|
|
../source/configure --prefix=/usr \
|
|
--enable-cxx-runtime-hack \
|
|
--disable-afm2pl \
|
|
--disable-aleph \
|
|
--disable-bibtex \
|
|
--disable-bibtex8 \
|
|
--disable-cfftot1 \
|
|
--disable-cjkutils \
|
|
--disable-detex \
|
|
--disable-devnag \
|
|
--disable-dialog \
|
|
--disable-dtl \
|
|
--disable-dump-share \
|
|
--disable-dvi2tty \
|
|
--disable-dvidvi \
|
|
--disable-dviljk \
|
|
--disable-dvipdfm \
|
|
--disable-dvipdfmx \
|
|
--disable-dvipos \
|
|
--disable-dvipsk \
|
|
--disable-gsftopk \
|
|
--disable-lacheck \
|
|
--disable-lcdf-typetools \
|
|
--disable-makeindexk \
|
|
--disable-mf \
|
|
--disable-mmafm \
|
|
--disable-mmpfb \
|
|
--disable-musixflx \
|
|
--disable-otfinfo \
|
|
--disable-otftotfm \
|
|
--disable-pdfopen \
|
|
--disable-pdftex \
|
|
--disable-ps2eps \
|
|
--disable-ps2pkm \
|
|
--disable-psutils \
|
|
--disable-seetexk \
|
|
--disable-t1dotlessj \
|
|
--disable-t1lint \
|
|
--disable-t1rawafm \
|
|
--disable-t1reencode \
|
|
--disable-t1testpage \
|
|
--disable-t1utils \
|
|
--disable-tex \
|
|
--disable-tex4htk \
|
|
--disable-tpic2pdftex \
|
|
--disable-ttf2pk \
|
|
--disable-ttfdump \
|
|
--disable-ttftotype42 \
|
|
--disable-vlna \
|
|
--disable-web-progs \
|
|
--disable-xdv2pdf \
|
|
--disable-xdvipdfmx \
|
|
--without-system-kpathsea \
|
|
--with-system-freetype2 \
|
|
--with-system-xpdf \
|
|
--with-freetype2-libdir=/usr/lib \
|
|
--with-freetype2-include=/usr/include/freetype2 \
|
|
--with-system-gd \
|
|
--with-system-libpng \
|
|
--without-system-teckit \
|
|
--with-system-zlib \
|
|
--with-system-t1lib \
|
|
--disable-shared \
|
|
--disable-largefile \
|
|
--disable-ipc \
|
|
--without-mf-x-toolkit \
|
|
--without-x || return 1
|
|
make || return 1
|
|
|
|
## install luatex binary
|
|
install -d -m755 $pkgdir/usr/bin || return 1
|
|
install -m755 texk/web2c/luatex $pkgdir/usr/bin/ || return 1
|
|
cd $pkgdir/usr/bin
|
|
/bin/ln -s luatex texlua || return 1
|
|
cd $srcdir
|
|
##################################
|
|
# TODO don't forget to remove --disable-luatex below
|
|
# once luatex is updated in TeXLive...
|
|
|
|
cd source
|
|
## prevent compiling Xdvi with libXp
|
|
sed -i~ 's|-lXp ||' texk/xdvik/configure
|
|
test ! -d Work && mkdir Work
|
|
cd Work
|
|
echo "--> Initial configuration..."
|
|
../configure --prefix=/usr \
|
|
--datarootdir=$pkgdir/usr/share \
|
|
--datadir=$pkgdir/usr/share \
|
|
--mandir=$pkgdir/usr/share/man \
|
|
--disable-native-texlive-build \
|
|
--with-tex-banner="TeX Live 2009/Arch Linux" \
|
|
--disable-multiplatform \
|
|
--disable-dialog \
|
|
--disable-psutils \
|
|
--disable-t1utils \
|
|
--disable-xz \
|
|
--with-system-zlib \
|
|
--with-system-pnglib \
|
|
--with-system-ncurses \
|
|
--with-system-t1lib \
|
|
--with-system-gd \
|
|
--with-system-xpdf \
|
|
--with-system-freetype2 \
|
|
--with-freetype2-libdir=/usr/lib \
|
|
--with-freetype2-include=/usr/include/freetype2 \
|
|
--with-xdvi-x-toolkit=xaw \
|
|
--disable-dump-share \
|
|
--disable-aleph \
|
|
--disable-luatex \
|
|
--without-graphite \
|
|
--enable-xindy || return 1
|
|
#############################################################
|
|
#############################################################
|
|
echo "-------------------------------------------------------"
|
|
echo "--> Building the whole beast ..."
|
|
make || return 1
|
|
#############################################################
|
|
|
|
### fixes for xindy
|
|
find utils/xindy -name Makefile -exec sed -i -e "s|^prefix =.\+$|prefix = $pkgname/usr|" -e "s|^mandir =.\+$|mandir = \${prefix}/share/man|" -e "s|^datadir =.\+$|datadir = \${datarootdir}/texmf|" -e "s|^docdir =.\+$|docdir = \${datadir}/doc/xindy|" '{}' \; || return 1
|
|
echo "-------------------------------------------------------"
|
|
echo "--> Proceeding with make install ..."
|
|
install -d -m755 $pkgdir/usr/share/man/man5
|
|
make prefix=$pkgdir/usr texmf=$pkgdir/usr/share/texmf install || return 1
|
|
echo "-------------------------------------------------------"
|
|
echo "--> Fixing symlinks for scripts ..."
|
|
for f in $pkgdir/usr/bin/* ; do
|
|
if [ -L $f ]; then
|
|
target=`ls -l "$f" | sed 's/^.\+ -> //'`
|
|
if [[ "$target" == ..* ]]; then
|
|
newtarget=`echo $target | sed -e 's#../#/usr/share/#'`
|
|
rm -f $f
|
|
ln -s $newtarget $f
|
|
test -f $pkgdir/$newtarget && chmod a+x $pkgdir/$newtarget
|
|
fi
|
|
fi
|
|
done
|
|
|
|
## create symlinks for formats
|
|
echo "--> Create symlinks for TeX formats ..."
|
|
PATH="$PATH:${pkgdir}/usr/bin" texlinks -f $pkgdir/usr/share/texmf/web2c/fmtutil.cnf $pkgdir/usr/bin/ || return 1
|
|
#############################################################
|
|
|
|
## CLEAN UP...
|
|
echo "--> ...Cleaning up installation"
|
|
# remove tlmgr from PATH
|
|
rm -f $pkgdir/usr/bin/tlmgr
|
|
# spurious symlink
|
|
rm -f $pkgdir/usr/bin/man
|
|
|
|
# remove symlinks to scripts that are not in texlive-core:
|
|
for s in cachepic ht htcontext htlatex htmex httex httexi htxelatex htxetex mk4ht \
|
|
mkgrkindex epspdftk pst2pdf epspdf ulqda ebong makeglossaries \
|
|
pdfannotextractor perltex pdfthumb ppower4 ps4pdf splitindex svn-multi vpe; do
|
|
rm $pkgdir/usr/bin/$s
|
|
done
|
|
|
|
# the mandirs contain Makefiles ...
|
|
find $pkgdir -name Makefile -delete
|
|
|
|
rm -f $pkgdir/usr/share/texmf/scripts/texlive/*-{win32,w32}*
|
|
rm -rf $pkgdir/usr/share/texmf/scripts/tlgs
|
|
rm -rf $pkgdir/usr/share/texmf/asymptote
|
|
|
|
# make install targets are somewhat chaotic :)
|
|
mv -n $pkgdir/usr/texmf/* $pkgdir/usr/share/texmf/
|
|
mv -n $pkgdir/usr/texmf-dist/* $pkgdir/usr/share/texmf/
|
|
rm -rf $pkgdir/usr/{texmf,texmf-dist}
|
|
rmdir $pkgdir/usr/share/lcdf-typetools
|
|
|
|
# most man files went to two different places:
|
|
for i in 1 5; do
|
|
# remove pdf versions of manpages:
|
|
rm -f $pkgdir/usr/share/texmf/doc/man/man$i/*.pdf
|
|
# move to
|
|
mv -n $pkgdir/usr/share/texmf/doc/man/man$i/*.$i $pkgdir/usr/share/man/man$i/
|
|
done
|
|
# remove all doc (essentially xindy and duplicated man files)
|
|
rm -rf $pkgdir/usr/share/texmf/doc
|
|
# those files are also in base, but "make install" duplicated them here:
|
|
rm -rf $pkgdir/usr/share/texmf/bibtex/
|
|
# remove files that belong to asymptote
|
|
rm -rf $pkgdir/usr/share/texmf/tex/latex/asymptote
|
|
for f in asy xasy; do
|
|
rm -f $pkgdir/usr/share/man/man1/$f.1
|
|
done
|
|
# remove files that belong to t1utils
|
|
for f in t1ascii t1asm t1binary t1disasm t1mac t1unmac; do
|
|
rm -f $pkgdir/usr/share/man/man1/$f.1
|
|
done
|
|
# remove files that belong to psutils
|
|
for f in epsffit extractres fixdlsrps fixfmps fixmacps fixpsditps fixpspps fixscribeps fixtpps fixwfwps fixwpps fixwwps getafm includeres psbook psmerge psnup psresize psselect pstops; do
|
|
rm -f $pkgdir/usr/share/man/man1/$f.1
|
|
done
|
|
# remove man files that belong to omega/aleph
|
|
for f in lambda odvicopy odvitype ofm2opl opl2ofm otp2ocp outocp ovf2ovp ovp2ovf ; do
|
|
rm -f $pkgdir/usr/share/man/man1/$f.1
|
|
done
|
|
# replace upstream texmf.cnf with ours
|
|
rm -f $pkgdir/usr/share/texmf/web2c/texmf.cnf
|
|
install -m644 $srcdir/texmf.cnf $pkgdir/usr/share/texmf/web2c/texmf.cnf
|
|
## remove aleph from fmtutil.cnf
|
|
sed -i -e '/aleph/d' $pkgdir/usr/share/texmf/web2c/fmtutil.cnf || return 1
|
|
###################################################################
|
|
# copy config files to texmf-config tree
|
|
install -d -m755 $pkgdir/usr/share/texmf-config/web2c
|
|
install -d -m755 $pkgdir/usr/share/texmf-config/dvips/config
|
|
install -d -m755 $pkgdir/usr/share/texmf-config/dvipdfm/config
|
|
install -d -m755 $pkgdir/usr/share/texmf-config/dvipdfmx
|
|
install -d -m755 $pkgdir/usr/share/texmf-config/tex/generic/config
|
|
install -d -m755 $pkgdir/usr/share/texmf-config/xdvi
|
|
cp -a $pkgdir/usr/share/texmf/web2c/mktex.cnf \
|
|
$pkgdir/usr/share/texmf-config/web2c/
|
|
cp -a $pkgdir/usr/share/texmf/web2c/updmap.cfg \
|
|
$pkgdir/usr/share/texmf-config/web2c/
|
|
cp -a $pkgdir/usr/share/texmf/web2c/fmtutil.cnf \
|
|
$pkgdir/usr/share/texmf-config/web2c/
|
|
cp -a $pkgdir/usr/share/texmf/dvips/config/config.ps \
|
|
$pkgdir/usr/share/texmf-config/dvips/config/
|
|
cp -a $pkgdir/usr/share/texmf/dvipdfm/config/config \
|
|
$pkgdir/usr/share/texmf-config/dvipdfm/config/
|
|
cp -a $pkgdir/usr/share/texmf/dvipdfmx/dvipdfmx.cfg \
|
|
$pkgdir/usr/share/texmf-config/dvipdfmx/
|
|
cp -a $pkgdir/usr/share/texmf/tex/generic/config/pdftexconfig.tex \
|
|
$pkgdir/usr/share/texmf-config/tex/generic/config/
|
|
cp -a $pkgdir/usr/share/texmf/tex/generic/config/language.dat \
|
|
$pkgdir/usr/share/texmf-config/tex/generic/config/
|
|
cp -a $pkgdir/usr/share/texmf/xdvi/XDvi \
|
|
$pkgdir/usr/share/texmf-config/xdvi/
|
|
# clean updmap.cfg
|
|
sed -i '/^\(Map\|MixedMap\)/d' $pkgdir/usr/share/texmf-config/web2c/updmap.cfg
|
|
sed -i '/^#! \(Map\|MixedMap\)/d' $pkgdir/usr/share/texmf-config/web2c/updmap.cfg
|
|
# fix hard-coded paths in xindy.pl
|
|
sed -i "s|'/.\+/pkg/usr|'/usr|" $pkgdir/usr/share/texmf/scripts/xindy/xindy.pl
|
|
# move xindy modules to /usr/share/xindy
|
|
rm -rf $pkgdir/usr/share/xindy
|
|
mv $pkgdir/usr/share/texmf/xindy $pkgdir/usr/share/
|
|
}
|