Control: tags -1 +pending +patch Dear maintainer,
I've prepared an NMU for scim-skk (versioned as 0.5.2-7.3) and uploaded it to DELAYED/10. Please feel free to tell me if I should delay it longer. Regards. diff -Nru scim-skk-0.5.2/debian/changelog scim-skk-0.5.2/debian/changelog --- scim-skk-0.5.2/debian/changelog 2022-06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/changelog 2022-06-12 20:23:35.000000000 -0400 @@ -1,3 +1,15 @@ +scim-skk (0.5.2-7.3) unstable; urgency=high + + * Non-maintainer upload. + * Migrate from dpatch to dh. (Closes: #1005985, #998953) + * Refresh packaging: + + Bump debhelper compat to v13. + + Bump Standards-Version to 4.6.1. + + Migrate to "3.0 (quilt)" source format. + * debian/patches: Add patch to fix LIBTOOL_EXPORT_OPTIONS. + + -- Boyuan Yang <by...@debian.org> Sun, 12 Jun 2022 20:23:35 -0400 + scim-skk (0.5.2-7.2) unstable; urgency=low * Non-maintainer upload. diff -Nru scim-skk-0.5.2/debian/compat scim-skk-0.5.2/debian/compat --- scim-skk-0.5.2/debian/compat 2022-06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/compat 1969-12-31 19:00:00.000000000 -0500 @@ -1 +0,0 @@ -7 diff -Nru scim-skk-0.5.2/debian/control scim-skk-0.5.2/debian/control --- scim-skk-0.5.2/debian/control 2022-06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/control 2022-06-12 20:15:44.000000000 -0400 @@ -3,8 +3,8 @@ Priority: optional Maintainer: Ikuya Awashiro <ik...@oooug.jp> Uploaders: Yukiharu YABUKI <yyab...@debian.org> -Build-Depends: debhelper (>= 7.0.0), dpatch (>= 1.11), libscim-dev (>= 1.4.6), autotools-dev, pkg-config, libltdl-dev -Standards-Version: 3.9.1.0 +Build-Depends: debhelper-compat (= 13), libscim-dev (>= 1.4.6), pkg-config, libltdl-dev +Standards-Version: 4.6.1 Homepage: http://scim-imengine.sourceforge.jp/ Package: scim-skk diff -Nru scim-skk-0.5.2/debian/patches/0005-AC_SUBST- LIBTOOL_EXPORT_OPTIONS.patch scim-skk-0.5.2/debian/patches/0005-AC_SUBST- LIBTOOL_EXPORT_OPTIONS.patch --- scim-skk-0.5.2/debian/patches/0005-AC_SUBST- LIBTOOL_EXPORT_OPTIONS.patch 1969-12-31 19:00:00.000000000 -0500 +++ scim-skk-0.5.2/debian/patches/0005-AC_SUBST- LIBTOOL_EXPORT_OPTIONS.patch 2022-06-12 20:23:25.000000000 -0400 @@ -0,0 +1,20 @@ +From: Boyuan Yang <by...@debian.org> +Date: Sun, 12 Jun 2022 20:23:21 -0400 +Subject: AC_SUBST LIBTOOL_EXPORT_OPTIONS + +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index bd3f9fb..acf4a3f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -79,6 +79,7 @@ AC_SUBST(ac_aux_dir) + # libtool option to control which symbols are exported + # right now, symbols starting with _ are not exported + LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"' ++AC_SUBST([LIBTOOL_EXPORT_OPTIONS]) + + # Extra args. + AC_ARG_ENABLE(debug, diff -Nru scim-skk-0.5.2/debian/patches/00list scim-skk- 0.5.2/debian/patches/00list --- scim-skk-0.5.2/debian/patches/00list 2022-06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/patches/00list 1969-12-31 19:00:00.000000000 -0500 @@ -1,4 +0,0 @@ -01_error_check_to_cdb_get -02_scim_skk_dictionary.cpp -20_gcc-4.3-fixes -99_fix_ftbfs_gtk.dpatch diff -Nru scim-skk-0.5.2/debian/patches/01_error_check_to_cdb_get.dpatch scim- skk-0.5.2/debian/patches/01_error_check_to_cdb_get.dpatch --- scim-skk-0.5.2/debian/patches/01_error_check_to_cdb_get.dpatch 2022- 06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/patches/01_error_check_to_cdb_get.dpatch 1969- 12-31 19:00:00.000000000 -0500 @@ -1,48 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 01_error_check_to_cdb_get.dpatch by Ikuya Awashiro <ik...@oooug.jp> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad scim-skk-0.5.2~/src/cdb.cpp scim-skk-0.5.2/src/cdb.cpp ---- scim-skk-0.5.2~/src/cdb.cpp 2005-11-11 20:05:51.000000000 +0900 -+++ scim-skk-0.5.2/src/cdb.cpp 2005-12-23 22:18:33.000000000 +0900 -@@ -70,14 +70,21 @@ - { - if (!m_open_flag) return false; - -- bool retval = false; -- unsigned int hash_val = calc_hash(key); -- unsigned int hashtbl_pos = get_value((hash_val % 256) * 2 * 4); -- unsigned int hashtbl_len = get_value((hash_val % 256) * 2 * 4 + 4); -- unsigned int entry_point = -- hashtbl_pos + ((hash_val / 256) % hashtbl_len) * 2 * 4; -- unsigned int entry_hashval = get_value(entry_point); -- unsigned int entry_pos = get_value(entry_point + 4); -+ unsigned int hash_val; /* hash value of key */ -+ unsigned int hashtbl_pos, hashtbl_len; /* position and length of -+ the hash table */ -+ unsigned int entry_point; /* position of the entry */ -+ unsigned int entry_hashval, entry_pos; /* hash value and position of -+ the entry */ -+ hash_val = calc_hash(key); -+ hashtbl_pos = get_value((hash_val % 256) * 2 * 4); -+ hashtbl_len = get_value((hash_val % 256) * 2 * 4 + 4); -+ if (hashtbl_len == 0) { /* there are no entries for the hash table */ -+ return false; -+ } -+ entry_point = hashtbl_pos + ((hash_val / 256) % hashtbl_len) * 2 * 4; -+ entry_hashval = get_value(entry_point); -+ entry_pos = get_value(entry_point + 4); - while (entry_pos != 0) { - if (entry_hashval == hash_val) { - int entry_keylen = get_value(entry_pos); -@@ -89,6 +96,7 @@ - } - } - entry_point += 8; -+ if (entry_point > m_size - 8) break; - entry_hashval = get_value(entry_point); - entry_pos = get_value(entry_point+4); - } diff -Nru scim-skk-0.5.2/debian/patches/01_error_check_to_cdb_get.patch scim- skk-0.5.2/debian/patches/01_error_check_to_cdb_get.patch --- scim-skk-0.5.2/debian/patches/01_error_check_to_cdb_get.patch 1969- 12-31 19:00:00.000000000 -0500 +++ scim-skk-0.5.2/debian/patches/01_error_check_to_cdb_get.patch 2022- 06-12 20:23:35.000000000 -0400 @@ -0,0 +1,45 @@ +From: Ikuya Awashiro <ik...@oooug.jp> +Subject: error check to cdb get + +--- +diff -urNad scim-skk-0.5.2~/src/cdb.cpp scim-skk-0.5.2/src/cdb.cpp +--- scim-skk-0.5.2~/src/cdb.cpp 2005-11-11 20:05:51.000000000 +0900 ++++ scim-skk-0.5.2/src/cdb.cpp 2005-12-23 22:18:33.000000000 +0900 +@@ -70,14 +70,21 @@ + { + if (!m_open_flag) return false; + +- bool retval = false; +- unsigned int hash_val = calc_hash(key); +- unsigned int hashtbl_pos = get_value((hash_val % 256) * 2 * 4); +- unsigned int hashtbl_len = get_value((hash_val % 256) * 2 * 4 + 4); +- unsigned int entry_point = +- hashtbl_pos + ((hash_val / 256) % hashtbl_len) * 2 * 4; +- unsigned int entry_hashval = get_value(entry_point); +- unsigned int entry_pos = get_value(entry_point + 4); ++ unsigned int hash_val; /* hash value of key */ ++ unsigned int hashtbl_pos, hashtbl_len; /* position and length of ++ the hash table */ ++ unsigned int entry_point; /* position of the entry */ ++ unsigned int entry_hashval, entry_pos; /* hash value and position of ++ the entry */ ++ hash_val = calc_hash(key); ++ hashtbl_pos = get_value((hash_val % 256) * 2 * 4); ++ hashtbl_len = get_value((hash_val % 256) * 2 * 4 + 4); ++ if (hashtbl_len == 0) { /* there are no entries for the hash table */ ++ return false; ++ } ++ entry_point = hashtbl_pos + ((hash_val / 256) % hashtbl_len) * 2 * 4; ++ entry_hashval = get_value(entry_point); ++ entry_pos = get_value(entry_point + 4); + while (entry_pos != 0) { + if (entry_hashval == hash_val) { + int entry_keylen = get_value(entry_pos); +@@ -89,6 +96,7 @@ + } + } + entry_point += 8; ++ if (entry_point > m_size - 8) break; + entry_hashval = get_value(entry_point); + entry_pos = get_value(entry_point+4); + } diff -Nru scim-skk-0.5.2/debian/patches/02_scim_skk_dictionary.cpp.dpatch scim-skk-0.5.2/debian/patches/02_scim_skk_dictionary.cpp.dpatch --- scim-skk-0.5.2/debian/patches/02_scim_skk_dictionary.cpp.dpatch 2022- 06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/patches/02_scim_skk_dictionary.cpp.dpatch 1969- 12-31 19:00:00.000000000 -0500 @@ -1,24 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 02_scim_skk_dictionary.cpp.dpatch by Ikuya Awashiro <ik...@oooug.jp> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad scim-skk-0.5.2~/src/scim_skk_dictionary.cpp scim-skk- 0.5.2/src/scim_skk_dictionary.cpp ---- scim-skk-0.5.2~/src/scim_skk_dictionary.cpp 2005-12-18 22:02:39.000000000 +0900 -+++ scim-skk-0.5.2/src/scim_skk_dictionary.cpp 2006-06-18 18:12:15.000000000 +0900 -@@ -543,9 +543,11 @@ - UserDict::write (const WideString &key, const CandPair &data) - { - list<CandPair> &cl = m_dictdata[key]; -- for (list<CandPair>::iterator it = cl.begin(); it != cl.end(); it++) { -+ for (list<CandPair>::iterator it = cl.begin(); it != cl.end();) { - if (it->first == data.first) { -- cl.erase(it); -+ it = cl.erase(it); -+ } else { -+ ++it; - } - } - cl.push_front(data); diff -Nru scim-skk-0.5.2/debian/patches/02_scim_skk_dictionary.cpp.patch scim- skk-0.5.2/debian/patches/02_scim_skk_dictionary.cpp.patch --- scim-skk-0.5.2/debian/patches/02_scim_skk_dictionary.cpp.patch 1969- 12-31 19:00:00.000000000 -0500 +++ scim-skk-0.5.2/debian/patches/02_scim_skk_dictionary.cpp.patch 2022- 06-12 20:23:35.000000000 -0400 @@ -0,0 +1,21 @@ +From: Ikuya Awashiro <ik...@oooug.jp> +Subject: scim_skk_dictionary.cpp + +--- +diff -urNad scim-skk-0.5.2~/src/scim_skk_dictionary.cpp scim-skk- 0.5.2/src/scim_skk_dictionary.cpp +--- scim-skk-0.5.2~/src/scim_skk_dictionary.cpp 2005-12-18 22:02:39.000000000 +0900 ++++ scim-skk-0.5.2/src/scim_skk_dictionary.cpp 2006-06-18 18:12:15.000000000 +0900 +@@ -543,9 +543,11 @@ + UserDict::write (const WideString &key, const CandPair &data) + { + list<CandPair> &cl = m_dictdata[key]; +- for (list<CandPair>::iterator it = cl.begin(); it != cl.end(); it++) { ++ for (list<CandPair>::iterator it = cl.begin(); it != cl.end();) { + if (it->first == data.first) { +- cl.erase(it); ++ it = cl.erase(it); ++ } else { ++ ++it; + } + } + cl.push_front(data); diff -Nru scim-skk-0.5.2/debian/patches/20_gcc-4.3-fixes.dpatch scim-skk- 0.5.2/debian/patches/20_gcc-4.3-fixes.dpatch --- scim-skk-0.5.2/debian/patches/20_gcc-4.3-fixes.dpatch 2022-06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/patches/20_gcc-4.3-fixes.dpatch 1969-12-31 19:00:00.000000000 -0500 @@ -1,17 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 20_gcc-4.3-fixes.dpatch by Cyril Brulebois <cyril.bruleb...@enst-bretagne.fr> -## -## DP: fix for building with gcc-4.3 (bug #455270) - -@DPATCH@ -diff -urNad scim-skk-0.5.2~/src/scim_skk_imengine_setup.cpp scim-skk- 0.5.2/src/scim_skk_imengine_setup.cpp ---- scim-skk-0.5.2~/src/scim_skk_imengine_setup.cpp 2008-04-05 01:26:25.000000000 +0200 -+++ scim-skk-0.5.2/src/scim_skk_imengine_setup.cpp 2008-04-05 01:27:27.000000000 +0200 -@@ -32,6 +32,7 @@ - #endif - - #include <vector> -+#include <cstring> - - #include <scim.h> - #include <gtk/scimkeyselection.h> diff -Nru scim-skk-0.5.2/debian/patches/20_gcc-4.3-fixes.patch scim-skk- 0.5.2/debian/patches/20_gcc-4.3-fixes.patch --- scim-skk-0.5.2/debian/patches/20_gcc-4.3-fixes.patch 1969-12-31 19:00:00.000000000 -0500 +++ scim-skk-0.5.2/debian/patches/20_gcc-4.3-fixes.patch 2022-06-12 20:23:35.000000000 -0400 @@ -0,0 +1,15 @@ +From: Cyril Brulebois <cyril.bruleb...@enst-bretagne.fr> +Subject: gcc-4.3 fixes + +--- +diff -urNad scim-skk-0.5.2~/src/scim_skk_imengine_setup.cpp scim-skk- 0.5.2/src/scim_skk_imengine_setup.cpp +--- scim-skk-0.5.2~/src/scim_skk_imengine_setup.cpp 2008-04-05 01:26:25.000000000 +0200 ++++ scim-skk-0.5.2/src/scim_skk_imengine_setup.cpp 2008-04-05 01:27:27.000000000 +0200 +@@ -32,6 +32,7 @@ + #endif + + #include <vector> ++#include <cstring> + + #include <scim.h> + #include <gtk/scimkeyselection.h> diff -Nru scim-skk-0.5.2/debian/patches/99_fix_ftbfs_gtk.dpatch scim-skk- 0.5.2/debian/patches/99_fix_ftbfs_gtk.dpatch --- scim-skk-0.5.2/debian/patches/99_fix_ftbfs_gtk.dpatch 2022-06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/patches/99_fix_ftbfs_gtk.dpatch 1969-12-31 19:00:00.000000000 -0500 @@ -1,550 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -# Tz-Huan Huang <tzh...@gmail.com> -# DP: FTBFS: scim_skk_setup_dictionaries.cpp:21:21: fatal error: gtk/gtk.h: No such file or directory -# BTS: 676014 - -@DPATCH@ -diff --git a/src/scim_skk_imengine_setup.cpp b/src/scim_skk_imengine_setup.cpp -index f881e33..47b5c16 100644 ---- a/src/scim_skk_imengine_setup.cpp -+++ b/src/scim_skk_imengine_setup.cpp -@@ -179,7 +179,10 @@ static GtkWidget * __widget_annot_target = 0; - static GtkWidget * __widget_annot_highlight = 0; - static GtkWidget * __widget_ignore_return = 0; - static GtkWidget * __widget_selection_style = 0; -+#if GTK_CHECK_VERSION(2, 12, 0) -+#else - static GtkTooltips * __widget_tooltips = 0; -+#endif - - static KeyboardConfigData __config_keyboards_common [] = - { -@@ -477,25 +480,43 @@ create_combo_widget (const char *label_text, GtkWidget **widget, - { - GtkWidget *hbox, *label; - -+#if GTK_CHECK_VERSION(3, 0, 0) -+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else - hbox = gtk_hbox_new (FALSE, 0); -+#endif - gtk_widget_show (hbox); - - label = gtk_label_new (label_text); - gtk_widget_show (label); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 4); - -+#if GTK_CHECK_VERSION(2, 4, 0) -+ *widget = gtk_combo_box_text_new_with_entry (); -+ gtk_editable_set_editable ( -+ GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (*widget))), FALSE); -+#else - *widget = gtk_combo_new (); - gtk_combo_set_value_in_list (GTK_COMBO (*widget), TRUE, FALSE); - gtk_combo_set_case_sensitive (GTK_COMBO (*widget), TRUE); -- gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (*widget)->entry), FALSE); -+ gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (*widget)->entry), FALSE); -+#endif - gtk_widget_show (*widget); - gtk_box_pack_start (GTK_BOX (hbox), *widget, FALSE, FALSE, 4); -+#if GTK_CHECK_VERSION(2, 4, 0) -+ g_object_set_data (G_OBJECT (gtk_bin_get_child (GTK_BIN (*widget))), DATA_POINTER_KEY, -+ (gpointer) candidates_p); -+ g_signal_connect ((gpointer) gtk_bin_get_child (GTK_BIN (*widget)), "changed", -+ G_CALLBACK (on_default_combo_changed), -+ data_p); -+#else - g_object_set_data (G_OBJECT (GTK_COMBO (*widget)->entry), DATA_POINTER_KEY, - (gpointer) candidates_p); -- - g_signal_connect ((gpointer) GTK_COMBO (*widget)->entry, "changed", - G_CALLBACK (on_default_combo_changed), - data_p); -+#endif -+ - - return hbox; - } -@@ -506,7 +527,11 @@ create_color_button (ColorConfigData *entry) - GtkWidget *hbox, *label = NULL; - if (!entry) return NULL; - -+#if GTK_CHECK_VERSION(3, 0, 0) -+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else - hbox = gtk_hbox_new (FALSE, 0); -+#endif - gtk_widget_show (hbox); - - if (entry->label) { -@@ -528,11 +553,18 @@ create_color_button (ColorConfigData *entry) - if (label) - gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry->widget); - -+#if GTK_CHECK_VERSION(2, 12, 0) -+#else - 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 hbox; - } -@@ -558,7 +590,11 @@ create_options_page () - GtkWidget *annot_widgets, *bgcolor_widgets; - gchar *markup; - -+#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); - - /* title 1 */ -@@ -574,7 +610,11 @@ create_options_page () - - - /* list size */ -- widget = gtk_hbox_new(FALSE, 0); -+#if GTK_CHECK_VERSION(3, 0, 0) -+ widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else -+ widget = gtk_hbox_new (FALSE, 0); -+#endif - label = gtk_label_new (_("List Size:")); - __widget_listsize = gtk_spin_button_new_with_range(0, 100, 1); - gtk_spin_button_set_digits(GTK_SPIN_BUTTON (__widget_listsize), 0); -@@ -601,7 +641,11 @@ create_options_page () - gtk_box_pack_start (GTK_BOX (vbox), __widget_annot_view, FALSE, FALSE, 1); - gtk_container_set_border_width (GTK_CONTAINER (__widget_annot_view), 0); - -+#if GTK_CHECK_VERSION(3, 0, 0) -+ annot_widgets = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -+#else - annot_widgets = gtk_vbox_new(FALSE, 0); -+#endif - gtk_box_pack_start (GTK_BOX(vbox), annot_widgets, FALSE, FALSE, 1); - gtk_widget_show(annot_widgets); - widget = create_combo_widget (_("Position of Annotation:"), -@@ -619,7 +663,11 @@ create_options_page () - gtk_box_pack_start (GTK_BOX (annot_widgets), widget, FALSE, FALSE, 1); - - /* annotation color */ -+#if GTK_CHECK_VERSION(3, 0, 0) -+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else - hbox = gtk_hbox_new(FALSE, 0); -+#endif - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 1); - gtk_widget_show(hbox); - __widget_annot_highlight = gtk_check_button_new_with_mnemonic(_("Highlight Annotation.")); -@@ -655,26 +703,38 @@ create_dictionary_page () - { - GtkWidget *vbox, *widget, *label, *button; - -+#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); - - /* system dictionaries */ - __widget_sysdicts = dict_selection_widget_setup(); - gtk_box_pack_start (GTK_BOX (vbox), __widget_sysdicts, FALSE, FALSE, 4); -+#if GTK_CHECK_VERSION(3, 2, 0) -+ widget = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); -+#else - widget = gtk_hseparator_new(); -+#endif - gtk_widget_show(widget); - gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0); - - /* user dictionary */ -- widget = gtk_hbox_new(FALSE, 0); -- label = gtk_label_new(_("User Dictionary Name:")); -- __widget_userdict = gtk_entry_new(); -- gtk_widget_show(label); -- gtk_widget_show(__widget_userdict); -+#if GTK_CHECK_VERSION(3, 0, 0) -+ widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else -+ widget = gtk_hbox_new (FALSE, 0); -+#endif -+ label = gtk_label_new (_("User Dictionary Name:")); -+ __widget_userdict = gtk_entry_new (); -+ gtk_widget_show (label); -+ gtk_widget_show (__widget_userdict); - gtk_box_pack_start (GTK_BOX (widget), label, FALSE, FALSE, 4); - gtk_box_pack_start (GTK_BOX (widget), __widget_userdict, TRUE, TRUE, 4); - gtk_label_set_mnemonic_widget (GTK_LABEL (label), __widget_userdict); -- gtk_widget_show(widget); -+ gtk_widget_show (widget); - gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 4); - - g_signal_connect ((gpointer) __widget_userdict, "changed", -@@ -720,7 +780,7 @@ create_keyboard_page (unsigned int page) - // Create keyboard setting. - for (unsigned int i = 0; data[i].key; ++ i) { - APPEND_ENTRY(_(data[i].label), data[i].entry, i); -- gtk_entry_set_editable (GTK_ENTRY (data[i].entry), FALSE); -+ gtk_editable_set_editable (GTK_EDITABLE (data[i].entry), FALSE); - - data[i].button = gtk_button_new_with_label ("..."); - gtk_widget_show (data[i].button); -@@ -739,11 +799,18 @@ create_keyboard_page (unsigned int page) - &(data[i].data)); - } - -+#if GTK_CHECK_VERSION(2, 12, 0) -+#else - if (!__widget_tooltips) - __widget_tooltips = gtk_tooltips_new(); -+#endif - for (unsigned int i = 0; data[i].key; ++ i) { -+#if GTK_CHECK_VERSION(2, 12, 0) -+ gtk_widget_set_tooltip_text (data[i].entry, _(data[i].tooltip)); -+#else - gtk_tooltips_set_tip (__widget_tooltips, data[i].entry, - _(data[i].tooltip), NULL); -+#endif - } - - return table; -@@ -835,9 +907,19 @@ create_setup_window () - } - - static void --setup_combo_value (GtkCombo *combo, -+setup_combo_value (GtkWidget *combo, - ComboConfigData *data, const String & str) - { -+#if GTK_CHECK_VERSION(2, 4, 0) -+ gint default_index = -1; -+ for (gint 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; - -@@ -852,23 +934,24 @@ setup_combo_value (GtkCombo *combo, - - if (defval) - gtk_entry_set_text (GTK_ENTRY (combo->entry), defval); -+#endif - } - - static void - setup_widget_value () - { - if (__widget_selection_style) { -- setup_combo_value (GTK_COMBO (__widget_selection_style), -+ setup_combo_value (__widget_selection_style, - selection_style, __config_selection_style); - } - - if (__widget_annot_pos) { -- setup_combo_value (GTK_COMBO (__widget_annot_pos), -+ setup_combo_value (__widget_annot_pos, - annot_position, __config_annot_pos); - } - - if (__widget_annot_target) { -- setup_combo_value (GTK_COMBO (__widget_annot_target), -+ setup_combo_value (__widget_annot_target, - annot_target, __config_annot_target); - } - -@@ -1107,6 +1190,29 @@ on_default_file_selection_clicked (GtkButton *button, - FileConfigData *data = static_cast <FileConfigData *> (user_data); - - if (data) { -+#if GTK_CHECK_VERSION(2, 4, 0) -+ GtkWidget *dialog = gtk_file_chooser_dialog_new( -+ _(data->title), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, -+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, -+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, -+ NULL); -+ gtk_file_chooser_set_filename ( -+ GTK_FILE_CHOOSER (dialog), -+ gtk_entry_get_text (GTK_ENTRY (data->entry))); -+ -+ if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { -+ char *filename; -+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); -+ gtk_entry_set_text (GTK_ENTRY (data->entry), filename); -+ if (strcmp (filename, gtk_entry_get_text (GTK_ENTRY (data- >entry))) != 0) { -+ gtk_entry_set_text (GTK_ENTRY (data->entry), filename); -+ data->data = filename; -+ __have_changed = true; -+ } -+ g_free (filename); -+ } -+ gtk_widget_destroy (dialog); -+#else - GtkWidget *dialog = gtk_file_selection_new (_(data->title)); - gint result; - -@@ -1129,6 +1235,7 @@ on_default_file_selection_clicked (GtkButton *button, - } - - gtk_widget_destroy (dialog); -+#endif - } - } - -diff --git a/src/scim_skk_setup_dictionaries.cpp b/src/scim_skk_setup_dictionaries.cpp -index 6050165..5f9dd1f 100644 ---- a/src/scim_skk_setup_dictionaries.cpp -+++ b/src/scim_skk_setup_dictionaries.cpp -@@ -59,7 +59,7 @@ enum DictColumnType { - }; - - struct DictionaryConfigWidgets { -- gchar *title; -+ const gchar *title; - GtkWidget *widget; - GtkWidget *entry; - GtkWidget *button; -@@ -170,7 +170,11 @@ inline void - dict_entry_widgets_dictfile_setup (DictionaryConfigWidgets *widgets) - { - GtkWidget *label; -+#if GTK_CHECK_VERSION(3, 0, 0) -+ widgets->widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else - widgets->widget = gtk_hbox_new(FALSE, 0); -+#endif - label = gtk_label_new(widgets->title); - widgets->entry = gtk_entry_new(); - widgets->button = gtk_button_new_with_label ("..."); -@@ -195,8 +199,13 @@ dict_entry_widgets_skkserv_setup (DictionaryConfigWidgets *widgets) - { - GtkWidget *hbox, *label; - -+#if GTK_CHECK_VERSION(3, 0, 0) -+ widgets->widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else - widgets->widget = gtk_vbox_new(FALSE, 0); - hbox = gtk_hbox_new(FALSE, 0); -+#endif - gtk_widget_hide(widgets->widget); - label = gtk_label_new(_("Server Name:")); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); -@@ -205,7 +214,11 @@ dict_entry_widgets_skkserv_setup (DictionaryConfigWidgets *widgets) - TRUE, TRUE, 4); - gtk_box_pack_start(GTK_BOX(widgets->widget), hbox, - FALSE, FALSE, 4); -+#if GTK_CHECK_VERSION(3, 0, 0) -+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else - hbox = gtk_hbox_new(FALSE, 0); -+#endif - label = gtk_label_new(_("Port Number:")); - widgets->entry2 = gtk_entry_new(); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); -@@ -224,7 +237,11 @@ dict_entry_widgets_setup (GtkBox *container, - GtkWidget *button; - - /* edit buttons */ -+#if GTK_CHECK_VERSION(3, 0, 0) -+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else - hbox = gtk_hbox_new(FALSE, 0); -+#endif - button = gtk_button_new_with_label(_("Add")); - gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 4); - g_signal_connect((gpointer) button, "clicked", -@@ -245,7 +262,11 @@ dict_selection_widget_setup (void) - { - GtkWidget *tree; - -+#if GTK_CHECK_VERSION(3, 0, 0) -+ __widget_sysdicts = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -+#else - __widget_sysdicts = gtk_vbox_new(FALSE, 0); -+#endif - dict_list_setup(__config_sysdicts); - - /* setup container for dictionaries selection */ -@@ -257,10 +278,18 @@ dict_selection_widget_setup (void) - - { - GtkWidget *hbox, *vbox, *button; -+#if GTK_CHECK_VERSION(3, 0, 0) -+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else - hbox = gtk_hbox_new(FALSE, 0); -+#endif - gtk_widget_show(hbox); - gtk_box_pack_start(GTK_BOX(hbox), tree, TRUE, TRUE, 4); -+#if GTK_CHECK_VERSION(3, 0, 0) -+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -+#else - vbox = gtk_vbox_new(FALSE, 0); -+#endif - button = gtk_button_new_from_stock(GTK_STOCK_GO_UP); - gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 4); - g_signal_connect((gpointer) button, "clicked", -@@ -301,6 +330,24 @@ file_selection_clicked_cb (GtkButton *button, - DictionaryConfigWidgets *data = static_cast <DictionaryConfigWidgets *> (user_data); - - if (data) { -+#if GTK_CHECK_VERSION(2, 4, 0) -+ GtkWidget *dialog = gtk_file_chooser_dialog_new ( -+ _(data->title), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, -+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, -+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, -+ NULL); -+ gtk_file_chooser_set_filename ( -+ GTK_FILE_CHOOSER (dialog), -+ gtk_entry_get_text (GTK_ENTRY (data->entry))); -+ -+ if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { -+ char *filename; -+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); -+ gtk_entry_set_text (GTK_ENTRY (data->entry), filename); -+ g_free (filename); -+ } -+ gtk_widget_destroy (dialog); -+#else - GtkWidget *dialog = gtk_file_selection_new (_(data->title)); - gint result; - -@@ -318,6 +365,7 @@ file_selection_clicked_cb (GtkButton *button, - } - - gtk_widget_destroy (dialog); -+#endif - } - } - -@@ -325,12 +373,20 @@ static void - dict_type_changed_cb (GtkComboBox *combo, - gpointer userdata) - { -+#if GTK_CHECK_VERSION(2, 24, 0) -+ gchar *typetext = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT (combo)); -+#else - gchar *typetext = gtk_combo_box_get_active_text(combo); -+#endif - for (int i = 0; __dict_type_names[i] != ""; i++) { - if (__dict_type_names[i] == typetext) { - gtk_widget_show_all(__widgets_dicts[i].widget); - } else { -+#if GTK_CHECK_VERSION(2, 24, 0) -+ gtk_widget_hide(__widgets_dicts[i].widget); -+#else - gtk_widget_hide_all(__widgets_dicts[i].widget); -+#endif - } - } - gtk_entry_set_text(GTK_ENTRY(__widgets_dicts[0].entry), ""); -@@ -351,37 +407,74 @@ dict_list_add_clicked_cb (GtkButton *button, - gtk_window_set_title(GTK_WINDOW(dialog), - _("Add new dictionary")); - -+#if GTK_CHECK_VERSION(3, 0, 0) -+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -+#else - hbox = gtk_hbox_new(FALSE, 0); -+#endif - gtk_widget_show(hbox); - label = gtk_label_new(_("Dictionary Type: ")); - gtk_widget_show(label); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); -+#if GTK_CHECK_VERSION(2, 24, 0) -+ __combo_box_dict_types = gtk_combo_box_text_new(); -+#else - __combo_box_dict_types = gtk_combo_box_new_text(); -+#endif - for (int i = 0; !__dict_type_names[i].empty(); i++) { -+#if GTK_CHECK_VERSION(2, 24, 0) -+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (__combo_box_dict_types), -+ __dict_type_names[i].data()); -+#else - gtk_combo_box_append_text(GTK_COMBO_BOX(__combo_box_dict_types), - __dict_type_names[i].data()); -+#endif - } - g_signal_connect((gpointer) __combo_box_dict_types, "changed", - G_CALLBACK(dict_type_changed_cb), - NULL); - gtk_widget_show(__combo_box_dict_types); - gtk_box_pack_start(GTK_BOX(hbox), __combo_box_dict_types, FALSE, TRUE, 4); -+#if GTK_CHECK_VERSION(3, 0, 0) -+ gtk_box_pack_start( -+ GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), -+ hbox, FALSE, FALSE, 4); -+#else - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 4); -+#endif - - /* dictionary file widgets */ - dict_entry_widgets_dictfile_setup(&(__widgets_dicts[0])); -+#if GTK_CHECK_VERSION(3, 0, 0) -+ gtk_box_pack_start( -+ GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), -+ __widgets_dicts[0].widget, TRUE, TRUE, 4); -+#else - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[0].widget, - TRUE, FALSE, 4); -+#endif - - /* skkserv widgets */ - dict_entry_widgets_skkserv_setup(&__widgets_dicts[1]); -+#if GTK_CHECK_VERSION(3, 0, 0) -+ gtk_box_pack_start( -+ GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), -+ __widgets_dicts[1].widget, TRUE, FALSE, 4); -+#else - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[1].widget, - TRUE, FALSE, 4); -+#endif - - /* dictionary file widgets */ - dict_entry_widgets_dictfile_setup(&__widgets_dicts[2]); -+#if GTK_CHECK_VERSION(3, 0, 0) -+ gtk_box_pack_start( -+ GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), -+ __widgets_dicts[2].widget, TRUE, FALSE, 4); -+#else - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[2].widget, - TRUE, FALSE, 4); -+#endif - - gtk_combo_box_set_active(GTK_COMBO_BOX(__combo_box_dict_types), 0); - -@@ -392,12 +485,19 @@ dict_list_add_clicked_cb (GtkButton *button, - _("Add"), - GTK_RESPONSE_OK); - gtk_widget_grab_default(ok_button); -+#if GTK_CHECK_VERSION(2, 22, 0) -+#else - gtk_dialog_set_has_separator(GTK_DIALOG(dialog), TRUE); -+#endif - gtk_widget_show(dialog); - - result = gtk_dialog_run(GTK_DIALOG(dialog)); - if (result == GTK_RESPONSE_OK) { -+#if GTK_CHECK_VERSION(2, 24, 0) -+ String dict_type = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(__combo_box_dict_types)) ; -+#else - String dict_type = gtk_combo_box_get_active_text(GTK_COMBO_BOX(__combo_box_dict_types)); -+#endif - String dict_name; - GtkTreeIter iter; - GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(userdata)); diff -Nru scim-skk-0.5.2/debian/patches/99_fix_ftbfs_gtk.patch scim-skk- 0.5.2/debian/patches/99_fix_ftbfs_gtk.patch --- scim-skk-0.5.2/debian/patches/99_fix_ftbfs_gtk.patch 1969-12-31 19:00:00.000000000 -0500 +++ scim-skk-0.5.2/debian/patches/99_fix_ftbfs_gtk.patch 2022-06-12 20:23:35.000000000 -0400 @@ -0,0 +1,552 @@ +From: Tz-Huan Huang <tzh...@gmail.com> +Subject: bug676014 + +FTBFS: scim_skk_setup_dictionaries.cpp:21:21: fatal error: gtk/gtk.h: No such file or directory + +Bug-Debian: https://bugs.debian.org/676014 + +--- +diff --git a/src/scim_skk_imengine_setup.cpp b/src/scim_skk_imengine_setup.cpp +index f881e33..47b5c16 100644 +--- a/src/scim_skk_imengine_setup.cpp ++++ b/src/scim_skk_imengine_setup.cpp +@@ -179,7 +179,10 @@ static GtkWidget * __widget_annot_target = 0; + static GtkWidget * __widget_annot_highlight = 0; + static GtkWidget * __widget_ignore_return = 0; + static GtkWidget * __widget_selection_style = 0; ++#if GTK_CHECK_VERSION(2, 12, 0) ++#else + static GtkTooltips * __widget_tooltips = 0; ++#endif + + static KeyboardConfigData __config_keyboards_common [] = + { +@@ -477,25 +480,43 @@ create_combo_widget (const char *label_text, GtkWidget **widget, + { + GtkWidget *hbox, *label; + ++#if GTK_CHECK_VERSION(3, 0, 0) ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else + hbox = gtk_hbox_new (FALSE, 0); ++#endif + gtk_widget_show (hbox); + + label = gtk_label_new (label_text); + gtk_widget_show (label); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 4); + ++#if GTK_CHECK_VERSION(2, 4, 0) ++ *widget = gtk_combo_box_text_new_with_entry (); ++ gtk_editable_set_editable ( ++ GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (*widget))), FALSE); ++#else + *widget = gtk_combo_new (); + gtk_combo_set_value_in_list (GTK_COMBO (*widget), TRUE, FALSE); + gtk_combo_set_case_sensitive (GTK_COMBO (*widget), TRUE); +- gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (*widget)->entry), FALSE); ++ gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (*widget)->entry), FALSE); ++#endif + gtk_widget_show (*widget); + gtk_box_pack_start (GTK_BOX (hbox), *widget, FALSE, FALSE, 4); ++#if GTK_CHECK_VERSION(2, 4, 0) ++ g_object_set_data (G_OBJECT (gtk_bin_get_child (GTK_BIN (*widget))), DATA_POINTER_KEY, ++ (gpointer) candidates_p); ++ g_signal_connect ((gpointer) gtk_bin_get_child (GTK_BIN (*widget)), "changed", ++ G_CALLBACK (on_default_combo_changed), ++ data_p); ++#else + g_object_set_data (G_OBJECT (GTK_COMBO (*widget)->entry), DATA_POINTER_KEY, + (gpointer) candidates_p); +- + g_signal_connect ((gpointer) GTK_COMBO (*widget)->entry, "changed", + G_CALLBACK (on_default_combo_changed), + data_p); ++#endif ++ + + return hbox; + } +@@ -506,7 +527,11 @@ create_color_button (ColorConfigData *entry) + GtkWidget *hbox, *label = NULL; + if (!entry) return NULL; + ++#if GTK_CHECK_VERSION(3, 0, 0) ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else + hbox = gtk_hbox_new (FALSE, 0); ++#endif + gtk_widget_show (hbox); + + if (entry->label) { +@@ -528,11 +553,18 @@ create_color_button (ColorConfigData *entry) + if (label) + gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry->widget); + ++#if GTK_CHECK_VERSION(2, 12, 0) ++#else + 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 hbox; + } +@@ -558,7 +590,11 @@ create_options_page () + GtkWidget *annot_widgets, *bgcolor_widgets; + gchar *markup; + ++#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); + + /* title 1 */ +@@ -574,7 +610,11 @@ create_options_page () + + + /* list size */ +- widget = gtk_hbox_new(FALSE, 0); ++#if GTK_CHECK_VERSION(3, 0, 0) ++ widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else ++ widget = gtk_hbox_new (FALSE, 0); ++#endif + label = gtk_label_new (_("List Size:")); + __widget_listsize = gtk_spin_button_new_with_range(0, 100, 1); + gtk_spin_button_set_digits(GTK_SPIN_BUTTON (__widget_listsize), 0); +@@ -601,7 +641,11 @@ create_options_page () + gtk_box_pack_start (GTK_BOX (vbox), __widget_annot_view, FALSE, FALSE, 1); + gtk_container_set_border_width (GTK_CONTAINER (__widget_annot_view), 0); + ++#if GTK_CHECK_VERSION(3, 0, 0) ++ annot_widgets = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); ++#else + annot_widgets = gtk_vbox_new(FALSE, 0); ++#endif + gtk_box_pack_start (GTK_BOX(vbox), annot_widgets, FALSE, FALSE, 1); + gtk_widget_show(annot_widgets); + widget = create_combo_widget (_("Position of Annotation:"), +@@ -619,7 +663,11 @@ create_options_page () + gtk_box_pack_start (GTK_BOX (annot_widgets), widget, FALSE, FALSE, 1); + + /* annotation color */ ++#if GTK_CHECK_VERSION(3, 0, 0) ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else + hbox = gtk_hbox_new(FALSE, 0); ++#endif + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 1); + gtk_widget_show(hbox); + __widget_annot_highlight = gtk_check_button_new_with_mnemonic(_("Highlight Annotation.")); +@@ -655,26 +703,38 @@ create_dictionary_page () + { + GtkWidget *vbox, *widget, *label, *button; + ++#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); + + /* system dictionaries */ + __widget_sysdicts = dict_selection_widget_setup(); + gtk_box_pack_start (GTK_BOX (vbox), __widget_sysdicts, FALSE, FALSE, 4); ++#if GTK_CHECK_VERSION(3, 2, 0) ++ widget = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); ++#else + widget = gtk_hseparator_new(); ++#endif + gtk_widget_show(widget); + gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0); + + /* user dictionary */ +- widget = gtk_hbox_new(FALSE, 0); +- label = gtk_label_new(_("User Dictionary Name:")); +- __widget_userdict = gtk_entry_new(); +- gtk_widget_show(label); +- gtk_widget_show(__widget_userdict); ++#if GTK_CHECK_VERSION(3, 0, 0) ++ widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else ++ widget = gtk_hbox_new (FALSE, 0); ++#endif ++ label = gtk_label_new (_("User Dictionary Name:")); ++ __widget_userdict = gtk_entry_new (); ++ gtk_widget_show (label); ++ gtk_widget_show (__widget_userdict); + gtk_box_pack_start (GTK_BOX (widget), label, FALSE, FALSE, 4); + gtk_box_pack_start (GTK_BOX (widget), __widget_userdict, TRUE, TRUE, 4); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), __widget_userdict); +- gtk_widget_show(widget); ++ gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 4); + + g_signal_connect ((gpointer) __widget_userdict, "changed", +@@ -720,7 +780,7 @@ create_keyboard_page (unsigned int page) + // Create keyboard setting. + for (unsigned int i = 0; data[i].key; ++ i) { + APPEND_ENTRY(_(data[i].label), data[i].entry, i); +- gtk_entry_set_editable (GTK_ENTRY (data[i].entry), FALSE); ++ gtk_editable_set_editable (GTK_EDITABLE (data[i].entry), FALSE); + + data[i].button = gtk_button_new_with_label ("..."); + gtk_widget_show (data[i].button); +@@ -739,11 +799,18 @@ create_keyboard_page (unsigned int page) + &(data[i].data)); + } + ++#if GTK_CHECK_VERSION(2, 12, 0) ++#else + if (!__widget_tooltips) + __widget_tooltips = gtk_tooltips_new(); ++#endif + for (unsigned int i = 0; data[i].key; ++ i) { ++#if GTK_CHECK_VERSION(2, 12, 0) ++ gtk_widget_set_tooltip_text (data[i].entry, _(data[i].tooltip)); ++#else + gtk_tooltips_set_tip (__widget_tooltips, data[i].entry, + _(data[i].tooltip), NULL); ++#endif + } + + return table; +@@ -835,9 +907,19 @@ create_setup_window () + } + + static void +-setup_combo_value (GtkCombo *combo, ++setup_combo_value (GtkWidget *combo, + ComboConfigData *data, const String & str) + { ++#if GTK_CHECK_VERSION(2, 4, 0) ++ gint default_index = -1; ++ for (gint 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; + +@@ -852,23 +934,24 @@ setup_combo_value (GtkCombo *combo, + + if (defval) + gtk_entry_set_text (GTK_ENTRY (combo->entry), defval); ++#endif + } + + static void + setup_widget_value () + { + if (__widget_selection_style) { +- setup_combo_value (GTK_COMBO (__widget_selection_style), ++ setup_combo_value (__widget_selection_style, + selection_style, __config_selection_style); + } + + if (__widget_annot_pos) { +- setup_combo_value (GTK_COMBO (__widget_annot_pos), ++ setup_combo_value (__widget_annot_pos, + annot_position, __config_annot_pos); + } + + if (__widget_annot_target) { +- setup_combo_value (GTK_COMBO (__widget_annot_target), ++ setup_combo_value (__widget_annot_target, + annot_target, __config_annot_target); + } + +@@ -1107,6 +1190,29 @@ on_default_file_selection_clicked (GtkButton *button, + FileConfigData *data = static_cast <FileConfigData *> (user_data); + + if (data) { ++#if GTK_CHECK_VERSION(2, 4, 0) ++ GtkWidget *dialog = gtk_file_chooser_dialog_new( ++ _(data->title), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, ++ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, ++ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, ++ NULL); ++ gtk_file_chooser_set_filename ( ++ GTK_FILE_CHOOSER (dialog), ++ gtk_entry_get_text (GTK_ENTRY (data->entry))); ++ ++ if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { ++ char *filename; ++ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); ++ gtk_entry_set_text (GTK_ENTRY (data->entry), filename); ++ if (strcmp (filename, gtk_entry_get_text (GTK_ENTRY (data- >entry))) != 0) { ++ gtk_entry_set_text (GTK_ENTRY (data->entry), filename); ++ data->data = filename; ++ __have_changed = true; ++ } ++ g_free (filename); ++ } ++ gtk_widget_destroy (dialog); ++#else + GtkWidget *dialog = gtk_file_selection_new (_(data->title)); + gint result; + +@@ -1129,6 +1235,7 @@ on_default_file_selection_clicked (GtkButton *button, + } + + gtk_widget_destroy (dialog); ++#endif + } + } + +diff --git a/src/scim_skk_setup_dictionaries.cpp b/src/scim_skk_setup_dictionaries.cpp +index 6050165..5f9dd1f 100644 +--- a/src/scim_skk_setup_dictionaries.cpp ++++ b/src/scim_skk_setup_dictionaries.cpp +@@ -59,7 +59,7 @@ enum DictColumnType { + }; + + struct DictionaryConfigWidgets { +- gchar *title; ++ const gchar *title; + GtkWidget *widget; + GtkWidget *entry; + GtkWidget *button; +@@ -170,7 +170,11 @@ inline void + dict_entry_widgets_dictfile_setup (DictionaryConfigWidgets *widgets) + { + GtkWidget *label; ++#if GTK_CHECK_VERSION(3, 0, 0) ++ widgets->widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else + widgets->widget = gtk_hbox_new(FALSE, 0); ++#endif + label = gtk_label_new(widgets->title); + widgets->entry = gtk_entry_new(); + widgets->button = gtk_button_new_with_label ("..."); +@@ -195,8 +199,13 @@ dict_entry_widgets_skkserv_setup (DictionaryConfigWidgets *widgets) + { + GtkWidget *hbox, *label; + ++#if GTK_CHECK_VERSION(3, 0, 0) ++ widgets->widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else + widgets->widget = gtk_vbox_new(FALSE, 0); + hbox = gtk_hbox_new(FALSE, 0); ++#endif + gtk_widget_hide(widgets->widget); + label = gtk_label_new(_("Server Name:")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); +@@ -205,7 +214,11 @@ dict_entry_widgets_skkserv_setup (DictionaryConfigWidgets *widgets) + TRUE, TRUE, 4); + gtk_box_pack_start(GTK_BOX(widgets->widget), hbox, + FALSE, FALSE, 4); ++#if GTK_CHECK_VERSION(3, 0, 0) ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else + hbox = gtk_hbox_new(FALSE, 0); ++#endif + label = gtk_label_new(_("Port Number:")); + widgets->entry2 = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); +@@ -224,7 +237,11 @@ dict_entry_widgets_setup (GtkBox *container, + GtkWidget *button; + + /* edit buttons */ ++#if GTK_CHECK_VERSION(3, 0, 0) ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else + hbox = gtk_hbox_new(FALSE, 0); ++#endif + button = gtk_button_new_with_label(_("Add")); + gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 4); + g_signal_connect((gpointer) button, "clicked", +@@ -245,7 +262,11 @@ dict_selection_widget_setup (void) + { + GtkWidget *tree; + ++#if GTK_CHECK_VERSION(3, 0, 0) ++ __widget_sysdicts = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); ++#else + __widget_sysdicts = gtk_vbox_new(FALSE, 0); ++#endif + dict_list_setup(__config_sysdicts); + + /* setup container for dictionaries selection */ +@@ -257,10 +278,18 @@ dict_selection_widget_setup (void) + + { + GtkWidget *hbox, *vbox, *button; ++#if GTK_CHECK_VERSION(3, 0, 0) ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else + hbox = gtk_hbox_new(FALSE, 0); ++#endif + gtk_widget_show(hbox); + gtk_box_pack_start(GTK_BOX(hbox), tree, TRUE, TRUE, 4); ++#if GTK_CHECK_VERSION(3, 0, 0) ++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); ++#else + vbox = gtk_vbox_new(FALSE, 0); ++#endif + button = gtk_button_new_from_stock(GTK_STOCK_GO_UP); + gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 4); + g_signal_connect((gpointer) button, "clicked", +@@ -301,6 +330,24 @@ file_selection_clicked_cb (GtkButton *button, + DictionaryConfigWidgets *data = static_cast <DictionaryConfigWidgets *> (user_data); + + if (data) { ++#if GTK_CHECK_VERSION(2, 4, 0) ++ GtkWidget *dialog = gtk_file_chooser_dialog_new ( ++ _(data->title), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, ++ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, ++ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, ++ NULL); ++ gtk_file_chooser_set_filename ( ++ GTK_FILE_CHOOSER (dialog), ++ gtk_entry_get_text (GTK_ENTRY (data->entry))); ++ ++ if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { ++ char *filename; ++ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); ++ gtk_entry_set_text (GTK_ENTRY (data->entry), filename); ++ g_free (filename); ++ } ++ gtk_widget_destroy (dialog); ++#else + GtkWidget *dialog = gtk_file_selection_new (_(data->title)); + gint result; + +@@ -318,6 +365,7 @@ file_selection_clicked_cb (GtkButton *button, + } + + gtk_widget_destroy (dialog); ++#endif + } + } + +@@ -325,12 +373,20 @@ static void + dict_type_changed_cb (GtkComboBox *combo, + gpointer userdata) + { ++#if GTK_CHECK_VERSION(2, 24, 0) ++ gchar *typetext = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT (combo)); ++#else + gchar *typetext = gtk_combo_box_get_active_text(combo); ++#endif + for (int i = 0; __dict_type_names[i] != ""; i++) { + if (__dict_type_names[i] == typetext) { + gtk_widget_show_all(__widgets_dicts[i].widget); + } else { ++#if GTK_CHECK_VERSION(2, 24, 0) ++ gtk_widget_hide(__widgets_dicts[i].widget); ++#else + gtk_widget_hide_all(__widgets_dicts[i].widget); ++#endif + } + } + gtk_entry_set_text(GTK_ENTRY(__widgets_dicts[0].entry), ""); +@@ -351,37 +407,74 @@ dict_list_add_clicked_cb (GtkButton *button, + gtk_window_set_title(GTK_WINDOW(dialog), + _("Add new dictionary")); + ++#if GTK_CHECK_VERSION(3, 0, 0) ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++#else + hbox = gtk_hbox_new(FALSE, 0); ++#endif + gtk_widget_show(hbox); + label = gtk_label_new(_("Dictionary Type: ")); + gtk_widget_show(label); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); ++#if GTK_CHECK_VERSION(2, 24, 0) ++ __combo_box_dict_types = gtk_combo_box_text_new(); ++#else + __combo_box_dict_types = gtk_combo_box_new_text(); ++#endif + for (int i = 0; !__dict_type_names[i].empty(); i++) { ++#if GTK_CHECK_VERSION(2, 24, 0) ++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (__combo_box_dict_types), ++ __dict_type_names[i].data()); ++#else + gtk_combo_box_append_text(GTK_COMBO_BOX(__combo_box_dict_types), + __dict_type_names[i].data()); ++#endif + } + g_signal_connect((gpointer) __combo_box_dict_types, "changed", + G_CALLBACK(dict_type_changed_cb), + NULL); + gtk_widget_show(__combo_box_dict_types); + gtk_box_pack_start(GTK_BOX(hbox), __combo_box_dict_types, FALSE, TRUE, 4); ++#if GTK_CHECK_VERSION(3, 0, 0) ++ gtk_box_pack_start( ++ GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), ++ hbox, FALSE, FALSE, 4); ++#else + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 4); ++#endif + + /* dictionary file widgets */ + dict_entry_widgets_dictfile_setup(&(__widgets_dicts[0])); ++#if GTK_CHECK_VERSION(3, 0, 0) ++ gtk_box_pack_start( ++ GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), ++ __widgets_dicts[0].widget, TRUE, TRUE, 4); ++#else + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[0].widget, + TRUE, FALSE, 4); ++#endif + + /* skkserv widgets */ + dict_entry_widgets_skkserv_setup(&__widgets_dicts[1]); ++#if GTK_CHECK_VERSION(3, 0, 0) ++ gtk_box_pack_start( ++ GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), ++ __widgets_dicts[1].widget, TRUE, FALSE, 4); ++#else + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[1].widget, + TRUE, FALSE, 4); ++#endif + + /* dictionary file widgets */ + dict_entry_widgets_dictfile_setup(&__widgets_dicts[2]); ++#if GTK_CHECK_VERSION(3, 0, 0) ++ gtk_box_pack_start( ++ GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), ++ __widgets_dicts[2].widget, TRUE, FALSE, 4); ++#else + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), __widgets_dicts[2].widget, + TRUE, FALSE, 4); ++#endif + + gtk_combo_box_set_active(GTK_COMBO_BOX(__combo_box_dict_types), 0); + +@@ -392,12 +485,19 @@ dict_list_add_clicked_cb (GtkButton *button, + _("Add"), + GTK_RESPONSE_OK); + gtk_widget_grab_default(ok_button); ++#if GTK_CHECK_VERSION(2, 22, 0) ++#else + gtk_dialog_set_has_separator(GTK_DIALOG(dialog), TRUE); ++#endif + gtk_widget_show(dialog); + + result = gtk_dialog_run(GTK_DIALOG(dialog)); + if (result == GTK_RESPONSE_OK) { ++#if GTK_CHECK_VERSION(2, 24, 0) ++ String dict_type = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(__combo_box_dict_types)) ; ++#else + String dict_type = gtk_combo_box_get_active_text(GTK_COMBO_BOX(__combo_box_dict_types)); ++#endif + String dict_name; + GtkTreeIter iter; + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(userdata)); diff -Nru scim-skk-0.5.2/debian/patches/series scim-skk- 0.5.2/debian/patches/series --- scim-skk-0.5.2/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ scim-skk-0.5.2/debian/patches/series 2022-06-12 20:23:25.000000000 -0400 @@ -0,0 +1,5 @@ +01_error_check_to_cdb_get.patch +02_scim_skk_dictionary.cpp.patch +20_gcc-4.3-fixes.patch +99_fix_ftbfs_gtk.patch +0005-AC_SUBST-LIBTOOL_EXPORT_OPTIONS.patch diff -Nru scim-skk-0.5.2/debian/README.source scim-skk- 0.5.2/debian/README.source --- scim-skk-0.5.2/debian/README.source 2022-06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/README.source 1969-12-31 19:00:00.000000000 -0500 @@ -1,38 +0,0 @@ -This package uses dpatch to manage all modifications to the upstream -source. Changes are stored in the source package as diffs in -debian/patches and applied during the build. - -To get the fully patched source after unpacking the source package, cd -to the root level of the source package and run: - - debian/rules patch - -Removing a patch is as simple as removing its entry from the -debian/patches/00list file, and please also remove the patch file -itself. - -Creating a new patch is done with "dpatch-edit-patch patch XX_patchname" -where you should replace XX with a new number and patchname with a -descriptive shortname of the patch. You can then simply edit all the -files your patch wants to edit, and then simply "exit 0" from the shell -to actually create the patch file. - -To tweak an already existing patch, call "dpatch-edit-patch XX_patchname" -and replace XX_patchname with the actual filename from debian/patches -you want to use. - -To clean up afterwards again, "debian/rules unpatch" will do the -work for you - or you can of course choose to call -"fakeroot debian/rules clean" all together. - - ---- - -this documentation is part of dpatch package, and may be used by -packages using dpatch to comply with policy on README.source. This -documentation is meant to be useful to users who are not proficient in -dpatch in doing work with dpatch-based packages. Please send any -improvements to the BTS of dpatch package. - -original text by Gerfried Fuchs, edited by Junichi Uekawa <dan...@debian.org> -10 Aug 2008. diff -Nru scim-skk-0.5.2/debian/rules scim-skk-0.5.2/debian/rules --- scim-skk-0.5.2/debian/rules 2022-06-12 20:26:31.000000000 -0400 +++ scim-skk-0.5.2/debian/rules 2022-06-12 20:16:34.000000000 -0400 @@ -1,122 +1,27 @@ #!/usr/bin/make -f # -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -include /usr/share/dpatch/dpatch.make - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +include /usr/share/dpkg/default.mk SCIM_MOD_PATH ?= $(shell pkg-config --variable=moduledir scim) -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -config.status: configure -configure: configure-stamp -configure-stamp: patch-stamp - dh_testdir - -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif - - # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) -- build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man -- infodir=\$${prefix}/share/info --disable-rpath -- libdir=/usr/lib/$(DEB_HOST_MULTIARCH) - +%: + dh $@ -build: build-stamp - -build-stamp: config.status - dh_testdir - - # Add here commands to compile the package. - $(MAKE) +execute_after_dh_auto_build: msgfmt -o po/ja.gmo po/ja.po #docbook-to-man debian/scim-skk.sgml > scim-skk.1 - touch build-stamp - -clean: unpatch - dh_testdir - dh_testroot +execute_before_dh_clean: rm -f build-stamp rm -f po/ja.gmo - # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) distclean - rm -rf config.sub config.guess - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean - dh_installdirs - - # Add here commands to install the package into debian/scim-skk. - $(MAKE) install DESTDIR=$(CURDIR)/debian/scim-skk +execute_after_dh_auto_install: mv $(CURDIR)/debian/scim-skk/$(SCIM_MOD_PATH)/IMEngine/skk.a \ $(CURDIR)/debian/scim-skk/$(SCIM_MOD_PATH)/IMEngine/libskk.a mv $(CURDIR)/debian/scim-skk/$(SCIM_MOD_PATH)/SetupUI/skk-imengine- setup.a \ $(CURDIR)/debian/scim-skk/$(SCIM_MOD_PATH)/SetupUI/libskk- imengine-setup.a - rm $(CURDIR)/debian/scim-skk/$(SCIM_MOD_PATH)/IMEngine/*.la rm $(CURDIR)/debian/scim-skk/$(SCIM_MOD_PATH)/SetupUI/*.la - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs ChangeLog - dh_installdocs - dh_installexamples -# dh_install -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman - dh_link - dh_strip - dh_compress - dh_fixperms -# dh_perl -# dh_python -# dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install patch unpatch diff -Nru scim-skk-0.5.2/debian/source/format scim-skk- 0.5.2/debian/source/format --- scim-skk-0.5.2/debian/source/format 1969-12-31 19:00:00.000000000 -0500 +++ scim-skk-0.5.2/debian/source/format 2022-06-12 20:15:44.000000000 -0400 @@ -0,0 +1 @@ +3.0 (quilt)
signature.asc
Description: This is a digitally signed message part