Skip to content

Commit

Permalink
Bump after change to remove OpenBSD version from ruby SITEARCHDIR,
Browse files Browse the repository at this point in the history
and use new MODRUBY_SITEDIR and MODRUBY_SITEARCHDIR variables in
PLIST.

Allow building on ruby 1.9 by using RARRAY_LEN() instead of
RARRAY()->len.

OK landry@, jcs@ for the bump and PLIST changes
  • Loading branch information
Jeremy Evans committed Jul 19, 2011
1 parent 381a12b commit c4eb206
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 5 deletions.
4 changes: 2 additions & 2 deletions devel/ruby-ncurses/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.30 2011/07/18 19:06:36 naddy Exp $
# $OpenBSD: Makefile,v 1.31 2011/07/19 18:04:21 jeremy Exp $

COMMENT= Ruby interface to ncurses

VERSION= 1.1
DISTNAME= ncurses-ruby-${VERSION}
PKGNAME= ncurses-${VERSION}
REVISION= 11
REVISION= 12
CATEGORIES= devel

HOMEPAGE= http://ncurses-ruby.berlios.de/
Expand Down
39 changes: 39 additions & 0 deletions devel/ruby-ncurses/patches/patch-form_wrap_c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
$OpenBSD: patch-form_wrap_c,v 1.1 2011/07/19 18:04:21 jeremy Exp $
--- form_wrap.c.orig Tue Jul 19 09:13:14 2011
+++ form_wrap.c Tue Jul 19 09:14:49 2011
@@ -394,7 +394,7 @@ static void reg_proc(void* owner, int hook, VALUE proc
*/
static VALUE rbncurs_m_new_form(VALUE dummy, VALUE rb_field_array)
{
- long n = RARRAY(rb_field_array)->len;
+ long n = RARRAY_LEN(rb_field_array);
/* Will ncurses free this array? If not, must do it after calling free_form(). */
FIELD** fields = ALLOC_N(FIELD*, (n+1));
long i;
@@ -618,7 +618,7 @@ static VALUE rbncurs_c_set_field_type(int argc, VALUE*
rb_raise(rb_eArgError, "TYPE_ENUM requires three additional arguments");
}
else {
- int n = RARRAY(arg3)->len;
+ int n = RARRAY_LEN(arg3);
/* Will ncurses free this array of strings in free_field()? */
char** list = ALLOC_N(char*, n+1);
int i;
@@ -777,7 +777,7 @@ static VALUE rbncurs_m_set_max_field(VALUE dummy, VALU
* form_field
*/
static VALUE rbncurs_c_set_form_fields(VALUE rb_form, VALUE rb_field_array) {
- long n = RARRAY(rb_field_array)->len;
+ long n = RARRAY_LEN(rb_field_array);
/* If ncurses does not free memory used by the previous array of strings, */
/* we will have to do it now. */
FIELD** fields = ALLOC_N(FIELD*, (n+1));
@@ -1125,7 +1125,7 @@ static void* make_arg(va_list* ap) {
VALUE argc = rb_funcall(proc, rb_intern("arity"),0);
VALUE args = get_proc(field, FIELDTYPE_ARGS);
if (args != Qnil) {
- if (NUM2INT(argc)-1 != RARRAY(args)->len) {
+ if (NUM2INT(argc)-1 != RARRAY_LEN(args)) {
char msg[500];
snprintf(msg, 500, "The validation functions for this field type need %d additional arguments.",NUM2INT(argc)-1);
msg[499]=0;
6 changes: 3 additions & 3 deletions devel/ruby-ncurses/pkg/PLIST
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@comment $OpenBSD: PLIST,v 1.6 2010/11/08 23:24:40 jeremy Exp $
lib/ruby/site_ruby/${MODRUBY_LIBREV}/${MODRUBY_ARCH}/ncurses_bin.so
lib/ruby/site_ruby/${MODRUBY_LIBREV}/ncurses.rb
@comment $OpenBSD: PLIST,v 1.7 2011/07/19 18:04:21 jeremy Exp $
${MODRUBY_SITEDIR}/ncurses.rb
${MODRUBY_SITEARCHDIR}/ncurses_bin.so
${MODRUBY_RELDOCDIR}/
${MODRUBY_RELDOCDIR}/ncurses/
${MODRUBY_RELDOCDIR}/ncurses/README
Expand Down

0 comments on commit c4eb206

Please sign in to comment.