automatic rebuild by autodist [release 1.2.0-2mamba;Tue Aug 27 2013]
This commit is contained in:
parent
2ac7eafee7
commit
ac17af87e3
152
ruby-sary-1.2.0-ruby-2.0.patch
Normal file
152
ruby-sary-1.2.0-ruby-2.0.patch
Normal file
@ -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);
|
50
ruby-sary.spec
Normal file
50
ruby-sary.spec
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
Name: ruby-sary
|
||||||
|
Version: 1.2.0
|
||||||
|
Release: 2mamba
|
||||||
|
Summary: Ruby Binding of Sary
|
||||||
|
Group: Development/Libraries
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
URL: http://sary.sourceforge.net/
|
||||||
|
Source: http://sary.sourceforge.net/sary-ruby-%{version}.tar.gz
|
||||||
|
Patch0: ruby-sary-1.2.0-ruby-2.0.patch
|
||||||
|
License: LGPL
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libglib-devel
|
||||||
|
BuildRequires: libsary-devel
|
||||||
|
BuildRequires: ruby-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%description
|
||||||
|
Ruby Binding of Sary
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n sary-ruby-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
ruby extconf.rb
|
||||||
|
%make
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
%makeinstall DESTDIR=%{buildroot}
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{ruby_sitearch}/sary.so
|
||||||
|
#%doc ChangeLog README.en.rd README.ja.rd
|
||||||
|
#%doc Reference.en.rd Reference.ja.rd
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Aug 27 2013 Automatic Build System <autodist@mambasoft.it> 1.2.0-2mamba
|
||||||
|
- automatic rebuild by autodist
|
||||||
|
|
||||||
|
* Fri Jul 25 2008 gil <puntogil@libero.it> 1.2.0-1mamba
|
||||||
|
- package created by autospec
|
Loading…
Reference in New Issue
Block a user