diff options
author | Cheng-Lung Sung <clsung@FreeBSD.org> | 2005-12-13 03:16:49 +0000 |
---|---|---|
committer | Cheng-Lung Sung <clsung@FreeBSD.org> | 2005-12-13 03:16:49 +0000 |
commit | 33f600abddfb153fd17eefadd552aa3341c5e0d2 (patch) | |
tree | 46611daeaa6e1aea153be6f6872dd0d97b376c9b /textproc | |
parent | cdc46e62cbeab0360e396b6dad4cc6986ca38948 (diff) | |
download | ports-33f600abddfb153fd17eefadd552aa3341c5e0d2.tar.gz ports-33f600abddfb153fd17eefadd552aa3341c5e0d2.zip |
Notes
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/ruby-sary/Makefile | 12 | ||||
-rw-r--r-- | textproc/ruby-sary/distinfo | 6 | ||||
-rw-r--r-- | textproc/ruby-sary/files/patch-searcher.c | 113 |
3 files changed, 9 insertions, 122 deletions
diff --git a/textproc/ruby-sary/Makefile b/textproc/ruby-sary/Makefile index 7a232e25e367..340e87736889 100644 --- a/textproc/ruby-sary/Makefile +++ b/textproc/ruby-sary/Makefile @@ -6,15 +6,15 @@ # PORTNAME= sary -PORTVERSION= 0.5 -PORTREVISION= 6 +PORTVERSION= 1.2.0 +PORTREVISION= 0 CATEGORIES= textproc ruby -MASTER_SITES= http://prime.sourceforge.jp/freebsd/ +MASTER_SITES= http://sary.sourceforge.net/ PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX} DISTNAME= ${PORTNAME}-ruby-${PORTVERSION} DIST_SUBDIR= ruby -MAINTAINER= ports@FreeBSD.org +MAINTAINER= clsung@FreeBSD.org COMMENT= A Ruby interface to the Sary library LIB_DEPENDS= sary.10:${PORTSDIR}/textproc/sary @@ -35,8 +35,6 @@ DOCS_JA= ${RUBY_RD_FILES:M*.ja.rd} \ post-install: doc-install ${INSTALL_SCRIPT} ${WRKSRC}/rsary.rb ${PREFIX}/bin/ -.include <bsd.port.mk> - doc-install: .if !defined(NOPORTDOCS) ${MKDIR} ${RUBY_MODDOCDIR}/ja @@ -47,3 +45,5 @@ doc-install: ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/ja/ .endfor .endif + +.include <bsd.port.mk> diff --git a/textproc/ruby-sary/distinfo b/textproc/ruby-sary/distinfo index dd2c142d4253..3906525a7e92 100644 --- a/textproc/ruby-sary/distinfo +++ b/textproc/ruby-sary/distinfo @@ -1,3 +1,3 @@ -MD5 (ruby/sary-ruby-0.5.tar.gz) = de28199330d8b5d95a2eaba4f019b79a -SHA256 (ruby/sary-ruby-0.5.tar.gz) = de9b73a1a330a01d236fff4bff3e3dc1e600b724e5069d051a599f724dc86ba2 -SIZE (ruby/sary-ruby-0.5.tar.gz) = 8153 +MD5 (ruby/sary-ruby-1.2.0.tar.gz) = c885abffea72f25cb0f6286770a78ac1 +SHA256 (ruby/sary-ruby-1.2.0.tar.gz) = 32e493313b44e6d23fbda583c9aa13d7c2fa398fc717ec17cd8c3e9e9a62a30d +SIZE (ruby/sary-ruby-1.2.0.tar.gz) = 9155 diff --git a/textproc/ruby-sary/files/patch-searcher.c b/textproc/ruby-sary/files/patch-searcher.c deleted file mode 100644 index ca2cb53dc6de..000000000000 --- a/textproc/ruby-sary/files/patch-searcher.c +++ /dev/null @@ -1,113 +0,0 @@ ---- searcher.c.orig Wed Sep 17 17:49:46 2003 -+++ searcher.c Thu Jun 24 11:46:14 2004 -@@ -27,6 +27,7 @@ - #include <errno.h> - #include "sary.h" - #include "ruby.h" -+#include "version.h" - - #define GET_Searcher(obj, dat) Data_Get_Struct(obj, SarySearcher, dat) - -@@ -76,14 +77,24 @@ - - rb_scan_args(argc, argv, "11", &file_name, &array_name); - -+#if RUBY_VERSION_CODE < 180 - Check_SafeStr(file_name); - file_name_ptr = STR2CSTR(file_name); -+#else -+ SafeStringValue(file_name); -+ file_name_ptr = RSTRING(file_name)->ptr; -+#endif - - if (array_name == Qnil) - searcher = sary_searcher_new(file_name_ptr); - else { -+#if RUBY_VERSION_CODE < 180 - Check_SafeStr(array_name); - array_name_ptr = STR2CSTR(array_name); -+#else -+ SafeStringValue(array_name); -+ array_name_ptr = RSTRING(array_name)->ptr; -+#endif - searcher = sary_searcher_new2(file_name_ptr, array_name_ptr); - } - if (searcher == NULL) -@@ -118,8 +129,14 @@ - - GET_Searcher(klass, searcher); - -+#if RUBY_VERSION_CODE < 180 - Check_SafeStr(pattern); - pat = str2cstr(pattern, &len); -+#else -+ SafeStringValue(pattern); -+ pat = RSTRING(pattern)->ptr; -+ len = RSTRING(pattern)->len; -+#endif - - if (sary_searcher_search2(searcher, pat, len)) - return Qtrue; -@@ -145,8 +162,13 @@ - pat = ALLOCA_N(char*, len); - for (i = 0; i < len; i++) { - pattern = rb_ary_entry(pattern_array, (long)i); -+#if RUBY_VERSION_CODE < 180 - Check_SafeStr(pattern); - pat[i] = STR2CSTR(pattern); -+#else -+ SafeStringValue(pattern); -+ pat[i] = RSTRING(pattern)->ptr; -+#endif - } - - if (sary_searcher_multi_search(searcher, pat, len)) -@@ -164,8 +186,13 @@ - - GET_Searcher(klass, searcher); - -+#if RUBY_VERSION_CODE < 180 - Check_SafeStr(pattern); - pat = STR2CSTR(pattern); -+#else -+ SafeStringValue(pattern); -+ pat = RSTRING(pattern)->ptr; -+#endif - - if (sary_searcher_isearch(searcher, pat, NUM2INT(len))) - return Qtrue; -@@ -194,8 +221,14 @@ - - GET_Searcher(klass, searcher); - -+#if RUBY_VERSION_CODE < 180 - Check_SafeStr(pattern); - pat = str2cstr(pattern, &len); -+#else -+ SafeStringValue(pattern); -+ pat = RSTRING(pattern)->ptr; -+ len = RSTRING(pattern)->len; -+#endif - - if (sary_searcher_icase_search2(searcher, pat, len)) - return Qtrue; -@@ -239,10 +272,19 @@ - if (sary_searcher_count_occurrences(searcher) == 0) - return Qnil; - -+#if RUBY_VERSION_CODE < 180 - Check_SafeStr(start_tag); - Check_SafeStr(end_tag); - stag = rb_str2cstr(start_tag, &slen); - etag = rb_str2cstr(end_tag, &elen); -+#else -+ SafeStringValue(start_tag); -+ SafeStringValue(end_tag); -+ stag = RSTRING(start_tag)->ptr; -+ slen = RSTRING(start_tag)->len; -+ etag = RSTRING(end_tag)->ptr; -+ elen = RSTRING(end_tag)->len; -+#endif - - region = sary_searcher_get_next_tagged_region2(searcher, stag, slen, - etag, elen, &rlen); |