Compare commits
No commits in common. "c9-beta" and "c8" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/gtk+-2.24.33.tar.xz
|
SOURCES/gtk+-2.24.32.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
6fb0199cbb858456ba5d6fc9d7e4641f73476e76 SOURCES/gtk+-2.24.33.tar.xz
|
c885ade62b06854590822c8eb906daf7dd15d90a SOURCES/gtk+-2.24.32.tar.xz
|
||||||
|
122
SOURCES/python3-compat.patch
Normal file
122
SOURCES/python3-compat.patch
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
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
|
||||||
|
|
9
SOURCES/system-python.patch
Normal file
9
SOURCES/system-python.patch
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
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,9 +19,10 @@
|
|||||||
|
|
||||||
Summary: GTK+ graphical user interface library
|
Summary: GTK+ graphical user interface library
|
||||||
Name: gtk2
|
Name: gtk2
|
||||||
Version: 2.24.33
|
Version: 2.24.32
|
||||||
Release: 8%{?dist}
|
Release: 5%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
|
Group: System Environment/Libraries
|
||||||
URL: http://www.gtk.org
|
URL: http://www.gtk.org
|
||||||
#VCS: git:git://git.gnome.org/gtk+#gtk-2-24
|
#VCS: git:git://git.gnome.org/gtk+#gtk-2-24
|
||||||
Source: http://download.gnome.org/sources/gtk+/2.24/gtk+-%{version}.tar.xz
|
Source: http://download.gnome.org/sources/gtk+/2.24/gtk+-%{version}.tar.xz
|
||||||
@ -29,12 +30,15 @@ Source2: update-gtk-immodules
|
|||||||
Source3: im-cedilla.conf
|
Source3: im-cedilla.conf
|
||||||
Source4: update-gtk-immodules.1
|
Source4: update-gtk-immodules.1
|
||||||
|
|
||||||
|
Patch1: system-python.patch
|
||||||
# https://bugzilla.gnome.org/show_bug.cgi?id=583273
|
# https://bugzilla.gnome.org/show_bug.cgi?id=583273
|
||||||
Patch2: icon-padding.patch
|
Patch2: icon-padding.patch
|
||||||
# https://bugzilla.gnome.org/show_bug.cgi?id=599618
|
# https://bugzilla.gnome.org/show_bug.cgi?id=599618
|
||||||
Patch8: tooltip-positioning.patch
|
Patch8: tooltip-positioning.patch
|
||||||
# https://bugzilla.gnome.org/show_bug.cgi?id=611313
|
# https://bugzilla.gnome.org/show_bug.cgi?id=611313
|
||||||
Patch15: window-dragging.patch
|
Patch15: window-dragging.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1595827
|
||||||
|
Patch16: python3-compat.patch
|
||||||
|
|
||||||
BuildRequires: pkgconfig(atk) >= %{atk_version}
|
BuildRequires: pkgconfig(atk) >= %{atk_version}
|
||||||
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
|
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
|
||||||
@ -52,15 +56,15 @@ BuildRequires: pkgconfig(xcomposite)
|
|||||||
BuildRequires: pkgconfig(xdamage)
|
BuildRequires: pkgconfig(xdamage)
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
# For setting shebang of gtk-builder-convert:
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
# Bootstrap requirements
|
# Bootstrap requirements
|
||||||
BuildRequires: gtk-doc
|
BuildRequires: gtk-doc
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: make
|
|
||||||
|
# rpmbuild-time support for Python scripts
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
|
||||||
# Conflicts with packages containing theme engines
|
# Conflicts with packages containing theme engines
|
||||||
# built against the 2.4.0 ABI
|
# built against the 2.4.0 ABI
|
||||||
@ -86,13 +90,6 @@ Requires: pango >= %{pango_version}
|
|||||||
Requires(post): libtiff >= 3.6.1
|
Requires(post): libtiff >= 3.6.1
|
||||||
Requires: libXrandr >= %{xrandr_version}
|
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
|
%description
|
||||||
GTK+ is a multi-platform toolkit for creating graphical user
|
GTK+ is a multi-platform toolkit for creating graphical user
|
||||||
interfaces. Offering a complete set of widgets, GTK+ is suitable for
|
interfaces. Offering a complete set of widgets, GTK+ is suitable for
|
||||||
@ -101,6 +98,7 @@ suites.
|
|||||||
|
|
||||||
%package immodules
|
%package immodules
|
||||||
Summary: Input methods for GTK+
|
Summary: Input methods for GTK+
|
||||||
|
Group: System Environment/Libraries
|
||||||
Requires: gtk2 = %{version}-%{release}
|
Requires: gtk2 = %{version}-%{release}
|
||||||
|
|
||||||
%description immodules
|
%description immodules
|
||||||
@ -109,6 +107,7 @@ as part of GTK+.
|
|||||||
|
|
||||||
%package immodule-xim
|
%package immodule-xim
|
||||||
Summary: XIM support for GTK+
|
Summary: XIM support for GTK+
|
||||||
|
Group: System Environment/Libraries
|
||||||
Requires: gtk2 = %{version}-%{release}
|
Requires: gtk2 = %{version}-%{release}
|
||||||
|
|
||||||
%description immodule-xim
|
%description immodule-xim
|
||||||
@ -116,6 +115,7 @@ The gtk2-immodule-xim package contains XIM support for GTK+.
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for GTK+
|
Summary: Development files for GTK+
|
||||||
|
Group: Development/Libraries
|
||||||
Requires: gtk2 = %{version}-%{release}
|
Requires: gtk2 = %{version}-%{release}
|
||||||
Requires: pango-devel >= %{pango_version}
|
Requires: pango-devel >= %{pango_version}
|
||||||
Requires: atk-devel >= %{atk_version}
|
Requires: atk-devel >= %{atk_version}
|
||||||
@ -138,6 +138,7 @@ package.
|
|||||||
|
|
||||||
%package devel-docs
|
%package devel-docs
|
||||||
Summary: Developer documentation for GTK+
|
Summary: Developer documentation for GTK+
|
||||||
|
Group: Development/Libraries
|
||||||
Requires: gtk2 = %{version}-%{release}
|
Requires: gtk2 = %{version}-%{release}
|
||||||
#BuildArch: noarch
|
#BuildArch: noarch
|
||||||
|
|
||||||
@ -145,7 +146,13 @@ Requires: gtk2 = %{version}-%{release}
|
|||||||
This package contains developer documentation for the GTK+ widget toolkit.
|
This package contains developer documentation for the GTK+ widget toolkit.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n gtk+-%{version} -p1
|
%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
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS='-fno-strict-aliasing %optflags'
|
export CFLAGS='-fno-strict-aliasing %optflags'
|
||||||
@ -237,9 +244,6 @@ cp %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/update-gtk-immodules
|
|||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d
|
||||||
cp %{SOURCE3} $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
|
# Remove unpackaged files
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/*.la
|
rm $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/*.la
|
||||||
@ -260,7 +264,9 @@ gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
|||||||
%transfiletriggerpostun -- %{_libdir}/gtk-2.0/immodules/ %{_libdir}/gtk-2.0/%{bin_version}/immodules/
|
%transfiletriggerpostun -- %{_libdir}/gtk-2.0/immodules/ %{_libdir}/gtk-2.0/%{bin_version}/immodules/
|
||||||
gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%files -f gtk20.lang
|
%files -f gtk20.lang
|
||||||
%license COPYING
|
%license COPYING
|
||||||
@ -315,7 +321,7 @@ gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
|||||||
%{_bindir}/gtk-demo
|
%{_bindir}/gtk-demo
|
||||||
%{_datadir}/gtk-2.0/demo
|
%{_datadir}/gtk-2.0/demo
|
||||||
%{_datadir}/gir-1.0
|
%{_datadir}/gir-1.0
|
||||||
%{_mandir}/man1/gtk-builder-convert.1.gz
|
%{_mandir}/man1/gtk-builder-convert.1*
|
||||||
|
|
||||||
%files devel-docs
|
%files devel-docs
|
||||||
%{_datadir}/gtk-doc
|
%{_datadir}/gtk-doc
|
||||||
@ -324,53 +330,18 @@ gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
|||||||
%doc tmpdocs/examples
|
%doc tmpdocs/examples
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Nov 7 2022 Jens Petersen <petersen@redhat.com> - 2.24.33-8
|
* Tue Jan 12 2020 Tomas Popela <tpopela@redhat.com> - 2.24.32-5.2
|
||||||
- Recommend ibus-gtk2 when ibus is installed (#2066314)
|
- Fix the flatpak build
|
||||||
|
- Resolves: rhbz#1906196
|
||||||
|
|
||||||
* Thu Feb 24 2022 David King <amigadave@amigadave.com> - 2.24.33-7
|
* Thu Aug 02 2018 Petr Viktorin <pviktori@redhat.com> - 2.24.32-3.2
|
||||||
- Recommend adwaita-gtk2-theme (#2051573)
|
- Port gtk-builder-convert to Python 3 (#1595827)
|
||||||
|
|
||||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.24.33-6
|
* Thu Jun 21 2018 Troy Dawson <tdawson@redhat.com> - 2.24.32-3.1
|
||||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
- Fix python shebangs (#1580696)
|
||||||
Related: rhbz#1991688
|
|
||||||
|
|
||||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.24.33-5
|
* Mon May 21 2018 Josh Boyer <jwboyer@redhat.com> - 2.24.32-3
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
- No longer require imsettings (#1538134)
|
||||||
|
|
||||||
* 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
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.32-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user