# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ TEXLIVE_MODULE_CONTENTS="cs csbulletin cslatex csplain bin-cslatex bin-csplain bin-vlna hyphen-czech hyphen-slovak collection-langczechslovak " TEXLIVE_MODULE_DOC_CONTENTS="csbulletin.doc cslatex.doc bin-vlna.doc " TEXLIVE_MODULE_SRC_CONTENTS="cslatex.source " inherit eutils texlive-module DESCRIPTION="TeXLive Czech/Slovak" LICENSE="GPL-2 as-is GPL-1 LPPL-1.3 " SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd" IUSE="unicode" DEPEND=">=dev-texlive/texlive-basic-2008 >=dev-texlive/texlive-latex-2008 " RDEPEND="${DEPEND}" src_unpack() { unpack ${A} if use unicode ; then cp ${FILESDIR}/format.cs{latex,plain}.cnf ${S}/texmf/fmtutil/ fi } pkg_postinst() { texlive-module_pkg_postinst einfo "" if use unicode ; then einfo "=== UNICODE MESSAGE ======================================================" einfo "As you have enabled the unicode USE flag, all your documents are expecting" einfo "in UTF-8 encoding. If you want to use an other encoding (e.g. ISO-8859-2)," einfo "you should disable the unicode USE flag for this package." einfo "==========================================================================" einfo "" fi einfo "If you want to have full Czech/Slovak support in your CSLaTeX, it is reco-" einfo "mended to execute the following command:" einfo "$ emerge --config ${PN}" einfo "" einfo "It will fix the following:" einfo " - remove Czech and Slovak babel files" if has_version dev-texlive/texlive-latexextra ; then einfo " - enable CSLaTeX for ps4pdf" fi einfo "" } pkg_config() { einfo "Removing Czech and Slovak babel files..." rm -f "{ROOT}"${TEXMF_DIST_PATH}/tex/generic/babel/czech.sty || die rm -f "{ROOT}"${TEXMF_DIST_PATH}/tex/generic/babel/slovak.sty || die if has_version dev-texlive/texlive-latexextra ; then einfo "Updating ps4pdf..." sed -i "s/myexec latex/myexec cslatex/" "${ROOT}"${TEXMF_DIST_PATH}/scripts/pst-pdf/ps4pdf sed -i "s/myexec pdflatex/myexec pdfcslatex/" "${ROOT}"${TEXMF_DIST_PATH}/scripts/pst-pdf/ps4pdf fi }