[arch-commits] Commit in weechat/repos (6 files)

Giovanni Scafora giovanni at nymeria.archlinux.org
Sun May 19 15:10:48 EDT 2013


    Date: Sunday, May 19, 2013 @ 21:10:48
  Author: giovanni
Revision: 185917

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  weechat/repos/staging-i686/
  weechat/repos/staging-i686/PKGBUILD
    (from rev 185916, weechat/trunk/PKGBUILD)
  weechat/repos/staging-i686/ruby-2.0.0-crash-fix.diff
    (from rev 185916, weechat/trunk/ruby-2.0.0-crash-fix.diff)
  weechat/repos/staging-x86_64/
  weechat/repos/staging-x86_64/PKGBUILD
    (from rev 185916, weechat/trunk/PKGBUILD)
  weechat/repos/staging-x86_64/ruby-2.0.0-crash-fix.diff
    (from rev 185916, weechat/trunk/ruby-2.0.0-crash-fix.diff)

------------------------------------------+
 staging-i686/PKGBUILD                    |   39 ++++++++++++++
 staging-i686/ruby-2.0.0-crash-fix.diff   |   76 +++++++++++++++++++++++++++++
 staging-x86_64/PKGBUILD                  |   39 ++++++++++++++
 staging-x86_64/ruby-2.0.0-crash-fix.diff |   76 +++++++++++++++++++++++++++++
 4 files changed, 230 insertions(+)

Copied: weechat/repos/staging-i686/PKGBUILD (from rev 185916, weechat/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD	                        (rev 0)
+++ staging-i686/PKGBUILD	2013-05-19 19:10:48 UTC (rev 185917)
@@ -0,0 +1,39 @@
+# $Id$
+# Maintainer: Giovanni Scafora <giovanni at archlinux.org>
+# Contributor: lucke <lucke at o2 dot pl>
+
+pkgname=weechat
+pkgver=0.4.0
+pkgrel=4
+pkgdesc="Fast, light and extensible IRC client (curses UI)"
+arch=('i686' 'x86_64')
+url="http://www.weechat.org/"
+license=('GPL')
+depends=('gnutls' 'curl' 'libgcrypt')
+makedepends=('cmake' 'pkgconfig' 'perl' 'python2' 'lua' 'tcl>=8.6.0' 'ruby' 'aspell' 'guile')
+optdepends=('perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell' 'guile')
+options=('!libtool')
+source=("http://www.weechat.org/files/src/${pkgname}-${pkgver}.tar.bz2"
+        'ruby-2.0.0-crash-fix.diff')
+md5sums=('b2e10ca1e3a72142fcc8d58c7c774b1b'
+         '8bafb0ec603af018e2d66155640685b4')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # fix: https://bugs.archlinux.org/task/34342
+  # original commit: http://git.savannah.gnu.org/gitweb/?p=weechat.git;a=commit;h=4fdbb83a079f24a742633fd4d02084911580c19c
+  patch -Np1 -i ${srcdir}/ruby-2.0.0-crash-fix.diff
+
+  mkdir build
+  cd build
+  cmake .. -DPREFIX=/usr \
+        -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+        -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}/build"
+
+  make DESTDIR="${pkgdir}/" install
+}

