--- /usr/portage/app-i18n/man-pages-cs/man-pages-cs-0.16-r1.ebuild 2006-06-21 19:35:45.000000000 +0200 +++ /usr/local/portage/app-i18n/man-pages-cs/man-pages-cs-0.16-r2.ebuild 2007-01-07 22:32:08.000000000 +0100 @@ -1,6 +1,7 @@ # 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 $ + +inherit eutils DESCRIPTION="A somewhat comprehensive collection of Linux czech man page translations" HOMEPAGE="http://www.win.tue.nl/~aeb/linux/man/" @@ -9,14 +10,25 @@ 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_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/man-pages-cs-unicode.diff +} + src_compile() { :; } src_install() { - make MANDIR="${D}"/usr/share/man/cs install || die + local utf8switch="" + if use unicode; then + utf8switch="UTF8=yes" + fi + + make ${utf8switch} MANDIR="${D}"/usr/share/man/cs install || die dodoc CONTRIB README* # remove man pages that are provided by other packages. @@ -25,3 +37,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 "-Tutf8 -mlatin2 in /etc/man.conf on line configuring nroff to" + ewarn "keep man pages in ISO-8859-2." + else + elog "man utility can't recognise encoding of manual pages. Therefore" + elog "you should replace -Tascii by -Tutf8 -mlatin2 in /etc/man.conf" + elog "on line configuring nroff. Otherwise manual pages wouldn't be" + elog "displayed properly." + fi +}