# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-texlive/texlive-langczechslovak/texlive-langczechslovak-2009.ebuild,v 1.2 2010/02/02 21:15:40 abcd Exp $ TEXLIVE_MODULE_CONTENTS="cs csbulletin cslatex csplain hyphen-czech hyphen-slovak collection-langczechslovak " TEXLIVE_MODULE_DOC_CONTENTS="csbulletin.doc cslatex.doc " TEXLIVE_MODULE_SRC_CONTENTS="cslatex.source " inherit texlive-module DESCRIPTION="TeXLive Czech/Slovak" LICENSE="GPL-2 as-is GPL-1 LPPL-1.3 " SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" IUSE="unicode" DEPEND=">=dev-texlive/texlive-basic-2009 >=dev-texlive/texlive-latex-2009 " RDEPEND="${DEPEND} " src_unpack() { texlive-module_src_unpack if use unicode ; then mkdir -p ${S}/texmf/fmtutil || die 'Can not create directory!' 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 }