--- man-pages-cs-0.16-r1.ebuild 2007-01-03 23:02:28.000000000 +0100 +++ man-pages-cs-0.16-r2.ebuild 2007-01-03 23:02:42.000000000 +0100 @@ -1,6 +1,5 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-i18n/man-pages-cs/man-pages-cs-0.16-r1.ebuild,v 1.2 2006/06/21 17:24:45 vapier Exp $ DESCRIPTION="A somewhat comprehensive collection of Linux czech man page translations" HOMEPAGE="http://www.win.tue.nl/~aeb/linux/man/" @@ -9,14 +8,19 @@ LICENSE="freedist" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="" +IUSE="unicode" RDEPEND="virtual/man" src_compile() { :; } src_install() { - make MANDIR="${D}"/usr/share/man/cs install || die + local locale="LANG=C LC_ALL=C" + if use unicode; then + locale="LANG=C.UTF-8" + fi + + make ${locale} MANDIR="${D}"/usr/share/man/cs install || die dodoc CONTRIB README* # remove man pages that are provided by other packages. @@ -25,3 +29,17 @@ rm -f ${D}/usr/share/man/cs/man5/shadow.5 rm -f ${D}/usr/share/man/cs/man8/{lastlog,vigr,vipw}.8 } + +pkg_postinst(){ + if use unicode; then + ewarn "sys-apps/groff doesn't support man pages in UTF-8. You should" + ewarn "consider to USE=-unicode on this ebuild and replace -Tascii by" + ewarn "-mlatin2 in /etc/man.conf on line configuring nroff to keep man" + ewarn "pages in ISO-8859-2." + else + elog "man utility can't recognise encoding of manual pages. Therefore" + elog "you should replace -Tascii by -mlatin2 in /etc/man.conf on line" + elog "configuring nroff. Otherwise manual pages wouldn't be displayed" + elog "properly." + fi +}