aboutsummaryrefslogtreecommitdiffstats
path: root/www/aswiki
diff options
context:
space:
mode:
authormatusita <matusita@FreeBSD.org>2007-04-27 12:18:18 +0800
committermatusita <matusita@FreeBSD.org>2007-04-27 12:18:18 +0800
commitcf594b3d72876f37455b376021ce6e4e74556d32 (patch)
tree8dc215ca083151224ffd69b5c92d32b52a6d891c /www/aswiki
parent90c4392d4e948d4596e02d61030b5e61b593dc9e (diff)
downloadfreebsd-ports-gnome-cf594b3d72876f37455b376021ce6e4e74556d32.tar.gz
freebsd-ports-gnome-cf594b3d72876f37455b376021ce6e4e74556d32.tar.zst
freebsd-ports-gnome-cf594b3d72876f37455b376021ce6e4e74556d32.zip
Fix to work with ruby-1.8.6,1.
I don't know why, but it seems that the method Digest::MD5.new behavior is changed between 1.8.5 and 1.8.6 (sigh). As usual, bump PORTREVISION. See also: http://myn.meganecco.org/2007041200 (in Japanese) See also: http://svn.ruby-lang.org/repos/ruby/tags/v1_8_6/ChangeLog (MD5 related codes are changed at Mar/06/2007?)
Diffstat (limited to 'www/aswiki')
-rw-r--r--www/aswiki/Makefile2
-rw-r--r--www/aswiki/files/patch-handler.rb29
2 files changed, 30 insertions, 1 deletions
diff --git a/www/aswiki/Makefile b/www/aswiki/Makefile
index b7f6d8dd8eed..3e67f1a63ee1 100644
--- a/www/aswiki/Makefile
+++ b/www/aswiki/Makefile
@@ -7,7 +7,7 @@
PORTNAME= aswiki
PORTVERSION= 1.0.4
-#PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= www ruby
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/www/aswiki/files/patch-handler.rb b/www/aswiki/files/patch-handler.rb
new file mode 100644
index 000000000000..10b40fdff936
--- /dev/null
+++ b/www/aswiki/files/patch-handler.rb
@@ -0,0 +1,29 @@
+--- aswiki/handler.rb.dist Wed Jun 23 10:54:16 2004
++++ aswiki/handler.rb Fri Apr 27 13:09:17 2007
+@@ -138,7 +138,7 @@
+ begin
+ c = @repository.load(name)
+ orig = c.dup
+- if cgi.value('md5sum')[0] != Digest::MD5::new(c.to_s).to_s
++ if cgi.value('md5sum')[0] != Digest::MD5::new.update(c.to_s).to_s
+ bl = body.map{|l| l.sub("\r\n", "\n")}
+ bol = (cgi.value('ebol')[0] or 1).to_i
+ eol = (cgi.value('eeol')[0] or c.size).to_i
+@@ -164,7 +164,7 @@
+ super
+ session = CGI::Session.new(cgi ,{'tmpdir' => $DIR_SESSION}) # XXX
+ if cgi['md5sum'][0] !=
+- Digest::MD5::new(@repository.load(session['pname']).to_s).to_s
++ Digest::MD5::new.update(@repository.load(session['pname']).to_s).to_s
+ raise AsWiki::TimestampMismatch
+ end
+ cgi.params.each{|key, value| session[key] = value}
+@@ -226,7 +226,7 @@
+ c = [true]
+ end
+ pd = AsWiki::PageData.new(pname)
+- pd.md5sum = Digest::MD5::new(c.to_s).to_s
++ pd.md5sum = Digest::MD5::new.update(c.to_s).to_s
+ pd.title = title
+ if body.nil?
+ bol = (cgi.value('ebol')[0] or 1).to_i