aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/geda
diff options
context:
space:
mode:
authorStanislav Brabec <utx@penguin.cz>2010-07-24 14:16:19 +0000
committerutx@penguin.cz <utx@penguin.cz>2010-07-24 14:16:19 +0000
commitd264d0fe024062e2c476ecbb006d0339459d0834 (patch)
tree84d26377992a66ce6d09b536102fa7594152f7e8 /recipes/geda
parent8e8e18e3be3df2e067605e5779c63328efa79bb9 (diff)
downloadopenembedded-d264d0fe024062e2c476ecbb006d0339459d0834.tar.gz
openembedded-d264d0fe024062e2c476ecbb006d0339459d0834.tar.bz2
openembedded-d264d0fe024062e2c476ecbb006d0339459d0834.zip
geda-gattrib: Drop support for gtk+ < 2.18. It was broken since 4e7aae5 that tried to fix 995db54, which failed to parse on some systems.
Signed-off-by: Stanislav Brabec <utx@penguin.cz>
Diffstat (limited to 'recipes/geda')
-rw-r--r--recipes/geda/files/gattrib-gtk218.patch110
-rw-r--r--recipes/geda/geda-gattrib_1.4.3.bb12
2 files changed, 3 insertions, 119 deletions
diff --git a/recipes/geda/files/gattrib-gtk218.patch b/recipes/geda/files/gattrib-gtk218.patch
deleted file mode 100644
index c1bbdd9ae6..0000000000
--- a/recipes/geda/files/gattrib-gtk218.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-Index: geda-gattrib-1.4.3/src/gtkitementry_2_2.c
-===================================================================
---- geda-gattrib-1.4.3.orig/src/gtkitementry_2_2.c
-+++ geda-gattrib-1.4.3/src/gtkitementry_2_2.c
-@@ -811,23 +811,23 @@ gtk_entry_real_insert_text (GtkEditable
- new_text_length = g_utf8_offset_to_pointer (new_text, n_chars) - new_text;
- }
-
-- if (new_text_length + entry->n_bytes + 1 > entry->text_size)
-+ if (new_text_length + entry->x_n_bytes + 1 > entry->x_text_size)
- {
-- while (new_text_length + entry->n_bytes + 1 > entry->text_size)
-+ while (new_text_length + entry->x_n_bytes + 1 > entry->x_text_size)
- {
-- if (entry->text_size == 0)
-- entry->text_size = MIN_SIZE;
-+ if (entry->x_text_size == 0)
-+ entry->x_text_size = MIN_SIZE;
- else
- {
-- if (2 * (guint)entry->text_size < MAX_SIZE &&
-- 2 * (guint)entry->text_size > entry->text_size)
-- entry->text_size *= 2;
-+ if (2 * (guint)entry->x_text_size < MAX_SIZE &&
-+ 2 * (guint)entry->x_text_size > entry->x_text_size)
-+ entry->x_text_size *= 2;
- else
- {
-- entry->text_size = MAX_SIZE;
-- if (new_text_length > (gint)entry->text_size - (gint)entry->n_bytes - 1)
-+ entry->x_text_size = MAX_SIZE;
-+ if (new_text_length > (gint)entry->x_text_size - (gint)entry->x_n_bytes - 1)
- {
-- new_text_length = (gint)entry->text_size - (gint)entry->n_bytes - 1;
-+ new_text_length = (gint)entry->x_text_size - (gint)entry->x_n_bytes - 1;
- new_text_length = g_utf8_find_prev_char (new_text, new_text + new_text_length + 1) - new_text;
- n_chars = g_utf8_strlen (new_text, new_text_length);
- }
-@@ -836,19 +836,19 @@ gtk_entry_real_insert_text (GtkEditable
- }
- }
-
-- entry->text = g_realloc (entry->text, entry->text_size);
-+ entry->text = g_realloc (entry->text, entry->x_text_size);
- }
-
- index = g_utf8_offset_to_pointer (entry->text, *position) - entry->text;
-
-- g_memmove (entry->text + index + new_text_length, entry->text + index, entry->n_bytes - index);
-+ g_memmove (entry->text + index + new_text_length, entry->text + index, entry->x_n_bytes - index);
- memcpy (entry->text + index, new_text, new_text_length);
-
-- entry->n_bytes += new_text_length;
-+ entry->x_n_bytes += new_text_length;
- entry->text_length += n_chars;
-
- /* NUL terminate for safety and convenience */
-- entry->text[entry->n_bytes] = '\0';
-+ entry->text[entry->x_n_bytes] = '\0';
-
- if (entry->current_pos > *position)
- entry->current_pos += n_chars;
-@@ -881,9 +881,9 @@ gtk_entry_real_delete_text (GtkEditable
- gint start_index = g_utf8_offset_to_pointer (entry->text, start_pos) - entry->text;
- gint end_index = g_utf8_offset_to_pointer (entry->text, end_pos) - entry->text;
-
-- g_memmove (entry->text + start_index, entry->text + end_index, entry->n_bytes + 1 - end_index);
-+ g_memmove (entry->text + start_index, entry->text + end_index, entry->x_n_bytes + 1 - end_index);
- entry->text_length -= (end_pos - start_pos);
-- entry->n_bytes -= (end_index - start_index);
-+ entry->x_n_bytes -= (end_index - start_index);
-
- if (entry->current_pos > start_pos)
- entry->current_pos -= MIN (entry->current_pos, end_pos) - start_pos;
-@@ -1157,7 +1157,7 @@ gtk_entry_retrieve_surrounding_cb (GtkIM
- {
- gtk_im_context_set_surrounding (context,
- entry->text,
-- entry->n_bytes,
-+ entry->x_n_bytes,
- g_utf8_offset_to_pointer (entry->text, entry->current_pos) - entry->text);
-
- return TRUE;
-@@ -1364,7 +1364,7 @@ gtk_entry_create_layout (GtkEntry *entry
-
- if (entry->visible)
- {
-- g_string_prepend_len (tmp_string, entry->text, entry->n_bytes);
-+ g_string_prepend_len (tmp_string, entry->text, entry->x_n_bytes);
- g_string_insert (tmp_string, cursor_index, preedit_string);
- }
- else
-@@ -1373,7 +1373,7 @@ gtk_entry_create_layout (GtkEntry *entry
- gint preedit_len_chars;
- gunichar invisible_char;
-
-- ch_len = g_utf8_strlen (entry->text, entry->n_bytes);
-+ ch_len = g_utf8_strlen (entry->text, entry->x_n_bytes);
- preedit_len_chars = g_utf8_strlen (preedit_string, -1);
- ch_len += preedit_len_chars;
-
-@@ -1407,7 +1407,7 @@ gtk_entry_create_layout (GtkEntry *entry
- {
- if (entry->visible)
- {
-- pango_layout_set_text (layout, entry->text, entry->n_bytes);
-+ pango_layout_set_text (layout, entry->text, entry->x_n_bytes);
- }
- else
- {
diff --git a/recipes/geda/geda-gattrib_1.4.3.bb b/recipes/geda/geda-gattrib_1.4.3.bb
index 8617311d05..7ee713d80a 100644
--- a/recipes/geda/geda-gattrib_1.4.3.bb
+++ b/recipes/geda/geda-gattrib_1.4.3.bb
@@ -5,18 +5,12 @@ PR = "r1"
DEPENDS = "gtk+ libgeda"
-SRC_URI = "http://geda.seul.org/release/v1.4/${PV}/${P}.tar.gz"
+SRC_URI = "http://geda.seul.org/release/v1.4/${PV}/${P}.tar.gz\
+ file://gattrib-gtk218.patch;patch=1"
+
inherit autotools pkgconfig
EXTRA_OECONF = "--disable-update-desktop-database"
-do_patch_prepend() {
- import bb
- if bb.data.getVar('PREFERRED_VERSION_gtk+', d, 1) and
- bb.data.getVar('PREFERRED_VERSION_gtk+', d, 1).split('.')[0] <= '2' and
- bb.data.getVar('PREFERRED_VERSION_gtk+', d, 1).split('.')[1] < '18':
- SRC_URI_append = "file://gattrib-gtk218.patch"
-}
-
SRC_URI[md5sum] = "e1f68401e7ca5fff16292358f0dfd553"
SRC_URI[sha256sum] = "5eb48772d374dad446bfcd69990231fa6c6b52ba9b30048991632557512a7565"