diff options
12 files changed, 252 insertions, 4 deletions
diff --git a/japanese/ruby-ming/Makefile b/japanese/ruby-ming/Makefile index cf6e1a3d5f86..fa675dbdb17e 100644 --- a/japanese/ruby-ming/Makefile +++ b/japanese/ruby-ming/Makefile @@ -16,10 +16,6 @@ COMMENT= Yet another Ming module for Ruby built with Japanese support LIB_DEPENDS= ming:${PORTSDIR}/japanese/ming -BROKEN= fails to build -DEPRECATED= Broken for more than 6 month -EXPIRATION_DATE= 2014-02-27 - RUBY_MING_VERSION= 0.1.6 USE_RUBY= yes diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-ming.c b/japanese/ruby-ming/files/patch-ext-ming-ming-ming.c new file mode 100644 index 000000000000..0e2973506604 --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-ming.c @@ -0,0 +1,28 @@ +--- ext/ming/ming/ming.c.orig 2003-09-28 13:51:44.000000000 +0900 ++++ ext/ming/ming/ming.c 2014-01-29 17:11:21.000000000 +0900 +@@ -56,10 +56,10 @@ + { + if(TYPE(c) != T_STRING) + rb_raise(rb_eMingError, "Argument must be a character on keyboard."); +- if(RSTRING(c)->len != 1) ++ if(RSTRING_LEN(c) != 1) + rb_raise(rb_eMingError, "Size of argument must be just 1."); + +- return INT2FIX(SWFBUTTON_KEYPRESS(RSTRING(c)->ptr[0])); ++ return INT2FIX(SWFBUTTON_KEYPRESS(RSTRING_PTR(c)[0])); + } + + static VALUE +@@ -68,10 +68,10 @@ + { + if(TYPE(c) != T_STRING) + rb_raise(rb_eMingError, "Argument must be character on keyboard."); +- if(RSTRING(c)->len != 1) ++ if(RSTRING_LEN(c) != 1) + rb_raise(rb_eMingError, "Size of argument must be just 1."); + +- return INT2FIX(SWFBUTTON_ONKEYPRESS(RSTRING(c)->ptr[0])); ++ return INT2FIX(SWFBUTTON_ONKEYPRESS(RSTRING_PTR(c)[0])); + } + + void rb_Ming_raise(char *msg, ...) diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-swfaction.c b/japanese/ruby-ming/files/patch-ext-ming-ming-swfaction.c new file mode 100644 index 000000000000..5376e7575638 --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-swfaction.c @@ -0,0 +1,11 @@ +--- ext/ming/ming/swfaction.c.orig 2003-09-28 13:30:00.000000000 +0900 ++++ ext/ming/ming/swfaction.c 2014-01-29 17:11:21.000000000 +0900 +@@ -36,7 +36,7 @@ + rb_SWFAction_s_new(self, s) + VALUE self, s; + { +- char *script = STR2CSTR(s); ++ char *script = StringValuePtr(s); + struct RSWFAction *a = ALLOC(struct RSWFAction); + VALUE obj; + diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-swfbitmap.c b/japanese/ruby-ming/files/patch-ext-ming-ming-swfbitmap.c new file mode 100644 index 000000000000..3c9f9a872755 --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-swfbitmap.c @@ -0,0 +1,27 @@ +--- ext/ming/ming/swfbitmap.c.orig 2003-09-28 11:54:54.000000000 +0900 ++++ ext/ming/ming/swfbitmap.c 2014-01-29 17:11:21.000000000 +0900 +@@ -39,13 +39,13 @@ + + rb_scan_args(argc, argv, "11", &f, &a); + +- filename = STR2CSTR(f); ++ filename = StringValuePtr(f); + fp = fopen(filename, "rb"); + if (fp == NULL) + RAISE_NOF(filename); + + if(NIL_P(a)) { +- len = RSTRING(f)->len; ++ len = RSTRING_LEN(f); + if(len > 5) { + ext = &filename[len - 5]; + if(strncmp_ignore_case(ext, ".jpeg", 5) == 0) { +@@ -64,7 +64,7 @@ + } + } else { + +- alpha_filename = STR2CSTR(a); ++ alpha_filename = StringValuePtr(a); + afp = fopen(alpha_filename, "rb"); + if (afp == NULL) RAISE_NOF(alpha_filename); + diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-swfdisplayitem.c b/japanese/ruby-ming/files/patch-ext-ming-ming-swfdisplayitem.c new file mode 100644 index 000000000000..4f0cc2ccbcec --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-swfdisplayitem.c @@ -0,0 +1,11 @@ +--- ext/ming/ming/swfdisplayitem.c.orig 2003-09-28 14:40:42.000000000 +0900 ++++ ext/ming/ming/swfdisplayitem.c 2014-01-29 17:11:21.000000000 +0900 +@@ -190,7 +190,7 @@ + struct RSWFDisplayItem *i; + + Data_Get_Struct(self, struct RSWFDisplayItem, i); +- SWFDisplayItem_setName(i->this, STR2CSTR(n)); ++ SWFDisplayItem_setName(i->this, StringValuePtr(n)); + + return self; + } diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-swffont.c b/japanese/ruby-ming/files/patch-ext-ming-ming-swffont.c new file mode 100644 index 000000000000..7446c1295483 --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-swffont.c @@ -0,0 +1,31 @@ +--- ext/ming/ming/swffont.c.orig 2003-09-28 12:51:28.000000000 +0900 ++++ ext/ming/ming/swffont.c 2014-01-29 17:11:21.000000000 +0900 +@@ -44,16 +44,16 @@ + VALUE self, n; + { + struct RSWFFont *f = ALLOC(struct RSWFFont); +- char *name = STR2CSTR(n), *ext; ++ char *name = StringValuePtr(n), *ext; + size_t len; + FILE *fp; + VALUE obj; + + VALUE path = rb_cv_get(rb_cSWFFont, "@@font_path"); +- len = RSTRING(n)->len; ++ len = RSTRING_LEN(n); + + if(len > 4) { +- ext = &name[RSTRING(n)->len - 4]; ++ ext = &name[RSTRING_LEN(n) - 4]; + + if (strncmp_ignore_case(ext, ".fdb", 4) == 0) { + fp = search_file(path, name, "rb"); +@@ -92,7 +92,7 @@ + + Data_Get_Struct(self, struct RSWFFont, f); + +- return rb_float_new(SWFFont_getStringWidth(f->this, STR2CSTR(s))); ++ return rb_float_new(SWFFont_getStringWidth(f->this, StringValuePtr(s))); + } + + static VALUE diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-swfmovie.c b/japanese/ruby-ming/files/patch-ext-ming-ming-swfmovie.c new file mode 100644 index 000000000000..7735d026dd81 --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-swfmovie.c @@ -0,0 +1,47 @@ +--- ext/ming/ming/swfmovie.c.orig 2003-09-28 13:22:16.000000000 +0900 ++++ ext/ming/ming/swfmovie.c 2014-01-29 17:11:21.000000000 +0900 +@@ -108,7 +108,7 @@ + int count; + + Data_Get_Struct(self, struct RSWFMovie, m); +- count = SWFMovie_save(m->this, STR2CSTR(s)); ++ count = SWFMovie_save(m->this, StringValuePtr(s)); + + return INT2NUM(count); + } +@@ -226,7 +226,7 @@ + struct RSWFMovie *m; + + Data_Get_Struct(self, struct RSWFMovie, m); +- SWFMovie_labelFrame(m->this, STR2CSTR(label)); ++ SWFMovie_labelFrame(m->this, StringValuePtr(label)); + + return self; + } +@@ -248,7 +248,7 @@ + VALUE self, n; + { + struct RSWFMovie *m; +- char *name = STR2CSTR(n); ++ char *name = StringValuePtr(n); + FILE *fp; + VALUE path = rb_cv_get(rb_cSWFMovie, "@@mp3_path"); + #ifdef SUPPORT_PCM +@@ -286,7 +286,7 @@ + Data_Get_Struct(block, struct RSWFBlock, b); + + regist_references(m->table, n); +- SWFMovie_addExport(m->this, b->this, STR2CSTR(n)); ++ SWFMovie_addExport(m->this, b->this, StringValuePtr(n)); + + return self; + } +@@ -331,7 +331,7 @@ + { + struct RSWFMovie *m; + struct RSWFDisplayItem *i; +- char *name = STR2CSTR(n); ++ char *name = StringValuePtr(n); + FILE *fp; + VALUE obj, path = rb_cv_get(rb_cSWFMovie, "@@mp3_path"); + SWFSound sound; diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-swfmovieclip.c b/japanese/ruby-ming/files/patch-ext-ming-ming-swfmovieclip.c new file mode 100644 index 000000000000..df3e2e2ab307 --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-swfmovieclip.c @@ -0,0 +1,20 @@ +--- ext/ming/ming/swfmovieclip.c.orig 2003-09-28 12:33:14.000000000 +0900 ++++ ext/ming/ming/swfmovieclip.c 2014-01-29 17:11:21.000000000 +0900 +@@ -135,7 +135,7 @@ + + Data_Get_Struct(self, struct RSWFMovieClip, m); + +- SWFMovieClip_labelFrame(m->this, STR2CSTR(s)); ++ SWFMovieClip_labelFrame(m->this, StringValuePtr(s)); + + return self; + } +@@ -158,7 +158,7 @@ + VALUE self, n, r; + { + struct RSWFMovie *m; +- char *name = STR2CSTR(n); ++ char *name = StringValuePtr(n); + FILE *fp; + VALUE path = rb_cv_get(rb_cSWFMovie, "@@mp3_path"); + #ifdef SUPPORT_PCM diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-swftext.c b/japanese/ruby-ming/files/patch-ext-ming-ming-swftext.c new file mode 100644 index 000000000000..b950392e1d57 --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-swftext.c @@ -0,0 +1,20 @@ +--- ext/ming/ming/swftext.c.orig 2003-09-28 13:30:34.000000000 +0900 ++++ ext/ming/ming/swftext.c 2014-01-29 17:11:21.000000000 +0900 +@@ -143,7 +143,7 @@ + + Data_Get_Struct(self, struct RSWFText, p); + +- SWFText_addString(p->this, STR2CSTR(s), NULL); ++ SWFText_addString(p->this, StringValuePtr(s), NULL); + return self; + } + +@@ -154,7 +154,7 @@ + struct RSWFText *p; + + Data_Get_Struct(self, struct RSWFText, p); +- return rb_float_new(SWFText_getStringWidth(p->this, STR2CSTR(s))); ++ return rb_float_new(SWFText_getStringWidth(p->this, StringValuePtr(s))); + } + + static VALUE diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-swftextfield.c b/japanese/ruby-ming/files/patch-ext-ming-ming-swftextfield.c new file mode 100644 index 000000000000..c17060aaa19d --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-swftextfield.c @@ -0,0 +1,20 @@ +--- ext/ming/ming/swftextfield.c.orig 2003-09-28 12:01:42.000000000 +0900 ++++ ext/ming/ming/swftextfield.c 2014-01-29 17:11:21.000000000 +0900 +@@ -209,7 +209,7 @@ + struct RSWFTextField *t; + + Data_Get_Struct(self, struct RSWFTextField, t); +- SWFTextField_addString(t->this, STR2CSTR(s)); ++ SWFTextField_addString(t->this, StringValuePtr(s)); + + return self; + } +@@ -245,7 +245,7 @@ + struct RSWFTextField *t; + + Data_Get_Struct(self, struct RSWFTextField, t); +- SWFTextField_setVariableName(t->this, STR2CSTR(n)); ++ SWFTextField_setVariableName(t->this, StringValuePtr(n)); + + return self; + } diff --git a/japanese/ruby-ming/files/patch-ext-ming-ming-util.c b/japanese/ruby-ming/files/patch-ext-ming-ming-util.c new file mode 100644 index 000000000000..ae5d3161fc36 --- /dev/null +++ b/japanese/ruby-ming/files/patch-ext-ming-ming-util.c @@ -0,0 +1,17 @@ +--- ext/ming/ming/util.c.orig 2003-09-28 13:30:20.000000000 +0900 ++++ ext/ming/ming/util.c 2014-01-29 17:11:17.000000000 +0900 +@@ -83,10 +83,10 @@ + if (fp != NULL) + return fp; + +- for(i = 0; i < RARRAY(path)->len; i++) { +- item = RARRAY(path)->ptr[i]; +- dir = STR2CSTR(item); +- dir_len = RSTRING(item)->len; ++ for(i = 0; i < RARRAY_LEN(path); i++) { ++ item = RARRAY_PTR(path)[i]; ++ dir = StringValuePtr(item); ++ dir_len = RSTRING_LEN(item); + + if(strncmp(&dir[dir_len - 1], delimiter, 1) != 0) { + total_len = dir_len + len + 2; diff --git a/japanese/ruby-ming/files/patch-setup.rb b/japanese/ruby-ming/files/patch-setup.rb new file mode 100644 index 000000000000..3a4522cd2569 --- /dev/null +++ b/japanese/ruby-ming/files/patch-setup.rb @@ -0,0 +1,20 @@ +--- setup.rb.orig 2003-09-28 15:35:08.000000000 +0900 ++++ setup.rb 2014-01-29 17:12:49.000000000 +0900 +@@ -204,7 +204,7 @@ + + class ConfigTable + +- c = ::Config::CONFIG ++ c = ::RbConfig::CONFIG + + rubypath = c['bindir'] + '/' + c['ruby_install_name'] + +@@ -787,7 +787,7 @@ + raise InstallError, "no ruby extention exists: 'ruby #{$0} setup' first" + end + +- DLEXT = /\.#{ ::Config::CONFIG['DLEXT'] }\z/ ++ DLEXT = /\.#{ ::RbConfig::CONFIG['DLEXT'] }\z/ + + def _ruby_extentions( dir ) + Dir.open(dir) {|d| |