import sources

This commit is contained in:
Adam Samalik 2023-05-16 09:46:38 +02:00
parent 35565686c2
commit a50e9be9ee
5 changed files with 70 additions and 121 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
SOURCES/pygobject-2.28.6.tar.bz2
/pygobject-2.28.7.tar.xz

View File

@ -1,28 +0,0 @@
From 42d871eb0b08ee6d55e95cc7e4b90844919555b9 Mon Sep 17 00:00:00 2001
From: Ivan Stankovic <ivan.stankovic@avl.com>
Date: Tue, 21 Feb 2012 12:24:58 +0100
Subject: [PATCH] Fix set_qdata warning on accessing NULL gobject property
https://bugzilla.gnome.org/show_bug.cgi?id=661155
---
gobject/pygobject.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gobject/pygobject.c b/gobject/pygobject.c
index 6c2f06c..70dc89a 100644
--- a/gobject/pygobject.c
+++ b/gobject/pygobject.c
@@ -991,7 +991,9 @@ pygobject_new(GObject *obj)
PyObject *
pygobject_new_sunk(GObject *obj)
{
- g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
+ if (obj)
+ g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
+
return pygobject_new_full(obj, TRUE, NULL);
}
--
1.7.1

View File

@ -1,49 +0,0 @@
From 42d01f060c5d764baa881d13c103d68897163a49 Mon Sep 17 00:00:00 2001
From: Ryan Lortie <desrt@desrt.ca>
Date: Mon, 12 Mar 2012 16:44:14 -0400
Subject: [PATCH] gio-types.defs: change some enums to flags
These flags types were originally incorrectly handled in glib as being
enums. That bug was fixed, but they're still enums here, leading to
warnings about the mismatch.
Change them to flags.
https://bugzilla.gnome.org/show_bug.cgi?id=668522
---
gio/gio-types.defs | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gio/gio-types.defs b/gio/gio-types.defs
index 331e0bc..7eee5c8 100644
--- a/gio/gio-types.defs
+++ b/gio/gio-types.defs
@@ -526,7 +526,7 @@
)
)
-(define-enum MountMountFlags
+(define-flags MountMountFlags
(in-module "gio")
(c-name "GMountMountFlags")
(gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS")
@@ -545,7 +545,7 @@
)
)
-(define-enum DriveStartFlags
+(define-flags DriveStartFlags
(in-module "gio")
(c-name "GDriveStartFlags")
(gtype-id "G_TYPE_DRIVE_START_FLAGS")
@@ -770,7 +770,7 @@
)
)
-(define-enum SocketMsgFlags
+(define-flags SocketMsgFlags
(in-module "gio")
(c-name "GSocketMsgFlags")
(gtype-id "G_TYPE_SOCKET_MSG_FLAGS")
--
1.7.9.1

View File

@ -1,28 +1,17 @@
### Abstract ###
Name: pygobject2
Version: 2.28.6
Release: 11%{?dist}
License: LGPLv2+
Group: Development/Languages
Version: 2.28.7
Release: 4%{?dist}
License: LGPLv2+, MIT
Summary: Python 2 bindings for GObject
URL: http://www.pygtk.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
#VCS: git:git://git.gnome.org/pygobject
Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-%{version}.tar.bz2
### Patches ###
# Fix this warning on startup:
# ** WARNING **: Trying to register gtype 'GMountMountFlags' as enum when
# in fact it is of type 'GFlags'
# using upstream patch (rhbz#790053)
Patch1: fix-gio-flags.patch
Patch2: 0001-Fix-set_qdata-warning-on-accessing-NULL-gobject-prop.patch
Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-%{version}.tar.xz
### Build Dependencies ###
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(python2)
BuildRequires: pkgconfig(cairo-gobject)
@ -35,14 +24,12 @@ for use in Python programs.
%package codegen
Summary: The code generation program for PyGObject
Group: Development/Languages
%description codegen
The package contains the C code generation program for PyGObject.
%package devel
Summary: Development files for building add-on libraries
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
Requires: %{name}-codegen = %{version}-%{release}
Requires: %{name}-doc = %{version}-%{release}
@ -56,60 +43,60 @@ libraries such as pygtk2.
%package doc
Summary: Documentation files for %{name}
Group: Development/Languages
%description doc
This package contains documentation files for %{name}.
%prep
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%setup -q -n pygobject-%{version}
%patch1 -p1
%patch2 -p1
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
%build
PYTHON=%{__python}
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
PYTHON=%{__python2}
export PYTHON
%configure --disable-introspection
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -name '*.la' -delete
find $RPM_BUILD_ROOT -name '*.a' -delete
rm examples/Makefile*
# Fix python shebangs
# This needs to be changed when converted to python3
for i in `grep -r -l '#!.*python.*' %{buildroot}`; do
sed -i 's|#!.*/usr/bin/env python.*|#!%{__python2}|' $i
done
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(644, root, root, 755)
%doc AUTHORS NEWS README
%doc examples
%{_libdir}/libpyglib-2.0-python.so*
%dir %{python_sitearch}/gtk-2.0
%dir %{python_sitearch}/gobject
%dir %{python_sitearch}/glib
%{_libdir}/libpyglib-2.0-python2.so*
%dir %{python2_sitearch}/gtk-2.0
%dir %{python2_sitearch}/gobject
%dir %{python2_sitearch}/glib
%{python_sitearch}/gtk-2.0/*
%{python_sitearch}/pygtk.*
%{python_sitearch}/gobject/*
%{python_sitearch}/glib/*
%{python2_sitearch}/gtk-2.0/*
%{python2_sitearch}/pygtk.*
%{python2_sitearch}/gobject/*
%{python2_sitearch}/glib/*
%files codegen
%defattr(755, root, root, 755)
%{_bindir}/pygobject-codegen-2.0
%defattr(644, root, root, 755)
%dir %{_datadir}/pygobject/2.0
%{_datadir}/pygobject/2.0/codegen
%files devel
%defattr(644, root, root, 755)
%dir %{_datadir}/pygobject
%dir %{_includedir}/pygtk-2.0
%{_datadir}/pygobject/2.0/defs
@ -118,16 +105,54 @@ rm examples/Makefile*
%{_libdir}/pkgconfig/pygobject-2.0.pc
%files doc
%defattr(644, root, root, 755)
%{_datadir}/gtk-doc/html/pygobject
%{_datadir}/pygobject/xsl
%changelog
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.28.6-11
- Mass rebuild 2014-01-24
* Mon Aug 13 2018 Josef Ridky <jridky@redhat.com> - 2.28.7-4
- update python macro to python2
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.28.6-10
- Mass rebuild 2013-12-27
* Thu Aug 09 2018 Josef Ridky <jridky@redhat.com> - 2.28.7-3
- Add MIT license
* Fri Jun 22 2018 Troy Dawson <tdawson@redhat.com> - 2.28.7-2.1
- Fix python shebangs (#1580854)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Dec 11 2017 Kalev Lember <klember@redhat.com> - 2.28.7-1
- Update to 2.28.7
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.6-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.6-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.6-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.28.6-16
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.6-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.28.6-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.28.6-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.28.6-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Sep 19 2013 Tomáš Mráz <tmraz@redhat.com> - 2.28.6-11
- allow old pygtk applications to work with pygobject 2.28.x and glib 2.35.x
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.28.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.28.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
@ -192,10 +217,10 @@ rm examples/Makefile*
* Mon Feb 28 2011 John (J5) Palmieri <johnp@redhat.com> - 2.27.91-1
- update to upstream version 2.27.91
* Fri Feb 09 2011 John (J5) Palmieri <johnp@redhat.com> - 2.27.90-2
* Fri Feb 11 2011 John (J5) Palmieri <johnp@redhat.com> - 2.27.90-2
- update files manifest to reflect files that moved around
* Fri Feb 09 2011 John (J5) Palmieri <johnp@redhat.com> - 2.27.90-1
* Fri Feb 11 2011 John (J5) Palmieri <johnp@redhat.com> - 2.27.90-1
- update to upstream version 2.27.90
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.27.0-2

View File

@ -1 +1 @@
SHA1 (pygobject-2.28.6.tar.bz2) = 4eda7d2b97f495a2ad7d4cdc234d08ca5408d9d5
SHA512 (pygobject-2.28.7.tar.xz) = a5f3ae39f8156bd6234fb6d0ea31eba782fbdd4c292656c31b33e098abe3dcf0774d492cf602a4637cb679af9ecd511b24263349fbfd25708ca70f16cb052dfb