summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ehmsen <ehmsen@gentoo.org>2006-05-28 21:55:51 +0000
committerMartin Ehmsen <ehmsen@gentoo.org>2006-05-28 21:55:51 +0000
commitd2dc4ad44ec30479c4a2954d56e03388f5895701 (patch)
tree167a1720abbc7ae82a4cb009c7eade5e54072932 /app-text/texlive
parentUpdate 4.1.0 w/ two mips patches for R10K support and R10K cache barriers han... (diff)
downloadgentoo-2-d2dc4ad44ec30479c4a2954d56e03388f5895701.tar.gz
gentoo-2-d2dc4ad44ec30479c4a2954d56e03388f5895701.tar.bz2
gentoo-2-d2dc4ad44ec30479c4a2954d56e03388f5895701.zip
Initial import of texlive
(Portage version: 2.1_rc2-r3)
Diffstat (limited to 'app-text/texlive')
-rw-r--r--app-text/texlive/ChangeLog18
-rw-r--r--app-text/texlive/Manifest54
-rw-r--r--app-text/texlive/files/digest-texlive-20059
-rw-r--r--app-text/texlive/files/texmf-update58
-rw-r--r--app-text/texlive/metadata.xml5
-rw-r--r--app-text/texlive/texlive-2005.ebuild284
6 files changed, 428 insertions, 0 deletions
diff --git a/app-text/texlive/ChangeLog b/app-text/texlive/ChangeLog
new file mode 100644
index 000000000000..f900c71101c4
--- /dev/null
+++ b/app-text/texlive/ChangeLog
@@ -0,0 +1,18 @@
+# ChangeLog for app-text/texlive
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/texlive/ChangeLog,v 1.1 2006/05/28 21:55:51 ehmsen Exp $
+
+*texlive-2005 (28 May 2006)
+
+ 28 May 2006; Martin Ehmsen <ehmsen@gentoo.org>
+ +files/2005/texlive-2005-amd64-xdvik-wp.patch,
+ +files/2005/texlive-2005-create-empty-files.patch,
+ +files/2005/texlive-2005-fmtutil-in.patch,
+ +files/2005/texlive-2005-gentoo-texmf-site.patch,
+ +files/2005/texlive-2005-mptest.patch,
+ +files/2005/texlive-2005-pdftosrc-install.patch,
+ +files/2005/texlive-2005-use-system-libtool.patch,
+ +files/2005/texlive-2005-xpdf-vulnerabilities.patch, +files/texmf-update,
+ +metadata.xml, +texlive-2005.ebuild:
+ Initial import of a monolithic TeXLive ebuild.
+
diff --git a/app-text/texlive/Manifest b/app-text/texlive/Manifest
new file mode 100644
index 000000000000..7f064e6603ac
--- /dev/null
+++ b/app-text/texlive/Manifest
@@ -0,0 +1,54 @@
+AUX 2005/texlive-2005-amd64-xdvik-wp.patch 891 RMD160 b5ca77437fb3cb65ab28ded97a122009dda581dd SHA1 f6046af61e128b0b2967687e679109224032c192 SHA256 47644a39dbaafebbb580f421fb6993744a9a74626fee474adfe4cc4a22718749
+MD5 196e2ac417459761152c317025da2141 files/2005/texlive-2005-amd64-xdvik-wp.patch 891
+RMD160 b5ca77437fb3cb65ab28ded97a122009dda581dd files/2005/texlive-2005-amd64-xdvik-wp.patch 891
+SHA256 47644a39dbaafebbb580f421fb6993744a9a74626fee474adfe4cc4a22718749 files/2005/texlive-2005-amd64-xdvik-wp.patch 891
+AUX 2005/texlive-2005-create-empty-files.patch 1091 RMD160 114f69ff218b56bf90861a8d049330109440aca6 SHA1 cb857815570fccfadbcde76dc60973984749ff7d SHA256 1869e55c2ab0378938992bf06dd618fde7c0c7fb6cdcdd39145b594cae196d17
+MD5 55cc394be5a65a4a5c5b7c4d8d8f5fe7 files/2005/texlive-2005-create-empty-files.patch 1091
+RMD160 114f69ff218b56bf90861a8d049330109440aca6 files/2005/texlive-2005-create-empty-files.patch 1091
+SHA256 1869e55c2ab0378938992bf06dd618fde7c0c7fb6cdcdd39145b594cae196d17 files/2005/texlive-2005-create-empty-files.patch 1091
+AUX 2005/texlive-2005-fmtutil-in.patch 1767 RMD160 0495f340842d0a0c750c4b654e727dfd9de6fd3c SHA1 080c87c1666a8efbe8ce531d4d2c27a3f9efb572 SHA256 b0a2f06acb7179934fe3b05176ff8edd9f3e3dfc272e9c7d2825f15e696fdee8
+MD5 e826c5ec6a436c2ac3ffca45c12cf6fd files/2005/texlive-2005-fmtutil-in.patch 1767
+RMD160 0495f340842d0a0c750c4b654e727dfd9de6fd3c files/2005/texlive-2005-fmtutil-in.patch 1767
+SHA256 b0a2f06acb7179934fe3b05176ff8edd9f3e3dfc272e9c7d2825f15e696fdee8 files/2005/texlive-2005-fmtutil-in.patch 1767
+AUX 2005/texlive-2005-gentoo-texmf-site.patch 1246 RMD160 3b3ba9ac684ab1207f73480af2d80c5a91295b8f SHA1 4de406284604e5dcd664108b5acfafc486a5522d SHA256 9d14aeccd57f499efc2f43db0d6fccacfa63760900b9c79bb14cdcd9bc82861b
+MD5 5aae85bd4be05268963eb89212605618 files/2005/texlive-2005-gentoo-texmf-site.patch 1246
+RMD160 3b3ba9ac684ab1207f73480af2d80c5a91295b8f files/2005/texlive-2005-gentoo-texmf-site.patch 1246
+SHA256 9d14aeccd57f499efc2f43db0d6fccacfa63760900b9c79bb14cdcd9bc82861b files/2005/texlive-2005-gentoo-texmf-site.patch 1246
+AUX 2005/texlive-2005-mptest.patch 425 RMD160 e5199b164132faa9fd85e4eb1e5bd626fb9e64a8 SHA1 986dfa97b402b695f3c1214a9ceb5f08ca06bbd9 SHA256 61a13ec65768b7f10200b2f7bd6ccaa8ffac8560c331ebefb2f19999e4266a69
+MD5 10d7e14ea29ff07b899716e8bd447a20 files/2005/texlive-2005-mptest.patch 425
+RMD160 e5199b164132faa9fd85e4eb1e5bd626fb9e64a8 files/2005/texlive-2005-mptest.patch 425
+SHA256 61a13ec65768b7f10200b2f7bd6ccaa8ffac8560c331ebefb2f19999e4266a69 files/2005/texlive-2005-mptest.patch 425
+AUX 2005/texlive-2005-pdftosrc-install.patch 930 RMD160 1e3971813d1cc9f6ad7839b3c4f6cfae5c02f17b SHA1 ca3a814581cd7a18eaee7fbc44d247004b456bec SHA256 34cb75bb42c658b303d9387dfd601d247eb4e76f317e30f57c8ee6abc720b4b4
+MD5 50739edffa520935e22c643185eda571 files/2005/texlive-2005-pdftosrc-install.patch 930
+RMD160 1e3971813d1cc9f6ad7839b3c4f6cfae5c02f17b files/2005/texlive-2005-pdftosrc-install.patch 930
+SHA256 34cb75bb42c658b303d9387dfd601d247eb4e76f317e30f57c8ee6abc720b4b4 files/2005/texlive-2005-pdftosrc-install.patch 930
+AUX 2005/texlive-2005-use-system-libtool.patch 1511 RMD160 62e0c7f4ab3f781f39aa3e1186dff9feb9806bd2 SHA1 546fd00657ec8612b72e60d9feb3ed75ff55ac24 SHA256 f03b1b80da77bb8798c42923c2d7ab30429e46393ce8ee07af2257055953a0cc
+MD5 9678ae52548a04846d643c0c91cf49d3 files/2005/texlive-2005-use-system-libtool.patch 1511
+RMD160 62e0c7f4ab3f781f39aa3e1186dff9feb9806bd2 files/2005/texlive-2005-use-system-libtool.patch 1511
+SHA256 f03b1b80da77bb8798c42923c2d7ab30429e46393ce8ee07af2257055953a0cc files/2005/texlive-2005-use-system-libtool.patch 1511
+AUX 2005/texlive-2005-xpdf-vulnerabilities.patch 4247 RMD160 ff35a336df6fad9ea76d27dfe27d5cc714b37914 SHA1 094a1251c6e3b1ea0bf72431af957641c96148f4 SHA256 0c75a17f477ee7277b8e22bdc203d54ee9cd5248c3e4959f82712771133cfac2
+MD5 91aeed19f8c9fb38e6078c6423952c9c files/2005/texlive-2005-xpdf-vulnerabilities.patch 4247
+RMD160 ff35a336df6fad9ea76d27dfe27d5cc714b37914 files/2005/texlive-2005-xpdf-vulnerabilities.patch 4247
+SHA256 0c75a17f477ee7277b8e22bdc203d54ee9cd5248c3e4959f82712771133cfac2 files/2005/texlive-2005-xpdf-vulnerabilities.patch 4247
+AUX texmf-update 1876 RMD160 731e5551321b43149aba9b3a5d79b051df953b81 SHA1 bd74ca54dd0e5da1347fbe8494d7cbc5f8301ae1 SHA256 eca7bdd52d000a0d8405641f83773f37e528da3300ed1bfaf010252e264a2fe5
+MD5 7decdf517ed2c37ae7033732432eb4ec files/texmf-update 1876
+RMD160 731e5551321b43149aba9b3a5d79b051df953b81 files/texmf-update 1876
+SHA256 eca7bdd52d000a0d8405641f83773f37e528da3300ed1bfaf010252e264a2fe5 files/texmf-update 1876
+DIST texlive-2005-src.tar.bz2 18754502 RMD160 ac2c390cad8160028b2754c46a347847d6523346 SHA1 a4078d825c38874c6aa4c3dc070c203c66e913d2 SHA256 faf645ca74889c35ec9df5902e8b0d7afe1eb29477574a6747810b671afef674
+DIST texlive-2005-texmf-dist.tar.bz2 408486129 RMD160 32d046f1363028bf8164bd1525a60968ca78ec39 SHA1 fba766bff12fb04e7859c1b39c8a10ccaadbfcad SHA256 ef6838f569cdbcc7ce49b1102be7797995c1b0e82e0c9b593acf0c5b133b843c
+DIST texlive-2005-texmf.tar.bz2 16285465 RMD160 bcdad713732a49607005130b8f707f7fbeb59815 SHA1 c7c87c55bd5cccbde62b07d8180b2816c6d169ce SHA256 ffe9d2ec59a30aa4972ae21a99e8e0ea85648204a77f9e114b01bd3a8a603a6b
+EBUILD texlive-2005.ebuild 7234 RMD160 358fafcc10768856ca45eedbe69cf39080278733 SHA1 d9c9c7bb701b07953e989764180c0485d456a228 SHA256 03570a475772e1fd2f53227c00ea44ccd4e9e25d881b300efd48edf09b169830
+MD5 6a69043668d9224540cb43b4eb928f11 texlive-2005.ebuild 7234
+RMD160 358fafcc10768856ca45eedbe69cf39080278733 texlive-2005.ebuild 7234
+SHA256 03570a475772e1fd2f53227c00ea44ccd4e9e25d881b300efd48edf09b169830 texlive-2005.ebuild 7234
+MISC ChangeLog 704 RMD160 7aaf66a0a5b708782dae590d4689f534c9099678 SHA1 aebc152d78b8ecce794314170b23c9b11eedf887 SHA256 fafa577f74fda08359cb83cb541ddd241ac1ff7b66b8fb53a485535925014a7d
+MD5 432ca38618503b4ce724731fa969fcb3 ChangeLog 704
+RMD160 7aaf66a0a5b708782dae590d4689f534c9099678 ChangeLog 704
+SHA256 fafa577f74fda08359cb83cb541ddd241ac1ff7b66b8fb53a485535925014a7d ChangeLog 704
+MISC metadata.xml 164 RMD160 698422e821458386b8da17baa6014296f8284e0b SHA1 a805613d38e6e3bff93cba3858d6a92cc79fe2f7 SHA256 7bd4d93c657a26aa9af1dea4232520c0d388cc92115dd9ca0eb04259228e044f
+MD5 c472f5fd1646eb8bca71d8df5cb2bdcc metadata.xml 164
+RMD160 698422e821458386b8da17baa6014296f8284e0b metadata.xml 164
+SHA256 7bd4d93c657a26aa9af1dea4232520c0d388cc92115dd9ca0eb04259228e044f metadata.xml 164
+MD5 9c7fbe19385a877bcd96ce75c347ad09 files/digest-texlive-2005 807
+RMD160 b3467176f93577677e4fded094c285a53b0be5e0 files/digest-texlive-2005 807
+SHA256 391f065bfc3c3cc88cbd4690c772c1550e16696ba934362f5523ea9b5a234607 files/digest-texlive-2005 807
diff --git a/app-text/texlive/files/digest-texlive-2005 b/app-text/texlive/files/digest-texlive-2005
new file mode 100644
index 000000000000..2a36d2d94a01
--- /dev/null
+++ b/app-text/texlive/files/digest-texlive-2005
@@ -0,0 +1,9 @@
+MD5 841d6678183bda7089526e5b7d2eba69 texlive-2005-src.tar.bz2 18754502
+RMD160 ac2c390cad8160028b2754c46a347847d6523346 texlive-2005-src.tar.bz2 18754502
+SHA256 faf645ca74889c35ec9df5902e8b0d7afe1eb29477574a6747810b671afef674 texlive-2005-src.tar.bz2 18754502
+MD5 527ae2d21701b787764d6cfe52ee51f3 texlive-2005-texmf-dist.tar.bz2 408486129
+RMD160 32d046f1363028bf8164bd1525a60968ca78ec39 texlive-2005-texmf-dist.tar.bz2 408486129
+SHA256 ef6838f569cdbcc7ce49b1102be7797995c1b0e82e0c9b593acf0c5b133b843c texlive-2005-texmf-dist.tar.bz2 408486129
+MD5 7abffdae0ea9cdd4823efcbc02e96b91 texlive-2005-texmf.tar.bz2 16285465
+RMD160 bcdad713732a49607005130b8f707f7fbeb59815 texlive-2005-texmf.tar.bz2 16285465
+SHA256 ffe9d2ec59a30aa4972ae21a99e8e0ea85648204a77f9e114b01bd3a8a603a6b texlive-2005-texmf.tar.bz2 16285465
diff --git a/app-text/texlive/files/texmf-update b/app-text/texlive/files/texmf-update
new file mode 100644
index 000000000000..99f7bb46a397
--- /dev/null
+++ b/app-text/texlive/files/texmf-update
@@ -0,0 +1,58 @@
+#!/bin/bash
+#
+# Utility to update Gentoo teTeX distribution configuration files
+#
+
+PATH=/bin:/usr/bin
+
+# Fix for all those with altered umask for root
+umask 022
+
+# Make sure we have a correct environment, bug #30432
+# The list of env. vars is taken from the INSTALL file
+for texvar in AFMFONTS BIBINPUTS BSTINPUTS DVILJFONTS DVIPSFONTS \
+ DVIPSHEADERS GFFONTS GLYPHFONTS INDEXSTYLE MFBASES MFINPUTS \
+ MFPOOL MFTINPUTS MPINPUTS MPMEMS MPPOOL MPSUPPORT OCPINPUTS \
+ OFMFONTS OPLFONTS OTPINPUTS OVFFONTS OVPFONTS PKFONTS PSHEADERS \
+ T1FONTS T1INPUTS TEXBIB TEXCONFIG TEXDOCS TEXFONTMAPS TEXFONTS \
+ TEXFORMATS TEXINDEXSTYLE TEXINPUTS TEXMFCNF TEXMFDBS TEXMFINI \
+ TEXPICTS TEXPKS TEXPOOL TEXPSHEADERS TEXSOURCES TFMFONTS TRFONTS \
+ VFFONTS XDVIFONTS XDVIVFS ; do
+
+ if [ "${!texvar}" ]; then
+ if ! $(echo ${!texvar} | grep '^:\|::\|:$' &>/dev/null) ; then
+ export ${texvar}="${!texvar}:"
+ fi
+ fi
+done
+
+if [ "$TEXINPUTS" ]; then
+ if $(echo ${TEXINPUTS} | grep '/usr/share/texmf' &>/dev/null) ; then
+ export TEXINPUTS=$(echo ${TEXINPUTS} | sed -e 's|/usr/share/texmf/*:\?||g')
+ elif $(echo ${TEXINPUTS} | grep '/var/lib/texmf' &>/dev/null) ; then
+ export TEXINPUTS=$(echo ${TEXINPUTS} | sed -e 's|/var/lib/texmf/*:\?||g')
+ fi
+fi
+
+for conf in texmf.cnf fmtutil.cnf updmap.cfg ; do
+ if [ -d "/etc/texmf/${conf/.*/.d}" ] ; then
+ echo "Generating /etc/texmf/web2c/${conf} from /etc/texmf/${conf/.*/.d} ..."
+ cat /etc/texmf/${conf/.*/.d}/* > "/etc/texmf/web2c/${conf}"
+ fi
+done
+
+# configure
+echo "Configuring teTeX ..."
+mktexlsr &>/dev/null
+texconfig-sys init &>/dev/null
+texconfig-sys confall &>/dev/null
+texconfig-sys font rw &>/dev/null
+texconfig-sys font vardir /var/cache/fonts &>/dev/null
+updmap-sys &>/dev/null
+
+# generate
+echo "Generating format files ..."
+fmtutil-sys --missing &>/dev/null
+echo
+echo "Use 'texconfig font ro' to disable font generation for users"
+echo
diff --git a/app-text/texlive/metadata.xml b/app-text/texlive/metadata.xml
new file mode 100644
index 000000000000..06689a1a9114
--- /dev/null
+++ b/app-text/texlive/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>text-markup</herd>
+</pkgmetadata>
diff --git a/app-text/texlive/texlive-2005.ebuild b/app-text/texlive/texlive-2005.ebuild
new file mode 100644
index 000000000000..b9dfa2ab2e8c
--- /dev/null
+++ b/app-text/texlive/texlive-2005.ebuild
@@ -0,0 +1,284 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/texlive/texlive-2005.ebuild,v 1.1 2006/05/28 21:55:51 ehmsen Exp $
+
+inherit eutils flag-o-matic toolchain-funcs versionator virtualx
+
+TEXMF_PATH=/var/lib/texmf
+
+DESCRIPTION="a complete TeX distribution"
+HOMEPAGE="http://tug.org/texlive/"
+SLOT="0"
+LICENSE="GPL-2"
+
+SRC_URI="http://dev.gentoo.org/~ehmsen/texlive/${P}-src.tar.bz2
+ http://dev.gentoo.org/~ehmsen/texlive/${P}-texmf-dist.tar.bz2
+ http://dev.gentoo.org/~ehmsen/texlive/${P}-texmf.tar.bz2"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="X doc tcltk Xaw3d lesstif motif neXt"
+
+# This is less than an ideal name
+PROVIDE="virtual/tetex"
+
+# I hope to kick this very soon
+BLOCKS="!dev-tex/memoir
+ !dev-tex/lineno
+ !dev-tex/SIunits
+ !dev-tex/floatflt
+ !dev-tex/g-brief
+ !dev-tex/pgf
+ !dev-tex/xcolor
+ !dev-tex/xkeyval
+ !dev-tex/latex-beamer
+ !dev-tex/vntex
+ !dev-tex/koma-script
+ !dev-tex/currvita
+ !dev-tex/eurosym
+ !dev-tex/extsizes"
+
+MODULAR_X_DEPEND="X? ( || ( (
+ x11-libs/libXmu
+ x11-libs/libXp
+ x11-libs/libXpm
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXaw
+ x11-libs/libXfont
+ )
+ virtual/x11
+ )
+ )"
+
+DEPEND="${MODULAR_X_DEPEND}
+ !app-text/ptex
+ !app-text/cstetex
+ !app-text/tetex
+ X? ( motif? ( lesstif? ( x11-libs/lesstif )
+ !lesstif? ( x11-libs/openmotif ) )
+ !motif? ( neXt? ( x11-libs/neXtaw )
+ !neXt? ( Xaw3d? ( x11-libs/Xaw3d ) ) )
+ !app-text/xdvik
+ )
+ sys-apps/ed
+ sys-libs/zlib
+ >=media-libs/libpng-1.2.1
+ sys-libs/ncurses
+ >=net-libs/libwww-5.3.2-r1"
+
+RDEPEND="${DEPEND}
+ ${BLOCKS}
+ >=dev-lang/perl-5.2
+ tcltk? ( dev-perl/perl-tk )
+ dev-util/dialog"
+
+src_unpack() {
+ unpack ${P}-src.tar.bz2 || die "unpack src"
+
+ cd "${S}"
+
+ unpack ${P}-texmf.tar.bz2 || die "unpack texmf"
+ unpack ${P}-texmf-dist.tar.bz2 || die "unpack texmf-dist"
+
+ epatch "${FILESDIR}/${PV}/${P}-use-system-libtool.patch" || die
+ epatch "${FILESDIR}/${PV}/${P}-amd64-xdvik-wp.patch" || die
+ epatch "${FILESDIR}/${PV}/${P}-mptest.patch" || die
+ epatch "${FILESDIR}/${PV}/${P}-fmtutil-in.patch" || die
+ epatch "${FILESDIR}/${PV}/${P}-xpdf-vulnerabilities.patch" || die
+ epatch "${FILESDIR}/${PV}/${P}-pdftosrc-install.patch" || die
+ epatch "${FILESDIR}/${PV}/${P}-create-empty-files.patch" || die
+ epatch "${FILESDIR}/${PV}/${P}-gentoo-texmf-site.patch" || die
+
+ sed -i -e "/mktexlsr/,+3d" -e "s/\(updmap-sys\)/\1 --nohash/" \
+ Makefile.in || die "sed"
+}
+
+src_compile() {
+ local my_conf
+
+ export LC_ALL=C
+
+ filter-flags "-fstack-protector" "-Os"
+ use amd64 && replace-flags "-O3" "-O2"
+
+ if use X ; then
+ addwrite /var/cache/fonts
+ my_conf="${my_conf} --with-xdvik --with-oxdvik"
+ if use motif ; then
+ if use lesstif ; then
+ append-ldflags -L/usr/X11R6/lib/lesstif -R/usr/X11R6/lib/lesstif
+ export CPPFLAGS="${CPPFLAGS} -I/usr/X11R6/include/lesstif"
+ fi
+ my_conf="${my_conf} --with-xdvi-x-toolkit=motif"
+ elif use neXt ; then
+ my_conf="${my_conf} --with-xdvi-x-toolkit=neXtaw"
+ elif use Xaw3d ; then
+ my_conf="${my_conf} --with-xdvi-x-toolkit=xaw3d"
+ else
+ my_conf="${my_conf} --with-xdvi-x-toolkit=xaw"
+ fi
+ else
+ my_conf="${my_conf} --without-xdvik --without-oxdvik"
+ fi
+
+ econf --bindir=/usr/bin \
+ --datadir=${S} \
+ --with-system-wwwlib \
+ --with-libwww-include=/usr/include/w3c-libwww \
+ --with-system-ncurses \
+ --with-system-pnglib \
+ --without-texinfo \
+ --without-dialog \
+ --without-texi2html \
+ --with-system-zlib \
+ --disable-multiplatform \
+ --with-epsfwin \
+ --with-mftalkwin \
+ --with-regiswin \
+ --with-tektronixwin \
+ --with-unitermwin \
+ --with-ps=gs \
+ --enable-ipc \
+ --with-etex \
+ --without-dvipng \
+ --without-dvipdfm \
+ --without-dvipdfmx \
+ $(use_with X x) \
+ ${my_conf} || die "econf"
+
+ if use X && use ppc-macos ; then
+ for f in $(find ${S} -name config.status) ; do
+ sed -i -e "s:-ldl::g" $f
+ done
+ fi
+
+ emake -j1 CC="$(tc-getCC)" CXX="$(tc-getCXX)" texmf=${TEXMF_PATH:-/usr/share/texmf} || die "make"
+}
+
+src_test() {
+ fmtutil --fmtdir "${S}/texk/web2c" --all
+ Xmake check || die "Xmake check failed."
+}
+
+src_install() {
+ dodir /usr/share/
+ cp -R texmf ${D}/usr/share
+ cp -R texmf-dist ${D}/usr/share
+
+ dodir ${TEXMF_PATH:-/usr/share/texmf}/web2c
+ einstall bindir=${D}/usr/bin texmf=${D}${TEXMF_PATH:-/usr/share/texmf} || die "install"
+
+ dosbin ${FILESDIR}/${PV}/texmf-update
+
+ docinto texk
+ cd ${S}/TeX/texk
+ dodoc ChangeLog README
+
+ docinto kpathesa
+ cd ${S}/TeX/texk/kpathsea
+ dodoc BUGS ChangeLog NEWS PROJECTS README
+
+ docinto dviljk
+ cd ${S}/TeX/texk/dviljk
+ dodoc ChangeLog README NEWS
+
+ docinto dvipsk
+ cd ${S}/TeX/texk/dvipsk
+ dodoc ChangeLog README
+
+ docinto makeindexk
+ cd ${S}/TeX/texk/makeindexk
+ dodoc ChangeLog NEWS NOTES README
+
+ docinto ps2pkm
+ cd ${S}/TeX/texk/ps2pkm
+ dodoc ChangeLog README README.14m
+
+ docinto web2c
+ cd ${S}/TeX/texk/web2c
+ dodoc ChangeLog NEWS PROJECTS README
+
+ if use doc ; then
+ dodir /usr/share/doc/${PF}
+ mv ${D}/usr/share/texmf/doc/* \
+ ${D}/usr/share/doc/${PF} \
+ || die "mv doc failed."
+ cd ${D}/usr/share/texmf
+ rmdir doc
+ ln -s ../doc/${PF} doc || die "ln -s doc failed."
+ cd -
+ else
+ rm -rf ${D}/usr/share/texmf/doc
+ fi
+
+ dodir /var/cache/fonts
+
+ # root group name doesn't exist on Mac OS X
+ chown -R 0:0 ${D}/usr/share/texmf
+
+ dodir /etc/env.d
+ echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c"' > ${D}/etc/env.d/98tetex
+ # populate /etc/texmf
+ keepdir /etc/texmf/web2c
+ # _not_ ${TEXMF_PATH}
+ cd ${D}/usr/share/texmf
+ for d in $(find . -name config -type d | sed -e "s:\./::g") ; do
+ dodir /etc/texmf/${d}
+ for f in $(find ${D}usr/share/texmf/$d -maxdepth 1 -mindepth 1); do
+ mv $f ${D}/etc/texmf/$d || die "mv $f failed"
+ dosym /etc/texmf/$d/$(basename $f) /usr/share/texmf/$d/$(basename $f)
+ done
+ done
+ cd -
+ cd ${D}/${TEXMF_PATH}
+ for f in $(find . -name '*.cnf' -o -name '*.cfg' -type f | sed -e "s:\./::g") ; do
+ if [ "${f/config/}" != "${f}" ] ; then
+ continue
+ fi
+ dodir /etc/texmf/$(dirname $f)
+ mv ${D}/${TEXMF_PATH}/$f ${D}/etc/texmf/$(dirname $f) || die "mv $f failed."
+ dosym /etc/texmf/$f ${TEXMF_PATH}/$f
+ done
+
+ # take care of updmap.cfg, fmtutil.cnf and texmf.cnf
+ dodir /etc/texmf/{updmap.d,fmtutil.d,texmf.d}
+ dosym /etc/texmf/web2c/updmap.cfg ${TEXMF_PATH}/web2c/updmap.cfg
+ mv ${D}/usr/share/texmf/web2c/updmap.cfg ${D}/etc/texmf/updmap.d/00updmap.cfg
+ mv ${D}/etc/texmf/web2c/fmtutil.cnf ${D}/etc/texmf/fmtutil.d/00fmtutil.cnf
+ mv ${D}/etc/texmf/web2c/texmf.cnf ${D}/etc/texmf/texmf.d/00texmf.cnf
+
+ # xdvi
+ if use X ; then
+ dodir /etc/X11/app-defaults /etc/texmf/xdvi
+ mv ${D}${TEXMF_PATH}/xdvi/XDvi ${D}/etc/X11/app-defaults || die "mv XDvi failed"
+ dosym /etc/X11/app-defaults/XDvi ${TEXMF_PATH}/xdvi/XDvi
+ fi
+
+ doman ${S}/texk/web2c/pdftexdir/pdftosrc.1
+
+ keepdir /usr/share/texmf-site
+
+ # the virtex symlink is not installed
+ # The links has to be relative, since the targets
+ # is not present at this stage and MacOS doesn't
+ # like non-existing targets
+ cd ${D}/usr/bin/
+ ln -snf tex virtex
+ ln -snf pdftex pdfvirtex
+}
+
+pkg_preinst() {
+ ewarn "Removing ${ROOT}usr/share/texmf/web2c"
+ rm -rf "${ROOT}usr/share/texmf/web2c"
+}
+
+pkg_postinst() {
+ if [ "$ROOT" = "/" ] ; then
+ /usr/sbin/texmf-update
+ fi
+
+ einfo
+ einfo "If you have configuration files in /etc/texmf to merge,"
+ einfo "please update them and run /usr/sbin/texmf-update."
+ einfo
+}