Remove gnome-doc-utils and rarian

The last usage was removed here:
https://github.com/msys2/MINGW-packages/pull/19571

gnome-doc-utils is unmaintained for a long time, rarian has seen
some fixes recently, but we have no other users.
This commit is contained in:
Christoph Reiter 2023-12-28 09:48:14 +01:00
parent f05cdab3a9
commit 5dc88859d3
10 changed files with 0 additions and 824 deletions

View File

@ -1,8 +0,0 @@
--- origsrc/gnome-doc-utils-0.18.0/bootstrap.make 2009-09-07 19:38:59.000000000 -0500
+++ src/gnome-doc-utils-0.18.0/bootstrap.make 2009-10-26 23:19:25.335732900 -0500
@@ -1,4 +1,4 @@
-_xml2po = PYTHONPATH="$(shell pwd)/$(top_builddir)/xml2po:$(shell pwd)/$(top_srcdir)/xml2po:$(PYTHONPATH)" "$(shell pwd)/$(top_builddir)/xml2po/xml2po/xml2po"
+_xml2po = PYTHONPATH="$(abs_top_builddir)/xml2po:$(abs_top_srcdir)/xml2po:$(PYTHONPATH)" "$(abs_top_builddir)/xml2po/xml2po/xml2po"
_db2html = $(top_srcdir)/xslt/docbook/html/db2html.xsl
_db2omf = $(top_srcdir)/xslt/docbook/omf/db2omf.xsl

View File

@ -1,46 +0,0 @@
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
pkgname=gnome-doc-utils
pkgver=0.20.10
pkgrel=6
pkgdesc="Documentation utilities for Gnome"
arch=('any')
license=('GPL' 'LGPL')
depends=('libxslt' 'python' 'docbook-xml' 'rarian')
makedepends=('intltool' 'libxml2-devel' 'libxslt-devel' 'libxml2-python' 'autotools' 'gcc')
url="https://www.gnome.org"
source=(https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
0.18.0-abs_top_srcdir.patch
gnome-doc-utils-0.20.10-python3.patch
more-python3-fixes.patch
msysize.patch)
sha256sums=('cb0639ffa9550b6ddf3b62f3b1add92fb92ab4690d351f2353cffe668be8c4a6'
'39cb4c5c1fdc59f3d03ce4362d579d216c1ac3910c1e8c5b1b4d052f63e447b3'
'cf9bdb057cef5877a884117a607bf850df357c75c30a13d01ed77b2c36f78ee7'
'd67166cbc39b5f759c4d3ede409e9db7f7eafb38f1fd8bd49e005eacbffb93ea'
'db5db69b298fe27a29cb1c72ae2737f79bf04cbe871a98ceb9d1389865a31acd')
prepare() {
cd "$pkgname-$pkgver"
patch -p2 -i ${srcdir}/0.18.0-abs_top_srcdir.patch
patch -p1 -i ${srcdir}/msysize.patch
# From fedora: https://src.fedoraproject.org/rpms/gnome-doc-utils/blob/master/f/gnome-doc-utils-0.20.10-python3.patch
patch -p1 -i ${srcdir}/gnome-doc-utils-0.20.10-python3.patch
# Some more things I found, only partly tested. There is probably more...
patch -p1 -i ${srcdir}/more-python3-fixes.patch
}
build() {
cd "$pkgname-$pkgver"
PYTHON=/usr/bin/python ./configure --prefix=/usr \
--sysconfdir=/etc --mandir=/usr/share/man \
--localstatedir=/var --disable-scrollkeeper
make
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
}

View File

