From 1645ec8ff0b395886bdb86525599a3cbb5bd892d Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
Date: Thu, 30 Aug 2012 18:01:00 +0100
Subject: [PATCH 23/29] EPEL 5: podwrapper: Remove HTML output.
It requires perl Pod::Simple::XHTML which did not exist in
RHEL 5 era.
---
podwrapper.pl.in | 91 ------------------------------------------------------
1 files changed, 0 insertions(+), 91 deletions(-)
diff --git a/podwrapper.pl.in b/podwrapper.pl.in
index b8b0459..389c398 100755
--- a/podwrapper.pl.in
+++ b/podwrapper.pl.in
@@ -25,7 +25,6 @@ use Getopt::Long;
use Pod::Man;
use Pod::Simple;
use Pod::Simple::Text;
-use Pod::Simple::XHTML;
use File::Basename;
=encoding utf8
@@ -403,96 +402,6 @@ if ($man) {
print "$progname: wrote $man\n";
}
-# Output HTML.
-SUBHTML: {
- # Subclass Pod::Simple::XHTML. See the documentation.
- package Podwrapper::XHTML;
-
- use vars qw(@ISA $VERSION);
- @ISA = qw(Pod::Simple::XHTML);
- $VERSION = $package_version;
-
- # Pod::Simple::XHTML returns uppercase identifiers, whereas the
- # old pod2html returns lowercase ones.
- sub idify
- {
- my $self = shift;
- my $id = $self->SUPER::idify (@_);
- lc ($id);
- }
-
- sub is_a_libguestfs_page
- {
- local $_ = shift;
-
- return 1 if /^Sys::Guestfs/;
- return 1 if /^virt-/;
- return 1 if /^libguestf/;
- return 1 if /^guestf/;
- return 1 if /^guestmount/;
- return 1 if /^hivex/;
- return 1 if /^febootstrap/;
- return 0;
- }
-
- sub resolve_pod_page_link
- {
- my $self = shift;
- my $podname = $_[0]; # eg. "Sys::Guestfs", can be undef
- my $anchor = $_[1]; # eg. "SYNOPSIS", can be undef
- my $r = "";
- if (defined $podname) {
- return $self->SUPER::resolve_pod_page_link (@_)
- unless is_a_libguestfs_page ($podname);
- $r .= "$podname.3.html"
- }
- $r .= "#" . $self->idify ($anchor, 1) if defined $anchor;
- $r;
- }
-
- sub resolve_man_page_link
- {
- my $self = shift;
- my $name = $_[0]; # eg. "virt-make-fs(1)", can be undef
- my $anchor = $_[1]; # eg. "SYNOPSIS", can be undef
- my $r = "";
- if (defined $name) {
- return $self->SUPER::resolve_man_page_link (@_)
- unless is_a_libguestfs_page ($name);
- $name =~ s/\((.*)\)$/.$1/;
- $r .= "$name.html";
- }
- $r .= "#" . $self->idify ($anchor, 1) if defined $anchor;
- $r;
- }
-
- # For some reason Pod::Simple::XHTML usually cannot find a
- # title for the page. This defaults the HTML <title> field
- # to the same as the man page name.
- sub default_title { $name }
-}
-
-if ($html) {
- mkdir "$abs_top_builddir/html";
-
- my $parser = Podwrapper::XHTML->new;
- my $output;
- $parser->output_string (\$output);
- # Added in Pod::Simple 3.16, 2011-03-14.
- eval { $parser->html_charset ("UTF-8") };
- $parser->html_css ("pod.css");
- $parser->index (1);
- $parser->parse_string_document ($content);
-
- # Hack for Perl 5.16.
- $output =~ s{/>pod.css<}{/>\n<};
-
- open OUT, ">$html" or die "$progname: $html: $!";
- print OUT $output or die "$progname: $html: $!";
- close OUT or die "$progname: $html: $!";
- print "$progname: wrote $html\n";
-}
-
# Output text.
if ($text) {
my $parser = Pod::Simple::Text->new;
--
1.7.4.1