[106576] trunk/dports/ruby/rb-hyperestraier
kimuraw at macports.org
kimuraw at macports.org
Thu May 30 23:09:34 PDT 2013
Revision: 106576
https://trac.macports.org/changeset/106576
Author: kimuraw at macports.org
Date: 2013-05-30 23:09:34 -0700 (Thu, 30 May 2013)
Log Message:
-----------
ruby/rb-hyperestraier: upgrade to 1.4.13, fix build error with ruby-1.8.7 or later
Modified Paths:
--------------
trunk/dports/ruby/rb-hyperestraier/Portfile
Added Paths:
-----------
trunk/dports/ruby/rb-hyperestraier/files/
trunk/dports/ruby/rb-hyperestraier/files/patch-rubynative-configure.diff
trunk/dports/ruby/rb-hyperestraier/files/patch-rubynative-src-estraier.c.diff
Modified: trunk/dports/ruby/rb-hyperestraier/Portfile
===================================================================
--- trunk/dports/ruby/rb-hyperestraier/Portfile 2013-05-31 06:07:13 UTC (rev 106575)
+++ trunk/dports/ruby/rb-hyperestraier/Portfile 2013-05-31 06:09:34 UTC (rev 106576)
@@ -2,8 +2,7 @@
PortSystem 1.0
PortGroup ruby 1.0
-name rb-hyperestraier
-version 1.4.10
+ruby.setup hyperestraier 1.4.13 gnu {}
maintainers gmail.com:rsky0711
platforms darwin
description Ruby binding of Hyper Estraier
@@ -14,19 +13,20 @@
dist_subdir hyperestraier
distname hyperestraier-${version}
worksrcdir hyperestraier-${version}/rubynative
-checksums md5 cf4ca3dea77d161517388050654b52a6 \
- sha1 d9e200cf237e46315df5a729bc00920e0debfc0d \
- rmd160 56022db14947c00e5f8c01834173ae3bc5daeab8
+checksums md5 847aefb9e23266545280378d797f3981 \
+ sha1 21c3f325f42019fef096172105c2fc16f3e72fc0 \
+ rmd160 8af0af25df6d5bd45a09e9abfbb26300339b5a2c
categories ruby textproc
depends_lib port:ruby port:hyperestraier
+# fix old ruby C-API
+patchfiles patch-rubynative-src-estraier.c.diff \
+ patch-rubynative-configure.diff
+configure.args-append --bindir=${ruby.bindir}
+configure.env-append RUBY=${ruby.bin} RDOC=${ruby.rdoc} HOME=${prefix}
+
post-extract {
- # configure
- reinplace "s|\$HOME|${prefix}|g" \
- ${worksrcpath}/configure
- reinplace "s|\"sitelibdir\"|\"sitearchdir\"|g" \
- ${worksrcpath}/configure
# Makefile.in
reinplace "s|\$(HOME)|${prefix}|g" \
${worksrcpath}/Makefile.in
Added: trunk/dports/ruby/rb-hyperestraier/files/patch-rubynative-configure.diff
===================================================================
--- trunk/dports/ruby/rb-hyperestraier/files/patch-rubynative-configure.diff (rev 0)
+++ trunk/dports/ruby/rb-hyperestraier/files/patch-rubynative-configure.diff 2013-05-31 06:09:34 UTC (rev 106576)
@@ -0,0 +1,56 @@
+--- ../../hyperestraier-1.4.13.org/rubynative/configure 2007-12-25 10:53:40.000000000 +0900
++++ configure 2013-05-31 14:59:00.000000000 +0900
+@@ -1228,8 +1228,8 @@
+
+
+ # Export variables
+-RUBY="ruby"
+-RDOC="rdoc"
++#RUBY="ruby"
++#RDOC="rdoc"
+ MYRBLIBDIR=/usr/local/lib/ruby/site_ruby
+ MYRUNPATH=""
+
+@@ -1258,7 +1258,7 @@
+ # Setting the default prefix
+ if test "$prefix" = NONE
+ then
+- prefix=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("prefix"))'`
++ prefix=`$RUBY -rrbconfig -e 'puts(Config::CONFIG.fetch("prefix"))'`
+ fi
+
+
+@@ -1269,23 +1269,23 @@
+
+
+ # Ruby interpreter
+-printf 'checking RUBY... '
+-if which ruby > /dev/null
+-then
+- RUBY=`which ruby`
+-fi
++#printf 'checking RUBY... '
++#if which ruby > /dev/null
++#then
++# RUBY=`which ruby`
++#fi
+ printf '%s\n' "$RUBY"
+
+ # Other building tools
+ printf 'checking RDOC... '
+-if which rdoc > /dev/null
+-then
+- RDOC=`which rdoc`
+-fi
++#if which rdoc > /dev/null
++#then
++# RDOC=`which rdoc`
++#fi
+ printf '%s\n' "$RDOC"
+
+ # Librarh path
+-myrblibdir=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("sitelibdir"))'`
++myrblibdir=`$RUBY -rrbconfig -e 'puts(Config::CONFIG.fetch("vendorarchdir"))'`
+ if test -n "$myrblibdir"
+ then
+ MYRBLIBDIR="$myrblibdir"
Added: trunk/dports/ruby/rb-hyperestraier/files/patch-rubynative-src-estraier.c.diff
===================================================================
--- trunk/dports/ruby/rb-hyperestraier/files/patch-rubynative-src-estraier.c.diff (rev 0)
+++ trunk/dports/ruby/rb-hyperestraier/files/patch-rubynative-src-estraier.c.diff 2013-05-31 06:09:34 UTC (rev 106576)
@@ -0,0 +1,51 @@
+--- ../../hyperestraier-1.4.13.org/rubynative/src/estraier.c 2007-04-12 10:52:50.000000000 +0900
++++ src/estraier.c 2013-05-31 14:13:40.000000000 +0900
+@@ -351,7 +351,7 @@
+ vdoc = rb_iv_get(vself, VNDATA);
+ Data_Get_Struct(vdoc, ESTDOC, doc);
+ Check_Type(vwords, T_ARRAY);
+- len = RARRAY(vwords)->len;
++ len = RARRAY_LEN(vwords);
+ for(i = 0; i < len; i++){
+ Check_Type(rb_ary_entry(vwords, i), T_STRING);
+ }
+@@ -764,7 +764,7 @@
+ CBMAP *hints;
+ int i, dnum, *res, rnum;
+ Check_Type(vdbs, T_ARRAY);
+- dnum = RARRAY(vdbs)->len;
++ dnum = RARRAY_LEN(vdbs);
+ dbs = cbmalloc(dnum * sizeof(ESTMTDB *) + 1);
+ for(i = 0; i < dnum; i++){
+ vdb = rb_ary_entry(vdbs, i);
+@@ -1189,10 +1189,10 @@
+ VALUE str;
+ int i, len;
+ list = cblistopen();
+- len = RARRAY(obj)->len;
++ len = RARRAY_LEN(obj);
+ for(i = 0; i < len; i++){
+ str = rb_ary_entry(obj, i);
+- cblistpush(list, RSTRING(str)->ptr, RSTRING(str)->len);
++ cblistpush(list, RSTRING_PTR(str), RSTRING_LEN(str));
+ }
+ return list;
+ }
+@@ -1218,14 +1218,14 @@
+ int i, len;
+ map = cbmapopenex(31);
+ keys = rb_funcall(obj, rb_intern("keys"), 0);
+- len = RARRAY(keys)->len;
++ len = RARRAY_LEN(keys);
+ for(i = 0; i < len; i++){
+ key = rb_ary_entry(keys, i);
+ val = rb_hash_aref(obj, key);
+ key = rb_String(key);
+ val = rb_String(val);
+- cbmapput(map, RSTRING(key)->ptr, RSTRING(key)->len,
+- RSTRING(val)->ptr, RSTRING(val)->len, 0);
++ cbmapput(map, RSTRING_PTR(key), RSTRING_LEN(key),
++ RSTRING_PTR(val), RSTRING_LEN(val), 0);
+ }
+ return map;
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130530/d2962d17/attachment.html>
More information about the macports-changes
mailing list