[99341] trunk/dports/ruby/rb-rubygems

jmr at macports.org jmr at macports.org
Fri Nov 2 19:28:01 PDT 2012


Revision: 99341
          http://trac.macports.org//changeset/99341
Author:   jmr at macports.org
Date:     2012-11-02 19:28:01 -0700 (Fri, 02 Nov 2012)
Log Message:
-----------
rb-rubygems: fix bypassing destroot

Modified Paths:
--------------
    trunk/dports/ruby/rb-rubygems/Portfile
    trunk/dports/ruby/rb-rubygems/files/patch-lib_rubygems_commands_setup_command.rb.diff

Modified: trunk/dports/ruby/rb-rubygems/Portfile
===================================================================
--- trunk/dports/ruby/rb-rubygems/Portfile	2012-11-02 19:06:07 UTC (rev 99340)
+++ trunk/dports/ruby/rb-rubygems/Portfile	2012-11-03 02:28:01 UTC (rev 99341)
@@ -61,3 +61,12 @@
 if {![variant_isset ruby186] && ![variant_isset ruby19]} {
     default_variants +ruby
 }
+
+# clean up mess from previous portfile that bypassed the destroot
+pre-activate {
+    set docpath "${prefix}/lib/ruby/gems/1.8/doc/rubygems-1.3.7"
+    set adocfile "${docpath}/rdoc/classes/Gem/Builder.html"
+    if {[file exists $adocfile] && [registry_file_registered $adocfile] == "0"} {
+        delete $docpath
+    }
+}

Modified: trunk/dports/ruby/rb-rubygems/files/patch-lib_rubygems_commands_setup_command.rb.diff
===================================================================
--- trunk/dports/ruby/rb-rubygems/files/patch-lib_rubygems_commands_setup_command.rb.diff	2012-11-02 19:06:07 UTC (rev 99340)
+++ trunk/dports/ruby/rb-rubygems/files/patch-lib_rubygems_commands_setup_command.rb.diff	2012-11-03 02:28:01 UTC (rev 99341)
@@ -1,6 +1,15 @@
---- lib/rubygems/commands/setup_command.rb.orig	2009-05-27 16:51:56.000000000 -0600
-+++ lib/rubygems/commands/setup_command.rb	2009-06-24 00:04:37.000000000 -0600
-@@ -259,20 +259,8 @@
+--- lib/rubygems/commands/setup_command.rb.orig	2010-04-20 16:47:36.000000000 +1000
++++ lib/rubygems/commands/setup_command.rb	2012-11-02 20:34:53.000000000 +1100
+@@ -230,7 +230,7 @@
+   end
+ 
+   def install_rdoc
+-    gem_doc_dir = File.join Gem.dir, 'doc'
++    gem_doc_dir = File.join options[:destdir], Gem.dir, 'doc'
+     rubygems_name = "rubygems-#{Gem::VERSION}"
+     rubygems_doc_dir = File.join gem_doc_dir, rubygems_name
+ 
+@@ -270,20 +270,8 @@
        lib_dir = Gem::ConfigMap[site_or_vendor]
        bin_dir = Gem::ConfigMap[:bindir]
      else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121102/c5560b7f/attachment.html>


More information about the macports-changes mailing list