Switch to python3; cleanup spec

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2018-02-03 15:48:25 +01:00
parent 7ad10f0784
commit 1fe1ea4f82
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C
3 changed files with 43 additions and 85 deletions

View File

@ -1,67 +0,0 @@
From caf92fe51445de125eb3d78f17f6e539bcf3d4bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 26 Jul 2017 13:12:37 +0200
Subject: [PATCH] gir: Update glib annotations
One of the annotation changes that was pulled in for 1.53.4 broke
the introspection ABI and was therefore reverted in master. Pick
up the revert now so downstreams can more easily pull in the fix.
---
gir/glib-2.0.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c
index 21bb4957..fe3c262e 100644
--- a/gir/glib-2.0.c
+++ b/gir/glib-2.0.c
@@ -4183,8 +4183,7 @@
*
* Defines the log domain.
*
- * For applications, this is typically left as the default %NULL
- * (or "") domain. Libraries should define this so that any messages
+ * Libraries should define this so that any messages
* which they log can be differentiated from messages from other
* libraries and application code. But be careful not to define
* it in any public header files.
@@ -4193,6 +4192,10 @@
* |[
* AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gtk\"
* ]|
+ *
+ * Applications can choose to leave it as the default %NULL (or "")
+ * domain. However, defining the domain offers the same advantages as
+ * above.
*/
@@ -18154,7 +18157,7 @@
* The array of returned groups will be %NULL-terminated, so
* @length may optionally be %NULL.
*
- * Returns: (array zero-terminated=1 length=length) (transfer full): a newly-allocated %NULL-terminated array of strings.
+ * Returns: (array zero-terminated=1) (transfer full): a newly-allocated %NULL-terminated array of strings.
* Use g_strfreev() to free it.
* Since: 2.6
*/
@@ -18237,7 +18240,7 @@
* be found, %NULL is returned and @error is set to
* #G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
*
- * Returns: (array zero-terminated=1 length=length) (transfer full): a newly-allocated %NULL-terminated array of strings.
+ * Returns: (array zero-terminated=1) (transfer full): a newly-allocated %NULL-terminated array of strings.
* Use g_strfreev() to free it.
* Since: 2.6
*/
@@ -18851,7 +18854,7 @@
* Note that this function never reports an error,
* so it is safe to pass %NULL as @error.
*
- * Returns: (array length=length): a newly allocated string holding
+ * Returns: a newly allocated string holding
* the contents of the #GKeyFile
* Since: 2.6
*/
--
2.13.3

View File

@ -0,0 +1,23 @@
From b72408d85f1e514414e08c630812736a01cc4f29 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <ignatenko@src.gnome.org>
Date: Sat, 3 Feb 2018 15:36:27 +0100
Subject: [PATCH] tools: use real @PYTHON@ instead of /usr/bin/env
Signed-off-by: Igor Gnatenko <ignatenko@src.gnome.org>
---
tools/g-ir-tool-template.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/g-ir-tool-template.in b/tools/g-ir-tool-template.in
index edc68a4c..133088a6 100644
--- a/tools/g-ir-tool-template.in
+++ b/tools/g-ir-tool-template.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env @PYTHON@
+#!@PYTHON@
# -*- Mode: Python -*-
# GObject-Introspection - a framework for introspecting GObject libraries
# Copyright (C) 2008 Johan Dahlin
--
2.16.1

View File

@ -1,5 +1,7 @@
%global glib2_version 2.54.0
%global __python %{__python3}
Name: gobject-introspection
Version: 1.54.1
Release: 4%{?dist}
@ -8,9 +10,10 @@ Summary: Introspection system for GObject-based libraries
License: GPLv2+, LGPLv2+, MIT
URL: https://wiki.gnome.org/Projects/GObjectIntrospection
Source0: https://download.gnome.org/sources/gobject-introspection/1.54/%{name}-%{version}.tar.xz
Patch0: 0001-tools-use-real-PYTHON-instead-of-usr-bin-env.patch
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: python2-devel >= 2.5
BuildRequires: python3-devel
BuildRequires: gettext
BuildRequires: flex
BuildRequires: bison
@ -25,8 +28,6 @@ BuildRequires: fontconfig-devel
BuildRequires: libXft-devel
BuildRequires: freetype-devel
BuildRequires: gtk-doc
# For doctool
BuildRequires: python2-mako
Requires: glib2%{?_isa} >= %{glib2_version}
@ -37,12 +38,13 @@ typelib files, useful for creating language bindings among other
things.
%package devel
Summary: Libraries and headers for gobject-introspection
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: Libraries and headers for gobject-introspection
Requires: %{name}%{?_isa} = %{version}-%{release}
# Not always, but whatever, it's a tiny dep to pull in
Requires: libtool
Requires: libtool
# For g-ir-doctool
Requires: python2-mako
BuildRequires: python3-mako
Requires: python3-mako
%description devel
Libraries and headers for gobject-introspection
@ -51,9 +53,8 @@ Libraries and headers for gobject-introspection
%autosetup -p1
%build
%configure --enable-gtk-doc --enable-doctool --with-python=python2
make %{?_smp_mflags} V=1
%configure --enable-gtk-doc --enable-doctool --with-python=%{__python3}
%make_build
%install
%make_install
@ -64,8 +65,8 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/g-ir-generate
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/g-ir-inspect
# Die libtool, die.
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.la" -print -delete
find $RPM_BUILD_ROOT -type f -name "*.a" -print -delete
%ldconfig_scriptlets
@ -78,20 +79,21 @@ find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
%files devel
%{_libdir}/lib*.so
%dir %{_libdir}/gobject-introspection
%{_libdir}/gobject-introspection/*
%{_libdir}/gobject-introspection/
%{_libdir}/pkgconfig/*
%{_includedir}/*
%{_bindir}/g-ir-*
%{_datadir}/gir-1.0
%dir %{_datadir}/gobject-introspection-1.0
%{_datadir}/gobject-introspection-1.0/*
%{_datadir}/gobject-introspection-1.0/
%{_datadir}/aclocal/introspection.m4
%{_mandir}/man1/*.gz
%dir %{_datadir}/gtk-doc/html/gi
%{_datadir}/gtk-doc/html/gi/*
%{_datadir}/gtk-doc/html/gi/
%changelog
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.54.1-5
- Switch to python3
- Cleanup spec
* Sat Feb 03 2018 Richard Shaw <hobbes1069@gmail.com> - 1.54.1-4
- Add python2 to configure so shebangs are properly updated by
brp-mangle-shebangs.