* Use lang/ruby/gem.mk instead of misc/rubygems/rubygem.mk. * Update HOMEPAGE. * Add LICENSE. * Remove default value of GEM_BUILD. * Add patch to support both ruby18 and ruby19.diff -r1.9 -r1.10 pkgsrc/www/mongrel/Makefile
(taca)
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.9 2008/10/07 05:28:33 minskim Exp $ | 1 | # $NetBSD: Makefile,v 1.10 2010/09/10 12:27:34 taca Exp $ | |
2 | 2 | |||
3 | DISTNAME= mongrel-1.1.5 | 3 | DISTNAME= mongrel-1.1.5 | |
4 | CATEGORIES= www | 4 | CATEGORIES= www | |
5 | 5 | |||
6 | MAINTAINER= minskim@NetBSD.org | 6 | MAINTAINER= minskim@NetBSD.org | |
7 | HOMEPAGE= http://mongrel.rubyforge.org/ | 7 | HOMEPAGE= http://github.com/fauna/mongrel | |
8 | COMMENT= Fast HTTP library and server for Ruby | 8 | COMMENT= Fast HTTP library and server for Ruby | |
9 | LICENSE= gnu-gpl-v2 OR ruby-license | |||
9 | 10 | |||
10 | DEPENDS+= ${RUBY_PKGPREFIX}-daemons>=1.0.9:../../misc/ruby-daemons | 11 | DEPENDS+= ${RUBY_PKGPREFIX}-daemons>=1.0.3:../../misc/ruby-daemons | |
11 | DEPENDS+= ${RUBY_PKGPREFIX}-gem_plugin>=0.2.3:../../misc/ruby-gem_plugin | 12 | DEPENDS+= ${RUBY_PKGPREFIX}-gem_plugin>=0.2.3:../../misc/ruby-gem_plugin | |
12 | 13 | |||
13 | RUBY_REQD= 1.8.6.110 | 14 | RUBY_REQD= 1.8.6.110 | |
14 | GEM_BUILD= gemspec | |||
15 | 15 | |||
16 | .include "../../misc/rubygems/rubygem.mk" | 16 | .include "../../lang/ruby/gem.mk" | |
17 | .include "../../mk/bsd.pkg.mk" | 17 | .include "../../mk/bsd.pkg.mk" |
@@ -1,6 +1,7 @@ | @@ -1,6 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.4 2008/10/07 05:28:33 minskim Exp $ | 1 | $NetBSD: distinfo,v 1.5 2010/09/10 12:27:34 taca Exp $ | |
2 | 2 | |||
3 | SHA1 (mongrel-1.1.5.gem) = ce2393a56d49c5fcf726c744917b9a37b6daa743 | 3 | SHA1 (mongrel-1.1.5.gem) = ce2393a56d49c5fcf726c744917b9a37b6daa743 | |
4 | RMD160 (mongrel-1.1.5.gem) = d678d5a07e4ae61c28d0174f1c591a261a335056 | 4 | RMD160 (mongrel-1.1.5.gem) = d678d5a07e4ae61c28d0174f1c591a261a335056 | |
5 | Size (mongrel-1.1.5.gem) = 105472 bytes | 5 | Size (mongrel-1.1.5.gem) = 105472 bytes | |
6 | SHA1 (patch-ac) = 427f3865e31bcbebd02fb35f8ffcbbebde78fc37 | 6 | SHA1 (patch-ac) = 5307cdf60bbae90e1f56da8b084dfd160b84b85c | |
7 | SHA1 (patch-ad) = ce004bbaa84b581660e35773e3a1a9e63bcebd4c |
@@ -1,16 +1,21 @@ | @@ -1,16 +1,21 @@ | |||
1 | $NetBSD: patch-ac,v 1.2 2008/10/07 05:28:33 minskim Exp $ | 1 | $NetBSD: patch-ac,v 1.3 2010/09/10 12:27:34 taca Exp $ | |
2 | 2 | |||
3 | --- ../mongrel-1.1.5.gemspec.orig 2008-10-06 22:22:28.000000000 -0700 | 3 | * Remove certificate. (why?) | |
4 | * Remove dependency to fastthread and cgi_multipart_eof_fix and make | |||
5 | minimum Ruby's version to 1.8.6. Since these depending packages aren't | |||
6 | needed by Ruby 1.8.6 at least. | |||
7 | ||||
8 | --- ../mongrel-1.1.5.gemspec.orig 2010-09-07 00:11:11.000000000 +0000 | |||
4 | +++ ../mongrel-1.1.5.gemspec | 9 | +++ ../mongrel-1.1.5.gemspec | |
5 | @@ -7,51 +7,6 @@ authors: | 10 | @@ -7,51 +7,6 @@ authors: | |
6 | - Zed A. Shaw | 11 | - Zed A. Shaw | |
7 | autorequire: | 12 | autorequire: | |
8 | bindir: bin | 13 | bindir: bin | |
9 | -cert_chain: | 14 | -cert_chain: | |
10 | -- | | 15 | -- | | |
11 | - -----BEGIN CERTIFICATE----- | 16 | - -----BEGIN CERTIFICATE----- | |
12 | - MIIDUDCCAjigAwIBAgIBADANBgkqhkiG9w0BAQUFADBOMRwwGgYDVQQDDBNtb25n | 17 | - MIIDUDCCAjigAwIBAgIBADANBgkqhkiG9w0BAQUFADBOMRwwGgYDVQQDDBNtb25n | |
13 | - cmVsLWRldmVsb3BtZW50MRkwFwYKCZImiZPyLGQBGRYJcnVieWZvcmdlMRMwEQYK | 18 | - cmVsLWRldmVsb3BtZW50MRkwFwYKCZImiZPyLGQBGRYJcnVieWZvcmdlMRMwEQYK | |
14 | - CZImiZPyLGQBGRYDb3JnMB4XDTA3MDkxNjEwMzI0OVoXDTA4MDkxNTEwMzI0OVow | 19 | - CZImiZPyLGQBGRYDb3JnMB4XDTA3MDkxNjEwMzI0OVoXDTA4MDkxNTEwMzI0OVow | |
15 | - TjEcMBoGA1UEAwwTbW9uZ3JlbC1kZXZlbG9wbWVudDEZMBcGCgmSJomT8ixkARkW | 20 | - TjEcMBoGA1UEAwwTbW9uZ3JlbC1kZXZlbG9wbWVudDEZMBcGCgmSJomT8ixkARkW | |
16 | - CXJ1Ynlmb3JnZTETMBEGCgmSJomT8ixkARkWA29yZzCCASIwDQYJKoZIhvcNAQEB | 21 | - CXJ1Ynlmb3JnZTETMBEGCgmSJomT8ixkARkWA29yZzCCASIwDQYJKoZIhvcNAQEB | |
@@ -69,22 +74,13 @@ $NetBSD: patch-ac,v 1.2 2008/10/07 05:28 | @@ -69,22 +74,13 @@ $NetBSD: patch-ac,v 1.2 2008/10/07 05:28 | |||
69 | - version: | 74 | - version: | |
70 | -- !ruby/object:Gem::Dependency | 75 | -- !ruby/object:Gem::Dependency | |
71 | - name: cgi_multipart_eof_fix | 76 | - name: cgi_multipart_eof_fix | |
72 | - version_requirement: | 77 | - version_requirement: | |
73 | - version_requirements: !ruby/object:Gem::Requirement | 78 | - version_requirements: !ruby/object:Gem::Requirement | |
74 | - requirements: | 79 | - requirements: | |
75 | - - - ">=" | 80 | - - - ">=" | |
76 | - - !ruby/object:Gem::Version | 81 | - - !ruby/object:Gem::Version | |
77 | - version: "2.4" | 82 | - version: "2.4" | |
78 | - version: | 83 | - version: | |
79 | description: A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps. | 84 | description: A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps. | |
80 | email: "" | 85 | email: "" | |
81 | executables: | 86 | executables: | |
82 | @@ -206,7 +143,7 @@ required_ruby_version: !ruby/object:Gem: | |||
83 | requirements: | |||
84 | - - ">=" | |||
85 | - !ruby/object:Gem::Version | |||
86 | - version: 1.8.4 | |||
87 | + version: 1.8.6 | |||
88 | version: | |||
89 | required_rubygems_version: !ruby/object:Gem::Requirement | |||
90 | requirements: |
$NetBSD: patch-ad,v 1.1 2010/09/10 12:27:34 taca Exp $
Use modern API of Ruby.
--- ext/http11/http11.c.orig 2010-08-29 08:20:01.000000000 +0000
+++ ext/http11/http11.c
@@ -74,7 +74,7 @@ void http_field(void *data, const char *
f = rb_str_dup(global_http_prefix);
f = rb_str_buf_cat(f, field, flen);
- for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
+ for(ch = RSTRING_PTR(f), end = ch + RSTRING_LEN(f); ch < end; ch++) {
if(*ch == '-') {
*ch = '_';
} else {
@@ -169,12 +169,12 @@ void header_done(void *data, const char
rb_hash_aset(req, global_gateway_interface, global_gateway_interface_value);
if((temp = rb_hash_aref(req, global_http_host)) != Qnil) {
/* ruby better close strings off with a '\0' dammit */
- colon = strchr(RSTRING(temp)->ptr, ':');
+ colon = strchr(RSTRING_PTR(temp), ':');
if(colon != NULL) {
- rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr));
+ rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING_PTR(temp)));
rb_hash_aset(req, global_server_port,
- rb_str_substr(temp, colon - RSTRING(temp)->ptr+1,
- RSTRING(temp)->len));
+ rb_str_substr(temp, colon - RSTRING_PTR(temp)+1,
+ RSTRING_LEN(temp)));
} else {
rb_hash_aset(req, global_server_name, temp);
rb_hash_aset(req, global_server_port, global_port_80);
@@ -295,8 +295,8 @@ VALUE HttpParser_execute(VALUE self, VAL
DATA_GET(self, http_parser, http);
from = FIX2INT(start);
- dptr = RSTRING(data)->ptr;
- dlen = RSTRING(data)->len;
+ dptr = RSTRING_PTR(data);
+ dlen = RSTRING_LEN(data);
if(from >= dlen) {
rb_raise(eHttpParserError, "Requested start is after data buffer end.");