[packages/gimp-help] - updated to 2.8.0 - added am patch (fixes for modern automake) - added langs patch (disable missing
qboosh
qboosh at pld-linux.org
Tue Jul 2 20:18:59 CEST 2013
commit 4062f1b22493364199fce90d29bb08bff212e1a4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Jul 2 20:18:26 2013 +0200
- updated to 2.8.0
- added am patch (fixes for modern automake)
- added langs patch (disable missing Catalan translation)
- added xml2po patch (some fixes from git)
- note crashes that occur on two files
gimp-help-am.patch | 32 ++++++++
gimp-help-langs.patch | 17 ++++
gimp-help-xml2po.patch | 211 +++++++++++++++++++++++++++++++++++++++++++++++++
gimp-help.spec | 34 +++++---
4 files changed, 285 insertions(+), 9 deletions(-)
---
diff --git a/gimp-help.spec b/gimp-help.spec
index 8600149..fab6bd4 100644
--- a/gimp-help.spec
+++ b/gimp-help.spec
@@ -1,18 +1,25 @@
+# NOTE: python xml2po crashes with memory fault inside libxml2mod on two files from Greek (el) translation
Summary: Help files for the GIMP
Summary(pl.UTF-8): Pliki pomocy dla GIMP-a
Name: gimp-help
-Version: 2.4.2
+Version: 2.8.0
Release: 1
License: FDL
Group: Documentation
Source0: ftp://ftp.gimp.org/pub/gimp/help/%{name}-%{version}.tar.bz2
-# Source0-md5: 497e1212cbd1499d151b85dabaa3875c
+# Source0-md5: d6e07a569fe4b3bb11aaf5630da2693b
Source1: %{name}-lang-files.rb
+Patch0: %{name}-am.patch
+Patch1: %{name}-langs.patch
+Patch2: %{name}-xml2po.patch
URL: http://wiki.gimp.org/gimp/GimpDocs
+BuildRequires: autoconf >= 2.54
+BuildRequires: automake >= 1.6
BuildRequires: docbook-dtd43-xml
BuildRequires: ruby
+BuildRequires: sed >= 4.0
BuildRequires: xhtml-dtd10-xml
-Requires: gimp >= 2.0
+Requires: gimp >= 2.8.0
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -28,22 +35,31 @@ ludzkimi gałkami ocznymi.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%build
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+# see autogen.sh
+%{__sed} -i -e 's/# HIDE FROM AUTOMAKE #//' -e '/^all\(-local\)\?:/i\
+\
+\
+' Makefile.in
%configure \
+ --host=%{_host} \
+ --build=%{_host} \
--without-gimp
-%{__make}
+%{__make} -j1 all
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+%{__make} -j1 install \
DESTDIR=$RPM_BUILD_ROOT
-mv -f $RPM_BUILD_ROOT%{_datadir}/gimp/2.0/help/images/filters/{no,nb}
-mv -f $RPM_BUILD_ROOT%{_datadir}/gimp/2.0/help/images/preferences/{no,nb}
-mv -f $RPM_BUILD_ROOT%{_datadir}/gimp/2.0/help/images/tutorials/{no,nb}
-
%{__ruby} %{SOURCE1} -p %{_datadir}/gimp/2.0 -p %{_defaultdocdir} -s %{_defaultdocdir}/\.+ > %{name}.lang
%clean
diff --git a/gimp-help-am.patch b/gimp-help-am.patch
new file mode 100644
index 0000000..595db3f
--- /dev/null
+++ b/gimp-help-am.patch
@@ -0,0 +1,32 @@
+--- gimp-help-2.8.0/quickreference/Makefile.am.orig 2012-05-22 07:13:58.000000000 +0200
++++ gimp-help-2.8.0/quickreference/Makefile.am 2012-07-02 19:23:52.543625677 +0200
+@@ -36,17 +36,17 @@
+ $(TEMPLATES)
+
+ xml/gimp-keys-%.xml: po/%.po gimp-keys.xml
+- $(mkdir_p) xml
++ $(MKDIR_P) xml
+ $(XML2PO) -p $< $(srcdir)/gimp-keys.xml > $@
+
+ # English is a special case
+ #
+ xml/gimp-keys-en.xml: po/gimp-keys.pot gimp-keys.xml
+- $(mkdir_p) xml
++ $(MKDIR_P) xml
+ $(XML2PO) -p $< $(srcdir)/gimp-keys.xml > $@
+
+ svg/gimp-keys-%.svg: xml/gimp-keys-%.xml stylesheets/keys-svg.xsl
+- $(mkdir_p) svg
++ $(MKDIR_P) svg
+ $(XSLTPROC) \
+ $(srcdir)/stylesheets/keys-svg.xsl \
+ $< \
+@@ -55,7 +55,7 @@
+ svg: $(foreach lang,$(QUICKREFERENCE_LINGUAS),svg/gimp-keys-$(lang).svg)
+
+ docbook/gimp-keys-%.xml: xml/gimp-keys-%.xml stylesheets/keys-docbook.xsl
+- $(mkdir_p) docbook
++ $(MKDIR_P) docbook
+ $(XSLTPROC) \
+ $(srcdir)/stylesheets/keys-docbook.xsl \
+ $< \
diff --git a/gimp-help-langs.patch b/gimp-help-langs.patch
new file mode 100644
index 0000000..35d249a
--- /dev/null
+++ b/gimp-help-langs.patch
@@ -0,0 +1,17 @@
+--- gimp-help-2.8.0/configure.ac.orig 2012-05-24 10:40:04.000000000 +0200
++++ gimp-help-2.8.0/configure.ac 2012-07-02 19:47:30.143566188 +0200
+@@ -57,12 +57,12 @@
+ # QUICKREFERENCE_ALL_LINGUAS *and* (intersecton) ALL_LINGUAS
+
+ if test "x$ALL_LINGUAS" = "x"; then
+- ALL_LINGUAS="ca da de el en en_GB es fi fr hr it ja ko lt nl nn pl ru sl sv zh_CN"
++ ALL_LINGUAS="da de el en en_GB es fi fr hr it ja ko lt nl nn pl ru sl sv zh_CN"
+ else
+ ALL_LINGUAS=`echo "$ALL_LINGUAS" | $SED -e 's/[,] */ /g'`
+ fi
+ if test "x$QUICKREFERENCE_ALL_LINGUAS" = "x"; then
+- QUICKREFERENCE_ALL_LINGUAS="ca de el en fi fr it ja ko ru sv zh_CN"
++ QUICKREFERENCE_ALL_LINGUAS="de el en fi fr it ja ko ru sv zh_CN"
+ fi
+
+ AC_SUBST(ALL_LINGUAS)
diff --git a/gimp-help-xml2po.patch b/gimp-help-xml2po.patch
new file mode 100644
index 0000000..70379d6
--- /dev/null
+++ b/gimp-help-xml2po.patch
@@ -0,0 +1,211 @@
+From 7d8785e3a3278f3af101848bbfcb41c04a296a6c Mon Sep 17 00:00:00 2001
+From: Ulf-D. Ehlert <ulfehlert at svn.gnome.org>
+Date: Wed, 06 Feb 2013 19:08:53 +0000
+Subject: [make] Fix xml2po.py to use xml2po modes correctly
+
+This should make xml2po.py work without installed xml2po package
+(by mistake xml2po.py used some standard mode files instead of our
+mode files under tools/xml2po/modes/).
+These changes may be related to bug #692946 and thus fix it
+(we'll see...).
+---
+diff --git a/tools/xml2po.py b/tools/xml2po.py
+index 18a899b..57904ea 100755
+--- a/tools/xml2po.py
++++ b/tools/xml2po.py
+@@ -81,8 +81,7 @@ def main(argv):
+ sys.exit(2)
+
+ 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'
++ if not name in sys.path:
+ sys.path.insert(0, name)
+
+ from xml2po import Main
+diff --git a/tools/xml2po/modes/__init__.py b/tools/xml2po/modes/__init__.py
+index e2ef7a4..e69de29 100644
+--- a/tools/xml2po/modes/__init__.py
++++ b/tools/xml2po/modes/__init__.py
+@@ -1,80 +0,0 @@
+-# Copyright (c) 2004, 2005, 2006 Danilo Segan <danilo at gnome.org>.
+-#
+-# This file is part of xml2po.
+-#
+-# xml2po is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# xml2po is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with xml2po; if not, write to the Free Software Foundation, Inc.,
+-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-#
+-
+-# Basic default class; inherit from it to construct other special-handling classes
+-#
+-
+-class basicXmlMode:
+- """Abstract class for special handling of document types."""
+- def getIgnoredTags(self):
+- "Returns array of tags to be ignored."
+- return ['itemizedlist', 'orderedlist', 'variablelist', 'varlistentry']
+-
+- def getFinalTags(self):
+- "Returns array of tags to be considered 'final'."
+- return ['para', 'title', 'releaseinfo', 'revnumber',
+- 'date', 'itemizedlist', 'orderedlist',
+- 'variablelist', 'varlistentry', 'term']
+-
+- def isFinalNode(self, node):
+- #node.type =='text' or not node.children or
+- if node.type == 'element' and node.name in self.getFinalTags():
+- return True
+- elif node.children:
+- final_children = True
+- child = node.children
+- while child and final_children:
+- if not child.isBlankNode() and child.type != 'comment' and not self.isFinalNode(child):
+- final_children = False
+- child = child.next
+- if final_children:
+- return True
+- return False
+-
+- def getSpacePreserveTags(self):
+- "Returns array of tags in which spaces are to be preserved."
+- return []
+-
+- def getTreatedAttributes(self):
+- "Returns array of tag attributes which content is to be translated"
+- return []
+-
+- def preProcessXml(self, doc, msg):
+- "Preprocess a document and perhaps adds some messages."
+- pass
+-
+- def postProcessXmlTranslation(self, doc, language, translators):
+- """Sets a language and translators in "doc" tree.
+-
+- "translators" is a string consisted of translator credits.
+- "language" is a simple string.
+- "doc" is a libxml2.xmlDoc instance."""
+- pass
+-
+- def getStringForTranslators(self):
+- """Returns None or a string to be added to PO files.
+-
+- Common example is 'translator-credits'."""
+- return None
+-
+- def getCommentForTranslators(self):
+- """Returns a comment to be added next to string for crediting translators.
+-
+- It should explain the format of the string provided by getStringForTranslators()."""
+- return None
+diff --git a/tools/xml2po/modes/basic.py b/tools/xml2po/modes/basic.py
+new file mode 100644
+index 0000000..e2ef7a4
+--- /dev/null
++++ b/tools/xml2po/modes/basic.py
+@@ -0,0 +1,80 @@
++# Copyright (c) 2004, 2005, 2006 Danilo Segan <danilo at gnome.org>.
++#
++# This file is part of xml2po.
++#
++# xml2po is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# xml2po is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with xml2po; if not, write to the Free Software Foundation, Inc.,
++# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++#
++
++# Basic default class; inherit from it to construct other special-handling classes
++#
++
++class basicXmlMode:
++ """Abstract class for special handling of document types."""
++ def getIgnoredTags(self):
++ "Returns array of tags to be ignored."
++ return ['itemizedlist', 'orderedlist', 'variablelist', 'varlistentry']
++
++ def getFinalTags(self):
++ "Returns array of tags to be considered 'final'."
++ return ['para', 'title', 'releaseinfo', 'revnumber',
++ 'date', 'itemizedlist', 'orderedlist',
++ 'variablelist', 'varlistentry', 'term']
++
++ def isFinalNode(self, node):
++ #node.type =='text' or not node.children or
++ if node.type == 'element' and node.name in self.getFinalTags():
++ return True
++ elif node.children:
++ final_children = True
++ child = node.children
++ while child and final_children:
++ if not child.isBlankNode() and child.type != 'comment' and not self.isFinalNode(child):
++ final_children = False
++ child = child.next
++ if final_children:
++ return True
++ return False
++
++ def getSpacePreserveTags(self):
++ "Returns array of tags in which spaces are to be preserved."
++ return []
++
++ def getTreatedAttributes(self):
++ "Returns array of tag attributes which content is to be translated"
++ return []
++
++ def preProcessXml(self, doc, msg):
++ "Preprocess a document and perhaps adds some messages."
++ pass
++
++ def postProcessXmlTranslation(self, doc, language, translators):
++ """Sets a language and translators in "doc" tree.
++
++ "translators" is a string consisted of translator credits.
++ "language" is a simple string.
++ "doc" is a libxml2.xmlDoc instance."""
++ pass
++
++ def getStringForTranslators(self):
++ """Returns None or a string to be added to PO files.
++
++ Common example is 'translator-credits'."""
++ return None
++
++ def getCommentForTranslators(self):
++ """Returns a comment to be added next to string for crediting translators.
++
++ It should explain the format of the string provided by getStringForTranslators()."""
++ return None
+diff --git a/tools/xml2po/modes/docbook.py b/tools/xml2po/modes/docbook.py
+index b98916b..276a9d9 100644
+--- a/tools/xml2po/modes/docbook.py
++++ b/tools/xml2po/modes/docbook.py
+@@ -43,7 +43,7 @@ try:
+ except ImportError:
+ from md5 import new as md5_new
+
+-from xml2po.modes import basicXmlMode
++from basic import basicXmlMode
+
+ class docbookXmlMode(basicXmlMode):
+ """Class for special handling of DocBook document types.
+--
+cgit v0.9.2
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gimp-help.git/commitdiff/4062f1b22493364199fce90d29bb08bff212e1a4
More information about the pld-cvs-commit
mailing list