[68949] trunk/dports/ruby/rb19-cheat
singingwolfboy at macports.org
singingwolfboy at macports.org
Fri Jun 18 09:09:27 PDT 2010
Revision: 68949
http://trac.macports.org/changeset/68949
Author: singingwolfboy at macports.org
Date: 2010-06-18 09:09:24 -0700 (Fri, 18 Jun 2010)
Log Message:
-----------
Patched borked rb19-cheat port
Modified Paths:
--------------
trunk/dports/ruby/rb19-cheat/Portfile
Added Paths:
-----------
trunk/dports/ruby/rb19-cheat/files/
trunk/dports/ruby/rb19-cheat/files/cheat.patch
Modified: trunk/dports/ruby/rb19-cheat/Portfile
===================================================================
--- trunk/dports/ruby/rb19-cheat/Portfile 2010-06-18 15:38:16 UTC (rev 68948)
+++ trunk/dports/ruby/rb19-cheat/Portfile 2010-06-18 16:09:24 UTC (rev 68949)
@@ -4,6 +4,7 @@
PortGroup ruby 1.0
ruby.setup cheat 1.2.1 gem {} rubygems ruby19
+revision 1
description Cheat sheets in your terminal
long_description \
Cheat is a simple command line utility reference program that prints \
@@ -15,3 +16,8 @@
checksums md5 a22937c5c441569138a89b7d55dfe220 \
sha1 30395722979b89290c8566b74f0d2b20cccd4fa4 \
rmd160 2002d036c2c2e037a37f888a56fa92f412f7189d
+
+post-destroot {
+ set gemdir ${destroot}${prefix}/lib/ruby${ruby.prog_suffix}/gems/${ruby.version}/gems/${ruby.project}-${version}/
+ system "cd ${gemdir} && patch -p1 < ${portpath}/files/cheat.patch"
+}
Added: trunk/dports/ruby/rb19-cheat/files/cheat.patch
===================================================================
--- trunk/dports/ruby/rb19-cheat/files/cheat.patch (rev 0)
+++ trunk/dports/ruby/rb19-cheat/files/cheat.patch 2010-06-18 16:09:24 UTC (rev 68949)
@@ -0,0 +1,20 @@
+diff --git a/lib/cheat.rb b/lib/cheat.rb
+index d9f290c..a835e73 100644
+--- a/lib/cheat.rb
++++ b/lib/cheat.rb
+@@ -1,5 +1,6 @@
+ $:.unshift File.dirname(__FILE__)
+ %w[rubygems tempfile fileutils net/http yaml open-uri wrap].each { |f| require f }
++RUBY_PLATFORM = PLATFORM unless defined? RUBY_PLATFORM # Ruby 1.8 compatibility
+
+ module Cheat
+ extend self
+@@ -177,7 +178,7 @@ module Cheat
+ end
+
+ def cache_dir
+- PLATFORM =~ /win32/ ? win32_cache_dir : File.join(File.expand_path("~"), ".cheat")
++ RUBY_PLATFORM =~ /win32/ ? win32_cache_dir : File.join(File.expand_path("~"), ".cheat")
+ end
+
+ def win32_cache_dir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100618/e3e4f111/attachment-0001.html>
More information about the macports-changes
mailing list