Drop gtk2 dependency completely.
Make anthy build conditionally for Fedora release only. Resolves: rhbz#1939777 Fix build fail without anthy-devel.
This commit is contained in:
parent
812ed6d119
commit
eb62bd44d8
54
kasumi.spec
54
kasumi.spec
@ -2,28 +2,25 @@
|
||||
# https://github.com/fcitx/fcitx-anthy/issues/12
|
||||
# https://osdn.net/projects/scim-imengine/ticket/40956
|
||||
# https://github.com/uim/uim/issues/166
|
||||
%bcond_without unicode
|
||||
|
||||
Name: kasumi
|
||||
Version: 2.5
|
||||
Release: 34%{?dist}
|
||||
Release: 35%{?dist}
|
||||
|
||||
License: GPLv2+
|
||||
URL: http://kasumi.sourceforge.jp/
|
||||
BuildRequires: gtk2-devel anthy-devel
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: anthy-devel
|
||||
%endif
|
||||
BuildRequires: autoconf automake libtool
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: make
|
||||
%if %{with unicode}
|
||||
BuildRequires: gtk3-devel anthy-unicode-devel
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
%else
|
||||
Provides: %{name}-common = %{version}-%{release}
|
||||
Obsoletes: %{name}-common <= %{version}-%{release}
|
||||
%endif
|
||||
Source0: http://jaist.dl.sourceforge.jp/kasumi/41436/%{name}-%{version}.tar.gz
|
||||
Patch0: kasumi-853099-manpage.patch
|
||||
Patch1: kasumi-1928410-gtk3.patch
|
||||
Patch2: kasumi-check-anthy-pkg.patch
|
||||
|
||||
|
||||
Summary: An anthy dictionary management tool
|
||||
@ -31,7 +28,6 @@ Summary: An anthy dictionary management tool
|
||||
Kasumi is a dictionary management tool for Anthy.
|
||||
|
||||
|
||||
%if %{with unicode}
|
||||
%package common
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
Summary: Anthy dictionary management common files between kasumi and kasumi-unicode
|
||||
@ -47,43 +43,48 @@ Summary: An anthy-unicode dictionary management tool
|
||||
|
||||
%description unicode
|
||||
Kasumi-unicode is a dictionary management tool for Anthy-unicode.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS"
|
||||
%if %{with unicode}
|
||||
echo "# Building kasumi-unicode"
|
||||
sed -e 's/AC_CHECK_LIB(anthydic,/AC_CHECK_LIB(anthydic-unicode,/' \
|
||||
-e 's/AC_CHECK_LIB(anthy,/AC_CHECK_LIB(anthy-unicode,/' \
|
||||
-e '/AM_PATH_GTK_2_0(/i\
|
||||
sed -i -e '/AM_PATH_GTK_2_0(/i\
|
||||
PKG_CHECK_MODULES([GTK], [gtk+-3.0])\
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"\
|
||||
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"\
|
||||
LIBS="$LIBS $GTK_LIBS"' \
|
||||
-e '/AM_PATH_GTK_2_0(/d' \
|
||||
configure.in
|
||||
autoreconf -f -i
|
||||
export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS"
|
||||
echo "# Building kasumi-unicode"
|
||||
sed -e 's/AC_CHECK_LIB(anthydic,/AC_CHECK_LIB(anthydic-unicode,/' \
|
||||
-e 's/AC_CHECK_LIB(anthy,/AC_CHECK_LIB(anthy-unicode,/' \
|
||||
-e 's/PKG_CHECK_MODULES(ANTHY, anthy/PKG_CHECK_MODULES(ANTHY, anthy-unicode/' \
|
||||
-i.orig configure.in
|
||||
autoreconf -f -i
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if 0%{?fedora}
|
||||
mv kasumi kasumi-unicode
|
||||
make clean
|
||||
cp configure.in.orig configure.in
|
||||
%endif
|
||||
|
||||
autoreconf -f -i
|
||||
echo "# Building kasumi"
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
||||
%if %{with unicode}
|
||||
%if 0%{?fedora}
|
||||
install -pm 755 kasumi-unicode $RPM_BUILD_ROOT%{_bindir}/kasumi-unicode
|
||||
%else
|
||||
mv $RPM_BUILD_ROOT%{_bindir}/kasumi $RPM_BUILD_ROOT%{_bindir}/kasumi-unicode
|
||||
%endif
|
||||
|
||||
# remove .desktop file so that kasumi is accessible from scim panel/ibus panel and it's not necessary for other users.
|
||||
@ -92,11 +93,12 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
|
||||
%find_lang %{name}
|
||||
|
||||
|
||||
%if %{with unicode}
|
||||
%if 0%{?fedora}
|
||||
%files
|
||||
%{_bindir}/kasumi
|
||||
%doc AUTHORS ChangeLog NEWS README
|
||||
%license COPYING
|
||||
%endif
|
||||
|
||||
%files unicode
|
||||
%{_bindir}/kasumi-unicode
|
||||
@ -106,17 +108,15 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
|
||||
%files common -f %{name}.lang
|
||||
%{_mandir}/man1/kasumi.1*
|
||||
%{_datadir}/pixmaps/kasumi.png
|
||||
%else
|
||||
%files -f %{name}.lang
|
||||
%{_bindir}/kasumi
|
||||
%{_mandir}/man1/kasumi.1*
|
||||
%{_datadir}/pixmaps/kasumi.png
|
||||
%doc AUTHORS ChangeLog NEWS README
|
||||
%license COPYING
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Apr 20 2021 Akira TAGOH <tagoh@redhat.com> - 2.5-35
|
||||
- Drop gtk2 dependency completely.
|
||||
- Make anthy build conditionally for Fedora release only.
|
||||
Resolves: rhbz#1939777
|
||||
- Fix build fail without anthy-devel.
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.5-34
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user