diff -Naur html2ps-1.0b7/install html2ps-1.0b7.patched/install --- html2ps-1.0b7/install 2010-05-07 07:22:12.000000000 -0400 +++ html2ps-1.0b7.patched/install 2014-09-12 13:31:05.000000000 -0400 @@ -33,33 +33,6 @@ } @perl = ("Image${dirsep}Magick.pm", "LWP${dirsep}UserAgent.pm"); -print < to convert local files only"; - &getval($geturl, $getdef, - "\nBy default html2ps uses libwww-perl to retrieve remote documents, " - ."I cannot\nfind this on your system. You may instead use some command " - ."that can retrieve\ndocuments _with_a_complete_MIME_header_$both\.\n" - ."Enter such a command$none"); - $geturl = "/bin/true" if(!$geturl); - $pack .= " geturl: \"$geturl\";\n"; -} +$lynx = 1; +$lynxcmd = "lynx -source -mime_header"; +$geturl = $lynxcmd; +$pack .= " geturl: \"$geturl\";\n"; if(@reqpath) { $pack .= ' path: "'.join($pathsep, @reqpath).'";'; @@ -134,155 +87,22 @@ chop ($cd = `pwd`); -&getval($ans, "y", - "\nBy default all files will be installed in subdirectories 'bin', 'lib',\n" - ."and 'man' in a common directory. Is this OK?"); -$def = $ans=~/^y/i; - -if($def) { - &getval($prefix, "$prefix", "\nEnter the name of this directory"); - &fixdir($prefix); - while(!&goodprefix) { - &getval($prefix, "$prefix", "\nEnter a new directory name"); - } - &makedir($prefix,0); -} - -if($def) { - $bindir = "$prefix${dirsep}bin"; -} else { - &getval($bindir, "$prefix${dirsep}bin", - "\nEnter the directory where the html2ps script should be put"); - &fixdir($bindir); - ($prefix) = $bindir=~m|(.*)\Q$dirsep\E[^\Q$dirsep\E]+|; -} -&makedir($bindir,$def); +$bindir = "$ENV{PKG}/usr/bin"; -if($def) { - $glob = "$prefix${dirsep}lib${dirsep}html2ps"; -} else { - &getval($glob, "$prefix${dirsep}lib${dirsep}html2ps", - "\nEnter the the directory where the global configuration file for\n" - ."html2ps should be put"); - $glob =~ s|/$||g; - &fixdir($glob); -} -&makedir($glob,$def); $repl = "y"; -if(-f "$glob${dirsep}html2psrc") { - &getval($repl, "y", "\nA file $glob${dirsep}html2psrc already exists, replace?"); -} +$glob = "$ENV{PKG}/usr/share/html2ps"; -if($def) { - $man1 = "$prefix${dirsep}man${dirsep}man1"; -} else { - &getval($man1, "$prefix${dirsep}man${dirsep}man1", - "\nEnter the directory for the html2ps manual page"); - &fixdir($man1); -} -&makedir($man1,$def); - -if($def) { - $man5 = "$prefix${dirsep}man${dirsep}man5"; -} else { - &getval($man5, "$prefix${dirsep}man${dirsep}man5", - "\nEnter the directory for the manual page describing the configuration\n" - ."file format for html2ps"); - &fixdir($man5); -} -&makedir($man5,$def); +$man1 = "$ENV{PKG}/usr/man/man1"; +$man5 = "$ENV{PKG}/usr/man/man5"; -$ht = "\nTo use the automatic hyphenation feature, hyphenation pattern files\n" - ."from the TeX distribution are needed."; $cophy = 1; -if($exist{'TeX'}) { - $hfile = ""; - ($texdir = $dir{'TeX'}) =~ s|/bin$||; - SW:for("texmf/tex/generic/hyphen","macros","inputs","lib/macros", - "lib/inputs","lib/tex/macros","lib/tex/inputs") { - if(-f "$texdir/$_/ushyph1.tex") { - $hyph = "$texdir/$_"; - $hfile = "$hyph/ushyph1.tex"; - last SW; - } - if(-f "$texdir/$_/hyphen.tex") { - $hyph = "$texdir/$_"; - $hfile = "$hyph/hyphen.tex"; - last SW; - } - } - if($hfile) { - &getval($hdef, "y", "$ht I believe that I have found\nthe pattern " - ."file for English in your TeX installation:\n\n " - ."$hfile\n\nWould you like to use this instead of the " - ."file included with html2ps?"); - if($hdef=~/^y/i) { - $cophy = 0; - } else { - $hfile = ""; - } - } else { - &getval($hfile, "", "$ht I cannot find the pattern\nfile for English " - ."in your TeX installation. (It should be called\n'hyphen.tex', " - ."or perhaps 'ushyph1.tex', somewhere in the directory\ntree " - ."'$texdir'.)\n\nIf you know where this file is and want to use it " - ."instead of the\nfile included with html2ps, enter the full path " - ."name for this file,\notherwise press "); - while($hfile && !-f $hfile) { - &getval($hfile, "", "\nNo such file: $hfile\nEnter new name, or " - ."press to use the supplied file"); - } - $cophy = $hfile !~ /\S/; - } - if(!$hfile) { - if($def) { - $hyph = "$prefix${dirsep}lib${dirsep}html2ps"; - } else { - &getval($hyph, "$prefix${dirsep}lib${dirsep}html2ps", - "\nOK, I will use the supplied pattern file for English. Enter " - ."the directory\nwhere this file should be put"); - &fixdir($hyph); - } - } -} else { - if($def) { - $hyph = "$prefix${dirsep}lib${dirsep}html2ps"; - } else { - &getval($hyph, "$prefix${dirsep}lib${dirsep}html2ps", "$ht A pattern file for English is\n" - ."included with html2ps (see the documentation how to install pattern\n" - ."files for other languages). Enter the directory where this file\n" - ."should be put"); - } -} -if($cophy) { - &makedir($hyph,0); - $hfile = "$hyph${dirsep}hyphen.tex"; -} +$hyph = $glob; +$hfile = $glob . "/hyphen.tex"; -if($def) { - $html = "$prefix${dirsep}lib${dirsep}html2ps"; -} else { - &getval($html, "$prefix${dirsep}lib${dirsep}html2ps", - "\nEnter a directory where to put the HTML document describing\nhtml2ps"); - &fixdir($html); -} -&makedir($html,$def); +$html = "$ENV{PKG}/usr/doc/html2ps-$ENV{VERSION}"; -$paper = ""; -&getval($format, "A4", - "\nEnter the default paper type, possible choices are:\nA0, A1, A2, A3, A4," - ." A5, A6, A7, A8, A9, A10,\nB0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10,\n" - ."letter, legal, arche, archd, archc, archb, archa,\nflsa, flse, halfletter," - ." 11x17, ledger, other"); -if($format !~ /^other$/i) { - $paper .= " type: $format;"; -} else { - &getval($height, "", - "\nDefault paper height i centimeters (1 inch = 2.54 centimeters)"); - &getval($width, "", "\nDefault paper width i centimeters"); - $paper .= " height: $height;\n"; - $paper .= " width: $width;"; -} +$format = "letter"; +$paper = " type: $format;"; open(RC,">html2psrc") || die "*** Error opening html2psrc\n"; print RC "/* Global configuration file for html2ps */\n\n"