summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2017-04-07 21:10:06 +0900
committerAkinori Hattori <hattya@gentoo.org>2017-04-07 21:10:06 +0900
commitf481bbbaa3653bc40522f0a9052018f282519913 (patch)
treec30573996d53d56f89622b3688f50081861df3f6 /app-text/hyperestraier
parentapp-text/hyperestraier: update to EAPI 6 (diff)
downloadgentoo-f481bbbaa3653bc40522f0a9052018f282519913.tar.gz
gentoo-f481bbbaa3653bc40522f0a9052018f282519913.tar.bz2
gentoo-f481bbbaa3653bc40522f0a9052018f282519913.zip
app-text/hyperestraier: fix build with Ruby 1.9+
Gentoo-Bug: 608104 Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-text/hyperestraier')
-rw-r--r--app-text/hyperestraier/files/hyperestraier-ruby19.patch146
-rw-r--r--app-text/hyperestraier/hyperestraier-1.4.13.ebuild15
2 files changed, 160 insertions, 1 deletions
diff --git a/app-text/hyperestraier/files/hyperestraier-ruby19.patch b/app-text/hyperestraier/files/hyperestraier-ruby19.patch
new file mode 100644
index 000000000000..25d8ffad7daa
--- /dev/null
+++ b/app-text/hyperestraier/files/hyperestraier-ruby19.patch
@@ -0,0 +1,146 @@
+--- a/rubynative/Makefile.in
++++ b/rubynative/Makefile.in
+@@ -82,21 +82,21 @@
+
+ check :
+ rm -rf casket
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test001.est
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test002.est
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test003.est
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test004.est
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test005.est
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test006.est
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb edit casket 1 "@title" "java"
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb get casket 1
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb get casket 1 "@title"
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb out casket 1
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb inform casket
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb optimize casket
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb search \
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test001.est
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test002.est
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test003.est
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test004.est
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test005.est
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test006.est
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb edit casket 1 "@title" "java"
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb get casket 1
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb get casket 1 "@title"
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb out casket 1
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb inform casket
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb optimize casket
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb search \
+ -vf -cd casket "estraier" > check.out
+- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb search \
++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb search \
+ -vs -gs -attr "@uri" -ord "@mdate NUMD" -max 1 casket "estraier OR mikio" > check.out
+ rm -rf casket
+
+--- a/rubynative/configure.in
++++ b/rubynative/configure.in
+@@ -41,7 +41,7 @@
+ # Setting the default prefix
+ if test "$prefix" = NONE
+ then
+- prefix=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("prefix"))'`
++ prefix=`ruby -rrbconfig -e 'puts(RbConfig::CONFIG.fetch("prefix"))'`
+ fi
+
+
+@@ -68,7 +68,7 @@
+ printf '%s\n' "$RDOC"
+
+ # Librarh path
+-myrblibdir=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("sitelibdir"))'`
++myrblibdir=`ruby -rrbconfig -e 'puts(RbConfig::CONFIG.fetch("sitelibdir"))'`
+ if test -n "$myrblibdir"
+ then
+ MYRBLIBDIR="$myrblibdir"
+--- a/rubynative/src/estraier.c
++++ b/rubynative/src/estraier.c
+@@ -24,6 +24,16 @@
+ #define VNINFO "@informer"
+ #define VNCOND "@cond"
+
++#ifndef RSTRING_PTR
++# define RSTRING_PTR(s) (RSTRING(s)->ptr)
++#endif
++#ifndef RSTRING_LEN
++# define RSTRING_LEN(s) (RSTRING(s)->len)
++#endif
++#ifndef RARRAY_LEN
++# define RARRAY_LEN(a) (RARRAY(a)->len)
++#endif
++
+ typedef struct {
+ int *ids;
+ int *dbidxs;
+@@ -351,7 +361,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 +774,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 +1199,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 +1228,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;
+ }
+--- a/rubypure/configure.in
++++ b/rubypure/configure.in
+@@ -40,7 +40,7 @@
+ # Setting the default prefix
+ if test "$prefix" = NONE
+ then
+- prefix=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("prefix"))'`
++ prefix=`ruby -rrbconfig -e 'puts(RbConfig::CONFIG.fetch("prefix"))'`
+ fi
+
+
+@@ -67,7 +67,7 @@
+ printf '%s\n' "$RDOC"
+
+ # Librarh path
+-myrblibdir=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("sitelibdir"))'`
++myrblibdir=`ruby -rrbconfig -e 'puts(RbConfig::CONFIG.fetch("sitelibdir"))'`
+ if test -n "$myrblibdir"
+ then
+ MYRBLIBDIR="$myrblibdir"
diff --git a/app-text/hyperestraier/hyperestraier-1.4.13.ebuild b/app-text/hyperestraier/hyperestraier-1.4.13.ebuild
index 921b3192dcdc..681b09a04f5f 100644
--- a/app-text/hyperestraier/hyperestraier-1.4.13.ebuild
+++ b/app-text/hyperestraier/hyperestraier-1.4.13.ebuild
@@ -3,7 +3,7 @@
EAPI="6"
-inherit java-pkg-opt-2
+inherit autotools java-pkg-opt-2
IUSE="bzip2 debug java lzo mecab ruby +zlib"
@@ -26,8 +26,13 @@ DEPEND="${RDEPEND}
virtual/pkgconfig
java? ( >=virtual/jdk-1.4:* )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-ruby19.patch
+)
HTML_DOCS=( doc/. )
+AT_NOELIBTOOLIZE="yes"
+
he_foreach_api() {
local u d
for u in java ruby; do
@@ -38,6 +43,10 @@ he_foreach_api() {
einfo "${EBUILD_PHASE} ${d}"
cd "${d}"
case "${EBUILD_PHASE}" in
+ prepare)
+ mv configure.{in,ac}
+ eautoreconf
+ ;;
configure)
econf
;;
@@ -75,6 +84,10 @@ src_prepare() {
-e '/^LDENV/d' \
-e 's/make\( \|$\)/$(MAKE)\1/g' \
Makefile.in {java,ruby}*/Makefile.in
+
+ mv configure.{in,ac}
+ eautoreconf
+ he_foreach_api # prepare
}
src_configure() {