diff --git a/ibus-m17n-desktop-file.patch b/ibus-m17n-desktop-file.patch new file mode 100644 index 0000000..6064c92 --- /dev/null +++ b/ibus-m17n-desktop-file.patch @@ -0,0 +1,113 @@ +From 87ae4c79779f6e543ae5b75a595e2db04bfc7de2 Mon Sep 17 00:00:00 2001 +From: Daiki Ueno +Date: Fri, 28 Sep 2012 11:44:47 +0900 +Subject: [PATCH] Add a .desktop file for ibus-setup-m17n. + +BUG=https://bugzilla.gnome.org/show_bug.cgi?id=684935 + +Review URL: https://codereview.appspot.com/6572062 +--- + configure.ac | 1 + + po/POTFILES.in | 2 ++ + po/POTFILES.skip | 1 + + src/Makefile.am | 16 ++++++++++++++++ + src/ibus-setup-m17n.desktop.in.in | 7 +++++++ + src/setup.c | 5 +++++ + 6 files changed, 32 insertions(+) + create mode 100644 po/POTFILES.skip + create mode 100644 src/ibus-setup-m17n.desktop.in.in + +Index: ibus-m17n-1.3.4/configure.ac +=================================================================== +--- ibus-m17n-1.3.4.orig/configure.ac ++++ ibus-m17n-1.3.4/configure.ac +@@ -48,6 +48,7 @@ AM_PROG_CC_C_O + AC_PROG_CXX + AC_ISC_POSIX + AC_HEADER_STDC ++IT_PROG_INTLTOOL([0.35.0]) + AM_PROG_LIBTOOL + + # check ibus +Index: ibus-m17n-1.3.4/po/POTFILES.in +=================================================================== +--- ibus-m17n-1.3.4.orig/po/POTFILES.in ++++ ibus-m17n-1.3.4/po/POTFILES.in +@@ -1,3 +1,5 @@ + src/engine.c + src/m17nutil.c + src/main.c ++[type: gettext/glade]src/ibus-m17n-preferences.ui ++src/ibus-setup-m17n.desktop.in.in +Index: ibus-m17n-1.3.4/po/POTFILES.skip +=================================================================== +--- /dev/null ++++ ibus-m17n-1.3.4/po/POTFILES.skip +@@ -0,0 +1 @@ ++src/ibus-setup-m17n.desktop.in +Index: ibus-m17n-1.3.4/src/Makefile.am +=================================================================== +--- ibus-m17n-1.3.4.orig/src/Makefile.am ++++ ibus-m17n-1.3.4/src/Makefile.am +@@ -110,6 +110,7 @@ componentdir = @datadir@/ibus/component + EXTRA_DIST = \ + m17n.xml.in.in \ + default.xml.in \ ++ $(desktop_in_in_files) \ + $(NULL) + + DISTCLEANFILES = \ +@@ -120,6 +121,8 @@ DISTCLEANFILES = \ + CLEANFILES = \ + m17n.xml \ + default.xml \ ++ $(desktop_DATA) \ ++ $(desktop_in_files) \ + $(NULL) + + m17n.xml: m17n.xml.in +@@ -138,3 +141,16 @@ SUFFIXES = .xml.in .xml + + test: ibus-engine-m17n + $(builddir)/ibus-engine-m17n ++ ++desktop_in_in_files = ibus-setup-m17n.desktop.in.in ++desktop_in_files = $(desktop_in_in_files:.in.in=.in) ++ ++$(desktop_in_files): %.desktop.in: %.desktop.in.in Makefile ++ $(AM_V_GEN) sed \ ++ -e "s|\@libexecdir\@|$(libexecdir)|" \ ++ $< > $@.tmp && mv $@.tmp $@ ++ ++desktopdir=$(datadir)/applications ++desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) ++ ++@INTLTOOL_DESKTOP_RULE@ +Index: ibus-m17n-1.3.4/src/ibus-setup-m17n.desktop.in.in +=================================================================== +--- /dev/null ++++ ibus-m17n-1.3.4/src/ibus-setup-m17n.desktop.in.in +@@ -0,0 +1,7 @@ ++[Desktop Entry] ++_Name=IBus M17N Setup ++_Comment=Set up IBus M17N engine ++Exec=@libexecdir@/ibus-setup-m17n ++NoDisplay=true ++Type=Application ++StartupNotify=true +Index: ibus-m17n-1.3.4/src/setup.c +=================================================================== +--- ibus-m17n-1.3.4.orig/src/setup.c ++++ ibus-m17n-1.3.4/src/setup.c +@@ -611,6 +611,11 @@ main (gint argc, gchar **argv) + g_option_context_free (context); + + gtk_init (&argc, &argv); ++ ++ if (!opt_name) { ++ opt_name = (gchar *) g_getenv ("IBUS_ENGINE_NAME"); ++ } ++ + if (!opt_name) { + fprintf (stderr, "can't determine IBus engine name; use --name\n"); + exit (1); diff --git a/ibus-m17n.spec b/ibus-m17n.spec index f8e9480..0e39180 100644 --- a/ibus-m17n.spec +++ b/ibus-m17n.spec @@ -19,7 +19,7 @@ Name: ibus-m17n Version: 1.3.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The M17N engine for IBus platform License: GPLv2+ Group: System Environment/Libraries @@ -34,6 +34,7 @@ Patch4: ibus-m17n-virtkbd.patch Patch5: ibus-m17n-fix-mtext-config.patch Patch6: ibus-m17n-translit-layout.patch Patch7: ibus-m17n-honor-user-cflags.patch +Patch8: ibus-m17n-desktop-file.patch # The following BR is for autogen and not necessary when packging # released tarballs. @@ -70,6 +71,7 @@ the input table maps from m17n-db. %patch5 -p1 -b .fix-mtext-config %patch6 -p1 -b .translit-layout %patch7 -p1 -b .honor-user-cflags +%patch8 -p1 -b .desktop-file NOCONFIGURE=1 ./autogen.sh @@ -91,6 +93,11 @@ make DESTDIR=${RPM_BUILD_ROOT} install %{_datadir}/ibus/component/* %changelog +* Mon Oct 8 2012 Daiki Ueno - 1.3.4-6 +- Add ibus-m17n-desktop-file.patch + Fix bug 860955 - ibus-m17n setup is not enabled in + gnome-control-center region, .desktop file is missing + * Wed Sep 26 2012 Daiki Ueno - 1.3.4-5 - Add ibus-m17n-honor-user-cflags.patch