PKGBUILDs/extra/texlive-bin/PKGBUILD

315 lines
9.9 KiB
Bash
Raw Normal View History

2012-07-22 16:56:57 +00:00
# $Id: PKGBUILD 163857 2012-07-21 11:53:06Z remy $
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-12-24 08:09:03 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
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
2012-02-11 21:44:10 +00:00
# - --disable-cxx-runtime-hack in configure
2011-02-07 14:55:51 +00:00
pkgname=texlive-bin
2012-07-22 16:56:57 +00:00
pkgver=2012.0
2013-05-25 13:49:13 +00:00
pkgrel=12
2011-02-07 14:55:51 +00:00
pkgdesc="TeX Live binaries"
license=('GPL')
arch=('i686' 'x86_64')
2013-01-12 08:48:50 +00:00
depends=('t1lib' 'gd' 'poppler>=0.22.0' 'libsigsegv' 'zziplib' 'libpng' 'libjpeg' 'freetype2')
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')
2011-12-24 08:09:03 +00:00
options=('!libtool' '!strip')
2011-02-07 14:55:51 +00:00
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'
2012-07-22 16:56:57 +00:00
'poppler-0.20.patch'
'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-source-20120623.tar.xz'
'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-texmf-20120623.tar.xz'
'luatex-r4449-radical-rule-thickness.patch'
2011-09-17 17:37:29 +00:00
)
2011-02-07 14:55:51 +00:00
backup=(etc/texmf/web2c/texmf.cnf \
2012-07-22 16:56:57 +00:00
etc/texmf/chktex/chktexrc \
etc/texmf/dvipdfm/config/config \
etc/texmf/dvipdfmx/dvipdfmx.cfg \
etc/texmf/dvips/config/config.ps \
2011-02-07 14:55:51 +00:00
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 \
2012-07-22 16:56:57 +00:00
etc/texmf/web2c/fmtutil.cnf \
etc/texmf/web2c/mktex.cnf \
2011-02-07 14:55:51 +00:00
etc/texmf/xdvi/XDvi)
2011-12-24 08:09:03 +00:00
md5sums=('220a4f4cc0d915bf8fcbcb553dcee1ae'
2011-05-08 18:02:30 +00:00
'bfb9716aa00c86c08cd31e5b32edeb98'
'393a4bf67adc7ca5df2b386759d1a637'
2012-07-22 16:56:57 +00:00
'e3a664d5a7f0923f35060fe9d25d2573'
'ac2c3c3aa765581f8504e21a5edbfb9f'
'f315a860158cfc952c82a6d759961024'
'5190f3295eb9a604c5f17f5bd607299b')
2011-05-08 18:02:30 +00:00
2011-02-07 14:55:51 +00:00
build() {
2013-01-12 08:48:50 +00:00
cd "$srcdir"
2012-08-04 04:43:31 +00:00
if [ "${CARCH}" = "armv6h" -o "${CARCH}" = "armv7h" ]; then
2011-02-07 14:55:51 +00:00
export CFLAGS="${CFLAGS} -fPIC"
export CXXFLAGS="${CXXFLAGS} -fPIC"
fi
# this patch removes spurious error message with locale "xx_YY.utf8"
2012-07-22 16:56:57 +00:00
patch -Np0 -i fix-fontforge-encoding.patch
# fix build with poppler >= 0.20
patch -Np0 -i poppler-0.20.patch
# fix radical rule thickness regression in Luatex
# http://tex.stackexchange.com/q/61952/729
patch -Np0 -i luatex-r4449-radical-rule-thickness.patch
2011-11-27 20:44:43 +00:00
# t4ht expects to be un /usr/share/texmf/bin/t4ht (FS#27251)
sed -i s/SELFAUTOPARENT/TEXMFROOT/ source/texk/tex4htk/t4ht.c
2011-02-07 14:55:51 +00:00
#############################################################
### configure
cd source
## prevent compiling Xdvi with libXp
sed -i~ 's|-lXp ||' texk/xdvik/configure
test ! -d Work && mkdir Work
cd Work
echo "--> Initial configuration..."
2012-02-06 15:41:43 +00:00
# we use temporary prefix to avoid messing the existing
# $pkgdir/usr/share/texmf tree
# system zlib is disabled due to issues with zlib 1.2.6 (FS#28221)
2011-02-07 14:55:51 +00:00
../configure --prefix=/usr -C \
2011-12-24 08:09:03 +00:00
--sysconfdir=/etc \
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" \
2012-07-22 16:56:57 +00:00
--disable-cxx-runtime-hack \
2011-02-07 14:55:51 +00:00
--disable-multiplatform \
--disable-dialog \
--disable-psutils \
--disable-t1utils \
--disable-bibtexu \
--disable-xz \
2012-07-22 16:56:57 +00:00
--with-system-zlib \
--with-system-zziplib \
--with-system-pnglib \
2011-02-07 14:55:51 +00:00
--with-system-ncurses \
--with-system-t1lib \
2012-07-22 16:56:57 +00:00
--with-system-gd \
--with-system-poppler \
--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 \
2012-07-22 16:56:57 +00:00
--enable-luatex
2011-02-07 14:55:51 +00:00
#############################################################
### make
echo "-------------------------------------------------------"
echo "--> Building the whole beast ..."
echo "-------------------------------------------------------"
make
}
package() {
2012-02-06 15:41:43 +00:00
cd "$srcdir"
2011-02-07 14:55:51 +00:00
#############################################################
### install texmf tree
echo "-------------------------------------------------------"
echo "--> installing the texmf tree"
echo "-------------------------------------------------------"
2012-02-06 15:41:43 +00:00
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/
2011-02-07 14:55:51 +00:00
# move man files to /usr/share/man
for i in 1 5; do
2012-02-06 15:41:43 +00:00
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/
2011-02-07 14:55:51 +00:00
done
# move info files to /usr/share/info
2012-02-06 15:41:43 +00:00
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}
2011-02-07 14:55:51 +00:00
# copy config files to $TEXMFCONFIG tree
2012-02-06 15:41:43 +00:00
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/
2011-02-07 14:55:51 +00:00
# remove TL specific warnings in the language.{dat,def} files:
2012-02-06 15:41:43 +00:00
sed -i -e '/DO NOT EDIT/,+3 d' "$pkgdir"/etc/texmf/tex/generic/config/language.*
2011-02-07 14:55:51 +00:00
# clean updmap.cfg
2012-02-06 15:41:43 +00:00
sed -i '/^\(Map\|MixedMap\)/d' "$pkgdir"/etc/texmf/web2c/updmap.cfg
sed -i '/^#! \(Map\|MixedMap\)/d' "$pkgdir"/etc/texmf/web2c/updmap.cfg
2011-02-07 14:55:51 +00:00
#############################################################
### install
cd source
echo "-------------------------------------------------------"
echo "--> Proceeding with make install ..."
echo "-------------------------------------------------------"
cd Work
2012-02-06 15:41:43 +00:00
make DESTDIR="${pkgdir}" texmf="$pkgdir"/usr/share/texmf install
rm -rf "${pkgdir}"/usr/{texmf,share/texmf-dist}
2011-12-24 08:09:03 +00:00
# replace upstream texmf.cnf with ours
2012-02-06 15:41:43 +00:00
rm -f "$pkgdir"/usr/share/texmf/web2c/texmf.cnf
install -m644 "$srcdir"/texmf.cnf "$pkgdir"/etc/texmf/web2c/texmf.cnf
2011-12-24 08:09:03 +00:00
# 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
2012-02-06 15:41:43 +00:00
ln -sf /etc/texmf/web2c/texmf.cnf "$pkgdir"/usr/share/texmf/web2c/texmf.cnf
2011-12-24 08:09:03 +00:00
# fix location of TEXMFCACHE for luatools
2012-02-06 15:41:43 +00:00
sed -i 's#texlive2010#texlive#' "$pkgdir"/usr/share/texmf/web2c/texmfcnf.lua
2011-12-24 08:09:03 +00:00
## remove aleph from fmtutil.cnf
2012-02-06 15:41:43 +00:00
sed -i -e '/aleph/d' "$pkgdir"/usr/share/texmf/web2c/fmtutil.cnf
2011-02-07 14:55:51 +00:00
2011-09-17 17:37:29 +00:00
## install Perl libraries
2012-02-06 15:41:43 +00:00
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 ..."
2012-02-06 15:41:43 +00:00
PATH="$PATH:${pkgdir}/usr/bin" texlinks -f "$pkgdir"/usr/share/texmf/web2c/fmtutil.cnf "$pkgdir"/usr/bin/
2011-02-07 14:55:51 +00:00
#############################################################
2011-05-08 18:02:30 +00:00
# remove dangling symlinks
2011-12-24 08:09:03 +00:00
_bibtexextra_scripts="
bibexport
2012-07-22 16:56:57 +00:00
listbib
2011-12-24 08:09:03 +00:00
urlbst
"
2011-05-08 18:02:30 +00:00
_core_scripts="
afm2afm
arlatex
autoinst
bundledoc
2012-07-22 16:56:57 +00:00
checkcites
2011-05-08 18:02:30 +00:00
cmap2enc
2011-12-24 08:09:03 +00:00
ctanify
ctanupload
2011-05-08 18:02:30 +00:00
de-macro
2011-12-24 08:09:03 +00:00
dosepsbin
2011-05-08 18:02:30 +00:00
dviasm
epstopdf
findhyph
font2afm
fragmaster
installfont-tl
latex2man
latexdiff
latexdiff-vc
2012-07-22 16:56:57 +00:00
latexfileversion
2011-05-08 18:02:30 +00:00
latexmk
latexrevise
listings-ext.sh
2011-12-24 08:09:03 +00:00
match_parens
mf2pt1
2011-05-08 18:02:30 +00:00
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
2011-12-24 08:09:03 +00:00
texliveonfly
2011-05-08 18:02:30 +00:00
texloganalyser
2012-07-22 16:56:57 +00:00
typeoutfileinfo
2011-05-08 18:02:30 +00:00
thumbpdf
vpl2ovp
vpl2vpl
"
_htmlxml_scripts="ht htcontext htlatex htmex httex httexi htxelatex htxetex mk4ht"
2012-07-22 16:56:57 +00:00
_langcjk_scripts="convbkmk updmap-setup-kanji"
2011-05-08 18:02:30 +00:00
_langextra_scripts="ebong"
_langgreek_scripts="mkgrkindex"
2012-07-22 16:56:57 +00:00
_latexextra_scripts="
authorindex
exceltex
makeglossaries
pdfannotextractor
perltex
ppower4
ps4pdf
splitindex
svn-multi
2011-05-08 18:02:30 +00:00
vpe"
2012-07-22 16:56:57 +00:00
_music_scripts="m-tx musixtex musixflx pmx2pdf"
2011-05-08 18:02:30 +00:00
_pictures_scripts="cachepic epspdf epspdftk fig4latex mathspic"
2012-07-22 16:56:57 +00:00
_pstricks_scripts="pedigree pst2pdf"
2011-05-08 18:02:30 +00:00
_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} \
2012-07-22 16:56:57 +00:00
${_langcjk_scripts} \
2011-05-08 18:02:30 +00:00
${_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
2012-02-06 15:41:43 +00:00
rm -f "$pkgdir"/usr/bin/$s
2011-02-07 14:55:51 +00:00
done
###################################################################
}