@ -1,520 +0,0 @@
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</%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</%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</%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 "<para> </para>" (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 <danilo@gnome.org>.
# Copyright (c) 2009 Claude Paroz <claude@2xlibre.net>.

View File

@ -1,62 +0,0 @@
diff -Nur 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 2020-05-01 19:15:02.937514100 +0200
+++ gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py 2020-05-01 19:31:34.676207600 +0200
@@ -259,7 +259,7 @@
if not self.expand_entities:
result += '&' + child.name + ';'
else:
- result += child.content.decode('utf-8')
+ result += child.content
else:
result += self.myAttributeSerialize(child)
child = child.next
@@ -338,7 +338,7 @@
pass
if not newnode:
- print("""Error while parsing translation as XML:\n"%s"\n""" % (text.encode('utf-8')), file=sys.stderr)
+ print("""Error while parsing translation as XML:\n"%s"\n""" % (text), file=sys.stderr)
return
newelem = newnode.getRootElement()
@@ -423,7 +423,7 @@
outtxt = self.normalizeString(attr.content)
if self.app.operation == 'merge':
translation = self.app.getTranslation(outtxt)
- self.replaceAttributeContentsWithText(attr, translation.encode('utf-8'))
+ self.replaceAttributeContentsWithText(attr, translation)
else:
self.app.msg.outputMessage(outtxt, node.lineNo(), "", spacepreserve=False,
tag = node.name + ":" + attr.name)
@@ -464,7 +464,7 @@
norm_outtxt = self.normalizeString(outtxt, self.app.isSpacePreserveNode(node))
translation = self.app.getTranslation(norm_outtxt)
else:
- translation = outtxt.decode('utf-8')
+ translation = outtxt
starttag = self.startTagForNode(node)
endtag = self.endTagForNode(node)
@@ -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.
@@ -552,11 +552,11 @@
self.current_mode = self.load_mode(mode)()
# Prepare output
if operation == 'update':
- self.out = tempfile.TemporaryFile()
+ self.out = tempfile.TemporaryFile("w+", encoding="utf-8")
elif output == '-':
self.out = sys.stdout
else:
- self.out = file(output, 'w')
+ self.out = open(output, 'w', encoding="utf-8")
def load_mode(self, modename):
try:

View File

@ -1,37 +0,0 @@
diff -Naur gnome-doc-utils-0.20.10-orig/config.guess gnome-doc-utils-0.20.10/config.guess
--- gnome-doc-utils-0.20.10-orig/config.guess 2012-03-26 22:23:18.000000000 +0400
+++ gnome-doc-utils-0.20.10/config.guess 2014-07-23 15:34:04.129800000 +0400
@@ -800,6 +800,9 @@
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
@@ -837,7 +840,10 @@
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ amd64:CYGWIN*:*:* | x86_64:*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
diff -Naur gnome-doc-utils-0.20.10-orig/config.sub gnome-doc-utils-0.20.10/config.sub
--- gnome-doc-utils-0.20.10-orig/config.sub 2012-03-26 22:23:18.000000000 +0400
+++ gnome-doc-utils-0.20.10/config.sub 2014-07-23 15:31:40.609800000 +0400
@@ -1293,7 +1293,7 @@
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \

View File

@ -1,9 +0,0 @@
--- origsrc/rarian-0.8.0/librarian/Makefile.am 2008-03-09 13:46:22.000000000 -0500
+++ src/rarian-0.8.0/librarian/Makefile.am 2008-05-25 23:46:31.406250000 -0500
@@ -30,4 +30,4 @@
endif
librarian_la_CFLAGS = -DDATADIR=\""$(datadir)"\" -DSYSCONFDIR=\""$(sysconfdir)"\" -DI_KNOW_RARIAN_0_8_IS_UNSTABLE
-librarian_la_LDFLAGS = -export-symbols-regex "^rrn_.*"
\ No newline at end of file
+librarian_la_LDFLAGS = -export-symbols-regex "^rrn_.*" -no-undefined

View File

@ -1,48 +0,0 @@
Make sure we don't end up with //UNC paths.
--- origsrc/rarian-0.8.1/librarian/rarian-reg-full.c 2008-09-01 13:40:21.000000000 -0500
+++ src/rarian-0.8.1/librarian/rarian-reg-full.c 2009-11-12 01:38:10.092197400 -0600
@@ -703,8 +703,8 @@ process_section_path_full (RrnListEntry
}
if (entry->text[0] == '/') {
/* Absolute path */
- new_uri = malloc (sizeof (char) * strlen(entry->text)+6);
- sprintf (new_uri, "file:/%s", entry->text);
+ new_uri = malloc (sizeof (char) * strlen(entry->text)+7);
+ sprintf (new_uri, "file://%s", entry->text);
free (entry->text);
entry->text = new_uri;
goto done;
--- origsrc/rarian-0.8.1/librarian/rarian-reg-utils.c 2008-09-01 13:40:21.000000000 -0500
+++ src/rarian-0.8.1/librarian/rarian-reg-utils.c 2009-11-12 01:39:44.987162900 -0600
@@ -723,7 +723,7 @@ process_path (RrnReg *reg)
{
char *prefix = NULL;
RrnSect *child = reg->children;
- if (!strncmp ("file://", reg->uri, 7)) {
+ if (!strncmp ("file:///", reg->uri, 8)) {
/* No processing needs done. The URI is already in the file: scheme */
return;
}
@@ -782,8 +782,8 @@ process_section_path (char *owner_path,
}
if (section->uri[0] == '/') {
/* Absolute path */
- new_uri = malloc (sizeof (char) * strlen(section->uri)+6);
- sprintf (new_uri, "file:/%s", section->uri);
+ new_uri = malloc (sizeof (char) * strlen(section->uri)+7);
+ sprintf (new_uri, "file://%s", section->uri);
free (section->uri);
section->uri = new_uri;
goto done;
--- origsrc/rarian-0.8.1/util/rarian-sk-preinstall.cpp 2008-09-01 13:40:21.000000000 -0500
+++ src/rarian-0.8.1/util/rarian-sk-preinstall.cpp 2009-11-12 01:30:19.236576500 -0600
@@ -97,7 +97,7 @@ process_new_url (char *input)
if (i == 1) {
/* Normal path. Add file:/ to the start */
new_url = (char *) malloc (sizeof(char) * (strlen (input) + 7));
- sprintf (new_url, "file:/%s", input);
+ sprintf (new_url, "file://%s", input);
} else {
/* Don't know what to do. Just copy and append file: to it */
new_url = (char *) malloc (sizeof(char) * (strlen(input) + 6));

View File

@ -1,45 +0,0 @@
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
pkgname=rarian
pkgver=0.8.1
pkgrel=3
pkgdesc="Documentation meta-data library, designed as a replacement for Scrollkeeper."
arch=('i686' 'x86_64')
url="https://rarian.freedesktop.org/"
license=('GPL')
depends=('gcc-libs')
makedepends=('libxslt' 'autotools' 'gcc')
source=(https://download.gnome.org/sources/${pkgname}/0.8/${pkgname}-${pkgver}.tar.bz2
user-segfault.patch
msysize.patch
0.8-no-undefined.patch
0.8.1-file-uri.patch)
sha256sums=('aafe886d46e467eb3414e91fa9e42955bd4b618c3e19c42c773026b205a84577'
'518b1834d4f44e92161f0cf2f72a6474f0ec687ea53562c64109df90d343fe71'
'eb52d89126cb55a10441ec60b03ed12f5e1c20eb1daaee90eef94e07577416b0'
'de0cddcf34294f6a8cf14c38c196462de75840b5cfdf6445804100398bb2daa4'
'c3a447c98280653474112a9f4e740325f11947a2e4a4dc6b9afc8fb5e64e98d3')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -Np0 -i ${srcdir}/user-segfault.patch
patch -Np1 -i ${srcdir}/msysize.patch
patch -Np2 -i ${srcdir}/0.8-no-undefined.patch
patch -Np2 -i ${srcdir}/0.8.1-file-uri.patch
autoreconf -fi
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
}

View File

@ -1,35 +0,0 @@
diff -Naur rarian-0.8.1-orig/config.guess rarian-0.8.1/config.guess
--- rarian-0.8.1-orig/config.guess 2008-09-01 22:44:56.000000000 +0400
+++ rarian-0.8.1/config.guess 2014-07-23 15:14:46.899800000 +0400
@@ -781,6 +781,9 @@
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
@@ -815,6 +818,9 @@
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+ echo x86_64-unknown-msys
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit ;;
diff -Naur rarian-0.8.1-orig/config.sub rarian-0.8.1/config.sub
--- rarian-0.8.1-orig/config.sub 2008-09-01 22:44:56.000000000 +0400
+++ rarian-0.8.1/config.sub 2014-07-23 15:15:01.017800000 +0400
@@ -1217,7 +1217,7 @@
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \

View File

@ -1,14 +0,0 @@
--- util/rarian-sk-get-cl.cpp~ 2008-07-28 19:23:28.000000000 +0200
+++ util/rarian-sk-get-cl.cpp 2008-07-28 19:23:28.000000000 +0200
@@ -160,6 +160,11 @@
{
char *filename = NULL;
char *user = getenv ("USERNAME");
+
+ if (user == NULL) {
+ user = getenv ("USER");
+ }
+
char *basepath = NULL;
int i=0;
int last = 0;