Copied: weechat/repos/staging-i686/ruby-2.0.0-crash-fix.diff (from rev 185916, weechat/trunk/ruby-2.0.0-crash-fix.diff)
===================================================================
--- staging-i686/ruby-2.0.0-crash-fix.diff	                        (rev 0)
+++ staging-i686/ruby-2.0.0-crash-fix.diff	2013-05-19 19:10:48 UTC (rev 185917)
@@ -0,0 +1,76 @@
+X-Git-Url: http://git.savannah.gnu.org/gitweb/?p=weechat.git;a=blobdiff_plain;f=src%2Fplugins%2Fruby%2Fweechat-ruby-api.c;h=101caec961829de03f8097edc63f497eab99aaa3;hp=bbc2fbcbe3c5290a8a975c4676a85a8c7e0998b7;hb=4fdbb83a079f24a742633fd4d02084911580c19c;hpb=55e58811b3df451db4f95b1035a39f5659788989
+
+diff --git a/src/plugins/ruby/weechat-ruby-api.c b/src/plugins/ruby/weechat-ruby-api.c
+index bbc2fbc..101caec 100644
+--- a/src/plugins/ruby/weechat-ruby-api.c
++++ b/src/plugins/ruby/weechat-ruby-api.c
+@@ -1333,28 +1333,21 @@ weechat_ruby_api_config_new_option (VALUE class, VALUE config_file,
+                                     VALUE description, VALUE string_values,
+                                     VALUE min, VALUE max, VALUE default_value,
+                                     VALUE value, VALUE null_value_allowed,
+-                                    VALUE function_check_value,
+-                                    VALUE data_check_value,
+-                                    VALUE function_change,
+-                                    VALUE data_change,
+-                                    VALUE function_delete,
+-                                    VALUE data_delete)
++                                    VALUE callbacks)
+ {
+     char *c_config_file, *c_section, *c_name, *c_type, *c_description;
+     char *c_string_values, *c_default_value, *c_value;
+     char *c_function_check_value, *c_data_check_value, *c_function_change;
+     char *c_data_change, *c_function_delete, *c_data_delete, *result;
+     int c_min, c_max, c_null_value_allowed;
+-    VALUE return_value;
++    VALUE function_check_value, data_check_value, function_change, data_change;
++    VALUE function_delete, data_delete, return_value;
+ 
+     API_FUNC(1, "config_new_option", API_RETURN_EMPTY);
+     if (NIL_P (config_file) || NIL_P (section) || NIL_P (name) || NIL_P (type)
+         || NIL_P (description) || NIL_P (string_values) || NIL_P (min)
+         || NIL_P (max) || NIL_P (default_value) || NIL_P (value)
+-        || NIL_P (null_value_allowed) || NIL_P (function_check_value)
+-        || NIL_P (data_check_value) || NIL_P (function_change)
+-        || NIL_P (data_change) || NIL_P (function_delete)
+-        || NIL_P (data_delete))
++        || NIL_P (null_value_allowed) || NIL_P (callbacks))
+         API_WRONG_ARGS(API_RETURN_EMPTY);
+ 
+     Check_Type (config_file, T_STRING);
+@@ -1368,12 +1361,21 @@ weechat_ruby_api_config_new_option (VALUE class, VALUE config_file,
+     Check_Type (default_value, T_STRING);
+     Check_Type (value, T_STRING);
+     Check_Type (null_value_allowed, T_FIXNUM);
+-    Check_Type (function_check_value, T_STRING);
+-    Check_Type (data_check_value, T_STRING);
+-    Check_Type (function_change, T_STRING);
+-    Check_Type (data_change, T_STRING);
+-    Check_Type (function_delete, T_STRING);
+-    Check_Type (data_delete, T_STRING);
++    Check_Type (callbacks, T_ARRAY);
++
++    /*
++     * due to a Ruby limitation (15 arguments max by function), we receive the
++     * the callbacks in an array of 6 strings (3 callbacks + 3 data)
++     */
++    if (RARRAY_LEN(callbacks) != 6)
++        API_WRONG_ARGS(API_RETURN_EMPTY);
++
++    function_check_value = rb_ary_entry (callbacks, 0);
++    data_check_value = rb_ary_entry (callbacks, 1);
++    function_change = rb_ary_entry (callbacks, 2);
++    data_change = rb_ary_entry (callbacks, 3);
++    function_delete = rb_ary_entry (callbacks, 4);
++    data_delete = rb_ary_entry (callbacks, 5);
+ 
+     c_config_file = StringValuePtr (config_file);
+     c_section = StringValuePtr (section);
+@@ -5915,7 +5917,7 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
+     API_DEF_FUNC(config_new, 3);
+     API_DEF_FUNC(config_new_section, 14);
+     API_DEF_FUNC(config_search_section, 2);
+-    API_DEF_FUNC(config_new_option, 17);
++    API_DEF_FUNC(config_new_option, 12);
+     API_DEF_FUNC(config_search_option, 3);
+     API_DEF_FUNC(config_string_to_boolean, 1);
+     API_DEF_FUNC(config_option_reset, 2);

Copied: weechat/repos/staging-x86_64/PKGBUILD (from rev 185916, weechat/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2013-05-19 19:10:48 UTC (rev 185917)
@@ -0,0 +1,39 @@
+# $Id$
+# Maintainer: Giovanni Scafora <giovanni at archlinux.org>
+# Contributor: lucke <lucke at o2 dot pl>
+
+pkgname=weechat
+pkgver=0.4.0
+pkgrel=4
+pkgdesc="Fast, light and extensible IRC client (curses UI)"
+arch=('i686' 'x86_64')
+url="http://www.weechat.org/"
+license=('GPL')
+depends=('gnutls' 'curl' 'libgcrypt')
+makedepends=('cmake' 'pkgconfig' 'perl' 'python2' 'lua' 'tcl>=8.6.0' 'ruby' 'aspell' 'guile')
+optdepends=('perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell' 'guile')
+options=('!libtool')
+source=("http://www.weechat.org/files/src/${pkgname}-${pkgver}.tar.bz2"
+        'ruby-2.0.0-crash-fix.diff')
+md5sums=('b2e10ca1e3a72142fcc8d58c7c774b1b'
+         '8bafb0ec603af018e2d66155640685b4')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # fix: https://bugs.archlinux.org/task/34342
+  # original commit: http://git.savannah.gnu.org/gitweb/?p=weechat.git;a=commit;h=4fdbb83a079f24a742633fd4d02084911580c19c
+  patch -Np1 -i ${srcdir}/ruby-2.0.0-crash-fix.diff
+
+  mkdir build
+  cd build
+  cmake .. -DPREFIX=/usr \
+        -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+        -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}/build"
+
+  make DESTDIR="${pkgdir}/" install
+}

