summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2013-07-07 15:58:52 +0000
committertaca <taca@pkgsrc.org>2013-07-07 15:58:52 +0000
commite81b48d2158292b36652d611df16cce928026647 (patch)
treebd25f5459ec98f230cd25c4bf6ad399ffd9b9236 /devel
parent428fdb9800f8047667073bb1e5652a7b4b9d6f2b (diff)
downloadpkgsrc-e81b48d2158292b36652d611df16cce928026647.tar.gz
Make sure to add a patch file.
Diffstat (limited to 'devel')
-rw-r--r--devel/ruby-rdoc/patches/patch-lib_rdoc_parser_c.rb44
1 files changed, 44 insertions, 0 deletions
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..aa04e2e1121
--- /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 2013/07/07 15:58:52 taca 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