- Update to 1.0.5

- Add a patch to fix CodeRay API
This commit is contained in:
TAKATSU Tomonari 2012-02-05 05:28:36 +00:00
parent d328ca316c
commit 2eb780ae0a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=290420
7 changed files with 76 additions and 38 deletions

View file

@ -6,10 +6,11 @@
#
PORTNAME= rabbit
PORTVERSION= 1.0.4
PORTVERSION= 1.0.5
CATEGORIES= misc ruby
MASTER_SITES= http://rabbit-shockers.org/download/ \
${MASTER_SITE_LOCAL:S|%SUBDIR%|tota/rabbit|}
LOCAL
MASTER_SITE_SUBDIR= tota/${PORTNAME}
MAINTAINER= tota@FreeBSD.org
COMMENT= An RD-document-based presentation application
@ -23,10 +24,10 @@ RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/gtk2.so:${PORTSDIR}/x11-toolkits/ruby-gtk2 \
hikidoc:${PORTSDIR}/textproc/ruby-hikidoc \
rubygem-nokogiri>0:${PORTSDIR}/textproc/rubygem-nokogiri \
rubygem-sinatra>0:${PORTSDIR}/www/rubygem-sinatra \
rubygem-rack>0:${PORTSDIR}/www/rubygem-rack \
rubygem-haml>0:${PORTSDIR}/www/rubygem-haml \
rd2:${PORTSDIR}/textproc/ruby-rdtool \
rubygem-coderay>0:${PORTSDIR}/textproc/rubygem-coderay
rubygem-coderay>=1.0.0:${PORTSDIR}/textproc/rubygem-coderay \
rubygem-kramdown>0:${PORTSDIR}/textproc/rubygem-kramdown
USE_RUBY= yes
USE_RUBY_SETUP= yes
@ -66,9 +67,11 @@ RUN_DEPENDS+= rubygem-twitter_oauth>=0:${PORTSDIR}/security/rubygem-twitter_oaut
post-patch:
${RM} ${WRKSRC}/bin/rabwii
${RMDIR} ${WRKSRC}/lib/rt
${RUBY} -i -pe 'sub %r|((\s*)require "rack")|, %Q|\\2require "rubygems"\n\\1|' ${WRKSRC}/bin/rabbirack
${RUBY} -i -pe 'sub %r|(require "hikidoc")|, %Q|require "rubygems"\n\\1|' ${WRKSRC}/lib/rabbit/parser/wiki.rb
${RUBY} -i -pe "sub %r|((\s*)require 'twitter_oauth')|, %Q|\\\2require 'rubygems'\n\\\1|" ${WRKSRC}/lib/rabbit/twitter.rb
${RUBY} -i -pe "sub %r|(require 'coderay')|, %Q|require 'rubygems'\n\\\1|" ${WRKSRC}/lib/rabbit/parser/ext/coderay.rb
.if defined(WITH_MIMETEX)
${REINPLACE_CMD} -e 's|"mimetex.cgi"|"${PREFIX}/www/mimetex/cgi-bin/mimetex.cgi"|' \
${WRKSRC}/lib/rabbit/parser/ext/tex.rb

View file

@ -1,2 +1,2 @@
SHA256 (rabbit-1.0.4.tar.gz) = 4f04ffe71a02a6323a66c3b0dd55f07d17c7558dbd346f1b4c6cc72510cb69b9
SIZE (rabbit-1.0.4.tar.gz) = 5891669
SHA256 (rabbit-1.0.5.tar.gz) = 8d10e8affbdf4507e1481f8409dceca3ee43b5ff1beb9476788594782576e44a
SIZE (rabbit-1.0.5.tar.gz) = 5886310

View file

@ -1,11 +0,0 @@
--- lib/rabbit/logger/base.rb.orig 2011-04-29 16:19:39.000000000 +0900
+++ lib/rabbit/logger/base.rb 2011-08-20 18:53:13.000000000 +0900
@@ -65,7 +65,7 @@
log(INFO, message_or_error, &block)
end
- def warn(message_or_error=nil, &block)
+ def warning(message_or_error=nil, &block)
log(WARNING, message_or_error, &block)
end

View file

