packages: ruby-fcgi/ruby-fcgi.spec, ruby-fcgi/ruby-fcgi-ruby1.9.patch (NEW)...

baggins baggins at pld-linux.org
Mon Mar 1 22:40:13 CET 2010


Author: baggins                      Date: Mon Mar  1 21:40:13 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2
- make it build and work with ruby 1.9
- added rdoc and ri packages

---- Files affected:
packages/ruby-fcgi:
   ruby-fcgi.spec (1.15 -> 1.16) , ruby-fcgi-ruby1.9.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/ruby-fcgi/ruby-fcgi.spec
diff -u packages/ruby-fcgi/ruby-fcgi.spec:1.15 packages/ruby-fcgi/ruby-fcgi.spec:1.16
--- packages/ruby-fcgi/ruby-fcgi.spec:1.15	Fri Jun 15 23:13:39 2007
+++ packages/ruby-fcgi/ruby-fcgi.spec	Mon Mar  1 22:40:08 2010
@@ -4,11 +4,12 @@
 Summary(pl.UTF-8):	Biblioteka FastCGI dla języka Ruby
 Name:		ruby-fcgi
 Version:	0.8.7
-Release:	1
+Release:	2
 License:	GPL
 Group:		Development/Libraries
 Source0:	http://www.moonwolf.com/ruby/archive/%{name}-%{version}.tar.gz
 # Source0-md5:	fe4d4a019785e8108668a3e81a5df5e1
+Patch0:		%{name}-ruby1.9.patch
 URL:		http://sugi.nemui.org/prod/ruby-fcgi/
 BuildRequires:	fcgi-devel
 BuildRequires:	rpmbuild(macros) >= 1.277
@@ -23,40 +24,82 @@
 %description -l pl.UTF-8
 Biblioteka FastCGI dla języka Ruby.
 
+%package rdoc
+Summary:	HTML documentation for %{name}
+Summary(pl.UTF-8):	Dokumentacja w formacie HTML dla %{name}
+Group:		Documentation
+Requires:	ruby >= 1:1.8.7-4
+
+%description rdoc
+HTML documentation for %{name}.
+
+%description rdoc -l pl.UTF-8
+Dokumentacja w formacie HTML dla %{name}.
+
+%package ri
+Summary:	ri documentation for %{name}
+Summary(pl.UTF-8):	Dokumentacja w formacie ri dla %{name}
+Group:		Documentation
+Requires:	ruby
+
+%description ri
+ri documentation for %{name}.
+
+%description ri -l pl.UTF-8
+Dokumentacji w formacie ri dla %{name}.
+
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-ruby install.rb config --site-ruby=%{ruby_rubylibdir} --so-dir=%{ruby_archdir}
-ruby install.rb setup
+ruby install.rb config \
+	--site-ruby=%{ruby_rubylibdir} \
+	--so-dir=%{ruby_archdir}
 
-mkdir rdoc
+ruby install.rb setup
 
