Compare commits
No commits in common. "c8" and "c9-beta" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/gtk+-2.24.32.tar.xz
|
||||
SOURCES/gtk+-2.24.33.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
c885ade62b06854590822c8eb906daf7dd15d90a SOURCES/gtk+-2.24.32.tar.xz
|
||||
6fb0199cbb858456ba5d6fc9d7e4641f73476e76 SOURCES/gtk+-2.24.33.tar.xz
|
||||
|
@ -1,122 +0,0 @@
|
||||
Add compatibility with Python 3 (keeping compatibility with Python 2.7)
|
||||
|
||||
--- gtk+-2.24.32/gtk/gtk-builder-convert (original)
|
||||
+++ gtk+-2.24.32/gtk/gtk-builder-convert (refactored)
|
||||
@@ -36,10 +36,11 @@
|
||||
|
||||
Report bugs to http://bugzilla.gnome.org/."""
|
||||
|
||||
+from __future__ import print_function
|
||||
import getopt
|
||||
import os
|
||||
import sys
|
||||
-
|
||||
+import subprocess
|
||||
from xml.dom import minidom, Node
|
||||
|
||||
DIALOGS = ['GtkDialog',
|
||||
@@ -47,13 +48,6 @@
|
||||
'GtkMessageDialog']
|
||||
WINDOWS = ['GtkWindow'] + DIALOGS
|
||||
|
||||
-# The subprocess is only available in Python 2.4+
|
||||
-try:
|
||||
- import subprocess
|
||||
- subprocess # pyflakes
|
||||
-except ImportError:
|
||||
- subprocess = None
|
||||
-
|
||||
def get_child_nodes(node):
|
||||
assert node.tagName == 'object'
|
||||
nodes = []
|
||||
@@ -167,7 +161,11 @@
|
||||
|
||||
def to_xml(self):
|
||||
xml = self._dom.toprettyxml("", "")
|
||||
- return xml.encode('utf-8')
|
||||
+ if sys.version_info < (3, 0):
|
||||
+ # Python 2: convert with explicit encoding
|
||||
+ # (For Python 3, the result is left as text)
|
||||
+ xml = xml.encode('utf-8')
|
||||
+ return xml
|
||||
|
||||
#
|
||||
# Private
|
||||
@@ -259,7 +257,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
|
||||
@@ -272,13 +270,9 @@
|
||||
|
||||
# Output the newly created root objects and sort them
|
||||
# by attribute id
|
||||
- # FIXME: Use sorted(self.root_objects,
|
||||
- # key=lambda n: n.getAttribute('id'),
|
||||
- # reverse=True):
|
||||
- # when we can depend on python 2.4 or higher
|
||||
- root_objects = self.root_objects[:]
|
||||
- root_objects.sort(lambda a, b: cmp(b.getAttribute('id'),
|
||||
- a.getAttribute('id')))
|
||||
+ root_objects = sorted(self.root_objects,
|
||||
+ key=lambda n: n.getAttribute('id'),
|
||||
+ reverse=True)
|
||||
for obj in root_objects:
|
||||
self._interface.childNodes.insert(0, obj)
|
||||
|
||||
@@ -461,8 +455,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')
|
||||
@@ -481,8 +475,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)
|
||||
@@ -741,13 +735,14 @@
|
||||
|
||||
s = subprocess.Popen([filename, '--format', '-'],
|
||||
stdin=subprocess.PIPE,
|
||||
- stdout=subprocess.PIPE)
|
||||
+ stdout=subprocess.PIPE,
|
||||
+ universal_newlines=True)
|
||||
s.stdin.write(output)
|
||||
s.stdin.close()
|
||||
return s.stdout.read()
|
||||
|
||||
def usage():
|
||||
- print __doc__
|
||||
+ print(__doc__)
|
||||
|
||||
def main(args):
|
||||
try:
|
||||
@@ -788,10 +783,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
|
||||
|
@ -1,9 +0,0 @@
|
||||
diff -up gtk+-2.18.2/gtk/gtk-builder-convert.system-python gtk+-2.18.2/gtk/gtk-builder-convert
|
||||
--- gtk+-2.18.2/gtk/gtk-builder-convert.system-python 2009-10-13 15:59:50.423385098 -0400
|
||||
+++ gtk+-2.18.2/gtk/gtk-builder-convert 2009-10-13 16:00:31.876142050 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright (C) 2006-2008 Async Open Source
|
||||
# Henrique Romano <henrique@async.com.br>
|
@ -19,10 +19,9 @@
|
||||
|
||||
Summary: GTK+ graphical user interface library
|
||||
Name: gtk2
|
||||
Version: 2.24.32
|
||||
Release: 5%{?dist}
|
||||
Version: 2.24.33
|
||||
Release: 8%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.gtk.org
|
||||
#VCS: git:git://git.gnome.org/gtk+#gtk-2-24
|
||||
Source: http://download.gnome.org/sources/gtk+/2.24/gtk+-%{version}.tar.xz
|
||||
@ -30,15 +29,12 @@ Source2: update-gtk-immodules
|
||||
Source3: im-cedilla.conf
|
||||
Source4: update-gtk-immodules.1
|
||||
|
||||
Patch1: system-python.patch
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=583273
|
||||
Patch2: icon-padding.patch
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=599618
|
||||
Patch8: tooltip-positioning.patch
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=611313
|
||||
Patch15: window-dragging.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1595827
|
||||
Patch16: python3-compat.patch
|
||||
|
||||
BuildRequires: pkgconfig(atk) >= %{atk_version}
|
||||
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
|
||||
@ -56,15 +52,15 @@ BuildRequires: pkgconfig(xcomposite)
|
||||
BuildRequires: pkgconfig(xdamage)
|
||||
BuildRequires: gettext
|
||||
BuildRequires: cups-devel
|
||||
# For setting shebang of gtk-builder-convert:
|
||||
BuildRequires: python3-devel
|
||||
# Bootstrap requirements
|
||||
BuildRequires: gtk-doc
|
||||
BuildRequires: automake
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
|
||||
# rpmbuild-time support for Python scripts
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: make
|
||||
|
||||
# Conflicts with packages containing theme engines
|
||||
# built against the 2.4.0 ABI
|
||||
@ -90,6 +86,13 @@ Requires: pango >= %{pango_version}
|
||||
Requires(post): libtiff >= 3.6.1
|
||||
Requires: libXrandr >= %{xrandr_version}
|
||||
|
||||
Recommends: (adwaita-gtk2-theme if gnome-shell)
|
||||
|
||||
# For sound theme events in gtk2 apps
|
||||
Recommends: libcanberra-gtk2%{?_isa}
|
||||
|
||||
Recommends: (ibus-gtk2 if ibus)
|
||||
|
||||
%description
|
||||
GTK+ is a multi-platform toolkit for creating graphical user
|
||||
interfaces. Offering a complete set of widgets, GTK+ is suitable for
|
||||
@ -98,7 +101,6 @@ suites.
|
||||
|
||||
%package immodules
|
||||
Summary: Input methods for GTK+
|
||||
Group: System Environment/Libraries
|
||||
Requires: gtk2 = %{version}-%{release}
|
||||
|
||||
%description immodules
|
||||
@ -107,7 +109,6 @@ as part of GTK+.
|
||||
|
||||
%package immodule-xim
|
||||
Summary: XIM support for GTK+
|
||||
Group: System Environment/Libraries
|
||||
Requires: gtk2 = %{version}-%{release}
|
||||
|
||||
%description immodule-xim
|
||||
@ -115,7 +116,6 @@ The gtk2-immodule-xim package contains XIM support for GTK+.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for GTK+
|
||||
Group: Development/Libraries
|
||||
Requires: gtk2 = %{version}-%{release}
|
||||
Requires: pango-devel >= %{pango_version}
|
||||
Requires: atk-devel >= %{atk_version}
|
||||
@ -138,7 +138,6 @@ package.
|
||||
|
||||
%package devel-docs
|
||||
Summary: Developer documentation for GTK+
|
||||
Group: Development/Libraries
|
||||
Requires: gtk2 = %{version}-%{release}
|
||||
#BuildArch: noarch
|
||||
|
||||
@ -146,13 +145,7 @@ Requires: gtk2 = %{version}-%{release}
|
||||
This package contains developer documentation for the GTK+ widget toolkit.
|
||||
|
||||
%prep
|
||||
%setup -q -n gtk+-%{version}
|
||||
|
||||
%patch1 -p1 -b .system-python
|
||||
%patch2 -p1 -b .icon-padding
|
||||
%patch8 -p1 -b .tooltip-positioning
|
||||
%patch15 -p1 -b .window-dragging
|
||||
%patch16 -p1 -b .python3-compat
|
||||
%autosetup -n gtk+-%{version} -p1
|
||||
|
||||
%build
|
||||
export CFLAGS='-fno-strict-aliasing %optflags'
|
||||
@ -244,6 +237,9 @@ cp %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/update-gtk-immodules
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d
|
||||
cp %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d
|
||||
|
||||
# Use python3 shebang instead of ambiguous python
|
||||
pathfix.py -pn -i %{__python3} $RPM_BUILD_ROOT%{_bindir}/gtk-builder-convert
|
||||
|
||||
# Remove unpackaged files
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/*.la
|
||||
@ -264,9 +260,7 @@ gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
||||
%transfiletriggerpostun -- %{_libdir}/gtk-2.0/immodules/ %{_libdir}/gtk-2.0/%{bin_version}/immodules/
|
||||
gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files -f gtk20.lang
|
||||
%license COPYING
|
||||
@ -321,7 +315,7 @@ gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
||||
%{_bindir}/gtk-demo
|
||||
%{_datadir}/gtk-2.0/demo
|
||||
%{_datadir}/gir-1.0
|
||||
%{_mandir}/man1/gtk-builder-convert.1*
|
||||
%{_mandir}/man1/gtk-builder-convert.1.gz
|
||||
|
||||
%files devel-docs
|
||||
%{_datadir}/gtk-doc
|
||||
@ -330,18 +324,53 @@ gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
||||
%doc tmpdocs/examples
|
||||
|
||||
%changelog
|
||||
* Tue Jan 12 2020 Tomas Popela <tpopela@redhat.com> - 2.24.32-5.2
|
||||
- Fix the flatpak build
|
||||
- Resolves: rhbz#1906196
|
||||
* Mon Nov 7 2022 Jens Petersen <petersen@redhat.com> - 2.24.33-8
|
||||
- Recommend ibus-gtk2 when ibus is installed (#2066314)
|
||||
|
||||
* Thu Aug 02 2018 Petr Viktorin <pviktori@redhat.com> - 2.24.32-3.2
|
||||
- Port gtk-builder-convert to Python 3 (#1595827)
|
||||
* Thu Feb 24 2022 David King <amigadave@amigadave.com> - 2.24.33-7
|
||||
- Recommend adwaita-gtk2-theme (#2051573)
|
||||
|
||||
* Thu Jun 21 2018 Troy Dawson <tdawson@redhat.com> - 2.24.32-3.1
|
||||
- Fix python shebangs (#1580696)
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.24.33-6
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Mon May 21 2018 Josh Boyer <jwboyer@redhat.com> - 2.24.32-3
|
||||
- No longer require imsettings (#1538134)
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.24.33-5
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.33-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri Jan 22 2021 Kalev Lember <klember@redhat.com> - 2.24.33-3
|
||||
- Drop imsettings dependency on Fedora as well
|
||||
- Recommend libcanberra-gtk2 for sound theme events in gtk2 apps
|
||||
|
||||
* Fri Jan 08 2021 Tomas Popela <tpopela@redhat.com> - 2.24.33-2
|
||||
- Only require the imsettings dependency on Fedora (upstreaming a RHEL only change)
|
||||
|
||||
* Tue Jan 05 2021 Kalev Lember <klember@redhat.com> - 2.24.33-1
|
||||
- Update to 2.24.33
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.32-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.32-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Tue Sep 03 2019 Petr Viktorin <pviktori@redhat.com> - 2.24.32-6
|
||||
- Port gtk2-devel's gtk-builder-convert to Python 3
|
||||
https://gitlab.gnome.org/GNOME/gtk/merge_requests/1080
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1737988
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.32-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Jan 27 2019 Kalev Lember <klember@redhat.com> - 2.24.32-4
|
||||
- Backport two fixes from upstream (#1669768)
|
||||
- calendar: Use the new "%OB" format if supported
|
||||
- Fix compiler warnings with GCC 8.1
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.32-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.32-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user