--- ./texlive-langczechslovak-2009.ebuild 2010-02-02 22:36:49.000000000 +0100 +++ ./texlive-langczechslovak-2009-r1.ebuild 2010-02-04 15:38:19.000000000 +0100 @@ -12,8 +12,54 @@ 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="" +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 +}