# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="An HTML syntax checker. Installs both a command and a cgi script" HOMEPAGE="http://www.htmlhelp.com/tools/validator/source.html" SRC_URI="http://ftp.debian.org/debian/pool/main/w/wdg-html-validator/wdg-html-validator_1.5.7.orig.tar.gz http://www.htmlhelp.com/tools/validator/src/wdg-sgml-lib-1.1.3.tar.gz" LICENSE="Artistic" SLOT="0" KEYWORDS="~x86" IUSE="https" DEPEND=">=app-text/opensp-1.5-r1 >=dev-perl/CGI-3.05 >=dev-perl/libwww-perl-5.79 >=dev-perl/URI-1.31 >=dev-perl/Unicode-String-2.07 >=dev-perl/Unicode-Map8-0.12 https? (>=dev-perl/Crypt-SSLeay-0.49)" # assumes a web server on localhost with a cgi-bin # jconv needed for Japanese pages ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/src/jconv.c src_compile() { sed -i "s:/usr/local/share/wdg/sgml-lib:/usr/share/wdg/sgml-lib:" validate sed -i "s:/usr/local/bin/lq-nsgmls:/usr/bin/onsgmls:" validate sed -i "s:use CGI:use lib '/usr/share/wdg/lib';\nuse CGI:" cgi-bin/validate.cgi sed -i "s:/usr/local/bin/lq-nsgmls -E40:/usr/bin/onsgmls -E100:" cgi-bin/validate.cgi sed -i "s:/usr/local/bin:/usr/bin:" cgi-bin/validate.cgi sed -i "s:/usr/local/www/data/tools/validator/lib:/usr/share/wdg/sgml-lib:" cgi-bin/validate.cgi sed -i "s:/usr/local/www/cgi-bin/templates/validator:/usr/share/wdg/www/templates:" cgi-bin/validate.cgi } src_install() { cd ${S} insinto /usr/share/wdg/lib doins lib/SpiderUA.pm doins lib/HTMLLinkExtractor.pm exeinto /usr/bin doexe validate doexe lib/cjkvconv.pl exeinto /var/www/localhost/cgi-bin doexe cgi-bin/validate.cgi insinto /usr/share doins -r ../wdg insinto /usr/share/wdg/www doins -r html/* } pkg_postinst() { einfo "Before using validate.cgi you must: g-cpan.pl I18N::Charset" }