FreeBSD Bugzilla – Attachment 195684 Details for
Bug 230233
print/html2ps: fix compatibility with perl 5.26
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
html2ps Cumulative patch
html2ps.patch (text/plain), 3.04 KB, created by
Sergey N. Voronkov
on 2018-07-31 09:42:02 UTC
(
hide
)
Description:
html2ps Cumulative patch
Filename:
MIME Type:
Creator:
Sergey N. Voronkov
Created:
2018-07-31 09:42:02 UTC
Size:
3.04 KB
patch
obsolete
>--- html2ps.orig 2010-05-07 17:22:12.000000000 +0600 >+++ html2ps 2018-07-30 11:11:44.600980000 +0500 >@@ -1,5 +1,5 @@ > : # Use perl >-eval 'exec perl -S $0 "$@"' >+eval 'exec /usr/local/bin/perl -S $0 "$@"' > if $running_under_some_shell; > > # This is html2ps version 1.0 beta7, an HTML-to-PostScript converter. >@@ -26,8 +26,9 @@ > # Set the name of the global configuration file. See the installation notes > # and manual page for more details on configuration files. > >-$globrc='/it/sw/share/www/lib/html2ps/html2psrc'; >-$ug='/it/sw/share/www/lib/html2ps/html2ps.html'; >+$LIBPAPER=1; >+$globrc='/usr/local/etc/html2psrc'; >+$ug='/usr/local/share/html2ps/html2ps.html'; > > $conf=<<'EOR'; > @html2ps { >@@ -46,7 +47,7 @@ > path: ""; > } > paper { >- type: A4; >+ type: libpaper; > height: ""; > width: ""; > } >@@ -356,6 +357,7 @@ > > eval "require POSIX"; > $posix = !$@; >+use File::Temp qw/ :POSIX /; > > %extend=('quote',1, 'font',1, 'colour',1, 'hyphenation',1); > %fal=("serif","times", "sans_serif","helvetica", "monospace","courier"); >@@ -495,7 +497,7 @@ > if($opt_D && !$package{'Ghostscript'}); > die "Ghostscript is required to generate cross references\n" > if($opt_R && !$package{'Ghostscript'}); >-$tmpname=$posix?POSIX::tmpnam():"h2p_$$"; >+$tmpname=$posix?tmpnam():"h2p_$$"; > ($scr=$tmpname)=~/\w+$/; > $tempdir=$`; > >@@ -613,6 +615,23 @@ > $height{"b$_"}=int($temp*2**(1/2)*1000+.5)/10; > } > if(!$pagew || !$pageh) { >+ if ($LIBPAPER) { >+ my $env_com; >+ if ("\L$paper{'type'}" ne 'libpaper') { >+ $env_com = "/usr/bin/env PAPERSIZE=\"$paper{'type'}\""; >+ } >+ my $_w = `$env_com /usr/local/bin/paperconf -wc`; >+ my $_h = `$env_com /usr/local/bin/paperconf -hc`; >+ my $_n = `$env_com /usr/local/bin/paperconf -n`; >+ if ($_w ne '' and $_h ne '') { >+ $paper{'width'} = $_w; >+ $paper{'height'} = $_h; >+ $paper{'type'} = $_n; >+ ($pagew,$pageh)=($paper{'width'},$paper{'height'}); >+ } else { >+ &dbg("Unknown paper type: $paper{'type'}\n"); >+ } >+ } else { # !LIBPAPER > if($width{"\L$paper{'type'}"}) { > $paper{'width'}=$width{"\L$paper{'type'}"} if(!defined $paper{'width'}); > $paper{'height'}=$height{"\L$paper{'type'}"} if(!defined $paper{'height'}); >@@ -620,6 +639,7 @@ > } elsif($paper{'type'}) { > &dbg("Unknown paper type: $paper{'type'}\n"); > } >+ } # LIBPAPER > } > if($opt_L) { > $wl=$pageh-$mll-$mrl; >@@ -3405,7 +3425,6 @@ > local($optlist)=@_; > local(@args,$_,$opt,$opts,$rest,$olist,$plist,$found,@popts); > local($errs)=0; >- local($[)=0; > @args=split( /\|/, $optlist ); > for $opt (@args) { > if(substr($opt,-1,1) ne ':') {$olist.=$opt} >@@ -3830,7 +3849,7 @@ > $temp=$'=~/\/P\d+_?\d* \{/?$`:$rest; > ($eps{$pid})=$temp=~/([\w\W]*)} D/; > } >- if(/\/DH {/) { >+ if(/\/DH \{/) { > $'=~/%EndDH/; > $ph="/DH {$`"; > } >@@ -4081,7 +4100,7 @@ > } > if(open(HYPH,"<$hyfile")) { > &dbg("Reading hyphenation patterns from $hyfile\n") if($opt_d); >- <HYPH>=~/\\patterns{.*/; >+ <HYPH>=~/\\patterns\{.*/; > close HYPH; > $def=$`; > ($patterns=$')=~s/\^\^($X$X)/chr hex $1/eg;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 230233
: 195684 |
196376