[ibus-anthy] Use python2 for epel7.

Takao Fujiwara fujiwara at fedoraproject.org
Thu Nov 13 07:52:09 UTC 2014


commit 36b027773ebb19ad6c80bcaf34e57004ae64d8ca
Author: Takao Fujiwara <tfujiwar at redhat.com>
Date:   Thu Nov 13 16:47:01 2014 +0900

    Use python2 for epel7.

 ibus-anthy.spec |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/ibus-anthy.spec b/ibus-anthy.spec
index 77c090e..f363e60 100644
--- a/ibus-anthy.spec
+++ b/ibus-anthy.spec
@@ -9,8 +9,16 @@
 %global with_python_pkg                 0
 %endif
 
+%if (0%{?fedora} > 19 || 0%{?rhel} > 7)
+%global with_python3                    1
+%else
+%global with_python3                    0
+%endif
+
+%if %with_python3
 # for bytecompile in %%{_datadir}/ibus-anthy
 %global __python %{__python3}
+%endif
 
 Name:           ibus-anthy
 Version:        1.5.6
@@ -36,8 +44,13 @@ BuildRequires:  ibus
 BuildRequires:  intltool
 BuildRequires:  libtool
 BuildRequires:  pkgconfig
+%if %with_python3
 BuildRequires:  python3-devel
 BuildRequires:  python3-gobject
+%else
+BuildRequires:  python2-devel
+BuildRequires:  pygobject3-base
+%endif
 
 Requires:       ibus >= %{require_ibus_version}
 Requires:       kasumi
@@ -46,8 +59,13 @@ Requires:       anthy
 Requires:       %{name}-python = %{version}-%{release}
 %else
 Requires:       gtk3
+%if %with_python3
 Requires:       python3-cairo
 Requires:       python3-gobject
+%else
+Requires:       pycairo
+Requires:       pygobject3
+%endif
 %endif
 
 %description
@@ -61,8 +79,13 @@ Group:          System Environment/Libraries
 BuildArch:      noarch
 Requires:       %{name} = %{version}-%{release}
 Requires:       gtk3
+%if %with_python3
 Requires:       python3-cairo
 Requires:       python3-gobject
+%else
+Requires:       pycairo
+Requires:       pygobject3
+%endif
 
 %description python
 This package contains the Anthy Python files for IBus
@@ -95,7 +118,9 @@ autoreconf
   --with-hotkeys \
 %endif
   --with-on-off-keys="'Zenkaku_Hankaku', 'Ctrl+space', 'Ctrl+J'" \
+%if %with_python3
   --with-python=python3 \
+%endif
   --disable-static
 # make -C po update-gmo
 make %{?_smp_mflags}
@@ -159,8 +184,9 @@ touch --no-create %{_datadir}/icons/hicolor || :
 %{_libdir}/libanthygobject-%{sub_version}.so
 
 %changelog
-* Tue Oct 28 2014 Takao Fujiwara <tfujiwar at redhat.com> - 1.5.6-2
+* Thu Nov 13 2014 Takao Fujiwara <tfujiwar at redhat.com> - 1.5.6-2
 - Updated ibus-anthy-HEAD.patch to fix Enter key on setup dialog.
+- Use python2 for epel7.
 
 * Tue Sep 16 2014 Takao Fujiwara <tfujiwar at redhat.com> - 1.5.6-1
 - Bumped to 1.5.6


More information about the scm-commits mailing list