@ -0,0 +1,64 @@
--- lib/rabbit/parser/ext/coderay.rb.orig 2011-07-16 05:59:37.000000000 +0900
+++ lib/rabbit/parser/ext/coderay.rb 2012-02-05 11:24:16.000000000 +0900
@@ -21,7 +21,7 @@
def setup(options)
super
@out = SyntaxHighlightingBlock.new
- @elements = [@out]
+ @containers = [@out]
end
def text_token(text, type=:plain)
@@ -29,36 +29,39 @@
escaped_text = Escape.escape_meta_character(text)
text_element = SyntaxHighlightingText.new(Text.new(escaped_text))
tag_name = type.to_s.gsub(/_/, '-')
- CustomTag.new("syntax-#{tag_name}", text_element)
+ tag = CustomTag.new("syntax-#{tag_name}", text_element)
+ current_container << tag
end
- def open_token(kind)
- p [:open, kind] if Utils.syntax_highlighting_debug?
- @out = TextContainer.new
- @elements << @out
- CustomTag.new("syntax-#{kind}")
+ def begin_group(kind)
+ p [:begin_group, kind] if Utils.syntax_highlighting_debug?
+ @containers << TextContainer.new
+ tag = CustomTag.new("syntax-#{kind}")
+ current_container << tag
end
def begin_line(kind)
p [:begin_line, kind] if Utils.syntax_highlighting_debug?
- nil
end
def end_line(kind)
p [:end_line, kind] if Utils.syntax_highlighting_debug?
- nil
end
- def close_token(kind)
- p [:close, kind] if Utils.syntax_highlighting_debug?
- block = @elements.pop
- @out = @elements.last
- block
+ def end_group(kind)
+ p [:end_group, kind] if Utils.syntax_highlighting_debug?
+ block = @containers.pop
+ current_container << block
end
def finish(options)
super
end
+
+ private
+ def current_container
+ @containers.last
+ end
end
end
end

View file

@ -1,10 +0,0 @@
--- bin/rabbirack.orig 2011-08-20 22:42:21.000000000 +0900
+++ bin/rabbirack 2011-08-21 03:44:41.000000000 +0900
@@ -90,6 +90,6 @@
else
require "rack"
ARGV.shift if rack_runner == "rackup"
- ARGV.unshift("--option", "config=#{config_ru_path}")
+ ARGV.unshift(":config", "#{config_ru_path}")
Rack::Server.start
end

View file

@ -1,11 +0,0 @@
--- bin/rabbit-command.orig 2011-07-13 20:05:07.000000000 +0900
+++ bin/rabbit-command 2011-08-20 19:22:06.000000000 +0900
@@ -98,7 +98,7 @@
if options.druby_uri_specified
logger.warning(_("--druby-uri is deprecated. Use --rabbit-uri instead."))
end
- rabbit = DRbObject.new_with_uri(options.druby_uri)
+ rabbit = DRbObject.new_with_uri(options.rabbit_uri)
options.commands.each do |output, method, *args|
result = rabbit.send(method, *args)
send(output, result) if output

View file

@ -102,6 +102,8 @@ bin/rabrick
%%RUBY_SITELIBDIR%%/rabbit/parser/ext/inline.rb
%%RUBY_SITELIBDIR%%/rabbit/parser/ext/tex.rb
%%RUBY_SITELIBDIR%%/rabbit/parser/image.rb
%%RUBY_SITELIBDIR%%/rabbit/parser/markdown.rb
%%RUBY_SITELIBDIR%%/rabbit/parser/markdown/converter.rb
%%RUBY_SITELIBDIR%%/rabbit/parser/pause-support.rb
%%RUBY_SITELIBDIR%%/rabbit/parser/pdf.rb
%%RUBY_SITELIBDIR%%/rabbit/parser/rd.rb
@ -530,6 +532,7 @@ bin/rabrick
@dirrm %%RUBY_SITELIBDIR%%/rabbit/parser/rd/rt
@dirrm %%RUBY_SITELIBDIR%%/rabbit/parser/rd/ext
@dirrm %%RUBY_SITELIBDIR%%/rabbit/parser/rd
@dirrm %%RUBY_SITELIBDIR%%/rabbit/parser/markdown
@dirrm %%RUBY_SITELIBDIR%%/rabbit/parser/ext
@dirrm %%RUBY_SITELIBDIR%%/rabbit/parser
@dirrm %%RUBY_SITELIBDIR%%/rabbit/middleware/views