sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to stable-0.15 grimoire by Eric Sandall (1de5e2cf60e58d71db68b4c1d914c8bbedb40cfb)
- From: Eric Sandall <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to stable-0.15 grimoire by Eric Sandall (1de5e2cf60e58d71db68b4c1d914c8bbedb40cfb)
- Date: Mon, 3 Dec 2007 15:25:58 -0600
GIT changes to stable-0.15 grimoire by Eric Sandall <sandalle AT sourcemage.org>:
gnome2-libs/ruby-glib2/01-timeout_add_seconds.patch | 108 ++++++++++++
gnome2-libs/ruby-glib2/02-unicode.patch | 167
++++++++++++++++++++
gnome2-libs/ruby-glib2/HISTORY | 9 +
gnome2-libs/ruby-glib2/PRE_BUILD | 5
x11/xosview/HISTORY | 4
x11/xosview/PRE_BUILD | 3
x11/xosview/glibc-2.6.patch | 101 ++++++++++++
7 files changed, 397 insertions(+)
New commits:
commit 1de5e2cf60e58d71db68b4c1d914c8bbedb40cfb
Author: Eric Sandall <sandalle AT sourcemage.org>
Commit: Eric Sandall <sandalle AT sourcemage.org>
xosview: Remove custom snprintf, breaks with glibc 2.6 (Bug #14141)
(cherry picked from commit 55cefcaa3d12d729f33e6ccdf603922153e20d03)
commit 918e3ddccd7953b5c32bde7d1758361778ce4ddd
Author: Eric Sandall <sandalle AT sourcemage.org>
Commit: Eric Sandall <sandalle AT sourcemage.org>
ruby-glib2: Compile again with glib2 > 2.14.1 (Bug #14114)
(cherry picked from commit f53370367cb0b2a28ff4382c616af5aed7dc9e39)
diff --git a/gnome2-libs/ruby-glib2/01-timeout_add_seconds.patch
b/gnome2-libs/ruby-glib2/01-timeout_add_seconds.patch
new file mode 100644
index 0000000..e885089
--- /dev/null
+++ b/gnome2-libs/ruby-glib2/01-timeout_add_seconds.patch
@@ -0,0 +1,108 @@
+--- rbglib_maincontext.c 2006/12/10 17:24:22 1.10
++++ rbglib_maincontext.c 2007/08/30 10:13:44 1.13
+@@ -3,8 +3,8 @@
+
+ rbglib_maincontext.c -
+
+- $Author: mutoh $
+- $Date: 2006/12/10 17:24:22 $
++ $Author: ktou $
++ $Date: 2007/08/30 10:13:44 $
+
+ Copyright (C) 2005 Masao Mutoh
+ ************************************************/
+@@ -54,7 +54,7 @@
+ callback_info_t *info = (callback_info_t *)data;
+ gboolean ret;
+
+- ret = RTEST(rb_funcall(info->callback, id_call, 0));
++ ret = RVAL2CBOOL(rb_funcall(info->callback, id_call, 0));
+ if (!ret)
+ G_REMOVE_RELATIVE(mGLibSource, id__callbacks__, UINT2NUM(info->id));
+ return ret;
+@@ -95,7 +95,7 @@
+ mc_iteration(self, may_block)
+ VALUE self, may_block;
+ {
+- return CBOOL2RVAL(g_main_context_iteration(_SELF(self),
RTEST(may_block)));
++ return CBOOL2RVAL(g_main_context_iteration(_SELF(self),
RVAL2CBOOL(may_block)));
+ }
+
+ static VALUE
+@@ -253,7 +253,7 @@
+ mc_set_poll_func(self)
+ VALUE self;
+ {
+- rb_ivar_set(self, id_poll_func, G_BLOCK_PROC());
++ rb_ivar_set(self, id_poll_func, rb_block_proc());
+ g_main_context_set_poll_func(_SELF(self), (GPollFunc)poll_func);
+
+ return self;
+@@ -331,19 +331,23 @@
+
+ #if GLIB_CHECK_VERSION(2,14,0)
+ static VALUE
+-timeout_add_seconds(VALUE self, VALUE interval)
++timeout_add_seconds(int argc, VALUE *argv, VALUE self)
+ {
+- VALUE func, rb_id;
++ VALUE interval, rb_priority, func, rb_id;
++ gint priority;
+ callback_info_t *info;
+ guint id;
+
+- func = G_BLOCK_PROC();
++ rb_scan_args(argc, argv, "11&", &interval, &rb_priority, &func);
+
++ priority = NIL_P(rb_priority) ? G_PRIORITY_DEFAULT :
INT2NUM(rb_priority);
+ info = ALLOC(callback_info_t);
+ info->callback = func;
+- id = g_timeout_add_seconds(NUM2UINT(interval),
+- (GSourceFunc)invoke_source_func,
+- (gpointer)info, g_free);
++ id = g_timeout_add_seconds_full(priority,
++ NUM2UINT(interval),
++ (GSourceFunc)invoke_source_func,
++ (gpointer)info,
++ g_free);
+ info->id = id;
+ rb_id = UINT2NUM(id);
+ G_RELATIVE2(mGLibSource, func, id__callbacks__, rb_id);
+@@ -372,15 +376,15 @@
+
+ rb_scan_args(argc, argv, "02", &arg1, &arg2);
+
+- if (RTEST(rb_obj_is_kind_of(arg1, rb_cProc))) {
++ if (RVAL2CBOOL(rb_obj_is_kind_of(arg1, rb_cProc))) {
+ priority = G_PRIORITY_DEFAULT;
+ func = arg1;
+- } else if (RTEST(rb_obj_is_kind_of(arg1, rb_cInteger))) {
++ } else if (RVAL2CBOOL(rb_obj_is_kind_of(arg1, rb_cInteger))) {
+ priority = NUM2INT(arg1);
+- func = G_BLOCK_PROC();
++ func = rb_block_proc();
+ } else {
+ priority = G_PRIORITY_DEFAULT;
+- func = G_BLOCK_PROC();
++ func = rb_block_proc();
+ }
+
+ info = ALLOC(callback_info_t);
+@@ -427,7 +431,7 @@
+ child_watch_add(self, pid)
+ VALUE self, pid;
+ {
+- VALUE func = G_BLOCK_PROC();
++ VALUE func = rb_block_proc();
+ G_RELATIVE(self, func);
+ return UINT2NUM(g_child_watch_add((GPid)NUM2INT(pid),
+ (GChildWatchFunc)child_watch_func,
(gpointer)func));
+@@ -488,7 +492,7 @@
+ #endif
+ rb_define_module_function(timeout, "add", timeout_add, -1);
+ #if GLIB_CHECK_VERSION(2,14,0)
+- rb_define_module_function(timeout, "add_seconds", timeout_add_seconds,
1);
++ rb_define_module_function(timeout, "add_seconds", timeout_add_seconds,
-1);
+ #endif
+ rb_define_module_function(idle, "source_new", idle_source_new, 0);
+ rb_define_module_function(idle, "add", idle_add, -1);
diff --git a/gnome2-libs/ruby-glib2/02-unicode.patch
b/gnome2-libs/ruby-glib2/02-unicode.patch
new file mode 100644
index 0000000..2c0d17a
--- /dev/null
+++ b/gnome2-libs/ruby-glib2/02-unicode.patch
@@ -0,0 +1,167 @@
+--- rbglib_unicode.c 2006/12/16 05:01:30 1.7
++++ rbglib_unicode.c 2007/08/30 10:16:35 1.9
+@@ -3,8 +3,8 @@
+
+ rbglib_unicode.c -
+
+- $Author: mutoh $
+- $Date: 2006/12/16 05:01:30 $
++ $Author: ktou $
++ $Date: 2007/08/30 10:16:35 $
+
+ Copyright (C) 2006 Kouhei Sutou
+
+@@ -100,7 +100,7 @@
+ gint len;
+
+ original_str = StringValuePtr(rb_ucs4);
+- len = RSTRING(rb_ucs4)->len;
++ len = RSTRING_LEN(rb_ucs4);
+ ucs4 = g_memdup(original_str, len);
+ g_unicode_canonical_ordering(ucs4, len);
+ normalized_ucs4 = rb_str_new((const char *)ucs4, len);
+@@ -140,7 +140,7 @@
+ rbglib_m_unichar_get_script(VALUE self, VALUE unichar)
+ {
+ return GENUM2RVAL(g_unichar_get_script(NUM2UINT(unichar)),
+- G_TYPE_UNICODE_SCRIPT_TYPE);
++ G_TYPE_UNICODE_SCRIPT);
+ }
+ #endif
+
+@@ -154,8 +154,8 @@
+
+ if (RVAL2CBOOL(validate)) {
+ StringValue(utf8);
+- result = g_utf8_get_char_validated(RSTRING(utf8)->ptr,
+- RSTRING(utf8)->len);
++ result = g_utf8_get_char_validated(RSTRING_PTR(utf8),
++ RSTRING_LEN(utf8));
+ if (result == (gunichar)-1) {
+ return INT2NUM(-1);
+ } else if (result == (gunichar)-2) {
+@@ -174,7 +174,7 @@
+ gchar *utf8;
+
+ utf8 = StringValueCStr(rb_utf8);
+- return INT2NUM(g_utf8_strlen(utf8, RSTRING(rb_utf8)->len));
++ return INT2NUM(g_utf8_strlen(utf8, RSTRING_LEN(rb_utf8)));
+ }
+
+ static VALUE
+@@ -184,7 +184,7 @@
+ gchar *utf8, *reversed_utf8;
+
+ utf8 = StringValueCStr(rb_utf8);
+- reversed_utf8 = g_utf8_strreverse(utf8, RSTRING(rb_utf8)->len);
++ reversed_utf8 = g_utf8_strreverse(utf8, RSTRING_LEN(rb_utf8));
+ result = rb_str_new2(reversed_utf8);
+ g_free(reversed_utf8);
+ return result;
+@@ -194,7 +194,7 @@
+ rbglib_m_utf8_validate(VALUE self, VALUE str)
+ {
+ StringValue(str);
+- return CBOOL2RVAL(g_utf8_validate(RSTRING(str)->ptr, RSTRING(str)->len,
++ return CBOOL2RVAL(g_utf8_validate(RSTRING_PTR(str), RSTRING_LEN(str),
+ NULL));
+ }
+
+@@ -205,7 +205,7 @@
+ gchar *utf8, *upcased_utf8;
+
+ utf8 = StringValueCStr(rb_utf8);
+- upcased_utf8 = g_utf8_strup(utf8, RSTRING(rb_utf8)->len);
++ upcased_utf8 = g_utf8_strup(utf8, RSTRING_LEN(rb_utf8));
+ result = rb_str_new2(upcased_utf8);
+ g_free(upcased_utf8);
+ return result;
+@@ -218,7 +218,7 @@
+ gchar *utf8, *downcased_utf8;
+
+ utf8 = StringValueCStr(rb_utf8);
+- downcased_utf8 = g_utf8_strdown(utf8, RSTRING(rb_utf8)->len);
++ downcased_utf8 = g_utf8_strdown(utf8, RSTRING_LEN(rb_utf8));
+ result = rb_str_new2(downcased_utf8);
+ g_free(downcased_utf8);
+ return result;
+@@ -231,7 +231,7 @@
+ gchar *utf8, *casefolded_utf8;
+
+ utf8 = StringValueCStr(rb_utf8);
+- casefolded_utf8 = g_utf8_casefold(utf8, RSTRING(rb_utf8)->len);
++ casefolded_utf8 = g_utf8_casefold(utf8, RSTRING_LEN(rb_utf8));
+ result = rb_str_new2(casefolded_utf8);
+ g_free(casefolded_utf8);
+ return result;
+@@ -250,7 +250,7 @@
+ mode = RVAL2GENUM(rb_mode, G_TYPE_NORMALIZE_MODE);
+
+ utf8 = StringValueCStr(rb_utf8);
+- normalized_utf8 = g_utf8_normalize(utf8, RSTRING(rb_utf8)->len, mode);
++ normalized_utf8 = g_utf8_normalize(utf8, RSTRING_LEN(rb_utf8), mode);
+ result = rb_str_new2(normalized_utf8);
+ g_free(normalized_utf8);
+ return result;
+@@ -273,7 +273,7 @@
+ rb_scan_args(argc, argv, "11", &rb_utf8, &for_filename);
+
+ utf8 = StringValueCStr(rb_utf8);
+- len = RSTRING(rb_utf8)->len;
++ len = RSTRING_LEN(rb_utf8);
+ #if GLIB_CHECK_VERSION(2,8,0)
+ if (RVAL2CBOOL(for_filename))
+ key = g_utf8_collate_key_for_filename(utf8, len);
+@@ -296,7 +296,7 @@
+ GError *error = NULL;
+
+ utf8 = StringValueCStr(rb_utf8);
+- len = RSTRING(rb_utf8)->len;
++ len = RSTRING_LEN(rb_utf8);
+
+ utf16 = g_utf8_to_utf16(utf8, len, NULL, &items_written, &error);
+
+@@ -319,7 +319,7 @@
+ rb_scan_args(argc, argv, "11", &rb_utf8, &is_fast);
+
+ utf8 = StringValueCStr(rb_utf8);
+- len = RSTRING(rb_utf8)->len;
++ len = RSTRING_LEN(rb_utf8);
+
+ if (RVAL2CBOOL(is_fast)) {
+ ucs4 = g_utf8_to_ucs4_fast(utf8, len, &items_written);
+@@ -346,7 +346,7 @@
+ GError *error = NULL;
+
+ utf16 = (gunichar2 *)StringValueCStr(rb_utf16);
+- len = RSTRING(rb_utf16)->len / sizeof(*utf16);
++ len = RSTRING_LEN(rb_utf16) / sizeof(*utf16);
+
+ ucs4 = g_utf16_to_ucs4(utf16, len, NULL, &items_written, &error);
+
+@@ -368,7 +368,7 @@
+ GError *error = NULL;
+
+ utf16 = (gunichar2 *)StringValueCStr(rb_utf16);
+- len = RSTRING(rb_utf16)->len / sizeof(*utf16);
++ len = RSTRING_LEN(rb_utf16) / sizeof(*utf16);
+
+ utf8 = g_utf16_to_utf8(utf16, len, NULL, &items_written, &error);
+
+@@ -390,7 +390,7 @@
+ GError *error = NULL;
+
+ ucs4 = (gunichar *)StringValuePtr(rb_ucs4);
+- len = RSTRING(rb_ucs4)->len / sizeof(*ucs4);
++ len = RSTRING_LEN(rb_ucs4) / sizeof(*ucs4);
+
+ utf16 = g_ucs4_to_utf16(ucs4, len, NULL, &items_written, &error);
+
+@@ -412,7 +412,7 @@
+ GError *error = NULL;
+
+ ucs4 = (gunichar *)StringValuePtr(rb_ucs4);
+- len = RSTRING(rb_ucs4)->len / sizeof(*ucs4);
++ len = RSTRING_LEN(rb_ucs4) / sizeof(*ucs4);
+
+ utf8 = g_ucs4_to_utf8(ucs4, len, NULL, &items_written, &error);
diff --git a/gnome2-libs/ruby-glib2/HISTORY b/gnome2-libs/ruby-glib2/HISTORY
index efef09c..8473181 100644
--- a/gnome2-libs/ruby-glib2/HISTORY
+++ b/gnome2-libs/ruby-glib2/HISTORY
@@ -1,3 +1,12 @@
+2007-12-01 Eric Sandall <sandalle AT sourcemage.org>
+ * 01-timeout_add_seconds.patch: Patch between 1.10 and 1.13 from
+ Revision 1.12 from
http://ruby-gnome2.cvs.sourceforge.net/ruby-gnome2/ruby-gnome2/glib/src/rbglib_maincontext.c?view=log
+ Fixes Bug #14114
+ * 02-unicode.patch: Patch from 1.7 to 1.9 from
+ Revision 1.12 from
http://ruby-gnome2.cvs.sourceforge.net/ruby-gnome2/ruby-gnome2/glib/src/rbglib_maincontext.c?view=log
+ Fixes another compile issue with glib2 > 2.14.1
+ * PRE_BUILD: Apply patches in-order
+
2007-03-18 Robin Cook <rcook AT wyrms.net>
* DETAILS: updated VERSION to 0.16.0
diff --git a/gnome2-libs/ruby-glib2/PRE_BUILD
b/gnome2-libs/ruby-glib2/PRE_BUILD
new file mode 100755
index 0000000..7ed2d8c
--- /dev/null
+++ b/gnome2-libs/ruby-glib2/PRE_BUILD
@@ -0,0 +1,5 @@
+default_pre_build &&
+patch $SOURCE_DIRECTORY/glib/src/rbglib_maincontext.c \
+ $SCRIPT_DIRECTORY/01-timeout_add_seconds.patch &&
+patch $SOURCE_DIRECTORY/glib/src/rbglib_unicode.c \
+ $SCRIPT_DIRECTORY/02-unicode.patch
diff --git a/x11/xosview/HISTORY b/x11/xosview/HISTORY
index 4f7e579..935cfaf 100644
--- a/x11/xosview/HISTORY
+++ b/x11/xosview/HISTORY
@@ -1,3 +1,7 @@
+2007-12-01 Eric Sandall <sandalle AT sourcemage.org>
+ * glibc-2.6.patch: Added to remove custom snprintf (Bug #14141)
+ * PRE_BUILD: Apply glibc-2.6.patch
+
2006-06-28 Eric Sandall <sandalle AT sourcemage.org>
* DETAILS: Removed BUILD_API=2, set grimoire-wide
diff --git a/x11/xosview/PRE_BUILD b/x11/xosview/PRE_BUILD
new file mode 100755
index 0000000..7fa05e2
--- /dev/null
+++ b/x11/xosview/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+patch -p1 < $SCRIPT_DIRECTORY/glibc-2.6.patch
diff --git a/x11/xosview/glibc-2.6.patch b/x11/xosview/glibc-2.6.patch
new file mode 100644
index 0000000..8f705ba
--- /dev/null
+++ b/x11/xosview/glibc-2.6.patch
@@ -0,0 +1,101 @@
+diff -Naur xosview-1.8.3.orig/Xrm.cc xosview-1.8.3/Xrm.cc
+--- xosview-1.8.3.orig/Xrm.cc 2007-12-01 10:37:19.247343664 -0800
++++ xosview-1.8.3/Xrm.cc 2007-12-01 10:43:33.736684594 -0800
+@@ -17,7 +17,6 @@
+ #include <iostream.h>
+ #endif
+ #include <unistd.h> // for access(), etc. BCG
+-#include "snprintf.h"
+ #include "general.h"
+ #ifndef NULL
+ #define NULL 0
+diff -Naur xosview-1.8.3.orig/bitfieldmeter.cc xosview-1.8.3/bitfieldmeter.cc
+--- xosview-1.8.3.orig/bitfieldmeter.cc 2007-12-01 10:37:19.247343664
-0800
++++ xosview-1.8.3/bitfieldmeter.cc 2007-12-01 10:43:36.752856477 -0800
+@@ -11,7 +11,6 @@
+ #include <fstream.h>
+ #endif
+ #include <stdlib.h>
+-#include "snprintf.h"
+ #include "general.h"
+ #include "bitfieldmeter.h"
+ #include "xosview.h"
+diff -Naur xosview-1.8.3.orig/config/Makefile.top.in
xosview-1.8.3/config/Makefile.top.in
+--- xosview-1.8.3.orig/config/Makefile.top.in 2007-12-01 10:37:19.247343664
-0800
++++ xosview-1.8.3/config/Makefile.top.in 2007-12-01 10:46:37.839175999
-0800
+@@ -19,7 +19,6 @@
+ bitfieldmeter.o \
+ bitmeter.o \
+ xosview.o \
+-snprintf.o \
+ main.o
+
+ CFILES := $(OBJS:.o=.cc)
+diff -Naur xosview-1.8.3.orig/fieldmeter.cc xosview-1.8.3/fieldmeter.cc
+--- xosview-1.8.3.orig/fieldmeter.cc 2007-12-01 10:37:19.243343436 -0800
++++ xosview-1.8.3/fieldmeter.cc 2007-12-01 10:43:39.521014224 -0800
+@@ -17,7 +17,6 @@
+ #include <fstream.h>
+ #endif
+ #include <stdlib.h>
+-#include "snprintf.h"
+ #include "general.h"
+ #include "fieldmeter.h"
+ #include "xosview.h"
+diff -Naur xosview-1.8.3.orig/snprintf.cc xosview-1.8.3/snprintf.cc
+--- xosview-1.8.3.orig/snprintf.cc 2007-12-01 10:37:19.243343436 -0800
++++ xosview-1.8.3/snprintf.cc 1969-12-31 16:00:00.000000000 -0800
+@@ -1,17 +0,0 @@
+-#ifndef HAVE_SNPRINTF
+-
+-#include <stdarg.h>
+-#include <stdio.h>
+-
+-extern "C" int snprintf ( char *str, int n, const char *format, ...)
+- {
+- /* punt the warning */
+- n++;
+- va_list ap;
+- va_start(ap, format);
+- int rval = vsprintf(str, format, ap);
+- va_end(ap);
+- return rval;
+- }
+-
+-#endif
+diff -Naur xosview-1.8.3.orig/snprintf.h xosview-1.8.3/snprintf.h
+--- xosview-1.8.3.orig/snprintf.h 2007-12-01 10:37:19.243343436 -0800
++++ xosview-1.8.3/snprintf.h 1969-12-31 16:00:00.000000000 -0800
+@@ -1,10 +0,0 @@
+-#ifndef snprintf_h
+-#define snprintf_h
+-
+-#ifndef HAVE_SNPRINTF
+-extern "C" int snprintf ( char *str, int n, const char *format, ...);
+-#else
+-#include <stdio.h>
+-#endif
+-
+-#endif
+diff -Naur xosview-1.8.3.orig/xosview.cc xosview-1.8.3/xosview.cc
+--- xosview-1.8.3.orig/xosview.cc 2007-12-01 10:37:19.239343207 -0800
++++ xosview-1.8.3/xosview.cc 2007-12-01 10:43:42.205167189 -0800
+@@ -9,7 +9,6 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <sys/time.h>
+-#include "snprintf.h"
+ #include "general.h"
+ #include "xosview.h"
+ #include "meter.h"
+diff -Naur xosview-1.8.3.orig/xwin.cc xosview-1.8.3/xwin.cc
+--- xosview-1.8.3.orig/xwin.cc 2007-12-01 10:37:19.239343207 -0800
++++ xosview-1.8.3/xwin.cc 2007-12-01 10:43:44.781313993 -0800
+@@ -5,7 +5,6 @@
+ #include <X11/Xatom.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+-#include "snprintf.h"
+ #include "general.h"
+ #include "xwin.h"
+ #include "Xrm.h"
- [SM-Commit] GIT changes to stable-0.15 grimoire by Eric Sandall (1de5e2cf60e58d71db68b4c1d914c8bbedb40cfb), Eric Sandall, 12/03/2007
Archive powered by MHonArc 2.6.24.