diff options
Diffstat (limited to 'dev-util/gtk-builder-convert')
-rw-r--r-- | dev-util/gtk-builder-convert/files/gtk-builder-convert-2.24.32-python3.patch | 56 | ||||
-rw-r--r-- | dev-util/gtk-builder-convert/gtk-builder-convert-2.24.32-r1.ebuild (renamed from dev-util/gtk-builder-convert/gtk-builder-convert-2.24.32.ebuild) | 12 |
2 files changed, 63 insertions, 5 deletions
diff --git a/dev-util/gtk-builder-convert/files/gtk-builder-convert-2.24.32-python3.patch b/dev-util/gtk-builder-convert/files/gtk-builder-convert-2.24.32-python3.patch new file mode 100644 index 000000000000..01dc3d0aaff2 --- /dev/null +++ b/dev-util/gtk-builder-convert/files/gtk-builder-convert-2.24.32-python3.patch @@ -0,0 +1,56 @@ +https://trac.macports.org/export/50710/trunk/dports/x11/gtk2/files/patch-gtk-builder-convert.diff +--- a/gtk/gtk-builder-convert 2009-04-27 14:02:41.000000000 +0300 ++++ b/gtk/gtk-builder-convert 2009-04-27 13:58:26.000000000 +0300 +@@ -258,7 +258,7 @@ + for node in objects: + self._convert(node.getAttribute("class"), node) + if self._get_object(node.getAttribute('id')) is not None: +- print "WARNING: duplicate id \"" + node.getAttribute('id') + "\"" ++ print("WARNING: duplicate id \"" + node.getAttribute('id') + "\"") + self.objects[node.getAttribute('id')] = node + + # Convert Gazpachos UI tag +@@ -441,8 +441,8 @@ + if signal_name in ['activate', 'toggled']: + action.appendChild(signal) + else: +- print 'Unhandled signal %s::%s' % (node.getAttribute('class'), +- signal_name) ++ print('Unhandled signal %s::%s' % (node.getAttribute('class'), ++ signal_name)) + + if not uimgr.childNodes: + child = self._dom.createElement('child') +@@ -461,8 +461,8 @@ + for accelerator in get_accelerator_nodes(node): + signal_name = accelerator.getAttribute('signal') + if signal_name != 'activate': +- print 'Unhandled accelerator signal for %s::%s' % ( +- node.getAttribute('class'), signal_name) ++ print('Unhandled accelerator signal for %s::%s' % ( ++ node.getAttribute('class'), signal_name)) + continue + accelerator.removeAttribute('signal') + child.appendChild(accelerator) +@@ -711,7 +711,7 @@ + return s.stdout.read() + + def usage(): +- print __doc__ ++ print(__doc__) + + def main(args): + try: +@@ -745,10 +745,10 @@ + + xml = _indent(conv.to_xml()) + if output_filename == "-": +- print xml ++ print(xml) + else: + open(output_filename, 'w').write(xml) +- print "Wrote", output_filename ++ print("Wrote", output_filename) + + return 0 + diff --git a/dev-util/gtk-builder-convert/gtk-builder-convert-2.24.32.ebuild b/dev-util/gtk-builder-convert/gtk-builder-convert-2.24.32-r1.ebuild index 323ce94de3e6..889c321a3bcd 100644 --- a/dev-util/gtk-builder-convert/gtk-builder-convert-2.24.32.ebuild +++ b/dev-util/gtk-builder-convert/gtk-builder-convert-2.24.32-r1.ebuild @@ -2,8 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=6 + GNOME_ORG_MODULE="gtk+" -PYTHON_COMPAT=( python2_7 ) +PYTHON_COMPAT=( python3_{6,7,8} ) PYTHON_REQ_USE="xml" inherit gnome.org python-single-r1 @@ -14,12 +15,9 @@ HOMEPAGE="https://www.gtk.org/" LICENSE="LGPL-2+" SLOT="0" KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -IUSE="" REQUIRED_USE="${PYTHON_REQUIRED_USE}" COMMON_DEPEND="${PYTHON_DEPS}" - # gtk-builder-convert was part of gtk+ until 2.24.10-r1 # man page transitioned in 2.24.31-r1 RDEPEND="${COMMON_DEPEND} @@ -32,10 +30,14 @@ DEPEND="${COMMON_DEPEND} dev-libs/libxslt " +PATCHES=( + "${FILESDIR}/${PN}-2.24.32-python3.patch" +) + src_configure() { :; } src_compile() { - xsltproc -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl docs/reference/gtk/gtk-builder-convert.xml + xsltproc -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl docs/reference/gtk/gtk-builder-convert.xml || die } src_install() { |