1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit texlive-common eutils libtool
11 DESCRIPTION="Library implementing generic path searching, configuration, and TeX-specific file searching"
12 HOMEPAGE="http://tug.org/texlive/"
13 SRC_URI="mirror://gentoo/texlive-${PV#*_p}-source.tar.xz
14 mirror://gentoo/${PN}-texmf.d-${TEXMFD_VERSION}.tar.xz"
18 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
19 IUSE="doc source static-libs"
21 DEPEND="!<app-text/texlive-core-2010
25 S=${WORKDIR}/texlive-${PV#*_p}-source/texk/${PN}
28 EXTRA_TL_MODULES="kpathsea"
29 EXTRA_TL_DOC_MODULES="kpathsea.doc"
31 for i in ${EXTRA_TL_MODULES} ; do
32 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${TL_VERSION}.tar.xz"
35 SRC_URI="${SRC_URI} doc? ( "
36 for i in ${EXTRA_TL_DOC_MODULES} ; do
37 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${TL_VERSION}.tar.xz"
39 SRC_URI="${SRC_URI} ) "
42 cd "${WORKDIR}/texlive-${PV#*_p}-source"
43 S="${WORKDIR}/texlive-${PV#*_p}-source" elibtoolize #sane .so versionning on gfbsd
47 # Too many regexps use A-Z a-z constructs, what causes problems with locales
48 # that don't have the same alphabetical order than ascii. Bug #347798
49 # So we set LC_ALL to C in order to avoid problems.
52 # Disable largefile because it seems to cause problems on big endian 32 bits
56 $(use_enable static-libs static)
60 emake DESTDIR="${D}" web2cdir="${EPREFIX}/usr/share/texmf/web2c" install
61 find "${D}" -name '*.la' -delete
63 dodir /usr/share # just in case
64 cp -pR "${WORKDIR}"/texmf "${ED}/usr/share/" || die "failed to install texmf trees"
66 cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files"
69 # The default configuration expects it to be world writable, bug #266680
70 # People can still change it with texconfig though.
71 dodir /var/cache/fonts
72 fperms 1777 /var/cache/fonts
74 # Take care of fmtutil.cnf and texmf.cnf
75 dodir /etc/texmf/{fmtutil.d,texmf.d}
77 # Remove default texmf.cnf to ship our own, greatly based on texlive dvd's
79 # It will also be generated from /etc/texmf/texmf.d files by texmf-update
80 rm -f "${ED}${TEXMF_PATH}/web2c/texmf.cnf"
82 insinto /etc/texmf/texmf.d
83 doins "${WORKDIR}/texmf.d/"*.cnf
85 # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
87 rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf"
89 dosym /etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf
90 dosym /etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf
92 # Keep it as that's where the formats will go
93 keepdir /var/lib/texmf
95 dodoc BUGS ChangeLog NEWS PROJECTS README