From c2ad1101efa300df137cf6c9ff96472fd3112242 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Fri, 6 Jul 2018 18:00:37 +0000 Subject: [PATCH] - Added/RM missing patches --- devel/zziplib/files/patch-docs_Makefile.in | 11 ----- devel/zziplib/files/patch-docs_dbk2man.py | 47 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 11 deletions(-) delete mode 100644 devel/zziplib/files/patch-docs_Makefile.in create mode 100644 devel/zziplib/files/patch-docs_dbk2man.py diff --git a/devel/zziplib/files/patch-docs_Makefile.in b/devel/zziplib/files/patch-docs_Makefile.in deleted file mode 100644 index 2e72a4a7ff8e..000000000000 --- a/devel/zziplib/files/patch-docs_Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- docs/Makefile.in.orig 2009-08-27 16:33:21.000000000 +0200 -+++ docs/Makefile.in 2009-08-27 16:33:21.000000000 +0200 -@@ -451,7 +451,7 @@ uninstall-am: - - - all : all-am default --default : doc @MAINTAINER_MODE_FALSE@ mans -+default : @MAINTAINER_MODE_FALSE@ mans - clean-doc clean-docs : clean-unpack - - rm $(DISTCLEANFILES) - - rm $(MAINTAINERCLEANFILES) diff --git a/devel/zziplib/files/patch-docs_dbk2man.py b/devel/zziplib/files/patch-docs_dbk2man.py new file mode 100644 index 000000000000..c52ae2f07f60 --- /dev/null +++ b/devel/zziplib/files/patch-docs_dbk2man.py @@ -0,0 +1,47 @@ +--- docs/dbk2man.py.orig 2018-03-16 11:55:55 UTC ++++ docs/dbk2man.py +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python2.7 ++#! /usr/bin/python + """ Converts an xml-file with docbook elements into troff manual pages. + The conversion uses etree expecting elements in the input. + The output goes to a multiple files in manX/* subdirectories. +@@ -223,22 +223,23 @@ def refentry2man(refentry, subdirectory + if found is not None: manvolnum = found.text + written = 0 + section = refentry.find("refnamediv") +- for refname in section.findall("refname"): +- if not refentrytitle: +- refentrytitle = refname.text +- manpage = refname.text +- filename = "%s/man%s/%s.%s" % (subdirectory, manvolnum, manpage, manvolnum) +- if manpage != refentrytitle: +- manpagetext = ".so %s.%s\n" % (refentrytitle, manvolnum) +- writefile(filename, manpagetext) +- else: +- manpagetext = text ++ if section is not None: ++ for refname in section.findall("refname"): ++ if not refentrytitle: ++ refentrytitle = refname.text ++ manpage = refname.text ++ filename = "%s/man%s/%s.%s" % (subdirectory, manvolnum, manpage, manvolnum) ++ if manpage != refentrytitle: ++ manpagetext = ".so %s.%s\n" % (refentrytitle, manvolnum) ++ writefile(filename, manpagetext) ++ else: ++ manpagetext = text ++ writefile(filename, manpagetext) ++ written += 1 ++ if not written: ++ manpage = refentrytitle ++ filename = "%s/man%s/%s.%s" % (subdirectory, manvolnum, manpage, manvolnum) + writefile(filename, manpagetext) +- written += 1 +- if not written: +- manpage = refentrytitle +- filename = "%s/man%s/%s.%s" % (subdirectory, manvolnum, manpage, manvolnum) +- writefile(filename, manpagetext) + + def writefile(filename, manpagetext): + dirname = os.path.dirname(filename)