From 6a7ad61628660cd8b8560dd0599a8c82a623b919 Mon Sep 17 00:00:00 2001 From: Sergey Cherevko Date: Tue, 21 May 2024 10:30:46 +0300 Subject: [PATCH] import gnome-doc-utils-0.20.10-30.el9 --- .gitignore | 1 + .gnome-doc-utils.metadata | 1 + SOURCES/gnome-doc-utils-0.14.0-package.patch | 26 + SOURCES/gnome-doc-utils-0.20.10-python3.patch | 540 ++++++++++++++++++ SPECS/gnome-doc-utils.spec | 423 ++++++++++++++ 5 files changed, 991 insertions(+) create mode 100644 .gitignore create mode 100644 .gnome-doc-utils.metadata create mode 100644 SOURCES/gnome-doc-utils-0.14.0-package.patch create mode 100644 SOURCES/gnome-doc-utils-0.20.10-python3.patch create mode 100644 SPECS/gnome-doc-utils.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36a5d00 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gnome-doc-utils-0.20.10.tar.xz diff --git a/.gnome-doc-utils.metadata b/.gnome-doc-utils.metadata new file mode 100644 index 0000000..a949b78 --- /dev/null +++ b/.gnome-doc-utils.metadata @@ -0,0 +1 @@ +8320a30e1b7239aa33ba276da046090407a93bbf SOURCES/gnome-doc-utils-0.20.10.tar.xz diff --git a/SOURCES/gnome-doc-utils-0.14.0-package.patch b/SOURCES/gnome-doc-utils-0.14.0-package.patch new file mode 100644 index 0000000..232a195 --- /dev/null +++ b/SOURCES/gnome-doc-utils-0.14.0-package.patch @@ -0,0 +1,26 @@ +diff -up gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-css.xsl.package gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-css.xsl +--- gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-css.xsl.package 2008-09-22 16:06:09.000000000 -0400 ++++ gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-css.xsl 2008-11-29 11:35:54.000000000 -0500 +@@ -465,6 +465,7 @@ span.medialabel { font-style: italic; } + span.methodname { font-family: monospace; } + span.ooclass, span.ooexception, span.oointerface { font-family: monospace; } + span.option { font-family: monospace; } ++span.package { font-family: monospace; } + span.parameter { font-family: monospace; } + span.paramdef span.parameter { font-style: italic; } + span.prompt { font-family: monospace; } +diff -up gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-inline.xsl.package gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-inline.xsl +--- gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-inline.xsl.package 2008-09-22 16:06:09.000000000 -0400 ++++ gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-inline.xsl 2008-11-29 11:35:54.000000000 -0500 +@@ -669,6 +669,11 @@ FIXME + + + ++ ++ ++ ++ ++ + + + diff --git a/SOURCES/gnome-doc-utils-0.20.10-python3.patch b/SOURCES/gnome-doc-utils-0.20.10-python3.patch new file mode 100644 index 0000000..bf9614f --- /dev/null +++ b/SOURCES/gnome-doc-utils-0.20.10-python3.patch @@ -0,0 +1,540 @@ +diff -U3 -r gnome-doc-utils-0.20.10.orig/xml2po/xml2po/__init__.py gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py +--- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/__init__.py 2011-08-04 09:36:03.000000000 -0500 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py 2019-09-10 09:30:28.018627919 -0500 +@@ -86,14 +86,14 @@ + self.messages.append(t) + if spacepreserve: + self.nowrap[t] = True +- if t in self.linenos.keys(): ++ if t in list(self.linenos.keys()): + self.linenos[t].append((self.filename, tag, lineno)) + else: + self.linenos[t] = [ (self.filename, tag, lineno) ] + if (not self.do_translations) and comment and not t in self.comments: + self.comments[t] = comment + else: +- if t in self.linenos.keys(): ++ if t in list(self.linenos.keys()): + self.linenos[t].append((self.filename, tag, lineno)) + else: + self.linenos[t] = [ (self.filename, tag, lineno) ] +@@ -166,7 +166,7 @@ + elif node.isText(): + if node.isBlankNode(): + if self.app.options.get('expand_entities') or \ +- (not (node.prev and not node.prev.isBlankNode() and node.next and not node.next.isBlankNode()) ): ++ (not (node.prev and not node.prev.isBlankNode() and node.__next__ and not node.next.isBlankNode()) ): + #print >>sys.stderr, "BLANK" + node.setContent('') + else: +@@ -176,7 +176,7 @@ + child = node.children + while child: + self.normalizeNode(child) +- child = child.next ++ child = child.__next__ + + def normalizeString(self, text, spacepreserve = False): + """Normalizes string to be used as key for gettext lookup. +@@ -200,7 +200,7 @@ + tree = ctxt.doc() + newnode = tree.getRootElement() + except: +- print >> sys.stderr, """Error while normalizing string as XML:\n"%s"\n""" % (text) ++ print("""Error while normalizing string as XML:\n"%s"\n""" % (text), file=sys.stderr) + return text + + self.normalizeNode(newnode) +@@ -209,7 +209,7 @@ + child = newnode.children + while child: + result += child.serialize('utf-8') +- child = child.next ++ child = child.__next__ + + result = re.sub('^ ','', result) + result = re.sub(' $','', result) +@@ -235,7 +235,7 @@ + ctxt.parseDocument() + tree = ctxt.doc() + if next: +- newnode = tree.children.next ++ newnode = tree.children.__next__ + else: + newnode = tree.children + +@@ -243,7 +243,7 @@ + child = newnode.children + while child: + result += child.serialize('utf-8') +- child = child.next ++ child = child.__next__ + tree.freeDoc() + return result + +@@ -262,7 +262,7 @@ + result += child.content.decode('utf-8') + else: + result += self.myAttributeSerialize(child) +- child = child.next ++ child = child.__next__ + else: + result = node.serialize('utf-8') + return result +@@ -338,7 +338,7 @@ + pass + + if not newnode: +- print >> sys.stderr, """Error while parsing translation as XML:\n"%s"\n""" % (text.encode('utf-8')) ++ print("""Error while parsing translation as XML:\n"%s"\n""" % (text.encode('utf-8')), file=sys.stderr) + return + + newelem = newnode.getRootElement() +@@ -346,13 +346,13 @@ + if newelem and newelem.children: + free = node.children + while free: +- next = free.next ++ next = free.__next__ + free.unlinkNode() + free = next + + if node: + copy = newelem.copyNodeList() +- next = node.next ++ next = node.__next__ + node.replaceNode(newelem.copyNodeList()) + node.next = next + +@@ -378,7 +378,7 @@ + if child.type in ['text'] and child.content.strip()!='': + final = True + break +- child = child.next ++ child = child.__next__ + + node.__autofinal__ = final + return final +@@ -457,7 +457,7 @@ + outtxt += '<%s>%s' % (starttag, content, endtag) + else: + outtxt += self.doSerialize(child) +- child = child.next ++ child = child.__next__ + + if self.app.operation == 'merge': + norm_outtxt = self.normalizeString(outtxt, self.app.isSpacePreserveNode(node)) +@@ -534,7 +534,7 @@ + outtxt = '' + while child: + outtxt += self.doSerialize(child) +- child = child.next ++ child = child.__next__ + return outtxt + + def xml_error_handler(arg, ctxt): +@@ -577,8 +577,8 @@ + raise IOError("Unable to read file '%s'" % xmlfile) + try: + doc = XMLDocument(xmlfile, self) +- except Exception, e: +- print >> sys.stderr, "Unable to parse XML file '%s': %s" % (xmlfile, str(e)) ++ except Exception as e: ++ print("Unable to parse XML file '%s': %s" % (xmlfile, str(e)), file=sys.stderr) + sys.exit(1) + self.current_mode.preProcessXml(doc.doc, self.msg) + doc.generate_messages() +@@ -590,14 +590,14 @@ + raise IOError("Unable to read file '%s'" % xmlfile) + try: + doc = XMLDocument(xmlfile, self) +- except Exception, e: +- print >> sys.stderr, str(e) ++ except Exception as e: ++ print(str(e), file=sys.stderr) + sys.exit(1) + + try: + mfile = open(mofile, "rb") + except: +- print >> sys.stderr, "Can't open MO file '%s'." % (mofile) ++ print("Can't open MO file '%s'." % (mofile), file=sys.stderr) + self.gt = gettext.GNUTranslations(mfile) + self.gt.add_fallback(NoneTranslations()) + # Has preProcessXml use cases for merge? +@@ -619,16 +619,16 @@ + raise IOError("Unable to read file '%s'" % xmlfile) + try: + doc = XMLDocument(xmlfile, self) +- except Exception, e: +- print >> sys.stderr, str(e) ++ except Exception as e: ++ print(str(e), file=sys.stderr) + sys.exit(1) + doc.generate_messages() + + self.msg.translationsFollow() + try: + doc = XMLDocument(origxml, self) +- except Exception, e: +- print >> sys.stderr, str(e) ++ except Exception as e: ++ print(str(e), file=sys.stderr) + sys.exit(1) + doc.generate_messages() + self.output_po() +diff -U3 -r gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/docbook.py gnome-doc-utils-0.20.10/xml2po/xml2po/modes/docbook.py +--- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/docbook.py 2011-01-10 10:08:10.000000000 -0600 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/modes/docbook.py 2019-09-10 09:31:15.199572286 -0500 +@@ -43,7 +43,7 @@ + except ImportError: + from md5 import new as md5_new + +-from basic import basicXmlMode ++from .basic import basicXmlMode + + class docbookXmlMode(basicXmlMode): + """Class for special handling of DocBook document types. +@@ -131,7 +131,7 @@ + hash = self._md5_for_file(fullpath) + else: + hash = "THIS FILE DOESN'T EXIST" +- print >>sys.stderr, "Warning: image file '%s' not found." % fullpath ++ print("Warning: image file '%s' not found." % fullpath, file=sys.stderr) + + msg.outputMessage("@@image: '%s'; md5=%s" % (attr, hash), node.lineNo(), + "When image changes, this message will be marked fuzzy or untranslated for you.\n"+ +@@ -198,10 +198,10 @@ + # Perform some tests when ran standalone + if __name__ == '__main__': + test = docbookXmlMode() +- print "Ignored tags : " + repr(test.getIgnoredTags()) +- print "Final tags : " + repr(test.getFinalTags()) +- print "Space-preserve tags: " + repr(test.getSpacePreserveTags()) ++ print("Ignored tags : " + repr(test.getIgnoredTags())) ++ print("Final tags : " + repr(test.getFinalTags())) ++ print("Space-preserve tags: " + repr(test.getSpacePreserveTags())) + +- print "Credits from string: '%s'" % test.getStringForTranslators() +- print "Explanation for credits:\n\t'%s'" % test.getCommentForTranslators() ++ print("Credits from string: '%s'" % test.getStringForTranslators()) ++ print("Explanation for credits:\n\t'%s'" % test.getCommentForTranslators()) + +diff -U3 -r gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/gs.py gnome-doc-utils-0.20.10/xml2po/xml2po/modes/gs.py +--- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/gs.py 2010-12-13 10:14:07.000000000 -0600 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/modes/gs.py 2019-09-10 09:31:15.201572284 -0500 +@@ -20,7 +20,7 @@ + # Special case Gnome Summary + # + +-from basic import basicXmlMode ++from .basic import basicXmlMode + + class gsXmlMode(basicXmlMode): + """Abstract class for special handling of document types.""" +diff -U3 -r gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/mallard.py gnome-doc-utils-0.20.10/xml2po/xml2po/modes/mallard.py +--- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/mallard.py 2011-01-10 10:08:50.000000000 -0600 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/modes/mallard.py 2019-09-10 09:31:15.212572271 -0500 +@@ -39,7 +39,7 @@ + except ImportError: + from md5 import new as md5_new + +-from basic import basicXmlMode ++from .basic import basicXmlMode + + class mallardXmlMode(basicXmlMode): + """Class for special handling of Mallard document types.""" +@@ -112,7 +112,7 @@ + hash = self._md5_for_file(fullpath) + else: + hash = "THIS FILE DOESN'T EXIST" +- print >>sys.stderr, "Warning: image file '%s' not found." % fullpath ++ print("Warning: image file '%s' not found." % fullpath, file=sys.stderr) + + msg.outputMessage("@@image: '%s'; md5=%s" % (attr, hash), node.lineNo(), + "When image changes, this message will be marked fuzzy or untranslated for you.\n"+ +diff -U3 -r gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/ubuntu.py gnome-doc-utils-0.20.10/xml2po/xml2po/modes/ubuntu.py +--- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/ubuntu.py 2010-12-13 10:14:07.000000000 -0600 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/modes/ubuntu.py 2019-09-10 09:31:15.213572270 -0500 +@@ -2,7 +2,7 @@ + + import libxml2 + +-from docbook import docbookXmlMode ++from .docbook import docbookXmlMode + + class ubuntuXmlMode (docbookXmlMode): + """Special-casing Ubuntu DocBook website documentation.""" +diff -U3 -r gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/xhtml.py gnome-doc-utils-0.20.10/xml2po/xml2po/modes/xhtml.py +--- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/modes/xhtml.py 2010-12-13 10:14:07.000000000 -0600 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/modes/xhtml.py 2019-09-10 09:31:15.214572269 -0500 +@@ -21,7 +21,7 @@ + # This implements special instructions for handling XHTML documents + # in a better way, particularly to extract some attributes in HTML tags + +-from basic import basicXmlMode ++from .basic import basicXmlMode + + class xhtmlXmlMode(basicXmlMode): + """Class for special handling of XHTML document types.""" +diff -U3 -r gnome-doc-utils-0.20.10.orig/xml2po/xml2po/xml2po.py.in gnome-doc-utils-0.20.10/xml2po/xml2po/xml2po.py.in +--- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/xml2po.py.in 2010-12-13 10:14:07.000000000 -0600 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/xml2po.py.in 2019-09-10 09:30:28.217627684 -0500 +@@ -41,9 +41,9 @@ + if not os.path.exists('/dev/null'): NULL_STRING = 'NUL' + + def usage (with_help = False): +- print >> sys.stderr, "Usage: %s [OPTIONS] [XMLFILE]..." % (sys.argv[0]) ++ print("Usage: %s [OPTIONS] [XMLFILE]..." % (sys.argv[0]), file=sys.stderr) + if with_help: +- print >> sys.stderr, """ ++ print(""" + OPTIONS may be some of: + -a --automatic-tags Automatically decides if tags are to be considered + "final" or not +@@ -72,7 +72,7 @@ + using -p option for each XML file: + %(command)s -p de.po chapter1.xml > chapter1.de.xml + %(command)s -p de.po chapter2.xml > chapter2.de.xml +-""" % {'command': sys.argv[0]} ++""" % {'command': sys.argv[0]}, file=sys.stderr) + + + def main(argv): +@@ -82,7 +82,7 @@ + + name = os.path.join(os.path.dirname(__file__), '..') + if os.path.exists(os.path.join(name, 'tests')): +- print >> sys.stderr, 'Running from source folder, modifying PYTHONPATH' ++ print('Running from source folder, modifying PYTHONPATH', file=sys.stderr) + sys.path.insert(0, name) + + from xml2po import Main +@@ -142,14 +142,14 @@ + elif opt in ('-o', '--output'): + output = arg + elif opt in ('-v', '--version'): +- print VERSION ++ print(VERSION) + sys.exit(0) + elif opt in ('-h', '--help'): + usage(True) + sys.exit(0) + + if operation == 'update' and output != "-": +- print >> sys.stderr, "Option '-o' is not yet supported when updating translations directly. Ignoring this option." ++ print("Option '-o' is not yet supported when updating translations directly. Ignoring this option.", file=sys.stderr) + + # Treat remaining arguments as XML files + filenames = [] +@@ -159,16 +159,16 @@ + try: + xml2po_main = Main(default_mode, operation, output, options) + except IOError: +- print >> sys.stderr, "Error: cannot open file %s for writing." % (output) ++ print("Error: cannot open file %s for writing." % (output), file=sys.stderr) + sys.exit(5) + + if operation == 'merge': + if len(filenames) > 1: +- print >> sys.stderr, "Error: You can merge translations with only one XML file at a time." ++ print("Error: You can merge translations with only one XML file at a time.", file=sys.stderr) + sys.exit(2) + + if not mofile: +- print >> sys.stderr, "Error: You must specify MO file when merging translations." ++ print("Error: You must specify MO file when merging translations.", file=sys.stderr) + sys.exit(3) + + xml2po_main.merge(mofile, filenames[0]) +--- gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py.orig 2019-09-10 09:34:42.110328324 -0500 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py 2019-09-10 09:34:44.170325899 -0500 +@@ -166,7 +166,7 @@ + elif node.isText(): + if node.isBlankNode(): + if self.app.options.get('expand_entities') or \ +- (not (node.prev and not node.prev.isBlankNode() and node.__next__ and not node.next.isBlankNode()) ): ++ (not (node.prev and not node.prev.isBlankNode() and node.next and not node.next.isBlankNode()) ): + #print >>sys.stderr, "BLANK" + node.setContent('') + else: +@@ -176,7 +176,7 @@ + child = node.children + while child: + self.normalizeNode(child) +- child = child.__next__ ++ child = child.next + + def normalizeString(self, text, spacepreserve = False): + """Normalizes string to be used as key for gettext lookup. +@@ -209,7 +209,7 @@ + child = newnode.children + while child: + result += child.serialize('utf-8') +- child = child.__next__ ++ child = child.next + + result = re.sub('^ ','', result) + result = re.sub(' $','', result) +@@ -235,7 +235,7 @@ + ctxt.parseDocument() + tree = ctxt.doc() + if next: +- newnode = tree.children.__next__ ++ newnode = tree.children.next + else: + newnode = tree.children + +@@ -243,7 +243,7 @@ + child = newnode.children + while child: + result += child.serialize('utf-8') +- child = child.__next__ ++ child = child.next + tree.freeDoc() + return result + +@@ -262,7 +262,7 @@ + result += child.content.decode('utf-8') + else: + result += self.myAttributeSerialize(child) +- child = child.__next__ ++ child = child.next + else: + result = node.serialize('utf-8') + return result +@@ -346,13 +346,13 @@ + if newelem and newelem.children: + free = node.children + while free: +- next = free.__next__ ++ next = free.next + free.unlinkNode() + free = next + + if node: + copy = newelem.copyNodeList() +- next = node.__next__ ++ next = node.next + node.replaceNode(newelem.copyNodeList()) + node.next = next + +@@ -378,7 +378,7 @@ + if child.type in ['text'] and child.content.strip()!='': + final = True + break +- child = child.__next__ ++ child = child.next + + node.__autofinal__ = final + return final +@@ -457,7 +457,7 @@ + outtxt += '<%s>%s' % (starttag, content, endtag) + else: + outtxt += self.doSerialize(child) +- child = child.__next__ ++ child = child.next + + if self.app.operation == 'merge': + norm_outtxt = self.normalizeString(outtxt, self.app.isSpacePreserveNode(node)) +@@ -534,7 +534,7 @@ + outtxt = '' + while child: + outtxt += self.doSerialize(child) +- child = child.__next__ ++ child = child.next + return outtxt + + def xml_error_handler(arg, ctxt): +--- gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py.orig 2019-09-10 09:39:57.733974912 -0500 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py 2019-09-10 09:40:24.761946962 -0500 +@@ -326,7 +326,7 @@ + pass + + content = '<%s>%s' % (starttag, text, endtag) +- tmp = tmp + content.encode('utf-8') ++ tmp = tmp + content + + newnode = None + try: +@@ -663,7 +663,7 @@ + if not text or text.strip() == '': + return text + if self.gt: +- res = self.gt.ugettext(text.decode('utf-8')) ++ res = self.gt.gettext(text) + return res + + return text +--- gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py.orig 2019-09-10 09:41:23.853885851 -0500 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py 2019-09-10 09:44:23.580699979 -0500 +@@ -352,9 +352,10 @@ + + if node: + copy = newelem.copyNodeList() +- next = node.next ++ #next = node.next + node.replaceNode(newelem.copyNodeList()) +- node.next = next ++ #print(type(next)) ++ #node.next = next + + else: + # In practice, this happens with tags such as " " (only whitespace in between) +@@ -470,7 +471,7 @@ + + worth = self.worthOutputting(node) + if not translation: +- translation = outtxt.decode('utf-8') ++ translation = outtxt + if worth and self.app.options.get('mark_untranslated'): + node.setLang('C') + +--- gnome-doc-utils-0.20.10/xml2po/xml2po/modes/docbook.py.orig 2019-09-10 09:46:15.409584334 -0500 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/modes/docbook.py 2019-09-10 09:46:30.164569075 -0500 +@@ -184,7 +184,7 @@ + else: + ai.addChild(copy) + if match.group(3): +- copy.newChild(None, "year", match.group(3).encode('utf-8')) ++ copy.newChild(None, "year", match.group(3)) + if match.group(1) and match.group(2): + holder = match.group(1)+"(%s)" % match.group(2) + elif match.group(1): +@@ -193,7 +193,7 @@ + holder = match.group(2) + else: + holder = "???" +- copy.newChild(None, "holder", holder.encode('utf-8')) ++ copy.newChild(None, "holder", holder) + + # Perform some tests when ran standalone + if __name__ == '__main__': +--- gnome-doc-utils-0.20.10/xml2po/xml2po/xml2po.py.in~ 2019-09-10 09:50:34.000000000 -0500 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/xml2po.py.in 2019-09-10 09:50:45.114305443 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python -u ++#!/usr/bin/python3 -u + # -*- encoding: utf-8 -*- + # Copyright (c) 2004, 2005, 2006 Danilo Šegan . + # Copyright (c) 2009 Claude Paroz . +--- gnome-doc-utils-0.20.10.old/xml2po/xml2po/__init__.py 2021-10-14 16:54:33.332661817 +0900 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py 2021-10-14 17:06:31.006607987 +0900 +@@ -504,7 +504,7 @@ + # !!! This is not very nice thing to do, but I don't know if + # raising an exception is any better + return False +- return tmpstr.find('EXTERNAL_GENERAL_PARSED_ENTITY') != -1 ++ return tmpstr.find(b'EXTERNAL_GENERAL_PARSED_ENTITY') != -1 + + def doSerialize(self, node): + """Serializes a node and its children, emitting PO messages along the way. +@@ -556,7 +556,7 @@ + elif output == '-': + self.out = sys.stdout + else: +- self.out = file(output, 'w') ++ self.out = open(output, 'w') + + def load_mode(self, modename): + try: diff --git a/SPECS/gnome-doc-utils.spec b/SPECS/gnome-doc-utils.spec new file mode 100644 index 0000000..ace7987 --- /dev/null +++ b/SPECS/gnome-doc-utils.spec @@ -0,0 +1,423 @@ +Name: gnome-doc-utils +Version: 0.20.10 +Release: 30%{?dist} +Summary: Documentation utilities for GNOME + +License: GPLv2+ and LGPLv2+ and GFDL +URL: https://wiki.gnome.org/Projects/GnomeDocUtils +Source: https://download.gnome.org/sources/%{name}/0.20/%{name}-%{version}.tar.xz +#VCS: git:git://git.gnome.org/gnome-doc-utils +# RH bug #438638 / GNOME bug #524207 +Patch1: gnome-doc-utils-0.14.0-package.patch +Patch2: gnome-doc-utils-0.20.10-python3.patch + +BuildArch: noarch + +BuildRequires: gcc +BuildRequires: libxml2-devel >= 2.6.12 +BuildRequires: libxslt-devel >= 1.1.8 +BuildRequires: python3-libxml2 +BuildRequires: python3-devel +BuildRequires: intltool +BuildRequires: gettext +BuildRequires: make + +Requires: libxml2 >= 2.6.12 +Requires: libxslt >= 1.1.8 +Requires: python3-libxml2 +# for /usr/share/aclocal +Requires: automake +# for /usr/share/gnome/help +#Requires: yelp +# Currently creates a chicken/egg problem; gnome-doc-utils is needed in +# the build-chain for yelp, thus making it nearly impossible to ever +# update yelp for say newer Firefox. +Requires: gnome-doc-utils-stylesheets = %{version}-%{release} + + +%description +gnome-doc-utils is a collection of documentation utilities for the GNOME +project. Notably, it contains utilities for building documentation and +all auxiliary files in your source tree. + +# note that this is an "inverse dependency" subpackage +%package stylesheets +Summary: XSL stylesheets used by gnome-doc-utils +License: LGPLv2+ +# for the validation with xsltproc to use local dtds +Requires: docbook-dtds +# for /usr/share/pkgconfig +Requires: pkgconfig +# for /usr/share/xml +Requires: xml-common + +%description stylesheets +The gnome-doc-utils-stylesheets package contains XSL stylesheets which +are used by the tools in gnome-doc-utils and by yelp. + +%prep +%setup -q +%patch1 -p1 -b .package +%patch2 -p1 -b .python3 + +%build +%configure --disable-scrollkeeper --enable-build-utils +%make_build +sed -i s/python$/python3/g xml2po/xml2po/xml2po + +%install +%make_install + +sed -i -e '/^Requires:/d' %{buildroot}%{_datadir}/pkgconfig/xml2po.pc + +%find_lang %{name} + +%files -f %{name}.lang +%doc AUTHORS README NEWS +%license COPYING COPYING.GPL COPYING.LGPL +%{_bindir}/* +%{_datadir}/aclocal/gnome-doc-utils.m4 +%{_datadir}/gnome/help/gnome-doc-make +%{_datadir}/gnome/help/gnome-doc-xslt +%{_datadir}/gnome-doc-utils +%{_mandir}/man1/xml2po.1* +%{python3_sitelib}/xml2po/ +%{_datadir}/pkgconfig/gnome-doc-utils.pc +%{_datadir}/pkgconfig/xml2po.pc + +%files stylesheets +%{_datadir}/xml/gnome +%{_datadir}/xml/mallard + +%changelog +* Tue May 21 2024 Sergey Cherevko - 0.20.10-30 +- Rebuilt for MSVSphere 9.4 + +* Thu Jul 21 2022 Fedora Release Engineering - 0.20.10-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.20.10-29 +- Rebuilt for Python 3.11 + +* Thu Jan 20 2022 Fedora Release Engineering - 0.20.10-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Oct 14 2021 Mamoru TASAKA - 0.20.10-27 +- Fix on xml2po -o -p option for python 3 + +* Thu Jul 22 2021 Fedora Release Engineering - 0.20.10-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.20.10-25 +- Rebuilt for Python 3.10 + +* Tue Jan 26 2021 Fedora Release Engineering - 0.20.10-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 0.20.10-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.20.10-22 +- Rebuilt for Python 3.9 + +* Tue Jan 28 2020 Fedora Release Engineering - 0.20.10-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Sep 13 2019 Gwyn Ciesla - 0.20.10-20 +- Anchor regex. + +* Tue Sep 10 2019 Gwyn Ciesla - 0.20.10-19 +- Port to Python 3. + +* Thu Jul 25 2019 Fedora Release Engineering - 0.20.10-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 0.20.10-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.20.10-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 0.20.10-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Jan 05 2018 Iryna Shcherbina - 0.20.10-14 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Wed Jul 26 2017 Fedora Release Engineering - 0.20.10-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jun 14 2017 David King - 0.20.10-12 +- Use license macro for COPYING* +- Update URL +- Use some more modern macros +- Update man page glob +- Remove Group tag + +* Fri Feb 10 2017 Fedora Release Engineering - 0.20.10-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Jan 18 2017 Merlin Mathesius - 0.20.10-10 +- Add BuildRequires: python to fix FTBFS (BZ#1414528). + +* Tue Jul 19 2016 Fedora Release Engineering - 0.20.10-9 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Wed Feb 03 2016 Fedora Release Engineering - 0.20.10-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 0.20.10-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.20.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 0.20.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 0.20.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 0.20.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Apr 18 2012 Kalev Lember - 0.20.10-2 +- Depend on docbook-dtds for local validation + +* Mon Mar 26 2012 Matthew Barnes - 0.20.10-1 +- Update to 0.20.10 (needed for evolution-3.4.0) + +* Wed Mar 21 2012 Kalev Lember - 0.20.9-1 +- Update to 0.20.9 + +* Mon Mar 5 2012 Matthias Clasen - 0.20.7-1 +- Update to 0.20.7 + +* Fri Jan 13 2012 Fedora Release Engineering - 0.20.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Apr 25 2011 Matthias Clasen - 0.20.6-1 +- Update to 0.20.6 + +* Tue Mar 22 2011 Matthias Clasen - 0.20.5-1 +- Update to 0.20.5 + +* Tue Feb 08 2011 Fedora Release Engineering - 0.20.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 10 2011 Matthias Clasen - 0.20.4-1 +- Update to 0.20.4 + +* Tue Sep 28 2010 Matthias Clasen - 0.20.2-2 +- Carry over a change from the f14 branch + +* Tue Sep 28 2010 Matthias Clasen - 0.20.2-1 +- Update to 0.20.2 + +* Wed Jul 21 2010 David Malcolm - 0.20.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Mon Apr 26 2010 Matthias Clasen - 0.20.1-1 +- Update to 0.20.1 + +* Mon Mar 29 2010 Matthias Clasen - 0.20.0-1 +- Update to 0.20.0 + +* Mon Feb 22 2010 Matthias Clasen - 0.19.5-1 +- Update to 0.19.5 + +* Mon Feb 08 2010 Matthew Barnes - 0.19.4-1 +- Update to 0.19.4 + +* Sat Jan 23 2010 Matthew Barnes - 0.19.3-1 +- Update to 0.19.3 + +* Mon Jan 11 2010 Matthew Barnes - 0.19.2-1 +- Update to 0.19.2 + +* Wed Jan 06 2010 Matthew Barnes - 0.19.1-1 +- Update to 0.19.1 + +* Sun Dec 20 2009 Matthew Barnes - 0.18.1-1 +- Update to 0.18.1 + +* Mon Sep 21 2009 Matthias Clasen - 0.18.0-1 +- Update to 0.18.0 + +* Mon Sep 7 2009 Matthias Clasen - 0.17.5-1 +- Update to 0.17.5 + +* Mon Aug 24 2009 Matthias Clasen - 0.17.4-1 +- Update to 0.17.4 + +* Tue Jul 28 2009 Matthias Clasen - 0.17.3-1 +- Update to 0.17.3 + +* Fri Jul 24 2009 Fedora Release Engineering - 0.17.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jun 29 2009 Matthew Barnes - 0.17.2-1 +- Update to 0.17.2 +- Require libxml2-python for building. + +* Mon Jun 15 2009 Matthias Clasen - 0.17.1-1 +- Update to 0.17.1 + +* Tue Apr 14 2009 Matthias Clasen - 0.16.1-1 +- Update to 0.16.1 + +* Mon Mar 16 2009 Matthias Clasen - 0.16.0-1 +- Update to 0.16.0 + +* Mon Mar 02 2009 Matthew Barnes - 0.15.2-1 +- Update to 0.15.2 + +* Tue Feb 24 2009 Fedora Release Engineering - 0.15.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Feb 3 2009 Matthias Clasen - 0.15.1-2 +- Update to 0.15.1 + +* Sun Jan 11 2009 Matthias Clasen - 0.14.2-1 +- Update to 0.14.2 + +* Wed Dec 17 2008 Matthias Clasen - 0.14.1-1 +- Update to 0.14.1 + +* Mon Dec 8 2008 Matthias Clasen - 0.14.0-7 +- Fight pkg-config-induced dependency bloat + +* Mon Dec 01 2008 Ignacio Vazquez-Abrams - 0.14.0-4 +- Rebuild for Python 2.6 + +* Sat Nov 29 2008 Matthew Barnes - 0.14.0-3 +- Add patch for RH bug #438638 (monospace elements). + +* Sun Nov 23 2008 Matthias Clasen - 0.14.0-2 +- Tweak %%summary and %%description + +* Mon Sep 22 2008 Matthias Clasen - 0.14.0-1 +- Update to 0.14.0 + +* Tue Sep 2 2008 Matthias Clasen - 0.13.1-1 +- Update to 0.13.1 + +* Mon Mar 10 2008 Matthias Clasen - 0.12.2-1 +- Update to 0.12.2 + +* Mon Feb 18 2008 Matthew Barnes - 0.12.1-2 +- Package review corrections (RH bug #225816). + +* Tue Feb 12 2008 Matthew Barnes - 0.12.1-1 +- Update to 0.12.1 + +* Mon Sep 17 2007 Matthias Clasen - 0.12.0-1 +- Update to 0.12.0 + +* Mon Sep 3 2007 Matthias Clasen - 0.11.2-1 +- Update to 0.11.2 + +* Thu Aug 2 2007 Matthias Clasen - 0.11.1-2 +- Update the license field + +* Mon Jul 30 2007 Matthias Clasen - 0.11.1-1 +- Update to 0.11.1 + +* Mon Jul 23 2007 Matthias Clasen - 0.10.3-4 +- Split out stylesheets as subpackage to avoid pulling automake + in the live CD + +* Fri Jul 20 2007 Jesse Keating - 0.10.3-3 +- Don't require yelp for now + +* Sun Jun 17 2007 Matthias Clasen - 0.10.3-2 +- Fix up Requires and BuildRequires + +* Mon Apr 09 2007 Matthew Barnes - 0.10.3-1.fc7 +- Update to 0.10.3 + +* Mon Mar 12 2007 Matthew Barnes - 0.10.1-1.fc7 +- Update to 0.10.1 + +* Wed Jan 31 2007 Matthias Clasen - 0.9.2-1 +- Update to 0.9.2 + +* Sat Dec 09 2006 Matthew Barnes - 0.8.0-3 +- Add patch for GNOME bug #355521 (look for local m4 files). + +* Fri Sep 8 2006 Matthias Clasen - 0.8.0-2 +- Fix some directory ownership issues (#205677) + +* Mon Sep 4 2006 Matthias Clasen - 0.8.0-1.fc6 +- Update to 0.8.0 + +* Sat Aug 12 2006 Matthias Clasen - 0.7.2-1.fc6 +- Update to 0.7.2 + +* Tue Jun 13 2006 Matthias Clasen - 0.7.1-1 +- Update to 0.7.1 + +* Tue Jun 6 2006 Matthias Clasen - 0.6.0-3 +- Add a BuildRequires for perl-XML-Parser + +* Tue Apr 11 2006 Matthias Clasen - 0.6.0-2 +- Add a missing Requires + +* Sun Mar 12 2006 Ray Strode - 0.6.0-1 +- Update to 0.6.0 + +* Mon Feb 27 2006 Matthias Clasen - 0.5.7-1 +- Update to 0.5.7 + +* Mon Feb 20 2006 Matthias Clasen - 0.5.6-1 +- Update to 0.5.6 + +* Sun Feb 12 2006 Matthias Clasen - 0.5.5-1 +- Update to 0.5.5 + +* Mon Jan 30 2006 Matthias Clasen - 0.5.4-1 +- Update to 0.5.4 + +* Fri Jan 13 2006 Matthias Clasen - 0.5.3-1 +- Update to 0.5.3 + +* Tue Dec 20 2005 Matthias Clasen - 0.5.2-1 +- Update to 0.5.2 + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Wed Nov 30 2005 Matthias Clasen - 0.5.1-1 +- Update to 0.5.1 + +* Tue Oct 25 2005 Matthias Clasen - 0.4.3-1 +- Update to 0.4.3 + +* Thu Sep 29 2005 Matthias Clasen - 0.4.2-1 +- Update to 0.4.2 + +* Thu Sep 8 2005 Matthias Clasen - 0.4.0-1 +- Update to 0.4.0 + +* Wed Jul 27 2005 Christopher Aillon - 0.3.2-1 +- Update to 0.3.2 + +* Wed Jul 13 2005 Matthias Clasen - 0.3.1-1 +- Newer upstream version + +* Tue Apr 26 2005 Ray Strode - 0.2.0-2 +- Add patch that might fix yelp links (bug 146862) + +* Fri Apr 8 2005 Ray Strode - 0.2.0-1 +- Update to upstream version 0.2.0 + +* Thu Mar 17 2005 Ray Strode - 0.1.3-1 +- Update to upstream version 0.1.3 + +* Wed Feb 2 2005 Nalin Dahyabhai - 0.1.2-2 +- remove explicit libxml dependency (should have been libxml2) +- add libxml2-devel and libxslt-devel as buildprereqs + +* Fri Jan 28 2005 Matthias Clasen - 0.1.2-1 +- Initial build.