--- man-1.6f-r2.ebuild.orig 2008-05-26 11:40:44.000000000 +0100 +++ man-1.6f-r2.ebuild 2008-05-26 11:48:26.000000000 +0100 @@ -2,7 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-apps/man/man-1.6f-r2.ebuild,v 1.1 2008/04/21 01:17:36 vapier Exp $ -inherit eutils toolchain-funcs +inherit eutils toolchain-funcs webapp + +WEBAPP_MANUAL_SLOT="yes" DESCRIPTION="Standard commands to read man pages" HOMEPAGE="http://primates.ximian.com/~flucifredi/man/" @@ -11,15 +13,19 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" -IUSE="nls" +IUSE="cgi nls" DEPEND="nls? ( sys-devel/gettext )" RDEPEND=">=sys-apps/groff-1.19.2-r1 !sys-apps/man-db - !app-arch/lzma" + !app-arch/lzma + cgi? ( virtual/httpd-cgi )" PROVIDE="virtual/man" pkg_setup() { + if use cgi ; then + webapp_pkg_setup + fi enewgroup man 15 enewuser man 13 -1 /usr/share/man man } @@ -39,6 +45,7 @@ epatch "${FILESDIR}"/man-1.6d-fbsd.patch epatch "${FILESDIR}"/man-1.6e-headers.patch epatch "${FILESDIR}"/man-1.6f-so-search.patch + epatch "${FILESDIR}"/man-1.6f-cgi.patch strip-linguas $(eval $(grep ^LANGUAGES= configure) ; echo ${LANGUAGES//,/ }) } @@ -85,6 +92,16 @@ for x in ${mansects//:/ } ; do keepdir /var/cache/man/cat${x} done + + if use cgi ; then + webapp_src_preinst + exeinto "${MY_CGIBINDIR}/man" + doexe man2html/scripts/cgi-bin/man/* + webapp_src_install + + insinto /usr/share/man-cgi-aux + doins man2html/scripts/cgi-aux/man/* + fi } pkg_postinst() { @@ -108,4 +125,8 @@ ewarn "You might want to delete all but one of these:" ewarn ${files} fi + + if use cgi ; then + webapp_pkg_postinst + fi }