diff options
-rw-r--r-- | textproc/doclifter/Makefile | 13 | ||||
-rw-r--r-- | textproc/doclifter/PLIST | 4 | ||||
-rw-r--r-- | textproc/doclifter/distinfo | 3 | ||||
-rw-r--r-- | textproc/doclifter/patches/patch-aa | 45 |
4 files changed, 59 insertions, 6 deletions
diff --git a/textproc/doclifter/Makefile b/textproc/doclifter/Makefile index 92a8b934b56..0cdf4b3ad3c 100644 --- a/textproc/doclifter/Makefile +++ b/textproc/doclifter/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.9 2004/12/25 15:59:17 wiz Exp $ +# $NetBSD: Makefile,v 1.10 2005/01/09 13:19:25 recht Exp $ # DISTNAME= doclifter-2.0 +PKGREVISION= 1 CATEGORIES= textproc MASTER_SITES= http://catb.org/~esr/doclifter/ @@ -15,12 +16,16 @@ USE_BUILDLINK3= yes PYTHON_PATCH_SCRIPTS= doclifter manlifter PYTHON_VERSIONS_ACCEPTED= 24pth 24 23pth 23 22pth 22 +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' + do-install: ${INSTALL_SCRIPT} ${WRKSRC}/doclifter ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/doclifter.1 ${PREFIX}/man/man1 -# Not yet (only works when run as "./manlifter" -# ${INSTALL_SCRIPT} ${WRKSRC}/manlifter ${PREFIX}/bin -# ${INSTALL_MAN} ${WRKSRC}/manlifter.1 ${PREFIX}/man/man1 + ${INSTALL_SCRIPT} ${WRKSRC}/manlifter ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/manlifter.1 ${PREFIX}/man/man1 .include "../../lang/python/application.mk" .include "../../mk/bsd.pkg.mk" diff --git a/textproc/doclifter/PLIST b/textproc/doclifter/PLIST index 374ccba1623..1dba8345bff 100644 --- a/textproc/doclifter/PLIST +++ b/textproc/doclifter/PLIST @@ -1,3 +1,5 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2004/01/17 01:07:14 recht Exp $ +@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 diff --git a/textproc/doclifter/distinfo b/textproc/doclifter/distinfo index c636b07eb06..4fbac59c7e1 100644 --- a/textproc/doclifter/distinfo +++ b/textproc/doclifter/distinfo @@ -1,4 +1,5 @@ -$NetBSD: distinfo,v 1.8 2004/12/25 15:59:17 wiz Exp $ +$NetBSD: distinfo,v 1.9 2005/01/09 13:19:25 recht Exp $ SHA1 (doclifter-2.0.tar.gz) = 976c1bad65dc0f8a893c9ff2d597b6e5f05305b6 Size (doclifter-2.0.tar.gz) = 126448 bytes +SHA1 (patch-aa) = 59761aa1058d4417c788d25133416a91473828c7 diff --git a/textproc/doclifter/patches/patch-aa b/textproc/doclifter/patches/patch-aa new file mode 100644 index 00000000000..766f0611ac5 --- /dev/null +++ b/textproc/doclifter/patches/patch-aa @@ -0,0 +1,45 @@ +--- manlifter.orig Fri Dec 24 23:44:11 2004 ++++ manlifter Sun Jan 9 14:06:09 2005 +@@ -300,7 +300,8 @@ + 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: +@@ -557,22 +558,18 @@ + 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!") +- 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 |