Copied: weechat/repos/staging-x86_64/ruby-2.0.0-crash-fix.diff (from rev 185916, weechat/trunk/ruby-2.0.0-crash-fix.diff)
===================================================================
--- staging-x86_64/ruby-2.0.0-crash-fix.diff	                        (rev 0)
+++ staging-x86_64/ruby-2.0.0-crash-fix.diff	2013-05-19 19:10:48 UTC (rev 185917)
@@ -0,0 +1,76 @@
+X-Git-Url: http://git.savannah.gnu.org/gitweb/?p=weechat.git;a=blobdiff_plain;f=src%2Fplugins%2Fruby%2Fweechat-ruby-api.c;h=101caec961829de03f8097edc63f497eab99aaa3;hp=bbc2fbcbe3c5290a8a975c4676a85a8c7e0998b7;hb=4fdbb83a079f24a742633fd4d02084911580c19c;hpb=55e58811b3df451db4f95b1035a39f5659788989
+
+diff --git a/src/plugins/ruby/weechat-ruby-api.c b/src/plugins/ruby/weechat-ruby-api.c
+index bbc2fbc..101caec 100644
+--- a/src/plugins/ruby/weechat-ruby-api.c
++++ b/src/plugins/ruby/weechat-ruby-api.c
+@@ -1333,28 +1333,21 @@ weechat_ruby_api_config_new_option (VALUE class, VALUE config_file,
+                                     VALUE description, VALUE string_values,
+                                     VALUE min, VALUE max, VALUE default_value,
+                                     VALUE value, VALUE null_value_allowed,
+-                                    VALUE function_check_value,
+-                                    VALUE data_check_value,
+-                                    VALUE function_change,
+-                                    VALUE data_change,
+-                                    VALUE function_delete,
+-                                    VALUE data_delete)
++                                    VALUE callbacks)
+ {
+     char *c_config_file, *c_section, *c_name, *c_type, *c_description;
+     char *c_string_values, *c_default_value, *c_value;
+     char *c_function_check_value, *c_data_check_value, *c_function_change;
+     char *c_data_change, *c_function_delete, *c_data_delete, *result;
+     int c_min, c_max, c_null_value_allowed;
+-    VALUE return_value;
++    VALUE function_check_value, data_check_value, function_change, data_change;
++    VALUE function_delete, data_delete, return_value;
+ 
+     API_FUNC(1, "config_new_option", API_RETURN_EMPTY);
+     if (NIL_P (config_file) || NIL_P (section) || NIL_P (name) || NIL_P (type)
+         || NIL_P (description) || NIL_P (string_values) || NIL_P (min)
+         || NIL_P (max) || NIL_P (default_value) || NIL_P (value)
+-        || NIL_P (null_value_allowed) || NIL_P (function_check_value)
+-        || NIL_P (data_check_value) || NIL_P (function_change)
+-        || NIL_P (data_change) || NIL_P (function_delete)
+-        || NIL_P (data_delete))
++        || NIL_P (null_value_allowed) || NIL_P (callbacks))
+         API_WRONG_ARGS(API_RETURN_EMPTY);
+ 
+     Check_Type (config_file, T_STRING);
+@@ -1368,12 +1361,21 @@ weechat_ruby_api_config_new_option (VALUE class, VALUE config_file,
+     Check_Type (default_value, T_STRING);
+     Check_Type (value, T_STRING);
+     Check_Type (null_value_allowed, T_FIXNUM);
+-    Check_Type (function_check_value, T_STRING);
+-    Check_Type (data_check_value, T_STRING);
+-    Check_Type (function_change, T_STRING);
+-    Check_Type (data_change, T_STRING);
+-    Check_Type (function_delete, T_STRING);
+-    Check_Type (data_delete, T_STRING);
++    Check_Type (callbacks, T_ARRAY);
++
++    /*
++     * due to a Ruby limitation (15 arguments max by function), we receive the
++     * the callbacks in an array of 6 strings (3 callbacks + 3 data)
++     */
++    if (RARRAY_LEN(callbacks) != 6)
++        API_WRONG_ARGS(API_RETURN_EMPTY);
++
++    function_check_value = rb_ary_entry (callbacks, 0);
++    data_check_value = rb_ary_entry (callbacks, 1);
++    function_change = rb_ary_entry (callbacks, 2);
++    data_change = rb_ary_entry (callbacks, 3);
++    function_delete = rb_ary_entry (callbacks, 4);
++    data_delete = rb_ary_entry (callbacks, 5);
+ 
+     c_config_file = StringValuePtr (config_file);
+     c_section = StringValuePtr (section);
+@@ -5915,7 +5917,7 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
+     API_DEF_FUNC(config_new, 3);
+     API_DEF_FUNC(config_new_section, 14);
+     API_DEF_FUNC(config_search_section, 2);
+-    API_DEF_FUNC(config_new_option, 17);
++    API_DEF_FUNC(config_new_option, 12);
+     API_DEF_FUNC(config_search_option, 3);
+     API_DEF_FUNC(config_string_to_boolean, 1);
+     API_DEF_FUNC(config_option_reset, 2);



More information about the arch-commits mailing list