diff options
author | tron <tron@pkgsrc.org> | 2013-07-16 19:12:27 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2013-07-16 19:12:27 +0000 |
commit | d8ecbdf7ab6a502de72edf3c91d2b1273795be0a (patch) | |
tree | 4c4a120ee5400d7da7451fb09970d68d44a62b91 | |
parent | 8116197197784ac1862f83ead593b9b0b23fbf98 (diff) | |
download | pkgsrc-d8ecbdf7ab6a502de72edf3c91d2b1273795be0a.tar.gz |
Pullup ticket #4180 - requested by taca
devel/ruby-rdoc: bug fix patch
Revisions pulled up:
- devel/ruby-rdoc/Makefile 1.7
- devel/ruby-rdoc/distinfo 1.12
- devel/ruby-rdoc/patches/patch-lib_rdoc_parser_c.rb 1.1
---
Module Name: pkgsrc
Committed By: taca
Date: Sun Jul 7 15:57:59 UTC 2013
Modified Files:
pkgsrc/devel/ruby-rdoc: Makefile distinfo
Log Message:
Add quick hack to fix runtime problem with Ruby 1.8.7.
Bump PKGREVISION.
---
Module Name: pkgsrc
Committed By: taca
Date: Sun Jul 7 15:58:52 UTC 2013
Added Files:
pkgsrc/devel/ruby-rdoc/patches: patch-lib_rdoc_parser_c.rb
Log Message:
Make sure to add a patch file.
-rw-r--r-- | devel/ruby-rdoc/Makefile | 3 | ||||
-rw-r--r-- | devel/ruby-rdoc/distinfo | 3 | ||||
-rw-r--r-- | devel/ruby-rdoc/patches/patch-lib_rdoc_parser_c.rb | 44 |
3 files changed, 48 insertions, 2 deletions
diff --git a/devel/ruby-rdoc/Makefile b/devel/ruby-rdoc/Makefile index 538a54b0eb9..caa9f46f356 100644 --- a/devel/ruby-rdoc/Makefile +++ b/devel/ruby-rdoc/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.6 2013/06/17 15:27:32 taca Exp $ +# $NetBSD: Makefile,v 1.6.2.1 2013/07/16 19:12:27 tron Exp $ DISTNAME= rdoc-${RUBY_RDOC_VERSION} +PKGREVISION= 1 CATEGORIES= devel MAINTAINER= pkgsrc-users@NetBSD.org diff --git a/devel/ruby-rdoc/distinfo b/devel/ruby-rdoc/distinfo index a834f19308c..53da9d2684c 100644 --- a/devel/ruby-rdoc/distinfo +++ b/devel/ruby-rdoc/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.11 2013/06/11 15:00:18 taca Exp $ +$NetBSD: distinfo,v 1.11.2.1 2013/07/16 19:12:27 tron Exp $ SHA1 (rdoc-4.0.1.gem) = b41e44037be75a7d61fc5f76692d48dae8cb339b RMD160 (rdoc-4.0.1.gem) = 0a1702de20305f8e211ff06a0f82e45d695a4af8 Size (rdoc-4.0.1.gem) = 467456 bytes +SHA1 (patch-lib_rdoc_parser_c.rb) = c63f03341feb4440fa7c07be4619f31302db5372 diff --git a/devel/ruby-rdoc/patches/patch-lib_rdoc_parser_c.rb b/devel/ruby-rdoc/patches/patch-lib_rdoc_parser_c.rb new file mode 100644 index 00000000000..ecf3f574c6f --- /dev/null +++ b/devel/ruby-rdoc/patches/patch-lib_rdoc_parser_c.rb @@ -0,0 +1,44 @@ +$NetBSD: patch-lib_rdoc_parser_c.rb,v 1.1.2.2 2013/07/16 19:12:27 tron Exp $ + +Dirty hack for Ruby 1.8.7. + +--- lib/rdoc/parser/c.rb.orig 2013-07-05 02:21:00.000000000 +0000 ++++ lib/rdoc/parser/c.rb +@@ -729,6 +729,7 @@ class RDoc::Parser::C < RDoc::Parser + def find_class_comment class_name, class_mod + comment = nil + ++ begin + if @content =~ %r% + ((?>/\*.*?\*/\s+)) + (static\s+)? +@@ -747,6 +748,29 @@ class RDoc::Parser::C < RDoc::Parser + else + comment = '' + end ++ rescue RegexpError ++ if RUBY_VERSION == "1.8.7" ++ if @content =~ %r% ++ ((?>/\*.*?\*/\s+)) ++ (static\s+)? ++ void\s+ ++ Init_#{class_name}\s*(?:_\(\s*)?\(\s*(?:void\s*)?\)%xmi then ++ comment = $1.sub(%r%Document-(?:class|module):\s+#{class_name}%, '') ++ elsif @content =~ %r%Document-(?:class|module):\s+#{class_name}\s*? ++ (?:<\s+[:,\w]+)?\n((?>.*?\*/))%xm then ++ comment = "/*\n#{$1}" ++ elsif @content =~ %r%((?>/\*.*?\*/\s+)) ++ ([\w\.\s]+\s* = \s+)?rb_define_(class|module).*?"(#{class_name})"%xm then ++ comment = $1 ++ elsif @content =~ %r%((?>/\*.*?\*/\s+)) ++ ([\w\.\s]+\s* = \s+)?rb_define_(class|module)_under.*?"(#{class_name.split('::').last})"%xm then ++ comment = $1 ++ else ++ comment = '' ++ end ++ end ++ comment = '' ++ end + + comment = RDoc::Comment.new comment, @top_level + comment.normalize |