Index: groff-1.20.1-r1.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-apps/groff/groff-1.20.1-r1.ebuild,v retrieving revision 1.10 diff -u -b -B -r1.10 groff-1.20.1-r1.ebuild --- groff-1.20.1-r1.ebuild 14 Mar 2009 14:37:26 -0000 1.10 +++ groff-1.20.1-r1.ebuild 12 Aug 2009 00:40:12 -0000 @@ -12,7 +12,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" -IUSE="X linguas_ja" +IUSE="examples X linguas_ja" DEPEND=">=sys-apps/texinfo-4.7-r1 X? ( @@ -30,6 +30,12 @@ epatch "${FILESDIR}"/${PN}-1.19.2-man-unicode-dashes.patch #16108 #17580 #121502 + # put the docs in the Gentoo-specific spot + sed -i \ + -e '/^docdir=/s/=.*/=@docdir@/' \ + Makefile.in \ + || die "sed failed" + # Make sure we can cross-compile this puppy if tc-is-cross-compiler ; then sed -i \ @@ -59,6 +65,7 @@ # tc-export CC CXX econf \ --with-appresdir=/usr/share/X11/app-defaults \ + --docdir=/usr/share/doc/${PF} \ $(use_with X x) \ $(use linguas_ja && echo --enable-japanese) emake || die @@ -73,4 +80,8 @@ dodoc BUG-REPORT ChangeLog MORE.STUFF NEWS \ PROBLEMS PROJECTS README REVISION TODO VERSION + + if ! use examples ; then + rm -rf "${D}"/usr/share/doc/${PF}/examples + fi }