diff options
author | hrs <hrs@FreeBSD.org> | 2013-04-28 23:11:37 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2013-04-28 23:11:37 +0800 |
commit | 4a0283fdf46c48b0c61496b4a5681305636d778f (patch) | |
tree | f2b4c1e8b07f3f129c614159947c8756fa9a78d3 /print/html2ps | |
parent | aaf88cd2cab77550e1deb4571918a69571f3963c (diff) | |
download | freebsd-ports-gnome-4a0283fdf46c48b0c61496b4a5681305636d778f.tar.gz freebsd-ports-gnome-4a0283fdf46c48b0c61496b4a5681305636d778f.tar.zst freebsd-ports-gnome-4a0283fdf46c48b0c61496b4a5681305636d778f.zip |
Merge print/html2ps-{a4,letter} to print/html2ps.
Diffstat (limited to 'print/html2ps')
-rw-r--r-- | print/html2ps/Makefile | 54 | ||||
-rw-r--r-- | print/html2ps/distinfo | 2 | ||||
-rw-r--r-- | print/html2ps/files/html2psrc.in | 23 | ||||
-rw-r--r-- | print/html2ps/files/patch-html2ps | 63 | ||||
-rw-r--r-- | print/html2ps/files/patch-html2ps.1 | 11 | ||||
-rw-r--r-- | print/html2ps/pkg-descr | 19 |
6 files changed, 172 insertions, 0 deletions
diff --git a/print/html2ps/Makefile b/print/html2ps/Makefile new file mode 100644 index 000000000000..68c337738dc9 --- /dev/null +++ b/print/html2ps/Makefile @@ -0,0 +1,54 @@ +# Created by: Andreas Klemm <andreas@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= html2ps +DISTVERSION= 1.0b7 +PORTREVISION= 1 +PORTEPOCH= 1 +CATEGORIES= print www perl5 +MASTER_SITES= http://user.it.uu.se/~jan/ \ + http://fossies.org/unix/www/ + +MAINTAINER= hrs@FreeBSD.org +COMMENT= HTML to PostScript converter + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +RUN_DEPENDS= mogrify:${PORTSDIR}/graphics/ImageMagick \ + p5-libwww>=0:${PORTSDIR}/www/p5-libwww \ + weblint++:${PORTSDIR}/www/weblint++ \ + paperconf:${PORTSDIR}/print/libpaper + +NO_BUILD= yes +USE_PERL5= yes +USE_GHOSTSCRIPT_RUN= yes + +SUB_FILES= html2psrc + +MAN1= html2ps.1 +MAN5= html2psrc.5 +PLIST_FILES= bin/html2ps \ + etc/html2psrc \ + %%DATADIR%%/html2ps.html \ + %%DATADIR%%/hyphen.tex +PLIST_DIRS= %%DATADIR%% + +post-patch: + @${REINPLACE_CMD} -e \ + 's|exec perl|exec ${PERL}| ; \ + s|%%LOCALBASE%%|${LOCALBASE}| ; \ + s|%%PREFIX%%|${PREFIX}| ; \ + s|%%DATADIR%%|${DATADIR}|' \ + ${WRKSRC}/html2ps + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/html2ps ${PREFIX}/bin + ${INSTALL_DATA} ${WRKDIR}/html2psrc ${PREFIX}/etc + ${INSTALL_MAN} ${WRKSRC}/html2ps.1 ${MAN1PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/html2psrc.5 ${MAN5PREFIX}/man/man5 + @${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/html2ps.html ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/hyphen.tex ${DATADIR} + +.include <bsd.port.mk> diff --git a/print/html2ps/distinfo b/print/html2ps/distinfo new file mode 100644 index 000000000000..74e21c9b5e70 --- /dev/null +++ b/print/html2ps/distinfo @@ -0,0 +1,2 @@ +SHA256 (html2ps-1.0b7.tar.gz) = d553980468a14bae738982c384c17f426ecf77dafd9a4e2499d520953f156f14 +SIZE (html2ps-1.0b7.tar.gz) = 128451 diff --git a/print/html2ps/files/html2psrc.in b/print/html2ps/files/html2psrc.in new file mode 100644 index 000000000000..4716fb2b8589 --- /dev/null +++ b/print/html2ps/files/html2psrc.in @@ -0,0 +1,23 @@ +/* Global configuration file for html2ps */ + +@html2ps { + package { + ImageMagick: 1; + PerlMagick: 1; + djpeg: 1; + TeX: 1; + dvips: 1; + Ghostscript: 1; + check: weblint++; + libwww-perl: 1; + path: "%%LOCALBASE%%/bin"; + } + paper { + type: libpaper; + } + hyphenation { + en { + file: "%%DATADIR%%/hyphen.tex"; + } + } +} diff --git a/print/html2ps/files/patch-html2ps b/print/html2ps/files/patch-html2ps new file mode 100644 index 000000000000..89acd7817d75 --- /dev/null +++ b/print/html2ps/files/patch-html2ps @@ -0,0 +1,63 @@ +--- html2ps.orig 2010-05-07 20:22:12.000000000 +0900 ++++ html2ps 2013-04-29 00:07:16.000000000 +0900 +@@ -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='%%PREFIX%%/etc/html2psrc'; ++$ug='%%DATADIR%%/html2ps.html'; + + $conf=<<'EOR'; + @html2ps { +@@ -46,7 +47,7 @@ + path: ""; + } + paper { +- type: A4; ++ type: libpaper; + height: ""; + width: ""; + } +@@ -613,6 +614,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 +638,7 @@ + } elsif($paper{'type'}) { + &dbg("Unknown paper type: $paper{'type'}\n"); + } ++ } # LIBPAPER + } + if($opt_L) { + $wl=$pageh-$mll-$mrl; +@@ -3405,7 +3424,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} diff --git a/print/html2ps/files/patch-html2ps.1 b/print/html2ps/files/patch-html2ps.1 new file mode 100644 index 000000000000..e05531623434 --- /dev/null +++ b/print/html2ps/files/patch-html2ps.1 @@ -0,0 +1,11 @@ +--- html2ps.1.orig 2013-04-28 23:11:32.000000000 +0900 ++++ html2ps.1 2013-04-28 23:11:39.000000000 +0900 +@@ -357,7 +357,7 @@ + $HOME/.html2psrc + User configuration file, see html2psrc(5). + .SH SEE ALSO +-html2psrc(5), perl(1), setlocale(3), strftime(3), weblint(1) ++html2psrc(5), perl(1), setlocale(3), strftime(3), weblint++(1) + .SH VERSION + This manpage describes html2ps version 1.0 beta7. + .SH AVAILABILITY diff --git a/print/html2ps/pkg-descr b/print/html2ps/pkg-descr new file mode 100644 index 000000000000..41c694f3e9ce --- /dev/null +++ b/print/html2ps/pkg-descr @@ -0,0 +1,19 @@ +- Much from HTML 4.0 - that is relevant for printing - is supported + (incidentally, the PostScript and PDF versions of the HTML 4.0 draft, + were generated using html2ps). For example, all character entities + (except ‌, ‍, ‎, and ‏) are supported. +- Many possibilities to control the appearance. Starting with this version, + this is mostly done using configuration files. +- Support for processing multiple documents, also automatically by + recursively following links. +- A table of contents can be generated, either from the links in a document, + or automatically from document headings. +- Configurable page headers/footers, that for example can contain + document title, URL, page number, current heading, and date. +- When converting the PostScript document to PDF - using some other + program such as version 5.0 or later of Aladdin Ghostscript, or + Adobe Acrobat Distiller - the original hyperlinks in the HTML + documents will be retained in the PDF document. +- Automatic hyphenation and text justification can be selected. + +WWW: http://www.tdb.uu.se/~jan/html2ps.html |