wok-6.x rev 16781
Merge branches.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Jun 23 01:50:31 2014 +0300 (2014-06-23) |
parents | 346b104468cc 08fef135770f |
children | e89fa6f14c59 |
files |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ruby-ncurses/receipt Mon Jun 23 01:50:31 2014 +0300 1.3 @@ -0,0 +1,33 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="ruby-ncurses" 1.7 +VERSION="1.3.1" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="Ruby extension for the ncurses C library." 1.10 +MAINTAINER="paul@slitaz.org" 1.11 +DEPENDS="ruby ncurses" 1.12 +BUILD_DEPENDS="ruby-dev ncurses-dev" 1.13 +TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.14 +SOURCE="ncurses-ruby" 1.15 +WEB_SITE="http://pkgs.fedoraproject.org/repo/pkgs/ruby-ncurses/" 1.16 +WGET_URL="http://pkgs.fedoraproject.org/repo/pkgs/ruby-ncurses/ncurses-ruby-1.3.1.tar.bz2/63fd3d09a51cdd745e1ed37f85621ea2/ncurses-ruby-1.3.1.tar.bz2" 1.17 + 1.18 +# Rules to configure and make the package. 1.19 +compile_rules() 1.20 +{ 1.21 + cd $src 1.22 + # use fedora patches 1.23 + patch -i ../../stuff/STR2CSTR-deprecated.patch 1.24 + patch -i ../../stuff/ruby-ncurses-fix-missing-tz-prototypes.patch 1.25 + ruby extconf.rb 1.26 + make 1.27 + make DESTDIR=$DESTDIR install 1.28 +} 1.29 + 1.30 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.31 +genpkg_rules() 1.32 +{ 1.33 + mkdir -p $fs/usr 1.34 + cp -a $install/usr/lib $fs/usr 1.35 +} 1.36 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/ruby-ncurses/stuff/STR2CSTR-deprecated.patch Mon Jun 23 01:50:31 2014 +0300 2.3 @@ -0,0 +1,320 @@ 2.4 +diff -Naur ncurses-ruby-1.3.1/form_wrap.c ncurses-ruby-1.3.1.p/form_wrap.c 2.5 +--- ncurses-ruby-1.3.1/form_wrap.c 2011-05-31 01:41:46.000000000 +0200 2.6 ++++ ncurses-ruby-1.3.1.p/form_wrap.c 2013-03-14 14:38:21.097682379 +0100 2.7 +@@ -625,7 +625,8 @@ 2.8 + char** list = ALLOC_N(char*, n+1); 2.9 + int i; 2.10 + for (i = 0; i < n; i++) { 2.11 +- list[i] = STR2CSTR(rb_ary_entry(arg3, (long)i)); 2.12 ++ VALUE tmp = rb_ary_entry(arg3, (long)i); 2.13 ++ list[i] = StringValuePtr(tmp); 2.14 + } 2.15 + list[n] = NULL; 2.16 + return INT2NUM(set_field_type(field, ftype, 2.17 +@@ -654,7 +655,7 @@ 2.18 + if (argc != 2) 2.19 + rb_raise(rb_eArgError, "TYPE_REGEXP requires one additional argument"); 2.20 + return INT2NUM(set_field_type(field, ftype, 2.21 +- STR2CSTR(arg3))); 2.22 ++ StringValuePtr(arg3))); 2.23 + } 2.24 + else if (ftype == TYPE_IPV4){ 2.25 + if (argc != 1) 2.26 +@@ -742,7 +743,7 @@ 2.27 + */ 2.28 + static VALUE rbncurs_c_set_field_buffer(VALUE rb_field, VALUE buf, VALUE value) { 2.29 + FIELD* field = get_field(rb_field); 2.30 +- return INT2NUM(set_field_buffer(field, NUM2INT(buf), STR2CSTR(value))); 2.31 ++ return INT2NUM(set_field_buffer(field, NUM2INT(buf), StringValuePtr(value))); 2.32 + } 2.33 + static VALUE rbncurs_m_set_field_buffer(VALUE dummy, VALUE rb_field, VALUE buf, VALUE value) 2.34 + { return rbncurs_c_set_field_buffer(rb_field, buf, value); } 2.35 +@@ -1052,7 +1053,7 @@ 2.36 + { return rbncurs_c_form_request_name(request); } 2.37 + 2.38 + static VALUE rbncurs_c_form_request_by_name(VALUE name) { 2.39 +- return INT2NUM(form_request_by_name(STR2CSTR(name))); 2.40 ++ return INT2NUM(form_request_by_name(StringValuePtr(name))); 2.41 + } 2.42 + static VALUE rbncurs_m_form_request_by_name(VALUE dummy, VALUE name) 2.43 + { return rbncurs_c_form_request_by_name(name); } 2.44 +diff -Naur ncurses-ruby-1.3.1/menu_wrap.c ncurses-ruby-1.3.1.p/menu_wrap.c 2.45 +--- ncurses-ruby-1.3.1/menu_wrap.c 2011-05-31 01:41:46.000000000 +0200 2.46 ++++ ncurses-ruby-1.3.1.p/menu_wrap.c 2013-03-14 14:39:37.016571464 +0100 2.47 +@@ -372,7 +372,7 @@ 2.48 + * Item creation/destruction functions - mitem_new(3X) man page 2.49 + */ 2.50 + static VALUE rbncurs_m_new_item(VALUE dummy, VALUE name, VALUE description) 2.51 +-{ return wrap_item(new_item(STR2CSTR(name), STR2CSTR(description))); } 2.52 ++{ return wrap_item(new_item(StringValuePtr(name), StringValuePtr(description))); } 2.53 + 2.54 + static VALUE rbncurs_c_free_item(VALUE rb_item) 2.55 + { 2.56 +@@ -670,7 +670,7 @@ 2.57 + 2.58 + static VALUE rbncurs_c_menu_request_by_name(VALUE name) 2.59 + { 2.60 +- return INT2NUM(menu_request_by_name(STR2CSTR(name))); 2.61 ++ return INT2NUM(menu_request_by_name(StringValuePtr(name))); 2.62 + } 2.63 + static VALUE rbncurs_m_menu_request_by_name(VALUE dummy, VALUE name) 2.64 + { return rbncurs_c_menu_request_by_name(name); } 2.65 +@@ -909,7 +909,7 @@ 2.66 + static VALUE rbncurs_c_set_menu_mark(VALUE rb_menu, VALUE value) 2.67 + { 2.68 + MENU *menu = get_menu(rb_menu); 2.69 +- return INT2NUM(set_menu_mark(menu, STR2CSTR(value))); 2.70 ++ return INT2NUM(set_menu_mark(menu, StringValuePtr(value))); 2.71 + } 2.72 + static VALUE rbncurs_m_set_menu_mark(VALUE dummy, VALUE rb_field, VALUE value) 2.73 + { return rbncurs_c_set_menu_mark(rb_field, value); } 2.74 +@@ -929,7 +929,7 @@ 2.75 + static VALUE rbncurs_c_set_menu_pattern(VALUE rb_menu, VALUE pattern) 2.76 + { 2.77 + MENU *menu = get_menu(rb_menu); 2.78 +- return INT2NUM(set_menu_pattern(menu, STR2CSTR(pattern))); 2.79 ++ return INT2NUM(set_menu_pattern(menu, StringValuePtr(pattern))); 2.80 + } 2.81 + static VALUE rbncurs_m_set_menu_pattern(VALUE dummy, VALUE rb_menu, VALUE pattern) 2.82 + { return rbncurs_c_set_menu_pattern(rb_menu, pattern); } 2.83 +diff -Naur ncurses-ruby-1.3.1/ncurses_wrap.c ncurses-ruby-1.3.1.p/ncurses_wrap.c 2.84 +--- ncurses-ruby-1.3.1/ncurses_wrap.c 2011-05-31 01:41:46.000000000 +0200 2.85 ++++ ncurses-ruby-1.3.1.p/ncurses_wrap.c 2013-03-14 15:09:59.535783327 +0100 2.86 +@@ -475,7 +475,7 @@ 2.87 + static VALUE rbncurs_define_key(VALUE dummy, VALUE definition, VALUE keycode) 2.88 + { 2.89 + return INT2NUM(define_key((definition != Qnil) 2.90 +- ? STR2CSTR(definition) 2.91 ++ ? StringValuePtr(definition) 2.92 + : (char*)(NULL), 2.93 + NUM2INT(keycode))); 2.94 + } 2.95 +@@ -580,10 +580,10 @@ 2.96 + return return_value; 2.97 + } 2.98 + static VALUE rbncurs_addnstr(VALUE dummy, VALUE arg1, VALUE arg2) { 2.99 +- return INT2NUM(addnstr(STR2CSTR(arg1), NUM2INT(arg2))); 2.100 ++ return INT2NUM(addnstr(StringValuePtr(arg1), NUM2INT(arg2))); 2.101 + } 2.102 + static VALUE rbncurs_addstr(VALUE dummy, VALUE arg1) { 2.103 +- return INT2NUM(addstr(STR2CSTR(arg1))); 2.104 ++ return INT2NUM(addstr(StringValuePtr(arg1))); 2.105 + } 2.106 + static VALUE rbncurs_attroff(VALUE dummy, VALUE arg1) { 2.107 + return INT2NUM(attroff(NUM2ULONG(arg1))); 2.108 +@@ -1011,10 +1011,10 @@ 2.109 + return INT2NUM(insertln()); 2.110 + } 2.111 + static VALUE rbncurs_insnstr(VALUE dummy, VALUE arg1, VALUE arg2) { 2.112 +- return INT2NUM(insnstr(STR2CSTR(arg1), NUM2INT(arg2))); 2.113 ++ return INT2NUM(insnstr(StringValuePtr(arg1), NUM2INT(arg2))); 2.114 + } 2.115 + static VALUE rbncurs_insstr(VALUE dummy, VALUE arg1) { 2.116 +- return INT2NUM(insstr(STR2CSTR(arg1))); 2.117 ++ return INT2NUM(insstr(StringValuePtr(arg1))); 2.118 + } 2.119 + #ifdef HAVE_INTRFLUSH 2.120 + static VALUE rbncurs_intrflush(VALUE dummy, VALUE arg1, VALUE arg2) { 2.121 +@@ -1070,10 +1070,10 @@ 2.122 + return return_value; 2.123 + } 2.124 + static VALUE rbncurs_mvaddnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) { 2.125 +- return INT2NUM(mvaddnstr(NUM2INT(arg1), NUM2INT(arg2), STR2CSTR(arg3), NUM2INT(arg4))); 2.126 ++ return INT2NUM(mvaddnstr(NUM2INT(arg1), NUM2INT(arg2), StringValuePtr(arg3), NUM2INT(arg4))); 2.127 + } 2.128 + static VALUE rbncurs_mvaddstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) { 2.129 +- return INT2NUM(mvaddstr(NUM2INT(arg1), NUM2INT(arg2), STR2CSTR(arg3))); 2.130 ++ return INT2NUM(mvaddstr(NUM2INT(arg1), NUM2INT(arg2), StringValuePtr(arg3))); 2.131 + } 2.132 + #ifdef HAVE_MVCHGAT 2.133 + static VALUE rbncurs_mvchgat(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5, VALUE arg6) { 2.134 +@@ -1106,10 +1106,10 @@ 2.135 + return INT2NUM(mvinsch(NUM2INT(arg1), NUM2INT(arg2), NUM2ULONG(arg3))); 2.136 + } 2.137 + static VALUE rbncurs_mvinsnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) { 2.138 +- return INT2NUM(mvinsnstr(NUM2INT(arg1), NUM2INT(arg2), STR2CSTR(arg3), NUM2INT(arg4))); 2.139 ++ return INT2NUM(mvinsnstr(NUM2INT(arg1), NUM2INT(arg2), StringValuePtr(arg3), NUM2INT(arg4))); 2.140 + } 2.141 + static VALUE rbncurs_mvinsstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) { 2.142 +- return INT2NUM(mvinsstr(NUM2INT(arg1), NUM2INT(arg2), STR2CSTR(arg3))); 2.143 ++ return INT2NUM(mvinsstr(NUM2INT(arg1), NUM2INT(arg2), StringValuePtr(arg3))); 2.144 + } 2.145 + #ifdef HAVE_MVVLINE 2.146 + static VALUE rbncurs_mvvline(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) { 2.147 +@@ -1137,10 +1137,10 @@ 2.148 + return return_value; 2.149 + } 2.150 + static VALUE rbncurs_mvwaddnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5) { 2.151 +- return INT2NUM(mvwaddnstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), STR2CSTR(arg4), NUM2INT(arg5))); 2.152 ++ return INT2NUM(mvwaddnstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), StringValuePtr(arg4), NUM2INT(arg5))); 2.153 + } 2.154 + static VALUE rbncurs_mvwaddstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) { 2.155 +- return INT2NUM(mvwaddstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), STR2CSTR(arg4))); 2.156 ++ return INT2NUM(mvwaddstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), StringValuePtr(arg4))); 2.157 + } 2.158 + #ifdef HAVE_MVWCHGAT 2.159 + static VALUE rbncurs_mvwchgat(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5, VALUE arg6, VALUE arg7) { 2.160 +@@ -1171,10 +1171,10 @@ 2.161 + return INT2NUM(mvwinsch(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), NUM2ULONG(arg4))); 2.162 + } 2.163 + static VALUE rbncurs_mvwinsnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5) { 2.164 +- return INT2NUM(mvwinsnstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), STR2CSTR(arg4), NUM2INT(arg5))); 2.165 ++ return INT2NUM(mvwinsnstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), StringValuePtr(arg4), NUM2INT(arg5))); 2.166 + } 2.167 + static VALUE rbncurs_mvwinsstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) { 2.168 +- return INT2NUM(mvwinsstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), STR2CSTR(arg4))); 2.169 ++ return INT2NUM(mvwinsstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), StringValuePtr(arg4))); 2.170 + } 2.171 + #ifdef HAVE_MVWVLINE 2.172 + static VALUE rbncurs_mvwvline(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5) { 2.173 +@@ -1238,7 +1238,7 @@ 2.174 + } 2.175 + #ifdef HAVE_PUTP 2.176 + static VALUE rbncurs_putp(VALUE dummy, VALUE arg1) { 2.177 +- return INT2NUM(putp(STR2CSTR(arg1))); 2.178 ++ return INT2NUM(putp(StringValuePtr(arg1))); 2.179 + } 2.180 + #endif 2.181 + #ifdef HAVE_QIFLUSH 2.182 +@@ -1271,12 +1271,12 @@ 2.183 + } 2.184 + #ifdef HAVE_SCR_DUMP 2.185 + static VALUE rbncurs_scr_dump(VALUE dummy, VALUE arg1) { 2.186 +- return INT2NUM(scr_dump(STR2CSTR(arg1))); 2.187 ++ return INT2NUM(scr_dump(StringValuePtr(arg1))); 2.188 + } 2.189 + #endif 2.190 + #ifdef HAVE_SCR_INIT 2.191 + static VALUE rbncurs_scr_init(VALUE dummy, VALUE arg1) { 2.192 +- return INT2NUM(scr_init(STR2CSTR(arg1))); 2.193 ++ return INT2NUM(scr_init(StringValuePtr(arg1))); 2.194 + } 2.195 + #endif 2.196 + static VALUE rbncurs_scrl(VALUE dummy, VALUE arg1) { 2.197 +@@ -1290,12 +1290,12 @@ 2.198 + } 2.199 + #ifdef HAVE_SCR_RESTORE 2.200 + static VALUE rbncurs_scr_restore(VALUE dummy, VALUE arg1) { 2.201 +- return INT2NUM(scr_restore(STR2CSTR(arg1))); 2.202 ++ return INT2NUM(scr_restore(StringValuePtr(arg1))); 2.203 + } 2.204 + #endif 2.205 + #ifdef HAVE_SCR_SET 2.206 + static VALUE rbncurs_scr_set(VALUE dummy, VALUE arg1) { 2.207 +- return INT2NUM(scr_set(STR2CSTR(arg1))); 2.208 ++ return INT2NUM(scr_set(StringValuePtr(arg1))); 2.209 + } 2.210 + #endif 2.211 + static VALUE rbncurs_setscrreg(VALUE dummy, VALUE arg1, VALUE arg2) { 2.212 +@@ -1352,7 +1352,7 @@ 2.213 + return INT2NUM(slk_restore()); 2.214 + } 2.215 + static VALUE rbncurs_slk_set(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) { 2.216 +- return INT2NUM(slk_set(NUM2INT(arg1), STR2CSTR(arg2), NUM2INT(arg3))); 2.217 ++ return INT2NUM(slk_set(NUM2INT(arg1), StringValuePtr(arg2), NUM2INT(arg3))); 2.218 + } 2.219 + static VALUE rbncurs_slk_touch(VALUE dummy) { 2.220 + return INT2NUM(slk_touch()); 2.221 +@@ -1383,17 +1383,17 @@ 2.222 + } 2.223 + #ifdef HAVE_TIGETFLAG 2.224 + static VALUE rbncurs_tigetflag(VALUE dummy, VALUE arg1) { 2.225 +- return INT2NUM(tigetflag(STR2CSTR(arg1))); 2.226 ++ return INT2NUM(tigetflag(StringValuePtr(arg1))); 2.227 + } 2.228 + #endif 2.229 + #ifdef HAVE_TIGETNUM 2.230 + static VALUE rbncurs_tigetnum(VALUE dummy, VALUE arg1) { 2.231 +- return INT2NUM(tigetnum(STR2CSTR(arg1))); 2.232 ++ return INT2NUM(tigetnum(StringValuePtr(arg1))); 2.233 + } 2.234 + #endif 2.235 + #ifdef HAVE_TIGETSTR 2.236 + static VALUE rbncurs_tigetstr(VALUE dummy, VALUE arg1) { 2.237 +- return rb_str_new2(tigetstr(STR2CSTR(arg1))); 2.238 ++ return rb_str_new2(tigetstr(StringValuePtr(arg1))); 2.239 + } 2.240 + #endif 2.241 + static VALUE rbncurs_timeout(VALUE dummy, VALUE arg1) { 2.242 +@@ -1438,10 +1438,10 @@ 2.243 + return return_value; 2.244 + } 2.245 + static VALUE rbncurs_waddnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) { 2.246 +- return INT2NUM(waddnstr(get_window(arg1), STR2CSTR(arg2), NUM2INT(arg3))); 2.247 ++ return INT2NUM(waddnstr(get_window(arg1), StringValuePtr(arg2), NUM2INT(arg3))); 2.248 + } 2.249 + static VALUE rbncurs_waddstr(VALUE dummy, VALUE arg1, VALUE arg2) { 2.250 +- return INT2NUM(waddstr(get_window(arg1), STR2CSTR(arg2))); 2.251 ++ return INT2NUM(waddstr(get_window(arg1), StringValuePtr(arg2))); 2.252 + } 2.253 + static VALUE rbncurs_wattron(VALUE dummy, VALUE arg1, VALUE arg2) { 2.254 + return INT2NUM(wattron(get_window(arg1), NUM2INT(arg2))); 2.255 +@@ -1514,10 +1514,10 @@ 2.256 + return INT2NUM(winsertln(get_window(arg1))); 2.257 + } 2.258 + static VALUE rbncurs_winsnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) { 2.259 +- return INT2NUM(winsnstr(get_window(arg1), STR2CSTR(arg2), NUM2INT(arg3))); 2.260 ++ return INT2NUM(winsnstr(get_window(arg1), StringValuePtr(arg2), NUM2INT(arg3))); 2.261 + } 2.262 + static VALUE rbncurs_winsstr(VALUE dummy, VALUE arg1, VALUE arg2) { 2.263 +- return INT2NUM(winsstr(get_window(arg1), STR2CSTR(arg2))); 2.264 ++ return INT2NUM(winsstr(get_window(arg1), StringValuePtr(arg2))); 2.265 + } 2.266 + static VALUE rbncurs_wmove(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) { 2.267 + return INT2NUM(wmove(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3))); 2.268 +@@ -1619,7 +1619,7 @@ 2.269 + { return rb_str_new2(unctrl(NUM2ULONG(ch))); } 2.270 + static VALUE rbncurs_newterm(VALUE dummy, VALUE rb_type, VALUE rb_outfd, VALUE rb_infd) 2.271 + { 2.272 +- char * type = (rb_type == Qnil) ? (char*)0 : STR2CSTR(rb_type); 2.273 ++ char * type = (rb_type == Qnil) ? (char*)0 : StringValuePtr(rb_type); 2.274 + int outfd = NUM2INT(rb_funcall(rb_outfd, rb_intern("to_i"), 0)); 2.275 + int infd = NUM2INT(rb_funcall(rb_infd, rb_intern("to_i"), 0)); 2.276 + VALUE rb_screen = 2.277 +@@ -2277,7 +2277,7 @@ 2.278 + #ifdef HAVE_MCPRINT 2.279 + static VALUE rbncurs_mcprint(VALUE dummy, VALUE data, VALUE len) 2.280 + { 2.281 +- return INT2NUM(mcprint(STR2CSTR(data), NUM2INT(len))); 2.282 ++ return INT2NUM(mcprint(StringValuePtr(data), NUM2INT(len))); 2.283 + } 2.284 + #endif 2.285 + #ifdef HAVE_HAS_KEY 2.286 +@@ -2378,9 +2378,9 @@ 2.287 + " and a String"); 2.288 + return Qnil; 2.289 + } 2.290 ++ VALUE tmp = rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc-1, argv + 1); 2.291 + wprintw(get_window(argv[0]), "%s", 2.292 +- STR2CSTR(rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc-1, 2.293 +- argv + 1))); 2.294 ++ StringValuePtr(tmp)); 2.295 + return Qnil; 2.296 + } 2.297 + 2.298 +@@ -2394,14 +2394,14 @@ 2.299 + return Qnil; 2.300 + } 2.301 + _tracef("%s", 2.302 +- STR2CSTR(rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc, argv))); 2.303 ++ StringValuePtr(funcall3(rb_mKernel, rb_intern("sprintf"), argc, argv))); 2.304 + return Qnil; 2.305 + } 2.306 + #endif /* HAVE__TRACEF */ 2.307 + #ifdef HAVE__TRACEDUMP 2.308 + static VALUE rbncurs_tracedump(VALUE dummy, VALUE rb_label, VALUE rb_win) 2.309 + { 2.310 +- _tracedump(STR2CSTR(rb_label), get_window(rb_win)); 2.311 ++ _tracedump(StringValuePtr(rb_label), get_window(rb_win)); 2.312 + } 2.313 + #endif /* HAVE__TRACEDUMP */ 2.314 + #ifdef HAVE__TRACEATTR 2.315 +@@ -2706,7 +2706,7 @@ 2.316 + 2.317 + #ifdef HAVE_LOCALE_H 2.318 + static VALUE rbncurs_setlocale(VALUE dummy, VALUE category, VALUE locale) 2.319 +-{ return rb_str_new2(setlocale(NUM2INT(category), STR2CSTR(locale)));} 2.320 ++{ return rb_str_new2(setlocale(NUM2INT(category), StringValuePtr(locale)));} 2.321 + #endif 2.322 + 2.323 + static void init_safe_functions(void)
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/ruby-ncurses/stuff/Werror-format-security.patch Mon Jun 23 01:50:31 2014 +0300 3.3 @@ -0,0 +1,12 @@ 3.4 +diff -Naur ncurses-ruby-1.3.1/form_wrap.c ncurses-ruby-1.3.1.format/form_wrap.c 3.5 +--- ncurses-ruby-1.3.1/form_wrap.c 2014-02-03 11:31:39.049867878 +0100 3.6 ++++ ncurses-ruby-1.3.1.format/form_wrap.c 2014-02-03 11:44:37.001008654 +0100 3.7 +@@ -1132,7 +1132,7 @@ 3.8 + char msg[500]; 3.9 + snprintf(msg, 500, "The validation functions for this field type need %d additional arguments.",(int)(NUM2INT(argc)-1)); 3.10 + msg[499]=0; 3.11 +- rb_raise(rb_eArgError, msg); 3.12 ++ rb_raise(rb_eArgError, "%s", msg); 3.13 + } 3.14 + } 3.15 + }
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/ruby-ncurses/stuff/ruby-ncurses-fix-missing-tz-prototypes.patch Mon Jun 23 01:50:31 2014 +0300 4.3 @@ -0,0 +1,34 @@ 4.4 +From d3e59724601b2aabb231f2e12e16ebf00ba79ab1 Mon Sep 17 00:00:00 2001 4.5 +From: Caleb Marble <cm@marblenix.com> 4.6 +Date: Sun, 2 Mar 2014 13:53:05 -0600 4.7 +Subject: [PATCH] modified: ext/ncurses/ncurses_wrap.h 4.8 +MIME-Version: 1.0 4.9 +Content-Type: text/plain; charset=UTF-8 4.10 +Content-Transfer-Encoding: 8bit 4.11 + 4.12 +Fixes the following compiler error: 4.13 + 4.14 +ext/ncurses/ncurses_wrap.c: In function ‘rbncurshelper_nonblocking_wgetch’: 4.15 +ext/ncurses/ncurses_wrap.c:807:12: error: variable ‘tz’ has initializer but incomplete type 4.16 + struct timezone tz = {0,0}; 4.17 + 4.18 +Also closes #6 4.19 +--- 4.20 + ncurses_wrap.h | 1 + 4.21 + 1 file changed, 1 insertion(+) 4.22 + 4.23 +diff --git a/ncurses_wrap.h b/ncurses_wrap.h 4.24 +index 85da4f8..92583c0 100644 4.25 +--- a/ncurses_wrap.h 4.26 ++++ b/ncurses_wrap.h 4.27 +@@ -84,6 +84,7 @@ int close(int); 4.28 + #endif 4.29 + 4.30 + #include <ruby.h> 4.31 ++#include <sys/time.h> 4.32 + 4.33 + extern VALUE mNcurses; /* module Ncurses */ 4.34 + extern VALUE cWINDOW; /* class Ncurses::WINDOW */ 4.35 +-- 4.36 +1.9.1 4.37 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/tpp/receipt Mon Jun 23 01:50:31 2014 +0300 5.3 @@ -0,0 +1,37 @@ 5.4 +# SliTaz package receipt. 5.5 + 5.6 +PACKAGE="tpp" 5.7 +VERSION="1.3.1" 5.8 +CATEGORY="utilities" 5.9 +SHORT_DESC="Text presentation program." 5.10 +MAINTAINER="paul@slitaz.org" 5.11 +DEPENDS="ruby ruby-ncurses ncurses" 5.12 +TARBALL="$PACKAGE-$VERSION.tar.gz" 5.13 +WEB_SITE="http://www.ngolde.de/tpp.html" 5.14 +WGET_URL="http://www.ngolde.de/download/$TARBALL" 5.15 + 5.16 +# Rules to configure and make the package. 5.17 +compile_rules() 5.18 +{ 5.19 + cd $src 5.20 + # use debian patches and fixes 5.21 + patch -i ../../stuff/ruby19.patch 5.22 + patch -i ../../stuff/optional-x.patch 5.23 + cd examples 5.24 + for tppfile in *.tpp; do 5.25 + iconv -f ISO-8859-1 -t UTF-8 -o $tppfile.new $tppfile && \ 5.26 + touch -r $tppfile $tppfile.new && \ 5.27 + mv $tppfile.new $tppfile 5.28 + done 5.29 + cd .. 5.30 + # make DESTDIR=$DESTDIR install 5.31 +} 5.32 + 5.33 +# Rules to gen a SliTaz package suitable for Tazpkg. 5.34 +genpkg_rules() 5.35 +{ 5.36 + mkdir -p $fs/usr/bin $fs/usr/share/doc/tpp/examples 5.37 + install $src/tpp.rb $fs/usr/bin/tpp 5.38 + install -m644 $src/examples/* $fs/usr/share/doc/tpp/examples 5.39 +} 5.40 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/tpp/stuff/optional-x.patch Mon Jun 23 01:50:31 2014 +0300 6.3 @@ -0,0 +1,51 @@ 6.4 +Description: Don't execute commands with --exec by default 6.5 +Author: Axel Beckert <abe@debian.org> 6.6 +Debian-Bug: 706644 6.7 + 6.8 +Index: tpp/tpp.rb 6.9 +=================================================================== 6.10 +--- tpp.orig/tpp.rb 2013-06-12 22:13:55.000000000 +0200 6.11 ++++ tpp/tpp.rb 2013-06-12 22:15:08.000000000 +0200 6.12 +@@ -725,9 +725,13 @@ 6.13 + end 6.14 + 6.15 + def do_exec(cmdline) 6.16 +- rc = Kernel.system(cmdline) 6.17 +- if not rc then 6.18 +- # @todo: add error message 6.19 ++ if $execok then 6.20 ++ rc = Kernel.system(cmdline) 6.21 ++ if not rc then 6.22 ++ # @todo: add error message 6.23 ++ end 6.24 ++ else 6.25 ++ @screen.addstr("--exec disabled by default for security reasons. Use option -x to enable it.") 6.26 + end 6.27 + end 6.28 + 6.29 +@@ -1683,6 +1687,7 @@ 6.30 + $stderr.puts "\t -t <type>\tset filetype <type> as output format" 6.31 + $stderr.puts "\t -o <file>\twrite output to file <file>" 6.32 + $stderr.puts "\t -s <seconds>\twait <seconds> seconds between slides (with -t autoplay)" 6.33 ++ $stderr.puts "\t -x\t\tallow parsing of --exec in input files" 6.34 + $stderr.puts "\t --version\tprint the version" 6.35 + $stderr.puts "\t --help\t\tprint this help" 6.36 + $stderr.puts "\n\t currently available types: ncurses (default), autoplay, latex, txt" 6.37 +@@ -1699,6 +1704,7 @@ 6.38 + output = nil 6.39 + type = "ncurses" 6.40 + time = 1 6.41 ++$execok = nil 6.42 + 6.43 + skip_next = false 6.44 + 6.45 +@@ -1720,6 +1726,8 @@ 6.46 + elsif ARGV[i] == "-s" then 6.47 + time = ARGV[i+1].to_i 6.48 + skip_next = true 6.49 ++ elsif ARGV[i] == "-x" then 6.50 ++ $execok = 1 6.51 + elsif input == nil then 6.52 + input = ARGV[i] 6.53 + end 6.54 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/tpp/stuff/ruby19.patch Mon Jun 23 01:50:31 2014 +0300 7.3 @@ -0,0 +1,294 @@ 7.4 +Description: make key events work on ruby 1.9 7.5 +Author: Chad Fowler <chad@chadfowler.com> 7.6 +Debian-Bug: 671530 7.7 + 7.8 +Index: tpp/tpp.rb 7.9 +=================================================================== 7.10 +--- tpp.orig/tpp.rb 2013-06-12 18:13:40.000000000 +0200 7.11 ++++ tpp/tpp.rb 2013-06-12 21:05:55.000000000 +0200 7.12 +@@ -44,7 +44,7 @@ 7.13 + "blue" => 5, 7.14 + "cyan" => 6, 7.15 + "magenta" => 7, 7.16 +- "black" => 8, 7.17 ++ "black" => 8, 7.18 + "default" =>-1} 7.19 + colors[color] 7.20 + end 7.21 +@@ -95,7 +95,7 @@ 7.22 + end # class FileParser 7.23 + 7.24 + 7.25 +-# Represents a page (aka `slide') in TPP. A page consists of a title and one or 7.26 ++# Represents a page (aka `slide') in TPP. A page consists of a title and one or 7.27 + # more lines. 7.28 + class Page 7.29 + 7.30 +@@ -145,8 +145,8 @@ 7.31 + 7.32 + 7.33 + 7.34 +-# Implements a generic visualizer from which all other visualizers need to be 7.35 +-# derived. If Ruby supported abstract methods, all the do_* methods would be 7.36 ++# Implements a generic visualizer from which all other visualizers need to be 7.37 ++# derived. If Ruby supported abstract methods, all the do_* methods would be 7.38 + # abstract. 7.39 + class TppVisualizer 7.40 + 7.41 +@@ -154,8 +154,8 @@ 7.42 + # nothing 7.43 + end 7.44 + 7.45 +- # Splits a line into several lines, where each of the result lines is at most 7.46 +- # _width_ characters long, caring about word boundaries, and returns an array 7.47 ++ # Splits a line into several lines, where each of the result lines is at most 7.48 ++ # _width_ characters long, caring about word boundaries, and returns an array 7.49 + # of strings. 7.50 + def split_lines(text,width) 7.51 + lines = [] 7.52 +@@ -190,13 +190,13 @@ 7.53 + $stderr.puts "Error: TppVisualizer#do_footer has been called directly." 7.54 + Kernel.exit(1) 7.55 + end 7.56 +- 7.57 ++ 7.58 + def do_header(header_text) 7.59 + $stderr.puts "Error: TppVisualizer#do_header has been called directly." 7.60 + Kernel.exit(1) 7.61 + end 7.62 + 7.63 +- 7.64 ++ 7.65 + def do_refresh 7.66 + $stderr.puts "Error: TppVisualizer#do_refresh has been called directly." 7.67 + Kernel.exit(1) 7.68 +@@ -316,7 +316,7 @@ 7.69 + $stderr.puts "Error: TppVisualizer#do_command_prompt has been called directly." 7.70 + Kernel.exit(1) 7.71 + end 7.72 +- 7.73 ++ 7.74 + def do_beginslideright 7.75 + $stderr.puts "Error: TppVisualizer#do_beginslideright has been called directly." 7.76 + Kernel.exit(1) 7.77 +@@ -377,7 +377,7 @@ 7.78 + Kernel.exit(1) 7.79 + end 7.80 + 7.81 +- # Receives a _line_, parses it if necessary, and dispatches it 7.82 ++ # Receives a _line_, parses it if necessary, and dispatches it 7.83 + # to the correct method which then does the correct processing. 7.84 + # It returns whether the controller shall wait for input. 7.85 + def visualize(line,eop) 7.86 +@@ -446,10 +446,10 @@ 7.87 + do_huge(figlet_text) 7.88 + when /^--footer / 7.89 + @footer_txt = line.sub(/^--footer /,"") 7.90 +- do_footer(@footer_txt) 7.91 ++ do_footer(@footer_txt) 7.92 + when /^--header / 7.93 + @header_txt = line.sub(/^--header /,"") 7.94 +- do_header(@header_txt) 7.95 ++ do_header(@header_txt) 7.96 + when /^--title / 7.97 + title = line.sub(/^--title /,"") 7.98 + do_title(title) 7.99 +@@ -547,7 +547,7 @@ 7.100 + @withborder = true 7.101 + draw_border 7.102 + end 7.103 +- 7.104 ++ 7.105 + def do_command_prompt() 7.106 + message = "Press any key to continue :)" 7.107 + cursor_pos = 0 7.108 +@@ -614,11 +614,11 @@ 7.109 + (@termwidth-2).times { @screen.addstr("-") }; @screen.addstr("'") 7.110 + 1.upto(@termheight-3) do |y| 7.111 + @screen.move(y,0) 7.112 +- @screen.addstr("|") 7.113 ++ @screen.addstr("|") 7.114 + end 7.115 + 1.upto(@termheight-3) do |y| 7.116 + @screen.move(y,@termwidth-1) 7.117 +- @screen.addstr("|") 7.118 ++ @screen.addstr("|") 7.119 + end 7.120 + end 7.121 + 7.122 +@@ -700,7 +700,7 @@ 7.123 + end 7.124 + 7.125 + def show_help_page 7.126 +- help_text = [ "tpp help", 7.127 ++ help_text = [ "tpp help", 7.128 + "", 7.129 + "space bar ............................... display next entry within page", 7.130 + "space bar, cursor-down, cursor-right .... display next page", 7.131 +@@ -775,7 +775,7 @@ 7.132 + @screen.move(@termheight - 3, (@termwidth - footer_txt.length)/2) 7.133 + @screen.addstr(footer_txt) 7.134 + end 7.135 +- 7.136 ++ 7.137 + def do_header(header_txt) 7.138 + @screen.move(@termheight - @termheight+1, (@termwidth - header_txt.length)/2) 7.139 + @screen.addstr(header_txt) 7.140 +@@ -918,7 +918,7 @@ 7.141 + time_to_sleep = 1.to_f / 20 7.142 + Kernel.sleep(time_to_sleep) 7.143 + xcount -= 1 7.144 +- end 7.145 ++ end 7.146 + when "right" 7.147 + (@termwidth - @indent).times do |pos| 7.148 + @screen.move(@cur_line,@termwidth - pos - 1) 7.149 +@@ -991,7 +991,7 @@ 7.150 + @screen.move(line,col*15 + 2) 7.151 + if current_page == i then 7.152 + @screen.printw("%2d %s <=",i+1,pages[i].title[0..80]) 7.153 +- else 7.154 ++ else 7.155 + @screen.printw("%2d %s",i+1,pages[i].title[0..80]) 7.156 + end 7.157 + line += 1 7.158 +@@ -1092,7 +1092,7 @@ 7.159 + 7.160 + def do_footer(footer_text) 7.161 + end 7.162 +- 7.163 ++ 7.164 + def do_header(header_text) 7.165 + end 7.166 + 7.167 +@@ -1166,7 +1166,7 @@ 7.168 + 7.169 + def do_revon 7.170 + end 7.171 +- 7.172 ++ 7.173 + def do_command_prompt 7.174 + end 7.175 + def do_revoff 7.176 +@@ -1183,7 +1183,7 @@ 7.177 + 7.178 + def do_endslide 7.179 + end 7.180 +- 7.181 ++ 7.182 + def do_beginslideright 7.183 + end 7.184 + 7.185 +@@ -1349,7 +1349,7 @@ 7.186 + 7.187 + end 7.188 + 7.189 +-# Implements an interactive controller which feeds the visualizer until it is 7.190 ++# Implements an interactive controller which feeds the visualizer until it is 7.191 + # told to stop, and then reads a key press and executes the appropiate action. 7.192 + class InteractiveController < TppController 7.193 + 7.194 +@@ -1396,17 +1396,17 @@ 7.195 + loop do 7.196 + ch = @vis.get_key 7.197 + case ch 7.198 +- when 'q'[0], 'Q'[0] # 'Q'uit 7.199 ++ when ?q.ord, ?Q.ord # 'Q'uit 7.200 + return 7.201 +- when 'r'[0], 'R'[0] # 'R'edraw slide 7.202 ++ when ?r.ord, ?R.ord # 'R'edraw slide 7.203 + changed_page = true # @todo: actually implement redraw 7.204 +- when 'e'[0], 'E'[0] 7.205 ++ when ?e.ord, ?E.ord 7.206 + @cur_page = @pages.size - 1 7.207 + break 7.208 +- when 's'[0], 'S'[0] 7.209 ++ when ?s.ord, ?S.ord 7.210 + @cur_page = 0 7.211 + break 7.212 +- when 'j'[0], 'J'[0] # 'J'ump to slide 7.213 ++ when ?j.ord, ?J.ord # 'J'ump to slide 7.214 + screen = @vis.store_screen 7.215 + p = @vis.read_newpage(@pages,@cur_page) 7.216 + if p >= 0 and p < @pages.size 7.217 +@@ -1417,28 +1417,28 @@ 7.218 + @vis.restore_screen(screen) 7.219 + end 7.220 + break 7.221 +- when 'l'[0], 'L'[0] # re'l'oad current file 7.222 ++ when ?l.ord, ?L.ord # re'l'oad current file 7.223 + @reload_file = true 7.224 + return 7.225 +- when 'c'[0], 'C'[0] # command prompt 7.226 ++ when ?c.ord, ?C.ord # command prompt 7.227 + screen = @vis.store_screen 7.228 + @vis.do_command_prompt 7.229 + @vis.clear 7.230 + @vis.restore_screen(screen) 7.231 +- when '?'[0], 'h'[0] 7.232 ++ when ??.ord, ?h.ord 7.233 + screen = @vis.store_screen 7.234 + @vis.show_help_page 7.235 + ch = @vis.get_key 7.236 + @vis.clear 7.237 + @vis.restore_screen(screen) 7.238 +- when :keyright, :keydown, ' '[0] 7.239 ++ when :keyright, :keydown, ' '.ord 7.240 + if @cur_page + 1 < @pages.size and eop then 7.241 + @cur_page += 1 7.242 + @pages[@cur_page].reset_eop 7.243 + @vis.new_page 7.244 + end 7.245 + break 7.246 +- when 'b'[0], 'B'[0], :keyleft, :keyup 7.247 ++ when ?b.ord, ?B.ord, :keyleft, :keyup 7.248 + if @cur_page > 0 then 7.249 + @cur_page -= 1 7.250 + @pages[@cur_page].reset_eop 7.251 +@@ -1455,7 +1455,7 @@ 7.252 + end 7.253 + 7.254 + 7.255 +-# Implements a visualizer which converts TPP source to a nicely formatted text 7.256 ++# Implements a visualizer which converts TPP source to a nicely formatted text 7.257 + # file which can e.g. be used as handout. 7.258 + class TextVisualizer < TppVisualizer 7.259 + 7.260 +@@ -1475,7 +1475,7 @@ 7.261 + 7.262 + def do_footer(footer_text) 7.263 + end 7.264 +- 7.265 ++ 7.266 + def do_header(header_text) 7.267 + end 7.268 + 7.269 +@@ -1539,7 +1539,7 @@ 7.270 + 7.271 + def do_revon 7.272 + end 7.273 +- 7.274 ++ 7.275 + def do_command_prompt 7.276 + end 7.277 + def do_revoff 7.278 +@@ -1556,7 +1556,7 @@ 7.279 + 7.280 + def do_endslide 7.281 + end 7.282 +- 7.283 ++ 7.284 + def do_beginslideright 7.285 + end 7.286 + 7.287 +@@ -1650,8 +1650,8 @@ 7.288 + 7.289 + end 7.290 + 7.291 +-# Implements a non-interactive controller to control non-interactive 7.292 +-# visualizers (i.e. those that are used for converting TPP source code into 7.293 ++# Implements a non-interactive controller to control non-interactive 7.294 ++# visualizers (i.e. those that are used for converting TPP source code into 7.295 + # another format) 7.296 + class ConversionController < TppController 7.297 +