aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-07-01 03:17:14 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-07-06 02:10:29 +0200
commit25c5b1a9955e0d6679301c75cc50ed868bab037f (patch)
tree85259f45d36a49e37d6cf38ed9fceb7e0a003385 /app-i18n
parentkde-apps/plasma-settings: add 22.06 (diff)
downloadguru-25c5b1a9955e0d6679301c75cc50ed868bab037f.tar.gz
guru-25c5b1a9955e0d6679301c75cc50ed868bab037f.tar.bz2
guru-25c5b1a9955e0d6679301c75cc50ed868bab037f.zip
app-i18n/scim-canna: new package, add 1.0.1
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'app-i18n')
-rw-r--r--app-i18n/scim-canna/Manifest1
-rw-r--r--app-i18n/scim-canna/files/scim-canna-1.0.1-fix_ftbfs_gtk3.patch201
-rw-r--r--app-i18n/scim-canna/metadata.xml8
-rw-r--r--app-i18n/scim-canna/scim-canna-1.0.1.ebuild54
4 files changed, 264 insertions, 0 deletions
diff --git a/app-i18n/scim-canna/Manifest b/app-i18n/scim-canna/Manifest
new file mode 100644
index 000000000..d2bfe27c3
--- /dev/null
+++ b/app-i18n/scim-canna/Manifest
@@ -0,0 +1 @@
+DIST scim-canna-1.0.1.tar.gz 516186 BLAKE2B 03b977e841d6263f6c980e8e729122ca4ff7c9a0966f6f9daf57543250e7119a84ddfb7805804e3c5afaecba91d50d21448f49335d5a28cb967de8370b9f5dd9 SHA512 711b67211c9d1f4cb8ca09b88d455718607aa2d99e47a753fa8d71d2e1f0df8c649b64d08149785eeaa98d1399b9ca92e3df7e1be8f150ce99f28f82491b8bc1
diff --git a/app-i18n/scim-canna/files/scim-canna-1.0.1-fix_ftbfs_gtk3.patch b/app-i18n/scim-canna/files/scim-canna-1.0.1-fix_ftbfs_gtk3.patch
new file mode 100644
index 000000000..d9a99010a
--- /dev/null
+++ b/app-i18n/scim-canna/files/scim-canna-1.0.1-fix_ftbfs_gtk3.patch
@@ -0,0 +1,201 @@
+--- a/src/scim_canna_imengine_setup.cpp
++++ b/src/scim_canna_imengine_setup.cpp
+@@ -152,7 +152,9 @@
+ // Internal data declaration.
+ static bool __have_changed = true;
+
++#if !GTK_CHECK_VERSION(2, 12, 0)
+ static GtkTooltips * __widget_tooltips = 0;
++#endif
+
+ static BoolConfigData __config_bool_common [] =
+ {
+@@ -284,11 +286,17 @@
+ entry);
+ gtk_widget_show (entry->widget);
+
++#if !GTK_CHECK_VERSION(2, 12, 0)
+ if (!__widget_tooltips)
+ __widget_tooltips = gtk_tooltips_new();
++#endif
+ if (entry->tooltip)
++#if GTK_CHECK_VERSION(2, 12, 0)
++ gtk_widget_set_tooltip_text (entry->widget, _(entry->tooltip));
++#else
+ gtk_tooltips_set_tip (__widget_tooltips, entry->widget,
+ _(entry->tooltip), NULL);
++#endif
+
+ return entry->widget;
+ }
+@@ -324,11 +332,17 @@
+ (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
+ (GtkAttachOptions) (GTK_FILL), 4, 4);
+
++#if !GTK_CHECK_VERSION(2, 12, 0)
+ if (!__widget_tooltips)
+ __widget_tooltips = gtk_tooltips_new();
++#endif
+ if (entry->tooltip)
++#if GTK_CHECK_VERSION(2, 12, 0)
++ gtk_widget_set_tooltip_text (GTK_WIDGET (entry->widget), _(entry->tooltip));
++#else
+ gtk_tooltips_set_tip (__widget_tooltips, GTK_WIDGET (entry->widget),
+ _(entry->tooltip), NULL);
++#endif
+
+ return GTK_WIDGET (entry->widget);
+ }
+@@ -351,31 +365,53 @@
+ (GtkAttachOptions) (GTK_FILL), 4, 4);
+ gtk_widget_show (label);
+
++#if GTK_CHECK_VERSION(2, 4, 0)
++ entry->widget = gtk_combo_box_text_new_with_entry ();
++ gtk_label_set_mnemonic_widget (GTK_LABEL (label),
++ gtk_bin_get_child (GTK_BIN (entry->widget)));
++ gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (entry->widget))), FALSE);
++#else
+ entry->widget = gtk_combo_new ();
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label),
+ GTK_COMBO (entry->widget)->entry);
+ gtk_combo_set_value_in_list (GTK_COMBO (entry->widget), TRUE, FALSE);
+ gtk_combo_set_case_sensitive (GTK_COMBO (entry->widget), TRUE);
+- gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (entry->widget)->entry),
++ gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (entry->widget)->entry),
+ FALSE);
++#endif
+ gtk_widget_show (GTK_WIDGET (entry->widget));
+ gtk_table_attach (GTK_TABLE (table), GTK_WIDGET (entry->widget),
+ 1, 2, idx, idx + 1,
+ (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
+ (GtkAttachOptions) (GTK_FILL), 4, 4);
++#if GTK_CHECK_VERSION(2, 4, 0)
++ g_object_set_data (G_OBJECT (gtk_bin_get_child (GTK_BIN (entry->widget))),
++ DATA_POINTER_KEY,
++ (gpointer) candidates_p);
++ g_signal_connect ((gpointer) gtk_bin_get_child (GTK_BIN (entry->widget)), "changed",
++ G_CALLBACK (on_default_combo_changed),
++ entry);
++#else
+ g_object_set_data (G_OBJECT (GTK_COMBO (entry->widget)->entry),
+ DATA_POINTER_KEY,
+ (gpointer) candidates_p);
+-
+ g_signal_connect ((gpointer) GTK_COMBO (entry->widget)->entry, "changed",
+ G_CALLBACK (on_default_combo_changed),
+ entry);
++#endif
++
+
++#if !GTK_CHECK_VERSION(2, 12, 0)
+ if (!__widget_tooltips)
+ __widget_tooltips = gtk_tooltips_new();
++#endif
+ if (entry->tooltip)
++#if GTK_CHECK_VERSION(2, 12, 0)
++ gtk_widget_set_tooltip_text (GTK_WIDGET (entry->widget), _(entry->tooltip));
++#else
+ gtk_tooltips_set_tip (__widget_tooltips, GTK_WIDGET (entry->widget),
+ _(entry->tooltip), NULL);
++#endif
+
+ return GTK_WIDGET (entry->widget);
+ }
+@@ -403,11 +439,17 @@
+ {
+ GtkWidget *vbox, *frame, *table, *check, *widget;
+
++#if GTK_CHECK_VERSION(3, 0, 0)
++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
++#else
+ vbox = gtk_vbox_new (FALSE, 0);
++#endif
+ gtk_widget_show (vbox);
+
++#if !GTK_CHECK_VERSION(2, 12, 0)
+ if (!__widget_tooltips)
+ __widget_tooltips = gtk_tooltips_new();
++#endif
+
+ /* specify initialize file name */
+ frame = gtk_frame_new ("");
+@@ -455,7 +497,11 @@
+ {
+ GtkWidget *vbox, *table;
+
++#if GTK_CHECK_VERSION(3, 0, 0)
++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
++#else
+ vbox = gtk_vbox_new (FALSE, 0);
++#endif
+ gtk_widget_show (vbox);
+
+ table = gtk_table_new (2, 2, FALSE);
+@@ -480,7 +526,11 @@
+ GtkWidget *vbox, *label;
+ gchar str[256];
+
++#if GTK_CHECK_VERSION(3, 0, 0)
++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
++#else
+ vbox = gtk_vbox_new (FALSE, 0);
++#endif
+ gtk_widget_show (vbox);
+
+ g_snprintf (
+@@ -547,8 +597,23 @@
+ }
+
+ static void
+-setup_combo_value (GtkCombo *combo, const String & str)
++setup_combo_value (GtkWidget *combo, const String & str)
+ {
++#if GTK_CHECK_VERSION(2, 4, 0)
++ ComboConfigCandidate *data
++ = static_cast<ComboConfigCandidate*>
++ (g_object_get_data (G_OBJECT (gtk_bin_get_child (GTK_BIN (combo))),
++ DATA_POINTER_KEY));
++
++ gint default_index = -1;
++ for (unsigned int i = 0; data[i].label; i++) {
++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _(data[i].label));
++ if (!strcmp (data[i].data, str.c_str ()))
++ default_index = i;
++ }
++ if (default_index != -1)
++ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), default_index);
++#else
+ GList *list = NULL;
+ const char *defval = NULL;
+
+@@ -563,11 +628,12 @@
+ defval = _(data[i].label);
+ }
+
+- gtk_combo_set_popdown_strings (combo, list);
++ gtk_combo_set_popdown_strings (GTK_COMBO (combo), list);
+ g_list_free (list);
+
+ if (defval)
+- gtk_entry_set_text (GTK_ENTRY (combo->entry), defval);
++ gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), defval);
++#endif
+ }
+
+ static void
+@@ -582,8 +648,13 @@
+
+ for (unsigned int i = 0; i < __config_string_common_num; i++) {
+ StringConfigData &entry = __config_string_common[i];
++#if GTK_CHECK_VERSION(2, 12, 0)
++ if (entry.widget && GTK_IS_COMBO_BOX (entry.widget))
++ setup_combo_value (entry.widget, entry.value);
++#else
+ if (entry.widget && GTK_IS_COMBO (entry.widget))
+- setup_combo_value (GTK_COMBO (entry.widget), entry.value);
++ setup_combo_value (entry.widget, entry.value);
++#endif
+ else if (entry.widget && GTK_IS_ENTRY (entry.widget))
+ gtk_entry_set_text (GTK_ENTRY (entry.widget),
+ entry.value.c_str ());
diff --git a/app-i18n/scim-canna/metadata.xml b/app-i18n/scim-canna/metadata.xml
new file mode 100644
index 000000000..0433bcab3
--- /dev/null
+++ b/app-i18n/scim-canna/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <name>Alessandro Barbieri</name>
+ <email>lssndrbarbieri@gmail.com</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-i18n/scim-canna/scim-canna-1.0.1.ebuild b/app-i18n/scim-canna/scim-canna-1.0.1.ebuild
new file mode 100644
index 000000000..242827847
--- /dev/null
+++ b/app-i18n/scim-canna/scim-canna-1.0.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="SCIM IMEngine module using Canna"
+HOMEPAGE="https://osdn.net/projects/scim-imengine"
+SRC_URI="https://free.nchc.org.tw/osdn//scim-imengine/29155/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+RDEPEND="
+ app-i18n/canna
+ app-i18n/scim
+ dev-libs/atk
+ dev-libs/glib:2
+ dev-libs/libltdl
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/harfbuzz:=
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/pango
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${P}-fix_ftbfs_gtk3.patch" )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myargs=(
+ --disable-static
+ --enable-shared
+ $(use_enable debug)
+ )
+ econf "${myargs[@]}"
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+}