diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-04-10 13:36:29 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-04-10 13:36:29 +0000 |
commit | 180ef443a6e6d8796220bac521339d2285efa84f (patch) | |
tree | 0fd8d1dae525f1411893f84f72b54df104d9776e /textproc/ruby-htmltools/files/patch-install.rb | |
parent | - Update to 0.4 (diff) |
Ruby-htmltools tools for parsing and manipulating HTML text in Ruby.
It can be used for programmatically access outside HTML-pages.
I hope to extend it to become a web-publishing framework in the future.
PR: ports/79432
Submitted by: Alexander Novitsky <alecn2002@yandex.ru>
Notes
Notes:
svn path=/head/; revision=132878
Diffstat (limited to 'textproc/ruby-htmltools/files/patch-install.rb')
-rw-r--r-- | textproc/ruby-htmltools/files/patch-install.rb | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/textproc/ruby-htmltools/files/patch-install.rb b/textproc/ruby-htmltools/files/patch-install.rb new file mode 100644 index 000000000000..7b8c3df0a33a --- /dev/null +++ b/textproc/ruby-htmltools/files/patch-install.rb @@ -0,0 +1,45 @@ +--- install.rb.orig Sun Apr 10 15:32:16 2005 ++++ install.rb Sun Apr 10 15:32:26 2005 +@@ -10,6 +10,8 @@ + # the GNU Lesser General Public License version 2.
+ #
+
++
++
+ ### begin compat.rb
+
+ unless Enumerable.instance_methods(true).include? 'inject' then
+@@ -32,6 +34,13 @@ + end
+
+ ### end compat.rb
++
++class String
++ def begin_with?( substr )
++ index( substr ) == 0
++ end
++end
++
+ ### begin config.rb
+
+ if i = ARGV.index(/\A--rbconfig=/) then
+@@ -308,7 +317,7 @@ + module FileOperations
+
+ def mkdir_p( dname, prefix = nil )
+- dname = prefix + dname if prefix
++ dname = File.join( prefix, dname ) if ( prefix and not dname.begin_with?( prefix ) )
+ $stderr.puts "mkdir -p #{dname}" if verbose?
+ return if no_harm?
+
+@@ -371,7 +380,9 @@ + $stderr.puts "install #{from} #{dest}" if verbose?
+ return if no_harm?
+
+- realdest = prefix + dest if prefix
++ realdest = ( prefix and not dest.begin_with?( prefix ) ) ?
++ prefix + dest :
++ dest
+ if dir? realdest then
+ realdest += '/' + File.basename(from)
+ end
|