-rdoc -o rdoc/c ext/*
-rdoc -o rdoc/ruby lib/*
+rdoc --ri --op ri lib ext
+rdoc --op rdoc lib ext
+rm ri/created.rid
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{ruby_rubylibdir}
+install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}}
 
 ruby install.rb install \
 	--prefix=$RPM_BUILD_ROOT
 
+cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
+cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc rdoc/*
 %{ruby_rubylibdir}/fcgi.rb
 %attr(755,root,root) %{ruby_archdir}/fcgi.so
 
+%files rdoc
+%defattr(644,root,root,755)
+%{ruby_rdocdir}/%{name}-%{version}
+
+%files ri
+%defattr(644,root,root,755)
+%{ruby_ridir}/FCGI
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.16  2010/03/01 21:40:08  baggins
+- rel 2
+- make it build and work with ruby 1.9
+- added rdoc and ri packages
+
 Revision 1.15  2007/06/15 21:13:39  aredridel
 - 0.8.7
 

================================================================
Index: packages/ruby-fcgi/ruby-fcgi-ruby1.9.patch
diff -u /dev/null packages/ruby-fcgi/ruby-fcgi-ruby1.9.patch:1.1
--- /dev/null	Mon Mar  1 22:40:13 2010
+++ packages/ruby-fcgi/ruby-fcgi-ruby1.9.patch	Mon Mar  1 22:40:08 2010
@@ -0,0 +1,69 @@
+ ext/fcgi/fcgi.c |   23 +++++++++++++----------
+ 1 files changed, 13 insertions(+), 10 deletions(-)
+
+diff --git a/ext/fcgi/fcgi.c b/ext/fcgi/fcgi.c
+index 8539890..0e26b79 100755
+--- a/ext/fcgi/fcgi.c
++++ b/ext/fcgi/fcgi.c
+@@ -222,7 +222,7 @@ static VALUE fcgi_stream_write(VALUE self, VALUE str)
+   rb_secure(4);
+   Data_Get_Struct(self, FCGX_Stream, stream);
+   str = rb_obj_as_string(str);
+-  len = FCGX_PutStr(RSTRING(str)->ptr, RSTRING(str)->len, stream);
++  len = FCGX_PutStr(RSTRING_PTR(str), RSTRING_LEN(str), stream);
+   if (len == EOF) CHECK_STREAM_ERROR(stream);
+   return INT2NUM(len);
+ }
+@@ -266,16 +266,19 @@ static VALUE fcgi_stream_printf(int argc, VALUE *argv, VALUE out)
+ 
+ static VALUE fcgi_stream_puts _((int, VALUE*, VALUE));
+ 
+-static VALUE fcgi_stream_puts_ary(VALUE ary, VALUE out)
++static VALUE fcgi_stream_puts_ary(VALUE ary, VALUE out, int recur)
+ {
+   VALUE tmp;
+   int i;
+ 
+-  for (i=0; i<RARRAY(ary)->len; i++) {
+-    tmp = RARRAY(ary)->ptr[i];
+-    if (rb_inspecting_p(tmp)) {
+-      tmp = rb_str_new2("[...]");
+-    }
++  if (recur) {
++    tmp = rb_str_new2("[...]");
++    fcgi_stream_puts(1, &tmp, out);
++    return Qnil;
++  }
++
++  for (i=0; i<RARRAY_LEN(ary); i++) {
++    tmp = RARRAY_PTR(ary)[i];
+     fcgi_stream_puts(1, &tmp, out);
+   }
+   return Qnil;
+@@ -297,7 +300,7 @@ static VALUE fcgi_stream_puts(int argc, VALUE *argv, VALUE out)
+       line = rb_str_new2("nil");
+       break;
+     case T_ARRAY:
+-      rb_protect_inspect(fcgi_stream_puts_ary, argv[i], out);
++      rb_exec_recursive(fcgi_stream_puts_ary, argv[i], out);
+       continue;
+     default:
+       line = argv[i];
+@@ -305,7 +308,7 @@ static VALUE fcgi_stream_puts(int argc, VALUE *argv, VALUE out)
+     }
+     line = rb_obj_as_string(line);
+     fcgi_stream_write(out, line);
+-    if (RSTRING(line)->ptr[RSTRING(line)->len-1] != '\n') {
++    if (RSTRING_PTR(line)[RSTRING_LEN(line)-1] != '\n') {
+       fcgi_stream_write(out, rb_default_rs);
+     }
+   }
+@@ -379,7 +382,7 @@ static VALUE fcgi_stream_gets(VALUE self)
+     rb_str_cat(str, buff, strlen(buff));
+     if (strchr(buff, '\n')) break;
+   }
+-  if (RSTRING(str)->len > 0)
++  if (RSTRING_LEN(str) > 0)
+     return str;
+   else
+     return Qnil;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ruby-fcgi/ruby-fcgi.spec?r1=1.15&r2=1.16&f=u



More information about the pld-cvs-commit mailing list