diff options
author | taca <taca@pkgsrc.org> | 2010-09-10 07:31:45 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2010-09-10 07:31:45 +0000 |
commit | 06612369465ee853b57e5e3ef00e18b71c31f40c (patch) | |
tree | abb9f7c67e56ce4eb3a3fb2527c2699b2d7d4a78 | |
parent | b9dad6aa64cec4bf8ab0de6362ce3026226b1eca (diff) | |
download | pkgsrc-06612369465ee853b57e5e3ef00e18b71c31f40c.tar.gz |
* Ajust new ruby package's framework.
* Add patch to support for ruby18 and ruby19.
-rw-r--r-- | multimedia/ruby-ming/Makefile | 14 | ||||
-rw-r--r-- | multimedia/ruby-ming/distinfo | 6 | ||||
-rw-r--r-- | multimedia/ruby-ming/patches/patch-aa | 15 | ||||
-rw-r--r-- | multimedia/ruby-ming/patches/patch-ab | 32 | ||||
-rw-r--r-- | multimedia/ruby-ming/patches/patch-ac | 18 | ||||
-rw-r--r-- | multimedia/ruby-ming/patches/patch-ad | 15 |
6 files changed, 95 insertions, 5 deletions
diff --git a/multimedia/ruby-ming/Makefile b/multimedia/ruby-ming/Makefile index 99d4e57b8d6..a83425a6db0 100644 --- a/multimedia/ruby-ming/Makefile +++ b/multimedia/ruby-ming/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2010/06/13 22:45:06 wiz Exp $ +# $NetBSD: Makefile,v 1.13 2010/09/10 07:31:45 taca Exp $ DISTNAME= ming-ruby-${VER} PKGNAME= ${RUBY_PKGPREFIX}-ming-${VER} @@ -25,10 +25,16 @@ CONFIGURE_ARGS+= --siteruby=${PREFIX}/${RUBY_VENDORLIB_BASE} CONFIGURE_ARGS+= --siterubyver=${PREFIX}/${RUBY_VENDORLIB} CONFIGURE_ARGS+= --siterubyverarch=${PREFIX}/${RUBY_VENDORARCHLIB} +INSTALLATION_DIRS+= ${RUBY_EG}/ming + +pre-configure: + ${CHMOD} -x ${WRKSRC}/examples/rubyguts/midnightcommander/ruby.syntax \ + ${WRKSRC}/examples/rubyguts/railsconnection/index.rhtml + post-install: - ${INSTALL_DATA_DIR} ${DESTDIR}${RUBY_EXAMPLESDIR}/ming - cd ${WRKSRC}/examples && \ - pax -wrppm '-s|.*/CVS.*$$||' . ${DESTDIR}${RUBY_EXAMPLESDIR}/ming + cd ${WRKSRC}/examples && \ + pax -wrppm '-s|.*/CVS.*$$||' . \ + ${DESTDIR}${PREFIX}/${RUBY_EG}/ming .include "../../multimedia/ming/buildlink3.mk" .include "../../lang/ruby/modules.mk" diff --git a/multimedia/ruby-ming/distinfo b/multimedia/ruby-ming/distinfo index 1e48bfeee76..1660490cc44 100644 --- a/multimedia/ruby-ming/distinfo +++ b/multimedia/ruby-ming/distinfo @@ -1,5 +1,9 @@ -$NetBSD: distinfo,v 1.7 2010/04/09 01:36:34 obache Exp $ +$NetBSD: distinfo,v 1.8 2010/09/10 07:31:45 taca Exp $ SHA1 (ming-ruby-0.2.1.tar.gz) = 942829a4085afb2645e6b098b72bd24badb8f0ef RMD160 (ming-ruby-0.2.1.tar.gz) = 7ddde8b9912bdd1608a7af8b23464a5fc63b9306 Size (ming-ruby-0.2.1.tar.gz) = 1818561 bytes +SHA1 (patch-aa) = 360988809e736eebe3f01f20c027783dcf64c507 +SHA1 (patch-ab) = aacbeafe64930e88f4d49e08734312e46116aec0 +SHA1 (patch-ac) = c6604cb8856ea42d1083894eae9f60c997bfa27a +SHA1 (patch-ad) = 6a62e023b934f528f9247bae24c28829f35d1c25 diff --git a/multimedia/ruby-ming/patches/patch-aa b/multimedia/ruby-ming/patches/patch-aa new file mode 100644 index 00000000000..2e7e0396d40 --- /dev/null +++ b/multimedia/ruby-ming/patches/patch-aa @@ -0,0 +1,15 @@ +$NetBSD: patch-aa,v 1.3 2010/09/10 07:31:45 taca Exp $ + +Use modern Ruby API. + +--- ext/ming/mingc/swfbitmap.c.orig 2008-03-09 17:40:50.000000000 +0000 ++++ ext/ming/mingc/swfbitmap.c +@@ -58,7 +58,7 @@ rb_SWFBitmap_s_new(argc, argv, self) + RAISE_NOF(filename); + + if(NIL_P(a)) { +- len = RSTRING(f)->len; ++ len = RSTRING_LEN(f); + if(len > 5) { + ext = &filename[len - 5]; + if(strncmp(ext, ".jpeg", 5) == 0) { diff --git a/multimedia/ruby-ming/patches/patch-ab b/multimedia/ruby-ming/patches/patch-ab new file mode 100644 index 00000000000..be7fc7d08f3 --- /dev/null +++ b/multimedia/ruby-ming/patches/patch-ab @@ -0,0 +1,32 @@ +$NetBSD: patch-ab,v 1.3 2010/09/10 07:31:45 taca Exp $ + +Use modern Ruby API. + +--- ext/ming/mingc/swfbutton.c.orig 2008-03-02 09:08:51.000000000 +0000 ++++ ext/ming/mingc/swfbutton.c +@@ -49,10 +49,10 @@ rb_SWFButton_s_key_press(self, key) + { + if(TYPE(key) != T_STRING) + rb_raise(rb_eMingError, "Argument must be a character on keyboard."); +- if(RSTRING(key)->len != 1) ++ if(RSTRING_LEN(key) != 1) + rb_raise(rb_eMingError, "Size of argument must be just 1."); + +- return INT2FIX(SWFBUTTON_KEYPRESS(RSTRING(key)->ptr[0])); ++ return INT2FIX(SWFBUTTON_KEYPRESS(RSTRING_PTR(key)[0])); + } + + static VALUE +@@ -61,10 +61,10 @@ rb_SWFButton_s_on_key_press(self, key) + { + if(TYPE(key) != T_STRING) + rb_raise(rb_eMingError, "Argument must be a character on keyboard."); +- if(RSTRING(key)->len != 1) ++ if(RSTRING_LEN(key) != 1) + rb_raise(rb_eMingError, "Size of argument must be just 1."); + +- return INT2FIX(SWFBUTTON_ONKEYPRESS(RSTRING(key)->ptr[0])); ++ return INT2FIX(SWFBUTTON_ONKEYPRESS(RSTRING_PTR(key)[0])); + } + + static VALUE diff --git a/multimedia/ruby-ming/patches/patch-ac b/multimedia/ruby-ming/patches/patch-ac new file mode 100644 index 00000000000..6cff09f1acb --- /dev/null +++ b/multimedia/ruby-ming/patches/patch-ac @@ -0,0 +1,18 @@ +$NetBSD: patch-ac,v 1.1 2010/09/10 07:31:45 taca Exp $ + +Use modern Ruby API. + +--- ext/ming/mingc/swffiltermatrix.c.orig 2008-03-09 20:12:44.000000000 +0000 ++++ ext/ming/mingc/swffiltermatrix.c +@@ -43,9 +43,9 @@ rb_SWFFilterMatrix_new(self, cols, rows, + struct RSWFFilterMatrix *fm = ALLOC(struct RSWFFilterMatrix); + int i; + +- int size = RARRAY(vals)->len; ++ int size = RARRAY_LEN(vals); + float *tab = (float *)malloc(cols*rows*sizeof(float)); +- VALUE *ptr = RARRAY(vals)->ptr; ++ VALUE *ptr = RARRAY_PTR(vals); + + for (i=0;i<size;i++,ptr++) { + diff --git a/multimedia/ruby-ming/patches/patch-ad b/multimedia/ruby-ming/patches/patch-ad new file mode 100644 index 00000000000..42f0739018e --- /dev/null +++ b/multimedia/ruby-ming/patches/patch-ad @@ -0,0 +1,15 @@ +$NetBSD: patch-ad,v 1.1 2010/09/10 07:31:45 taca Exp $ + +Use modern Ruby API. + +--- ext/ming/mingc/swftext.c.orig 2008-02-24 18:03:41.000000000 +0000 ++++ ext/ming/mingc/swftext.c +@@ -150,7 +150,7 @@ rb_SWFText_add_UTF8_string(int argc, VAL + if (advance == Qnil) { + adv = 0; + } else { +- len = RARRAY(advance)->len; ++ len = RARRAY_LEN(advance); + adv = ALLOC_N(int, len); + + /* unefficient, but easy to implement... */ |