Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

15
textproc/doclifter/DESCR Normal file
View File

@@ -0,0 +1,15 @@
The doclifter program translates documents written in troff macros to DocBook.
Lifting documents from presentation level to semantic level is hard, and
a really good job requires human polishing. This tool aims to do everything
that can be mechanized, and to preserve any troff-level information that might
have structural implications in XML comments.
This tool does most of the hard parts, but not all. TBL tables diagrams are
translated into DocBook table markup and and PIC into SVG, but EQN is not
translated.
Test loads are included in the distribution. The code has been tested in about
the most brutal possible way; it has been run against every single man page
in all sections of a full installation of Red Hat 9 with Fedore Core 1 updates.
It lifts 96% of 9836 pages without requiring any hand-hacking required.

View File

@@ -0,0 +1,33 @@
# $NetBSD: Makefile,v 1.25 2012/10/25 06:55:47 asau Exp $
#
DISTNAME= doclifter-2.3
PKGREVISION= 4
CATEGORIES= textproc
MASTER_SITES= http://catb.org/~esr/doclifter/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://catb.org/~esr/doclifter/
COMMENT= Translates documents written in troff macros to DocBook
NO_BUILD= yes
PYTHON_PATCH_SCRIPTS= doclifter manlifter
SUBST_CLASSES+= bin-path
SUBST_STAGE.bin-path= pre-configure
SUBST_FILES.bin-path= manlifter
SUBST_SED.bin-path= -e 's,@@BIN_PATH@@,${PREFIX}/bin,g'
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/doclifter ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/doclifter.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${INSTALL_SCRIPT} ${WRKSRC}/manlifter ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/manlifter.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"

5
textproc/doclifter/PLIST Normal file
View File

@@ -0,0 +1,5 @@
@comment $NetBSD: PLIST,v 1.2 2005/01/09 13:19:25 recht Exp $
bin/doclifter
bin/manlifter
man/man1/doclifter.1
man/man1/manlifter.1

View File

@@ -0,0 +1,8 @@
$NetBSD: distinfo,v 1.13 2012/03/22 21:43:35 wiz Exp $
SHA1 (doclifter-2.3.tar.gz) = 8ca55df65eb16958bc774abb3dc3d5929f5fa444
RMD160 (doclifter-2.3.tar.gz) = c1e18770260f40e74ad3b842ab09a92ed6f36646
Size (doclifter-2.3.tar.gz) = 132537 bytes
SHA1 (patch-aa) = ef13eca669f2b57ca559d631e6067ba290a25bd1
SHA1 (patch-doclifter.1) = 01c6cc595ccf73fb49e3897008548ad54d17d72f
SHA1 (patch-manlifter.1) = f6e48940ee0d596f8f915f3d31545963e475e25d

View File

@@ -0,0 +1,46 @@
$NetBSD: patch-aa,v 1.3 2007/01/15 23:40:46 wiz Exp $
--- manlifter.orig 2006-12-25 07:43:35.000000000 +0000
+++ manlifter
@@ -316,7 +316,8 @@ def massrun(files, options):
signal.signal(signal.SIGUSR2, report)
signal.signal(signal.SIGHUP, bailout)
signal.signal(signal.SIGINT, bailout)
- signal.signal(signal.SIGPWR, bailout)
+ if sys.platform != 'darwin':
+ signal.signal(signal.SIGPWR, bailout)
signal.signal(signal.SIGTERM, bailout)
print "%Test started", time.ctime(), "\n"
try:
@@ -584,22 +585,17 @@ def doclifter_driver(options, arguments)
fp.close()
if __name__ == "__main__":
- # Find a copy of doclifter
- for pathdir in ["."] + os.environ["PATH"].split(":"):
- where = os.path.join(pathdir, "doclifter")
- if os.path.exists(where):
- break
- else:
- sys.stderr.write("manlifter: can't find doclifter!\n")
- sys.exit(1)
- # Import it, so we can modify it while the test is running without
- # screwing up the results
+ import imp
+ fp = open('@@BIN_PATH@@/doclifter')
try:
- os.system("cp %s doclifter_test%s.py" % (where, os.getpid()))
- exec 'import doclifter_test%s' % os.getpid()
- exec "doclifter=doclifter_test%s" % os.getpid()
+ try:
+ doclifter = imp.load_module('doclifter', fp, '@@BIN_PATH@@/doclifter', ('.py', 'U', 1))
+ except ImportError:
+ sys.stderr.write("manlifter: can't find doclifter!")
+ sys.exit(1)
finally:
- os.system("rm -f doclifter_test%s.py*" % os.getpid())
+ if fp:
+ fp.close()
# Gather options
(options, arguments) = getopt.getopt(sys.argv[1:], "d:ef:hI:p:qs:Sv")
# Do the real work

View File

@@ -0,0 +1,36 @@
$NetBSD: patch-doclifter.1,v 1.1 2012/03/22 21:43:35 wiz Exp $
Avoid confusion with real macro calls.
--- doclifter.1.orig 2006-12-25 07:43:35.000000000 +0000
+++ doclifter.1
@@ -102,8 +102,7 @@ Troff and macro\-package special charact
.PP
When
\fBdoclifter\fR
-encounters a
-.so
+encounters a .so
directive, it searches for the file. If it can get read access to the file, and open it, and the file consists entirely of command lines and comments, then it is included. If any of these conditions fails, an entity reference for it is generated.
.PP
\fBdoclifter\fR
@@ -637,8 +636,7 @@ The
.nf
and
.fi
-macros are interpreted as literal\-layout boundaries. Calls to the
-.so
+macros are interpreted as literal\-layout boundaries. Calls to the .so
macro either cause inclusion or are translated into XML entity inclusions (see above). Calls to the
.ul
and
@@ -782,8 +780,7 @@ cannot be certain how subsections should
If you're translating a page that uses user\-defined macros and you get bad output, the first thing to do is simplify or eliminate the user\-defined macros. Replace them with stock requests where possible.
.SH "RETURN VALUES"
.PP
-On successful completion, the program returns status 0. It returns 1 if some file or standard input could not be translated. It returns 2 if one of the input sources was a
-.so
+On successful completion, the program returns status 0. It returns 1 if some file or standard input could not be translated. It returns 2 if one of the input sources was a .so
inclusion. It returns 3 if there is an error in reading or writing files. It returns 4 to indicate an internal error. It returns 5 when aborted by a keyboard interrupt.
.PP
Note that a zero return does not guarantee that the output is valid DocBook. It will almost always (as in, more than 96% of cases) be syntactically valid XML, but in some rare cases fixups by hand may be necessary to meet the semantics of the DocBook DTD. Validation problems are most likely to occur with complicated list markup.

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-manlifter.1,v 1.1 2012/03/22 21:43:35 wiz Exp $
Avoid confusion with real macro calls.
--- manlifter.1.orig 2006-12-25 07:43:35.000000000 +0000
+++ manlifter.1
@@ -29,8 +29,7 @@ For each source file examined, if the de
\fBmanlifter\fR
do the least work needed to keep the target XML tree up to date. Likewise, in \-h mode derived HTML files are only made when necessary.
.PP
-Stub pages that are just
-.so
+Stub pages that are just .so
redirections are translated to corresponding symlinks of XML files (and, with \-h, HTML files).
.PP
\fBmanlifter\fR