wok-current rev 16777
Add ruby-ncurses
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sun Jun 22 16:35:17 2014 +0100 (2014-06-22) |
parents | 313b384e2a06 |
children | 08fef135770f |
files | ruby-ncurses/receipt ruby-ncurses/stuff/STR2CSTR-deprecated.patch ruby-ncurses/stuff/Werror-format-security.patch ruby-ncurses/stuff/ruby-ncurses-fix-missing-tz-prototypes.patch |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ruby-ncurses/receipt Sun Jun 22 16:35:17 2014 +0100 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 Sun Jun 22 16:35:17 2014 +0100 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 Sun Jun 22 16:35:17 2014 +0100 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 Sun Jun 22 16:35:17 2014 +0100 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 +