This updates ruby-ncurses from 1.1 to 1.2.1. This fixes a fairly
important issue, which is that 1.1 does not run correctly on ruby 1.9,
and currently we build a ruby 1.9 version by default. I didn't catch
this in the update to make ruby 1.9 the default version, because it does
compile and load correctly 1.9. However, running the examples that ship
with ruby-ncurses ruby 1.9 to segfault.
This switches the upstream for the library, since the previous author
abandoned it. It's now maintained on GitHub, and is distributed as a
gem instead of tar.bz2.
Since this is a C extension gem, I'd like to treat it similarly to the
other C extension gems, and build versions for both ruby 1.8 and 1.9
by default.
Tested on i386 and amd64. OKs?
Thanks,
Jeremy
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/ruby-ncurses/Makefile,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile
--- Makefile 23 Sep 2012 16:57:34 -0000 1.34
+++ Makefile 8 Oct 2012 13:31:37 -0000
@@ -2,37 +2,23 @@
COMMENT= Ruby interface to ncurses
-VERSION= 1.1
+VERSION= 1.2.1
DISTNAME= ncurses-ruby-${VERSION}
PKGNAME= ncurses-${VERSION}
-REVISION= 14
CATEGORIES= devel
-HOMEPAGE= http://ncurses-ruby.berlios.de/
+HOMEPAGE= https://github.com/eclubb/ncurses-ruby
-# LGPL
+# LGPL 2.1
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
-WANTLIB= form ncurses panel
-MASTER_SITES= ${MASTER_SITE_BERLIOS:=ncurses-ruby/}
-EXTRACT_SUFX= .tar.bz2
+WANTLIB= form menu ncurses panel
MODULES= lang/ruby
-CONFIGURE_STYLE= ruby extconf
+CONFIGURE_STYLE= ruby gem ext
-INSTALL_TARGET= site-install
-
-DOC_DIR= ${MODRUBY_DOCDIR}/ncurses
-SAMPLE_DIR= ${MODRUBY_EXAMPLEDIR}/ncurses
-
-post-install:
- ${INSTALL_DATA_DIR} ${DOC_DIR}
- ${INSTALL_DATA} ${WRKSRC}/README ${DOC_DIR}
- ${INSTALL_DATA_DIR} ${SAMPLE_DIR}
- ${INSTALL_DATA} ${WRKSRC}/examples/* ${SAMPLE_DIR}
-
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/ruby-ncurses/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 17 Dec 2007 20:11:53 -0000 1.5
+++ distinfo 8 Oct 2012 13:18:22 -0000
@@ -1,5 +1,2 @@
-MD5 (ncurses-ruby-1.1.tar.bz2) = yW/2ovuXGuzOvjPPxrRgNQ==
-RMD160 (ncurses-ruby-1.1.tar.bz2) = 2Qdsu8KARtUBcgMEn0wOAmQD68Q=
-SHA1 (ncurses-ruby-1.1.tar.bz2) = 9Qpursg2hFzevRFnYKsOHOXB11s=
-SHA256 (ncurses-ruby-1.1.tar.bz2) =
cG7RN8NGRO24ZC5X4Zon+Y03NcStTONQ/2ogbVlneF8=
-SIZE (ncurses-ruby-1.1.tar.bz2) = 46327
+SHA256 (ncurses-ruby-1.2.1.gem) = oa9B6DPmOx6PwybSvKYaRzafd/9Sw/yvllZ/XJVJ2jc=
+SIZE (ncurses-ruby-1.2.1.gem) = 65024
Index: patches/patch-form_wrap_c
===================================================================
RCS file: patches/patch-form_wrap_c
diff -N patches/patch-form_wrap_c
--- patches/patch-form_wrap_c 19 Jul 2011 18:04:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
-$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;
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/ruby-ncurses/pkg/PLIST,v
retrieving revision 1.7
diff -u -p -r1.7 PLIST
--- pkg/PLIST 19 Jul 2011 18:04:21 -0000 1.7
+++ pkg/PLIST 8 Oct 2012 13:20:07 -0000
@@ -1,17 +1,42 @@
-@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
-${MODRUBY_RELEXAMPLEDIR}/
-${MODRUBY_RELEXAMPLEDIR}/ncurses/
-${MODRUBY_RELEXAMPLEDIR}/ncurses/LICENSES_for_examples
-${MODRUBY_RELEXAMPLEDIR}/ncurses/example.rb
-${MODRUBY_RELEXAMPLEDIR}/ncurses/form.rb
-${MODRUBY_RELEXAMPLEDIR}/ncurses/form2.rb
-${MODRUBY_RELEXAMPLEDIR}/ncurses/hello_ncurses.rb
-${MODRUBY_RELEXAMPLEDIR}/ncurses/rain.rb
-${MODRUBY_RELEXAMPLEDIR}/ncurses/read_line.rb
-${MODRUBY_RELEXAMPLEDIR}/ncurses/tclock.rb
-${MODRUBY_RELEXAMPLEDIR}/ncurses/test_scanw.rb
+@comment $OpenBSD$
+${GEM_LIB}/cache/${DISTNAME}.gem
+${GEM_LIB}/gems/${DISTNAME}/
+${GEM_LIB}/gems/${DISTNAME}/COPYING
+${GEM_LIB}/gems/${DISTNAME}/Changes
+${GEM_LIB}/gems/${DISTNAME}/README
+${GEM_LIB}/gems/${DISTNAME}/THANKS
+${GEM_LIB}/gems/${DISTNAME}/TODO
+${GEM_LIB}/gems/${DISTNAME}/examples/
+${GEM_LIB}/gems/${DISTNAME}/examples/LICENSES_for_examples
+${GEM_LIB}/gems/${DISTNAME}/examples/example.rb
+${GEM_LIB}/gems/${DISTNAME}/examples/form.rb
+${GEM_LIB}/gems/${DISTNAME}/examples/form2.rb
+${GEM_LIB}/gems/${DISTNAME}/examples/hello_ncurses.rb
+${GEM_LIB}/gems/${DISTNAME}/examples/rain.rb
+${GEM_LIB}/gems/${DISTNAME}/examples/read_line.rb
+${GEM_LIB}/gems/${DISTNAME}/examples/tclock.rb
+${GEM_LIB}/gems/${DISTNAME}/examples/test_scanw.rb
+${GEM_LIB}/gems/${DISTNAME}/ext/
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/Makefile
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/extconf.rb
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/form_wrap.c
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/form_wrap.h
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/form_wrap.o
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/menu_wrap.c
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/menu_wrap.h
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/menu_wrap.o
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/mkmf.log
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/ncurses.so
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/ncurses_wrap.c
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/ncurses_wrap.h
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/ncurses_wrap.o
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/panel_wrap.c
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/panel_wrap.h
+${GEM_LIB}/gems/${DISTNAME}/ext/ncurses/panel_wrap.o
+${GEM_LIB}/gems/${DISTNAME}/lib/
+${GEM_LIB}/gems/${DISTNAME}/lib/ncurses-ruby/
+${GEM_LIB}/gems/${DISTNAME}/lib/ncurses-ruby/version.rb
+${GEM_LIB}/gems/${DISTNAME}/lib/ncurses.rb
+${GEM_LIB}/gems/${DISTNAME}/lib/ncurses.so
+${GEM_LIB}/specifications/${DISTNAME}.gemspec