ports/opt (2.4): ruby-gtk: fixed the build.
commit 75e7c84cb8ef0d408fbde8a78c9918cf20efcca7 Author: Tilman Sauerbeck <tilman@crux.nu> Date: Sun Feb 3 20:07:49 2008 +0100 ruby-gtk: fixed the build. diff --git a/ruby-gtk/.md5sum b/ruby-gtk/.md5sum index 25a4f82..275e329 100644 --- a/ruby-gtk/.md5sum +++ b/ruby-gtk/.md5sum @@ -1 +1,2 @@ +e3aaae7cf5d1589dcf94d7f2bd4334d3 ruby-gtk.diff aedca2b3a7c6ae0f02cf5fd1e02f642c ruby-gtk2-0.16.0.tar.gz diff --git a/ruby-gtk/Pkgfile b/ruby-gtk/Pkgfile index a476218..3e6bff3 100644 --- a/ruby-gtk/Pkgfile +++ b/ruby-gtk/Pkgfile @@ -7,12 +7,15 @@ name=ruby-gtk version=0.16.0 -release=1 -source=(http://dl.sourceforge.net/ruby-gnome2/ruby-gtk2-$version.tar.gz) +release=2 +source=(http://dl.sourceforge.net/ruby-gnome2/ruby-gtk2-$version.tar.gz \ + $name.diff) build() { cd ruby-gtk2-$version + patch -Np1 -i $SRC/$name.diff + ruby extconf.rb make diff --git a/ruby-gtk/ruby-gtk.diff b/ruby-gtk/ruby-gtk.diff new file mode 100644 index 0000000..7af7819 --- /dev/null +++ b/ruby-gtk/ruby-gtk.diff @@ -0,0 +1,74 @@ +diff -aur ruby-gtk2-0.16.0.orig/glib/src/rbglib_maincontext.c ruby-gtk2-0.16.0/glib/src/rbglib_maincontext.c +--- ruby-gtk2-0.16.0.orig/glib/src/rbglib_maincontext.c 2006-12-29 14:17:29.000000000 +0100 ++++ ruby-gtk2-0.16.0/glib/src/rbglib_maincontext.c 2008-02-03 19:59:41.674002790 +0100 +@@ -331,17 +331,20 @@ + + #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), ++ id = g_timeout_add_seconds_full(priority, ++ NUM2UINT(interval), + (GSourceFunc)invoke_source_func, + (gpointer)info, g_free); + info->id = id; +@@ -488,7 +491,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 -aur ruby-gtk2-0.16.0.orig/glib/src/rbglib_unicode.c ruby-gtk2-0.16.0/glib/src/rbglib_unicode.c +--- ruby-gtk2-0.16.0.orig/glib/src/rbglib_unicode.c 2006-12-29 14:17:29.000000000 +0100 ++++ ruby-gtk2-0.16.0/glib/src/rbglib_unicode.c 2008-02-03 19:47:21.883858632 +0100 +@@ -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 + +diff -aur ruby-gtk2-0.16.0.orig/glib/src/rbgobj_boxed.c ruby-gtk2-0.16.0/glib/src/rbgobj_boxed.c +--- ruby-gtk2-0.16.0.orig/glib/src/rbgobj_boxed.c 2006-12-29 14:17:29.000000000 +0100 ++++ ruby-gtk2-0.16.0/glib/src/rbgobj_boxed.c 2008-02-03 19:49:08.444585783 +0100 +@@ -145,7 +145,8 @@ + + gpointer + rbgobj_boxed_get(obj, gtype) +- VALUE obj, gtype; ++ VALUE obj; ++ GType gtype; + { + boxed_holder* holder; + Data_Get_Struct(obj, boxed_holder, holder); +diff -aur ruby-gtk2-0.16.0.orig/gtk/src/rbgtk.h ruby-gtk2-0.16.0/gtk/src/rbgtk.h +--- ruby-gtk2-0.16.0.orig/gtk/src/rbgtk.h 2006-12-29 14:17:29.000000000 +0100 ++++ ruby-gtk2-0.16.0/gtk/src/rbgtk.h 2008-02-03 19:44:56.153964719 +0100 +@@ -115,7 +115,7 @@ + */ + typedef void (*rbgtkiter_set_value_func)(void *model, GtkTreeIter *iter, + gint column, GValue *value); +-extern void rbgtk_register_treeiter_set_value_func(VALUE klass, rbgtkiter_set_value_func); ++extern void rbgtk_register_treeiter_set_value_func(GType gtype, rbgtkiter_set_value_func); + + /* + * Gtk::SelectionData
participants (1)
-
crux@crux.nu