PKGBUILDs/extra/texlive-bin/PKGBUILD

341 lines
11 KiB
Bash
Raw Normal View History

2011-09-17 17:37:29 +00:00
# Maintainer: Rémy Oudompheng <remy@archlinux.org>
# Contributor: francois <francois.archlinux.org>
2011-02-07 14:55:51 +00:00
2011-08-01 22:30:01 +00:00
# ALARM: Kevin Mihelich <kevin@plugapps.com>
2011-02-07 14:55:51 +00:00
# - Removed clisp makedepend, removed xindy from build and packaging (only thing that used clisp)
2011-05-08 18:02:30 +00:00
# - Use -fPIC with armv7
2011-02-07 14:55:51 +00:00
plugrel=1
pkgname=texlive-bin
2011-09-17 17:37:29 +00:00
pkgver=2011.1
_luatex_ver=0.70.1
2011-11-13 19:49:30 +00:00
pkgrel=4
2011-02-07 14:55:51 +00:00
pkgdesc="TeX Live binaries"
license=('GPL')
arch=('i686' 'x86_64')
2011-10-29 17:53:28 +00:00
depends=('t1lib' 'gd' 'poppler' 'libsigsegv' 'zziplib')
2011-02-07 14:55:51 +00:00
makedepends=('perl' 'ffcall')
2011-05-08 18:02:30 +00:00
optdepends=('ed: for texconfig')
2011-02-07 14:55:51 +00:00
provides=('lcdf-typetools' 'kpathsea' 'pdfjam')
conflicts=('pdfjam')
options=('!libtool')
url='http://tug.org/texlive/'
2011-09-17 17:37:29 +00:00
install="texlive.install"
2011-02-07 14:55:51 +00:00
source=('texmf.cnf'
'fix-fontforge-encoding.patch'
'09-texlive-fonts.conf'
2011-09-17 17:37:29 +00:00
'archlinux-build.patch'
'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-source-20110724.tar.xz'
'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-texmf-20110724.tar.xz'
2011-10-19 23:56:58 +00:00
# "http://foundry.supelec.fr/gf/download/frsrelease/392/1730/luatex-beta-${_luatex_ver}.tar.bz2"
2011-11-13 19:50:29 +00:00
'http://mirrors.kernel.org/archlinux/other/texlive/luatex-svn4356.tar.xz'
2011-09-17 17:37:29 +00:00
)
2011-02-07 14:55:51 +00:00
backup=(etc/texmf/web2c/texmf.cnf \
etc/texmf/chktex/chktexrc \
etc/texmf/web2c/mktex.cnf \
etc/texmf/web2c/updmap.cfg \
etc/texmf/web2c/fmtutil.cnf \
etc/texmf/tex/generic/config/language.dat \
etc/texmf/tex/generic/config/language.def \
etc/texmf/tex/generic/config/pdftexconfig.tex \
etc/texmf/ttf2pk/ttf2pk.cfg \
etc/texmf/dvips/config/config.ps \
etc/texmf/dvipdfmx/dvipdfmx.cfg \
etc/texmf/dvipdfm/config/config \
etc/texmf/xdvi/XDvi)
2011-09-17 17:37:29 +00:00
md5sums=('ff30d6813babd2e41c414365eea9c147'
2011-05-08 18:02:30 +00:00
'bfb9716aa00c86c08cd31e5b32edeb98'
'393a4bf67adc7ca5df2b386759d1a637'
2011-09-17 17:37:29 +00:00
'94ef5571a54262790ab64d6d044dd10c'
'58e8ab64188eaf15897b7acf472dca9f'
'9f7ae1aa24afd9e34289ac10a8f9e87b'
2011-10-19 23:56:58 +00:00
'e7f0197559ef865d8c01683dab3b8526')
2011-05-08 18:02:30 +00:00
2011-02-07 14:55:51 +00:00
build() {
2011-06-22 00:48:50 +00:00
if [ "${CARCH}" = "armv7h" ]; then
2011-02-07 14:55:51 +00:00
export CFLAGS="${CFLAGS} -fPIC"
export CXXFLAGS="${CXXFLAGS} -fPIC"
fi
cd $srcdir
# Building LuaTeX
2011-10-19 23:56:58 +00:00
# cd luatex-beta-${_luatex_ver}
cd luatex
2011-02-07 14:55:51 +00:00
patch -p0 -i ../fix-fontforge-encoding.patch
2011-09-17 17:37:29 +00:00
(cd source && ./texk/web2c/luatexdir/getluatexsvnversion.sh)
2011-02-07 14:55:51 +00:00
mkdir build
cd build
../source/configure --prefix=/usr -C \
--disable-native-texlive-build \
2011-05-08 18:02:30 +00:00
--with-banner-add="/Arch Linux" \
2011-02-07 14:55:51 +00:00
--enable-cxx-runtime-hack \
--disable-all-pkgs \
--disable-dump-share \
--disable-ptex \
--enable-luatex \
--without-system-ptexenc \
2011-10-29 17:53:28 +00:00
--without-system-graphite \
2011-02-07 14:55:51 +00:00
--without-system-icu \
--without-system-kpathsea \
--with-system-freetype2 \
--with-system-poppler \
--with-freetype2-libdir=/usr/lib \
--with-freetype2-include=/usr/include/freetype2 \
--with-system-gd \
--with-system-libpng \
--without-system-teckit \
--with-system-zlib \
2011-05-08 18:02:30 +00:00
--with-system-zziplib \
2011-02-07 14:55:51 +00:00
--with-system-t1lib \
--disable-shared \
--disable-largefile \
--disable-ipc \
--without-mf-x-toolkit \
--without-x
make
make -C libs/obsdcompat
make -C texk/kpathsea
make -C texk/web2c luatex
cd "$srcdir"
# this patch removes spurious error message with locale "xx_YY.utf8"
patch -p0 -i fix-fontforge-encoding.patch
#############################################################
### configure
cd source
2011-09-17 17:37:29 +00:00
patch -Np1 -i ${srcdir}/archlinux-build.patch
for _dir in texk/tetex texk/texlive texk/tex4htk \
utils/ps2eps utils/chktex utils/psutils; do
(cd ${_dir} && automake) || true
done
2011-02-07 14:55:51 +00:00
## prevent compiling Xdvi with libXp
sed -i~ 's|-lXp ||' texk/xdvik/configure
test ! -d Work && mkdir Work
cd Work
echo "--> Initial configuration..."
# we use temporary prefix to avoid messing the existing $pkgdir/usr/share/texmf tree
../configure --prefix=/usr -C \
2011-09-17 17:37:29 +00:00
--datarootdir=/usr/share \
--datadir=/usr/share \
--mandir=/usr/share/man \
2011-02-07 14:55:51 +00:00
--disable-native-texlive-build \
2011-05-08 18:02:30 +00:00
--with-banner-add="/Arch Linux" \
2011-02-07 14:55:51 +00:00
--disable-multiplatform \
--disable-dialog \
--disable-psutils \
--disable-t1utils \
--disable-bibtexu \
--disable-xz \
--with-system-zlib \
2011-09-17 17:37:29 +00:00
--with-system-zziplib \
2011-02-07 14:55:51 +00:00
--with-system-pnglib \
--with-system-ncurses \
--with-system-t1lib \
--with-system-gd \
2011-09-17 17:37:29 +00:00
--with-system-poppler \
2011-02-07 14:55:51 +00:00
--with-system-xpdf \
--with-system-freetype2 \
2011-10-29 17:53:28 +00:00
--without-system-graphite \
2011-02-07 14:55:51 +00:00
--with-freetype2-libdir=/usr/lib \
--with-freetype2-include=/usr/include/freetype2 \
--with-xdvi-x-toolkit=xaw \
--disable-dump-share \
--disable-aleph \
--disable-luatex
#############################################################
### make
echo "-------------------------------------------------------"
echo "--> Building the whole beast ..."
echo "-------------------------------------------------------"
make
}
package() {
cd $srcdir
#############################################################
### install texmf tree
echo "-------------------------------------------------------"
echo "--> installing the texmf tree"
echo "-------------------------------------------------------"
install -m755 -d $pkgdir/usr/share
cp -r texmf $pkgdir/usr/share/
install -d -m755 $pkgdir/etc/texmf/web2c
install -d -m755 $pkgdir/etc/texmf/chktex
install -d -m755 $pkgdir/etc/texmf/dvips/config
install -d -m755 $pkgdir/etc/texmf/dvipdfm/config
install -d -m755 $pkgdir/etc/texmf/dvipdfmx
install -d -m755 $pkgdir/etc/texmf/tex/generic/config
install -d -m755 $pkgdir/etc/texmf/ttf2pk
install -d -m755 $pkgdir/etc/texmf/xdvi
install -d -m755 $pkgdir/etc/fonts/conf.avail
install -m644 $srcdir/09-texlive-fonts.conf $pkgdir/etc/fonts/conf.avail/
# replace upstream texmf.cnf with ours
rm -f $pkgdir/usr/share/texmf/web2c/texmf.cnf
install -m644 $srcdir/texmf.cnf $pkgdir/etc/texmf/web2c/texmf.cnf
# since the location of texmf.cnf is hard-wired to be under /usr/share/texmf/web2c
# we make a symlink from /etc/texmf/web2c/texmf.cnf to the latter
ln -s /etc/texmf/web2c/texmf.cnf $pkgdir/usr/share/texmf/web2c/texmf.cnf
# fix location of TEXMFCACHE for luatools
sed -i 's#texlive2010#texlive#' $pkgdir/usr/share/texmf/web2c/texmfcnf.lua
## remove aleph from fmtutil.cnf
sed -i -e '/aleph/d' $pkgdir/usr/share/texmf/web2c/fmtutil.cnf
# move man files to /usr/share/man
for i in 1 5; do
install -d -m755 $pkgdir/usr/share/man/man$i
mv $pkgdir/usr/share/texmf/doc/man/man$i/*.$i $pkgdir/usr/share/man/man$i/
done
# move info files to /usr/share/info
install -d -m755 $pkgdir/usr/share/info
mv $pkgdir/usr/share/texmf/doc/info/*.info $pkgdir/usr/share/info/
rm -rf $pkgdir/usr/share/texmf/doc/{man,info}
# copy config files to $TEXMFCONFIG tree
cp -a $pkgdir/usr/share/texmf/chktex/chktexrc \
$pkgdir/etc/texmf/chktex/
cp -a $pkgdir/usr/share/texmf/web2c/mktex.cnf \
$pkgdir/etc/texmf/web2c/
cp -a $pkgdir/usr/share/texmf/web2c/updmap.cfg \
$pkgdir/etc/texmf/web2c/
cp -a $pkgdir/usr/share/texmf/web2c/fmtutil.cnf \
$pkgdir/etc/texmf/web2c/
cp -a $pkgdir/usr/share/texmf/dvips/config/config.ps \
$pkgdir/etc/texmf/dvips/config/
cp -a $pkgdir/usr/share/texmf/dvipdfm/config/config \
$pkgdir/etc/texmf/dvipdfm/config/
cp -a $pkgdir/usr/share/texmf/dvipdfmx/dvipdfmx.cfg \
$pkgdir/etc/texmf/dvipdfmx/
cp -a $pkgdir/usr/share/texmf/tex/generic/config/pdftexconfig.tex \
$pkgdir/etc/texmf/tex/generic/config/
cp -a $pkgdir/usr/share/texmf/tex/generic/config/language.dat \
$pkgdir/etc/texmf/tex/generic/config/
cp -a $pkgdir/usr/share/texmf/tex/generic/config/language.def \
$pkgdir/etc/texmf/tex/generic/config/
cp -a $pkgdir/usr/share/texmf/ttf2pk/ttf2pk.cfg \
$pkgdir/etc/texmf/ttf2pk/
cp -a $pkgdir/usr/share/texmf/xdvi/XDvi \
$pkgdir/etc/texmf/xdvi/
# remove TL specific warnings in the language.{dat,def} files:
sed -i -e '/DO NOT EDIT/,+3 d' $pkgdir/etc/texmf/tex/generic/config/language.*
# clean updmap.cfg
sed -i '/^\(Map\|MixedMap\)/d' $pkgdir/etc/texmf/web2c/updmap.cfg
sed -i '/^#! \(Map\|MixedMap\)/d' $pkgdir/etc/texmf/web2c/updmap.cfg
#############################################################
### install
cd source
echo "-------------------------------------------------------"
echo "--> Proceeding with make install ..."
echo "-------------------------------------------------------"
cd Work
2011-09-17 17:37:29 +00:00
make DESTDIR=${pkgdir} texmf=$pkgdir/usr/share/texmf install
rm -rf ${pkgdir}/usr/{texmf,texmf-dist}
2011-02-07 14:55:51 +00:00
## install luatex binary
2011-10-19 23:56:58 +00:00
#install -m755 $srcdir/luatex-beta-${_luatex_ver}/build/texk/web2c/luatex $pkgdir/usr/bin/
install -m755 $srcdir/luatex/build/texk/web2c/luatex $pkgdir/usr/bin/
2011-02-07 14:55:51 +00:00
cd $pkgdir/usr/bin
/bin/ln -s luatex texlua
/bin/ln -s luatex texluac
2011-09-17 17:37:29 +00:00
## install Perl libraries
mkdir -p $pkgdir/usr/share/tlpkg/TeXLive
install -m644 ${srcdir}/source/utils/biber/TeXLive/*.pm $pkgdir/usr/share/tlpkg/TeXLive
2011-02-07 14:55:51 +00:00
# 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/
#############################################################
2011-05-08 18:02:30 +00:00
# remove dangling symlinks
_bibtexextra_scripts="bibexport"
_core_scripts="
afm2afm
arlatex
autoinst
bundledoc
cmap2enc
de-macro
dviasm
epstopdf
findhyph
font2afm
fragmaster
installfont-tl
latex2man
latexdiff
latexdiff-vc
latexmk
latexrevise
listings-ext.sh
mkjobtexmf
mkluatexfontdb
mkt1font
mptopdf
ot2kpx
pdf180
pdf270
pdf90
pdfatfi
pdfbook
pdfcrop
pdfflip
pdfjam
pdfjam-pocketmod
pdfjam-slides3up
pdfjam-slides6up
pdfjoin
pdfnup
pdfpun
pfm2kpx
pkfix
pkfix-helper
purifyeps
repstopdf
rpdfcrop
showglyphs
2011-09-17 17:37:29 +00:00
sty2dtx
2011-05-08 18:02:30 +00:00
texcount
2011-09-17 17:37:29 +00:00
texdef
2011-05-08 18:02:30 +00:00
texdiff
texdirflatten
texloganalyser
thumbpdf
vpl2ovp
vpl2vpl
"
_htmlxml_scripts="ht htcontext htlatex htmex httex httexi htxelatex htxetex mk4ht"
_langextra_scripts="ebong"
_langgreek_scripts="mkgrkindex"
_latexextra_scripts="authorindex \
2011-02-07 14:55:51 +00:00
makeglossaries \
pdfannotextractor \
pdfthumb \
2011-05-08 18:02:30 +00:00
perltex \
2011-02-07 14:55:51 +00:00
ppower4 \
ps4pdf \
splitindex \
svn-multi \
2011-05-08 18:02:30 +00:00
vpe"
2011-09-17 17:37:29 +00:00
_music_scripts="musixtex musixflx"
2011-05-08 18:02:30 +00:00
_pictures_scripts="cachepic epspdf epspdftk fig4latex mathspic"
_pstricks_scripts="pst2pdf"
_science_scripts="ulqda"
for s in \
${_bibtexextra_scripts} \
2011-09-17 17:37:29 +00:00
${_core_scripts} \
2011-05-08 18:02:30 +00:00
${_htmlxml_scripts} \
${_langextra_scripts} \
${_langgreek_scripts} \
${_latexextra_scripts} \
2011-09-17 17:37:29 +00:00
${_music_scripts} \
2011-05-08 18:02:30 +00:00
${_pictures_scripts} \
${_pstricks_scripts} \
${_science_scripts} \
tlmgr; do
2011-02-07 14:55:51 +00:00
rm -f $pkgdir/usr/bin/$s
done
###################################################################
}