summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2010-05-27 15:54:34 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2010-05-27 15:54:34 +0000
commite5fdf14fcb8d06856238034df60769bd4ffc5737 (patch)
treec57857dfbbdf6f82c964b915cbaf3fb6319d0d71 /dev-ruby/sary-ruby
parentStable for HPPA (bug #319887). (diff)
downloadgentoo-2-e5fdf14fcb8d06856238034df60769bd4ffc5737.tar.gz
gentoo-2-e5fdf14fcb8d06856238034df60769bd4ffc5737.tar.bz2
gentoo-2-e5fdf14fcb8d06856238034df60769bd4ffc5737.zip
Convert to ruby-ng. Removed old revision.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/sary-ruby')
-rw-r--r--dev-ruby/sary-ruby/ChangeLog10
-rw-r--r--dev-ruby/sary-ruby/files/sary-ruby-1.2.0-ruby19.patch152
-rw-r--r--dev-ruby/sary-ruby/sary-ruby-1.2.0-r2.ebuild49
-rw-r--r--dev-ruby/sary-ruby/sary-ruby-1.2.0.ebuild28
4 files changed, 209 insertions, 30 deletions
diff --git a/dev-ruby/sary-ruby/ChangeLog b/dev-ruby/sary-ruby/ChangeLog
index a191b38203f2..05fe1dcdac56 100644
--- a/dev-ruby/sary-ruby/ChangeLog
+++ b/dev-ruby/sary-ruby/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-ruby/sary-ruby
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/sary-ruby/ChangeLog,v 1.40 2009/09/27 15:50:38 nixnut Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/sary-ruby/ChangeLog,v 1.41 2010/05/27 15:54:34 matsuu Exp $
+
+*sary-ruby-1.2.0-r2 (27 May 2010)
+
+ 27 May 2010; MATSUU Takuto <matsuu@gentoo.org> -sary-ruby-1.2.0.ebuild,
+ +sary-ruby-1.2.0-r2.ebuild, +files/sary-ruby-1.2.0-ruby19.patch:
+ Convert to ruby-ng. Removed old revision.
27 Sep 2009; nixnut <nixnut@gentoo.org> sary-ruby-1.2.0-r1.ebuild:
ppc stable #282716
diff --git a/dev-ruby/sary-ruby/files/sary-ruby-1.2.0-ruby19.patch b/dev-ruby/sary-ruby/files/sary-ruby-1.2.0-ruby19.patch
new file mode 100644
index 000000000000..8eea0cc638cd
--- /dev/null
+++ b/dev-ruby/sary-ruby/files/sary-ruby-1.2.0-ruby19.patch
@@ -0,0 +1,152 @@
+diff -Naur sary-ruby-1.2.0.orig//builder.c sary-ruby-1.2.0//builder.c
+--- sary-ruby-1.2.0.orig//builder.c 2005-03-30 07:48:09.000000000 +0900
++++ sary-ruby-1.2.0//builder.c 2010-05-27 20:08:33.000000000 +0900
+@@ -26,7 +26,6 @@
+ #include <errno.h>
+ #include "sary.h"
+ #include "ruby.h"
+-#include "version.h"
+
+ #define GET_Builder(obj, dat) Data_Get_Struct(obj, SaryBuilder, dat)
+
+@@ -63,21 +62,13 @@
+ rb_scan_args(argc, argv, "11", &file_name, &array_name);
+
+ Check_SafeStr(file_name);
+-#if RUBY_VERSION_CODE >= 180
+ file_name_ptr = StringValuePtr(file_name);
+-#else
+- file_name_ptr = STR2CSTR(file_name);
+-#endif
+
+ if (array_name == Qnil)
+ builder = sary_builder_new(file_name_ptr);
+ else {
+ Check_SafeStr(array_name);
+-#if RUBY_VERSION_CODE >= 180
+ array_name_ptr = StringValuePtr(array_name);
+-#else
+- array_name_ptr = STR2CSTR(array_name);
+-#endif
+ builder = sary_builder_new2(file_name_ptr, array_name_ptr);
+ }
+ if (builder == NULL)
+diff -Naur sary-ruby-1.2.0.orig//searcher.c sary-ruby-1.2.0//searcher.c
+--- sary-ruby-1.2.0.orig//searcher.c 2005-03-30 07:48:09.000000000 +0900
++++ sary-ruby-1.2.0//searcher.c 2010-05-27 20:13:17.000000000 +0900
+@@ -27,7 +27,13 @@
+ #include <errno.h>
+ #include "sary.h"
+ #include "ruby.h"
+-#include "version.h"
++
++#ifndef RARRAY_LEN
++#define RARRAY_LEN(a) RARRAY(a)->len
++#endif
++#ifndef RSTRING_LEN
++#define RSTRING_LEN(str) RSTRING(str)->len
++#endif
+
+ #define GET_Searcher(obj, dat) Data_Get_Struct(obj, SarySearcher, dat)
+
+@@ -82,21 +88,13 @@
+ rb_scan_args(argc, argv, "11", &file_name, &array_name);
+
+ Check_SafeStr(file_name);
+-#if RUBY_VERSION_CODE >= 180
+ file_name_ptr = StringValuePtr(file_name);
+-#else
+- file_name_ptr = STR2CSTR(file_name);
+-#endif
+
+ if (array_name == Qnil)
+ searcher = sary_searcher_new(file_name_ptr);
+ else {
+ Check_SafeStr(array_name);
+-#if RUBY_VERSION_CODE >= 180
+ array_name_ptr = StringValuePtr(array_name);
+-#else
+- array_name_ptr = STR2CSTR(array_name);
+-#endif
+ searcher = sary_searcher_new2(file_name_ptr, array_name_ptr);
+ }
+ if (searcher == NULL)
+@@ -133,12 +131,8 @@
+ GET_Searcher(klass, searcher);
+
+ Check_SafeStr(pattern);
+-#if RUBY_VERSION_CODE >= 180
+ pat = StringValuePtr(pattern);
+- len = RSTRING(pattern)->len;
+-#else
+- pat = str2cstr(pattern, &len);
+-#endif
++ len = RSTRING_LEN(pattern);
+
+ if (sary_searcher_search2(searcher, pat, len))
+ return Qtrue;
+@@ -157,7 +151,7 @@
+
+ GET_Searcher(klass, searcher);
+
+- len = RARRAY(pattern_array)->len;
++ len = RARRAY_LEN(pattern_array);
+ if (len == 0) {
+ return Qfalse;
+ }
+@@ -166,11 +160,7 @@
+ for (i = 0; i < len; i++) {
+ pattern = rb_ary_entry(pattern_array, (long)i);
+ Check_SafeStr(pattern);
+-#if RUBY_VERSION_CODE >= 180
+ pat[i] = StringValuePtr(pattern);
+-#else
+- pat[i] = STR2CSTR(pattern);
+-#endif
+ }
+
+ if (sary_searcher_multi_search(searcher, pat, len))
+@@ -189,11 +179,7 @@
+ GET_Searcher(klass, searcher);
+
+ Check_SafeStr(pattern);
+-#if RUBY_VERSION_CODE >= 180
+ pat = StringValuePtr(pattern);
+-#else
+- pat = STR2CSTR(pattern);
+-#endif
+
+ if (sary_searcher_isearch(searcher, pat, NUM2INT(len)))
+ return Qtrue;
+@@ -224,12 +210,8 @@
+ GET_Searcher(klass, searcher);
+
+ Check_SafeStr(pattern);
+-#if RUBY_VERSION_CODE >= 180
+ pat = StringValuePtr(pattern);
+- len = RSTRING(pattern)->len;
+-#else
+- pat = str2cstr(pattern, &len);
+-#endif
++ len = RSTRING_LEN(pattern);
+
+ if (sary_searcher_icase_search2(searcher, pat, len))
+ return Qtrue;
+@@ -275,15 +257,10 @@
+
+ Check_SafeStr(start_tag);
+ Check_SafeStr(end_tag);
+-#if RUBY_VERSION_CODE >= 180
+ stag = StringValuePtr(start_tag);
+ etag = StringValuePtr(end_tag);
+- slen = RSTRING(stag)->len;
+- elen = RSTRING(etag)->len;
+-#else
+- stag = rb_str2cstr(start_tag, &slen);
+- etag = rb_str2cstr(end_tag, &elen);
+-#endif
++ slen = RSTRING_LEN(stag);
++ elen = RSTRING_LEN(etag);
+
+ region = sary_searcher_get_next_tagged_region2(searcher, stag, slen,
+ etag, elen, &rlen);
diff --git a/dev-ruby/sary-ruby/sary-ruby-1.2.0-r2.ebuild b/dev-ruby/sary-ruby/sary-ruby-1.2.0-r2.ebuild
new file mode 100644
index 000000000000..99733b07d42c
--- /dev/null
+++ b/dev-ruby/sary-ruby/sary-ruby-1.2.0-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/sary-ruby/sary-ruby-1.2.0-r2.ebuild,v 1.1 2010/05/27 15:54:34 matsuu Exp $
+
+EAPI="2"
+# jruby: mkmf issue
+USE_RUBY="ruby18 ree18 ruby19"
+inherit ruby-ng
+
+DESCRIPTION="Ruby Binding of Sary"
+HOMEPAGE="http://sary.sourceforge.net/"
+SRC_URI="http://sary.sourceforge.net/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+SLOT="0"
+IUSE=""
+
+RDEPEND=">=app-text/sary-1.2.0"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+RUBY_PATCHES=(
+ "${P}-gentoo.patch"
+ "${P}-ruby19.patch"
+)
+
+each_ruby_configure() {
+ ${RUBY} extconf.rb || die "extconf.rb failed"
+}
+
+each_ruby_compile() {
+ # We have injected --no-undefined in Ruby as a safety precaution
+ # against broken ebuilds, but the Ruby-Gnome bindings
+ # unfortunately rely on the lazy load of other extensions; see bug
+ # #320545.
+ find . -name Makefile -print0 | xargs -0 \
+ sed -i -e 's:-Wl,--no-undefined ::' || die "--no-undefined removal failed"
+
+ emake || die "emake failed"
+}
+
+each_ruby_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+}
+
+all_ruby_install() {
+ dodoc ChangeLog *.rd || die
+}
diff --git a/dev-ruby/sary-ruby/sary-ruby-1.2.0.ebuild b/dev-ruby/sary-ruby/sary-ruby-1.2.0.ebuild
deleted file mode 100644
index e8de74ceebbc..000000000000
--- a/dev-ruby/sary-ruby/sary-ruby-1.2.0.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/sary-ruby/sary-ruby-1.2.0.ebuild,v 1.15 2009/08/22 22:32:29 a3li Exp $
-
-inherit ruby
-
-IUSE=""
-
-DESCRIPTION="Ruby Binding of Sary"
-HOMEPAGE="http://sary.sourceforge.net/
- http://taiyaki.org/prime/"
-SRC_URI="http://sary.sourceforge.net/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
-SLOT="0"
-USE_RUBY="ruby18"
-
-DEPEND=">=app-text/sary-1.2.0"
-
-src_unpack() {
- unpack ${A}
- rm -rf "${S}"/debian # workaround for ruby19
-}
-
-src_compile() {
- ruby_src_compile || die
-}